From 847fa4451dd67b624a2820402e92ec6385128921 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Thu, 27 Oct 2022 12:06:31 +0000 Subject: [PATCH] chore: regenerate OpenAPI client v2.0.1 --- clients/hydra/dart/.openapi-generator/FILES | 260 +- clients/hydra/dart/.openapi-generator/VERSION | 2 +- clients/hydra/dart/README.md | 218 +- ...quest.md => AcceptOAuth2ConsentRequest.md} | 8 +- ...d => AcceptOAuth2ConsentRequestSession.md} | 2 +- ...Request.md => AcceptOAuth2LoginRequest.md} | 4 +- clients/hydra/dart/doc/AdminApi.md | 1534 ---- clients/hydra/dart/doc/CreateJsonWebKeySet.md | 17 + clients/hydra/dart/doc/ErrorOAuth2.md | 19 + .../doc/FlushInactiveOAuth2TokensRequest.md | 15 - ...KBodyError.md => GetVersion200Response.md} | 4 +- .../hydra/dart/doc/HealthNotReadyStatus.md | 2 +- ...spection.md => IntrospectedOAuth2Token.md} | 6 +- ...ConfigNetwork.md => IsReady200Response.md} | 4 +- ...nConfigRootfs.md => IsReady503Response.md} | 5 +- clients/hydra/dart/doc/JSONWebKeySet.md | 15 - clients/hydra/dart/doc/JsonError.md | 18 - clients/hydra/dart/doc/JsonPatch.md | 18 + .../dart/doc/{JSONWebKey.md => JsonWebKey.md} | 4 +- clients/hydra/dart/doc/JsonWebKeySet.md | 15 + .../dart/doc/JsonWebKeySetGeneratorRequest.md | 17 - clients/hydra/dart/doc/JwkApi.md | 331 + clients/hydra/dart/doc/MetadataApi.md | 103 +- clients/hydra/dart/doc/OAuth2Api.md | 1286 ++++ clients/hydra/dart/doc/OAuth2Client.md | 78 +- .../dart/doc/OAuth2ClientTokenLifespans.md | 24 + ...sentRequest.md => OAuth2ConsentRequest.md} | 10 +- ...uth2ConsentRequestOpenIDConnectContext.md} | 8 +- .../hydra/dart/doc/OAuth2ConsentSession.md | 22 + .../dart/doc/OAuth2ConsentSessionExpiresAt.md | 19 + ...{LoginRequest.md => OAuth2LoginRequest.md} | 8 +- ...ogoutRequest.md => OAuth2LogoutRequest.md} | 2 +- ...ompletedRequest.md => OAuth2RedirectTo.md} | 4 +- clients/hydra/dart/doc/OAuth2TokenExchange.md | 20 + clients/hydra/dart/doc/OidcApi.md | 320 + clients/hydra/dart/doc/OidcConfiguration.md | 43 + .../{UserinfoResponse.md => OidcUserInfo.md} | 2 +- clients/hydra/dart/doc/Pagination.md | 16 + ...2TokenResponse.md => PaginationHeaders.md} | 10 +- clients/hydra/dart/doc/PatchDocument.md | 18 - clients/hydra/dart/doc/PluginConfig.md | 30 - clients/hydra/dart/doc/PluginConfigArgs.md | 18 - .../hydra/dart/doc/PluginConfigInterface.md | 17 - clients/hydra/dart/doc/PluginConfigLinux.md | 17 - clients/hydra/dart/doc/PluginDevice.md | 18 - clients/hydra/dart/doc/PluginEnv.md | 18 - clients/hydra/dart/doc/PluginInterfaceType.md | 17 - clients/hydra/dart/doc/PluginMount.md | 21 - clients/hydra/dart/doc/PluginSettings.md | 18 - .../hydra/dart/doc/PreviousConsentSession.md | 21 - clients/hydra/dart/doc/PublicApi.md | 535 -- ...ejectRequest.md => RejectOAuth2Request.md} | 2 +- .../dart/doc/RequestWasHandledResponse.md | 15 - clients/hydra/dart/doc/TokenPagination.md | 16 + .../hydra/dart/doc/TokenPaginationHeaders.md | 16 + .../doc/TokenPaginationRequestParameters.md | 16 + .../doc/TokenPaginationResponseHeaders.md | 16 + ...erBody.md => TrustOAuth2JwtGrantIssuer.md} | 9 +- ...suer.md => TrustedOAuth2JwtGrantIssuer.md} | 7 +- ....md => TrustedOAuth2JwtGrantJsonWebKey.md} | 2 +- clients/hydra/dart/doc/Volume.md | 23 - clients/hydra/dart/doc/VolumeUsageData.md | 16 - clients/hydra/dart/doc/WellKnown.md | 41 - clients/hydra/dart/doc/WellknownApi.md | 53 + clients/hydra/dart/lib/api.dart | 94 - clients/hydra/dart/lib/api/admin_api.dart | 1895 ----- clients/hydra/dart/lib/api/metadata_api.dart | 60 - clients/hydra/dart/lib/api/public_api.dart | 668 -- clients/hydra/dart/lib/api_util.dart | 31 - clients/hydra/dart/lib/auth/api_key_auth.dart | 33 - clients/hydra/dart/lib/auth/auth.dart | 27 - clients/hydra/dart/lib/auth/basic_auth.dart | 38 - clients/hydra/dart/lib/auth/oauth.dart | 27 - .../lib/model/accept_consent_request.dart | 143 - .../dart/lib/model/accept_login_request.dart | 157 - .../dart/lib/model/completed_request.dart | 67 - .../hydra/dart/lib/model/consent_request.dart | 245 - .../lib/model/consent_request_session.dart | 86 - .../model/container_wait_ok_body_error.dart | 70 - ...flush_inactive_o_auth2_tokens_request.dart | 70 - .../hydra/dart/lib/model/generic_error.dart | 173 - .../lib/model/health_not_ready_status.dart | 71 - .../hydra/dart/lib/model/health_status.dart | 70 - clients/hydra/dart/lib/model/json_error.dart | 115 - .../hydra/dart/lib/model/json_web_key.dart | 287 - .../dart/lib/model/json_web_key_set.dart | 72 - .../json_web_key_set_generator_request.dart | 91 - .../hydra/dart/lib/model/login_request.dart | 168 - .../hydra/dart/lib/model/logout_request.dart | 145 - .../hydra/dart/lib/model/o_auth2_client.dart | 572 -- .../model/o_auth2_token_introspection.dart | 264 - .../dart/lib/model/oauth2_token_response.dart | 139 - .../lib/model/open_id_connect_context.dart | 132 - .../hydra/dart/lib/model/patch_document.dart | 110 - .../hydra/dart/lib/model/plugin_config.dart | 259 - .../dart/lib/model/plugin_config_args.dart | 104 - .../lib/model/plugin_config_interface.dart | 96 - .../dart/lib/model/plugin_config_linux.dart | 93 - .../dart/lib/model/plugin_config_network.dart | 67 - .../dart/lib/model/plugin_config_rootfs.dart | 86 - .../dart/lib/model/plugin_config_user.dart | 85 - .../hydra/dart/lib/model/plugin_device.dart | 104 - clients/hydra/dart/lib/model/plugin_env.dart | 104 - .../dart/lib/model/plugin_interface_type.dart | 91 - .../hydra/dart/lib/model/plugin_mount.dart | 140 - .../hydra/dart/lib/model/plugin_settings.dart | 106 - .../lib/model/previous_consent_session.dart | 158 - .../hydra/dart/lib/model/reject_request.dart | 130 - .../model/request_was_handled_response.dart | 67 - .../model/trust_jwt_grant_issuer_body.dart | 116 - .../dart/lib/model/trusted_json_web_key.dart | 85 - .../lib/model/trusted_jwt_grant_issuer.dart | 160 - .../dart/lib/model/userinfo_response.dart | 340 - clients/hydra/dart/lib/model/version.dart | 70 - clients/hydra/dart/lib/model/volume.dart | 174 - .../dart/lib/model/volume_usage_data.dart | 79 - clients/hydra/dart/lib/model/well_known.dart | 440 -- clients/hydra/dart/lib/ory_hydra_client.dart | 55 + clients/hydra/dart/lib/serializers.dart | 130 - clients/hydra/dart/lib/src/api.dart | 101 + clients/hydra/dart/lib/src/api/jwk_api.dart | 556 ++ .../hydra/dart/lib/src/api/metadata_api.dart | 240 + .../hydra/dart/lib/src/api/o_auth2_api.dart | 2303 ++++++ clients/hydra/dart/lib/src/api/oidc_api.dart | 545 ++ .../hydra/dart/lib/src/api/wellknown_api.dart | 93 + clients/hydra/dart/lib/src/api_util.dart | 77 + .../hydra/dart/lib/src/auth/api_key_auth.dart | 30 + clients/hydra/dart/lib/src/auth/auth.dart | 18 + .../hydra/dart/lib/src/auth/basic_auth.dart | 37 + .../hydra/dart/lib/src/auth/bearer_auth.dart | 26 + clients/hydra/dart/lib/src/auth/oauth.dart | 26 + .../hydra/dart/lib/src/date_serializer.dart | 31 + .../model/accept_o_auth2_consent_request.dart | 202 + ...ccept_o_auth2_consent_request_session.dart | 131 + .../model/accept_o_auth2_login_request.dart | 222 + .../src/model/create_json_web_key_set.dart | 141 + clients/hydra/dart/lib/src/model/date.dart | 70 + .../dart/lib/src/model/error_o_auth2.dart | 185 + .../dart/lib/src/model/generic_error.dart | 242 + .../src/model/get_version200_response.dart | 109 + .../src/model/health_not_ready_status.dart | 110 + .../dart/lib/src/model/health_status.dart | 109 + .../src/model/introspected_o_auth2_token.dart | 356 + .../lib/src/model/is_ready200_response.dart | 109 + .../lib/src/model/is_ready503_response.dart | 110 + .../hydra/dart/lib/src/model/json_patch.dart | 164 + .../dart/lib/src/model/json_web_key.dart | 394 + .../dart/lib/src/model/json_web_key_set.dart | 111 + .../dart/lib/src/model/o_auth2_client.dart | 940 +++ .../model/o_auth2_client_token_lifespans.dart | 280 + .../src/model/o_auth2_consent_request.dart | 334 + ...nsent_request_open_id_connect_context.dart | 187 + .../src/model/o_auth2_consent_session.dart | 240 + .../o_auth2_consent_session_expires_at.dart | 180 + .../lib/src/model/o_auth2_login_request.dart | 246 + .../lib/src/model/o_auth2_logout_request.dart | 204 + .../lib/src/model/o_auth2_redirect_to.dart | 107 + .../lib/src/model/o_auth2_token_exchange.dart | 204 + .../lib/src/model/oidc_configuration.dart | 624 ++ .../dart/lib/src/model/oidc_user_info.dart | 451 ++ .../hydra/dart/lib/src/model/pagination.dart | 130 + .../lib/src/model/pagination_headers.dart | 128 + .../lib/src/model/reject_o_auth2_request.dart | 185 + .../dart/lib/src/model/token_pagination.dart | 130 + .../src/model/token_pagination_headers.dart | 128 + .../token_pagination_request_parameters.dart | 130 + .../token_pagination_response_headers.dart | 128 + .../model/trust_o_auth2_jwt_grant_issuer.dart | 197 + .../trusted_o_auth2_jwt_grant_issuer.dart | 242 + ...rusted_o_auth2_jwt_grant_json_web_key.dart | 128 + clients/hydra/dart/lib/src/model/version.dart | 109 + clients/hydra/dart/lib/src/serializers.dart | 122 + clients/hydra/dart/pubspec.yaml | 16 +- ...o_auth2_consent_request_session_test.dart} | 17 +- ... accept_o_auth2_consent_request_test.dart} | 19 +- ...=> accept_o_auth2_login_request_test.dart} | 17 +- clients/hydra/dart/test/admin_api_test.dart | 325 - .../dart/test/completed_request_test.dart | 26 - .../container_wait_ok_body_error_test.dart | 26 - .../test/create_json_web_key_set_test.dart | 29 + ...rror_test.dart => error_o_auth2_test.dart} | 31 +- ..._inactive_o_auth2_tokens_request_test.dart | 26 - .../hydra/dart/test/generic_error_test.dart | 11 +- .../test/get_version200_response_test.dart | 17 + .../test/health_not_ready_status_test.dart | 11 +- .../hydra/dart/test/health_status_test.dart | 11 +- ...t => introspected_o_auth2_token_test.dart} | 19 +- .../dart/test/is_ready200_response_test.dart | 17 + .../dart/test/is_ready503_response_test.dart | 17 + clients/hydra/dart/test/json_patch_test.dart | 35 + ...on_web_key_set_generator_request_test.dart | 38 - .../dart/test/json_web_key_set_test.dart | 21 +- .../hydra/dart/test/json_web_key_test.dart | 17 +- clients/hydra/dart/test/jwk_api_test.dart | 74 + .../hydra/dart/test/metadata_api_test.dart | 36 +- clients/hydra/dart/test/o_auth2_api_test.dart | 263 + .../hydra/dart/test/o_auth2_client_test.dart | 122 +- .../o_auth2_client_token_lifespans_test.dart | 71 + ...request_open_id_connect_context_test.dart} | 19 +- ...dart => o_auth2_consent_request_test.dart} | 19 +- ...auth2_consent_session_expires_at_test.dart | 36 + ...dart => o_auth2_consent_session_test.dart} | 30 +- ...t.dart => o_auth2_login_request_test.dart} | 19 +- ....dart => o_auth2_logout_request_test.dart} | 17 +- .../dart/test/o_auth2_redirect_to_test.dart | 17 + .../test/o_auth2_token_exchange_test.dart | 47 + .../dart/test/oauth2_token_response_test.dart | 50 - clients/hydra/dart/test/oidc_api_test.dart | 74 + .../dart/test/oidc_configuration_test.dart | 185 + ...nse_test.dart => oidc_user_info_test.dart} | 17 +- .../dart/test/pagination_headers_test.dart | 23 + clients/hydra/dart/test/pagination_test.dart | 23 + .../hydra/dart/test/patch_document_test.dart | 44 - .../dart/test/plugin_config_args_test.dart | 44 - .../test/plugin_config_interface_test.dart | 38 - .../dart/test/plugin_config_linux_test.dart | 38 - .../dart/test/plugin_config_network_test.dart | 26 - .../dart/test/plugin_config_rootfs_test.dart | 32 - .../hydra/dart/test/plugin_config_test.dart | 110 - .../dart/test/plugin_config_user_test.dart | 32 - .../hydra/dart/test/plugin_device_test.dart | 44 - clients/hydra/dart/test/plugin_env_test.dart | 44 - .../dart/test/plugin_interface_type_test.dart | 38 - .../hydra/dart/test/plugin_mount_test.dart | 62 - .../hydra/dart/test/plugin_settings_test.dart | 44 - clients/hydra/dart/test/public_api_test.dart | 127 - ....dart => reject_o_auth2_request_test.dart} | 17 +- .../request_was_handled_response_test.dart | 26 - .../test/token_pagination_headers_test.dart | 23 + ...en_pagination_request_parameters_test.dart | 23 + ...oken_pagination_response_headers_test.dart | 23 + .../dart/test/token_pagination_test.dart | 23 + ... trust_o_auth2_jwt_grant_issuer_test.dart} | 25 +- ...rusted_o_auth2_jwt_grant_issuer_test.dart} | 25 +- ..._o_auth2_jwt_grant_json_web_key_test.dart} | 17 +- clients/hydra/dart/test/version_test.dart | 11 +- clients/hydra/dart/test/volume_test.dart | 73 - .../dart/test/volume_usage_data_test.dart | 32 - clients/hydra/dart/test/well_known_test.dart | 182 - .../hydra/dart/test/wellknown_api_test.dart | 20 + clients/hydra/dotnet/.openapi-generator/FILES | 234 +- clients/hydra/dotnet/Ory.Hydra.Client.sln | 10 +- clients/hydra/dotnet/README.md | 191 +- clients/hydra/dotnet/docs/AdminApi.md | 2554 ------- ....md => HydraAcceptOAuth2ConsentRequest.md} | 4 +- ...HydraAcceptOAuth2ConsentRequestSession.md} | 2 +- ...st.md => HydraAcceptOAuth2LoginRequest.md} | 2 +- .../docs/HydraContainerWaitOKBodyError.md | 11 - .../dotnet/docs/HydraCreateJsonWebKeySet.md | 13 + clients/hydra/dotnet/docs/HydraErrorOAuth2.md | 15 + .../HydraFlushInactiveOAuth2TokensRequest.md | 10 - .../docs/HydraInlineResponse200.md} | 8 +- .../dotnet/docs/HydraInlineResponse2001.md | 10 + ...igNetwork.md => HydraInlineResponse503.md} | 5 +- ...ion.md => HydraIntrospectedOAuth2Token.md} | 6 +- .../hydra/dotnet/docs/HydraJSONWebKeySet.md | 11 - clients/hydra/dotnet/docs/HydraJsonError.md | 14 - clients/hydra/dotnet/docs/HydraJsonPatch.md | 14 + ...{HydraJSONWebKey.md => HydraJsonWebKey.md} | 3 +- .../hydra/dotnet/docs/HydraJsonWebKeySet.md | 11 + .../HydraJsonWebKeySetGeneratorRequest.md | 12 - .../hydra/dotnet/docs/HydraOAuth2Client.md | 63 +- .../docs/HydraOAuth2ClientTokenLifespans.md | 20 + ...equest.md => HydraOAuth2ConsentRequest.md} | 4 +- ...uth2ConsentRequestOpenIDConnectContext.md} | 4 +- .../dotnet/docs/HydraOAuth2ConsentSession.md | 18 + .../HydraOAuth2ConsentSessionExpiresAt.md | 14 + ...nRequest.md => HydraOAuth2LoginRequest.md} | 4 +- ...Request.md => HydraOAuth2LogoutRequest.md} | 2 +- ...tedRequest.md => HydraOAuth2RedirectTo.md} | 5 +- .../dotnet/docs/HydraOAuth2TokenExchange.md | 16 + .../dotnet/docs/HydraOauth2TokenResponse.md | 16 - .../dotnet/docs/HydraOidcConfiguration.md | 39 + ...erinfoResponse.md => HydraOidcUserInfo.md} | 4 +- clients/hydra/dotnet/docs/HydraPagination.md | 11 + .../dotnet/docs/HydraPaginationHeaders.md | 11 + .../hydra/dotnet/docs/HydraPatchDocument.md | 14 - .../hydra/dotnet/docs/HydraPluginConfig.md | 25 - .../dotnet/docs/HydraPluginConfigArgs.md | 14 - .../dotnet/docs/HydraPluginConfigInterface.md | 13 - .../dotnet/docs/HydraPluginConfigLinux.md | 13 - .../dotnet/docs/HydraPluginConfigRootfs.md | 12 - .../dotnet/docs/HydraPluginConfigUser.md | 12 - .../hydra/dotnet/docs/HydraPluginDevice.md | 14 - clients/hydra/dotnet/docs/HydraPluginEnv.md | 14 - .../dotnet/docs/HydraPluginInterfaceType.md | 13 - clients/hydra/dotnet/docs/HydraPluginMount.md | 17 - .../hydra/dotnet/docs/HydraPluginSettings.md | 13 - .../docs/HydraPreviousConsentSession.md | 17 - ...Request.md => HydraRejectOAuth2Request.md} | 2 +- .../docs/HydraRequestWasHandledResponse.md | 10 - .../hydra/dotnet/docs/HydraTokenPagination.md | 11 + .../docs/HydraTokenPaginationHeaders.md | 11 + .../HydraTokenPaginationRequestParameters.md | 12 + .../HydraTokenPaginationResponseHeaders.md | 12 + ...y.md => HydraTrustOAuth2JwtGrantIssuer.md} | 8 +- ...md => HydraTrustedOAuth2JwtGrantIssuer.md} | 6 +- ...> HydraTrustedOAuth2JwtGrantJsonWebKey.md} | 3 +- clients/hydra/dotnet/docs/HydraVolume.md | 19 - .../hydra/dotnet/docs/HydraVolumeUsageData.md | 12 - clients/hydra/dotnet/docs/HydraWellKnown.md | 37 - clients/hydra/dotnet/docs/JwkApi.md | 529 ++ clients/hydra/dotnet/docs/MetadataApi.md | 165 +- clients/hydra/dotnet/docs/OAuth2Api.md | 2102 ++++++ clients/hydra/dotnet/docs/OidcApi.md | 520 ++ clients/hydra/dotnet/docs/PublicApi.md | 886 --- clients/hydra/dotnet/docs/WellknownApi.md | 77 + .../Api/AdminApiTests.cs | 475 -- .../Ory.Hydra.Client.Test/Api/JwkApiTests.cs | 146 + .../Api/MetadataApiTests.cs | 38 +- .../Api/OAuth2ApiTests.cs | 407 ++ .../Ory.Hydra.Client.Test/Api/OidcApiTests.cs | 138 + .../Api/PublicApiTests.cs | 196 - .../Api/WellknownApiTests.cs | 69 + ...AcceptOAuth2ConsentRequestSessionTests.cs} | 29 +- ...> HydraAcceptOAuth2ConsentRequestTests.cs} | 29 +- ... => HydraAcceptOAuth2LoginRequestTests.cs} | 29 +- ...ts.cs => HydraCreateJsonWebKeySetTests.cs} | 29 +- ...ErrorTests.cs => HydraErrorOAuth2Tests.cs} | 37 +- ...raFlushInactiveOAuth2TokensRequestTests.cs | 70 - .../Model/HydraGenericErrorTests.cs | 7 +- .../Model/HydraHealthNotReadyStatusTests.cs | 7 +- .../Model/HydraHealthStatusTests.cs | 7 +- ...sts.cs => HydraInlineResponse2001Tests.cs} | 35 +- ...ests.cs => HydraInlineResponse200Tests.cs} | 35 +- .../Model/HydraInlineResponse503Tests.cs | 71 + ...s => HydraIntrospectedOAuth2TokenTests.cs} | 29 +- ...ocumentTests.cs => HydraJsonPatchTests.cs} | 29 +- ...SetTests.cs => HydraJsonWebKeySetTests.cs} | 29 +- ...WebKeyTests.cs => HydraJsonWebKeyTests.cs} | 29 +- .../Model/HydraOAuth2ClientTests.cs | 87 +- .../HydraOAuth2ClientTokenLifespansTests.cs | 143 + ...onsentRequestOpenIDConnectContextTests.cs} | 29 +- ...s.cs => HydraOAuth2ConsentRequestTests.cs} | 29 +- ...HydraOAuth2ConsentSessionExpiresAtTests.cs | 103 + ...s.cs => HydraOAuth2ConsentSessionTests.cs} | 37 +- ...sts.cs => HydraOAuth2LoginRequestTests.cs} | 29 +- ...ts.cs => HydraOAuth2LogoutRequestTests.cs} | 29 +- ...Tests.cs => HydraOAuth2RedirectToTests.cs} | 29 +- ...ts.cs => HydraOAuth2TokenExchangeTests.cs} | 29 +- ...ests.cs => HydraOidcConfigurationTests.cs} | 45 +- ...onseTests.cs => HydraOidcUserInfoTests.cs} | 29 +- ...ests.cs => HydraPaginationHeadersTests.cs} | 41 +- ...RootfsTests.cs => HydraPaginationTests.cs} | 41 +- .../Model/HydraPluginConfigArgsTests.cs | 94 - .../Model/HydraPluginConfigInterfaceTests.cs | 86 - .../Model/HydraPluginConfigLinuxTests.cs | 86 - .../Model/HydraPluginConfigTests.cs | 190 - .../Model/HydraPluginDeviceTests.cs | 94 - .../Model/HydraPluginEnvTests.cs | 94 - .../Model/HydraPluginInterfaceTypeTests.cs | 86 - .../Model/HydraPluginMountTests.cs | 118 - .../Model/HydraPluginSettingsTests.cs | 94 - ...ts.cs => HydraRejectOAuth2RequestTests.cs} | 29 +- .../HydraRequestWasHandledResponseTests.cs | 70 - .../Model/HydraTokenPaginationHeadersTests.cs | 79 + ...raTokenPaginationRequestParametersTests.cs | 79 + ...ydraTokenPaginationResponseHeadersTests.cs | 79 + ...rTests.cs => HydraTokenPaginationTests.cs} | 41 +- ...=> HydraTrustOAuth2JwtGrantIssuerTests.cs} | 37 +- ... HydraTrustedOAuth2JwtGrantIssuerTests.cs} | 37 +- ...raTrustedOAuth2JwtGrantJsonWebKeyTests.cs} | 29 +- .../Model/HydraVersionTests.cs | 7 +- .../Model/HydraVolumeTests.cs | 134 - .../src/Ory.Hydra.Client/Api/AdminApi.cs | 6461 ----------------- .../dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs | 1516 ++++ .../src/Ory.Hydra.Client/Api/MetadataApi.cs | 392 +- .../src/Ory.Hydra.Client/Api/OAuth2Api.cs | 5474 ++++++++++++++ .../src/Ory.Hydra.Client/Api/OidcApi.cs | 1408 ++++ .../src/Ory.Hydra.Client/Api/PublicApi.cs | 2307 ------ .../src/Ory.Hydra.Client/Api/WellknownApi.cs | 316 + .../src/Ory.Hydra.Client/Client/ApiClient.cs | 7 +- .../Ory.Hydra.Client/Client/ApiException.cs | 7 +- .../Ory.Hydra.Client/Client/ApiResponse.cs | 7 +- .../Ory.Hydra.Client/Client/ClientUtils.cs | 7 +- .../Ory.Hydra.Client/Client/Configuration.cs | 15 +- .../Client/ExceptionFactory.cs | 7 +- .../Client/GlobalConfiguration.cs | 7 +- .../src/Ory.Hydra.Client/Client/HttpMethod.cs | 7 +- .../Ory.Hydra.Client/Client/IApiAccessor.cs | 7 +- .../Client/IAsynchronousClient.cs | 7 +- .../Client/IReadableConfiguration.cs | 7 +- .../Client/ISynchronousClient.cs | 7 +- .../src/Ory.Hydra.Client/Client/Multimap.cs | 7 +- .../Client/OpenAPIDateConverter.cs | 7 +- .../Ory.Hydra.Client/Client/RequestOptions.cs | 7 +- .../Client/RetryConfiguration.cs | 7 +- .../Model/AbstractOpenAPISchema.cs | 7 +- ....cs => HydraAcceptOAuth2ConsentRequest.cs} | 29 +- ...HydraAcceptOAuth2ConsentRequestSession.cs} | 31 +- ...st.cs => HydraAcceptOAuth2LoginRequest.cs} | 35 +- ...Request.cs => HydraCreateJsonWebKeySet.cs} | 55 +- ...{HydraJsonError.cs => HydraErrorOAuth2.cs} | 70 +- .../HydraFlushInactiveOAuth2TokensRequest.cs | 142 - .../Model/HydraGenericError.cs | 9 +- .../Model/HydraHealthNotReadyStatus.cs | 7 +- .../Model/HydraHealthStatus.cs | 7 +- ...onfigUser.cs => HydraInlineResponse200.cs} | 66 +- ...odyError.cs => HydraInlineResponse2001.cs} | 51 +- ...igNetwork.cs => HydraInlineResponse503.cs} | 64 +- ...ion.cs => HydraIntrospectedOAuth2Token.cs} | 38 +- ...ydraPatchDocument.cs => HydraJsonPatch.cs} | 59 +- ...{HydraJSONWebKey.cs => HydraJsonWebKey.cs} | 39 +- ...JSONWebKeySet.cs => HydraJsonWebKeySet.cs} | 35 +- .../Model/HydraOAuth2Client.cs | 431 +- .../Model/HydraOAuth2ClientTokenLifespans.cs | 384 + ...equest.cs => HydraOAuth2ConsentRequest.cs} | 37 +- ...uth2ConsentRequestOpenIDConnectContext.cs} | 34 +- ...ession.cs => HydraOAuth2ConsentSession.cs} | 61 +- ... => HydraOAuth2ConsentSessionExpiresAt.cs} | 107 +- ...nRequest.cs => HydraOAuth2LoginRequest.cs} | 45 +- ...Request.cs => HydraOAuth2LogoutRequest.cs} | 27 +- ...tedRequest.cs => HydraOAuth2RedirectTo.cs} | 39 +- .../Model/HydraOAuth2TokenExchange.cs | 226 + ...WellKnown.cs => HydraOidcConfiguration.cs} | 257 +- ...erinfoResponse.cs => HydraOidcUserInfo.cs} | 27 +- .../Ory.Hydra.Client/Model/HydraPagination.cs | 171 + ...figRootfs.cs => HydraPaginationHeaders.cs} | 76 +- .../Model/HydraPluginConfig.cs | 468 -- .../Model/HydraPluginConfigArgs.cs | 225 - .../Model/HydraPluginConfigInterface.cs | 197 - .../Model/HydraPluginConfigLinux.cs | 194 - .../Model/HydraPluginDevice.cs | 224 - .../Ory.Hydra.Client/Model/HydraPluginEnv.cs | 224 - .../Model/HydraPluginInterfaceType.cs | 200 - .../Model/HydraPluginMount.cs | 294 - .../Model/HydraPluginSettings.cs | 227 - ...Request.cs => HydraRejectOAuth2Request.cs} | 27 +- .../Model/HydraRequestWasHandledResponse.cs | 154 - .../Model/HydraTokenPagination.cs | 171 + .../Model/HydraTokenPaginationHeaders.cs | 162 + .../HydraTokenPaginationRequestParameters.cs | 171 + .../HydraTokenPaginationResponseHeaders.cs | 158 + ...y.cs => HydraTrustOAuth2JwtGrantIssuer.cs} | 62 +- ...cs => HydraTrustedOAuth2JwtGrantIssuer.cs} | 44 +- ...> HydraTrustedOAuth2JwtGrantJsonWebKey.cs} | 27 +- .../Ory.Hydra.Client/Model/HydraVersion.cs | 7 +- .../src/Ory.Hydra.Client/Model/HydraVolume.cs | 327 - .../Model/HydraVolumeUsageData.cs | 161 - .../Ory.Hydra.Client/Ory.Hydra.Client.csproj | 2 +- clients/hydra/elixir/.formatter.exs | 3 + clients/hydra/elixir/.openapi-generator/FILES | 76 +- .../hydra/elixir/.openapi-generator/VERSION | 2 +- clients/hydra/elixir/README.md | 4 +- clients/hydra/elixir/config/config.exs | 37 +- clients/hydra/elixir/config/runtime.exs | 12 + clients/hydra/elixir/lib/ory/api/admin.ex | 1079 --- clients/hydra/elixir/lib/ory/api/jwk.ex | 219 + clients/hydra/elixir/lib/ory/api/metadata.ex | 66 +- clients/hydra/elixir/lib/ory/api/o_auth2.ex | 881 +++ clients/hydra/elixir/lib/ory/api/oidc.ex | 203 + clients/hydra/elixir/lib/ory/api/public.ex | 352 - clients/hydra/elixir/lib/ory/api/wellknown.ex | 39 + clients/hydra/elixir/lib/ory/connection.ex | 20 +- .../lib/ory/model/accept_consent_request.ex | 37 - .../lib/ory/model/accept_login_request.ex | 37 - .../model/accept_o_auth2_consent_request.ex | 37 + .../accept_o_auth2_consent_request_session.ex | 30 + .../ory/model/accept_o_auth2_login_request.ex | 39 + .../elixir/lib/ory/model/consent_request.ex | 52 - ...dy_error.ex => create_json_web_key_set.ex} | 14 +- .../elixir/lib/ory/model/error_o_auth2.ex | 33 + .../elixir/lib/ory/model/generic_error.ex | 36 +- ...esponse.ex => get_version_200_response.ex} | 8 +- .../lib/ory/model/health_not_ready_status.ex | 4 +- .../elixir/lib/ory/model/health_status.ex | 4 +- .../ory/model/introspected_o_auth2_token.ex | 53 + ...ed_request.ex => is_ready_200_response.ex} | 8 +- ...ns_request.ex => is_ready_503_response.ex} | 8 +- .../hydra/elixir/lib/ory/model/json_error.ex | 31 - .../hydra/elixir/lib/ory/model/json_patch.ex | 33 + .../elixir/lib/ory/model/json_web_key.ex | 70 +- .../elixir/lib/ory/model/json_web_key_set.ex | 8 +- .../json_web_key_set_generator_request.ex | 29 - .../elixir/lib/ory/model/login_request.ex | 44 - .../elixir/lib/ory/model/logout_request.ex | 37 - .../elixir/lib/ory/model/o_auth2_client.ex | 167 +- .../model/o_auth2_client_token_lifespans.ex | 43 + .../lib/ory/model/o_auth2_consent_request.ex | 53 + ...consent_request_open_id_connect_context.ex | 35 + .../lib/ory/model/o_auth2_consent_session.ex | 43 + .../o_auth2_consent_session_expires_at.ex | 33 + .../lib/ory/model/o_auth2_login_request.ex | 44 + .../lib/ory/model/o_auth2_logout_request.ex | 37 + ...uest_session.ex => o_auth2_redirect_to.ex} | 12 +- .../lib/ory/model/o_auth2_token_exchange.ex | 35 + .../ory/model/o_auth2_token_introspection.ex | 51 - .../lib/ory/model/oauth2_token_response.ex | 35 - .../lib/ory/model/oidc_configuration.ex | 81 + .../elixir/lib/ory/model/oidc_user_info.ex | 61 + .../lib/ory/model/open_id_connect_context.ex | 33 - ...{trusted_json_web_key.ex => pagination.ex} | 12 +- .../lib/ory/model/pagination_headers.ex | 27 + .../elixir/lib/ory/model/patch_document.ex | 31 - .../elixir/lib/ory/model/plugin_config.ex | 64 - .../lib/ory/model/plugin_config_args.ex | 31 - .../lib/ory/model/plugin_config_interface.ex | 31 - .../lib/ory/model/plugin_config_linux.ex | 31 - .../lib/ory/model/plugin_config_network.ex | 25 - .../lib/ory/model/plugin_config_rootfs.ex | 27 - .../lib/ory/model/plugin_config_user.ex | 27 - .../elixir/lib/ory/model/plugin_device.ex | 31 - .../hydra/elixir/lib/ory/model/plugin_env.ex | 31 - .../lib/ory/model/plugin_interface_type.ex | 29 - .../elixir/lib/ory/model/plugin_mount.ex | 37 - .../elixir/lib/ory/model/plugin_settings.ex | 34 - .../lib/ory/model/previous_consent_session.ex | 40 - .../lib/ory/model/reject_o_auth2_request.ex | 33 + .../elixir/lib/ory/model/reject_request.ex | 33 - .../elixir/lib/ory/model/token_pagination.ex | 27 + .../lib/ory/model/token_pagination_headers.ex | 27 + .../token_pagination_request_parameters.ex | 27 + .../token_pagination_response_headers.ex | 27 + .../ory/model/trust_jwt_grant_issuer_body.ex | 35 - .../model/trust_o_auth2_jwt_grant_issuer.ex | 37 + .../lib/ory/model/trusted_jwt_grant_issuer.ex | 39 - .../model/trusted_o_auth2_jwt_grant_issuer.ex | 41 + .../trusted_o_auth2_jwt_grant_json_web_key.ex | 27 + .../elixir/lib/ory/model/userinfo_response.ex | 61 - clients/hydra/elixir/lib/ory/model/version.ex | 4 +- clients/hydra/elixir/lib/ory/model/volume.ex | 43 - .../elixir/lib/ory/model/volume_usage_data.ex | 27 - .../hydra/elixir/lib/ory/model/well_known.ex | 77 - clients/hydra/elixir/mix.exs | 22 +- clients/hydra/elixir/mix.lock | 8 +- clients/hydra/go/.openapi-generator/FILES | 152 +- clients/hydra/go/.openapi-generator/VERSION | 2 +- clients/hydra/go/README.md | 186 +- clients/hydra/go/api/openapi.yaml | 5604 +++++++------- clients/hydra/go/api_admin.go | 5232 ------------- clients/hydra/go/api_jwk.go | 951 +++ clients/hydra/go/api_metadata.go | 390 +- clients/hydra/go/api_o_auth2.go | 4047 +++++++++++ clients/hydra/go/api_oidc.go | 1002 +++ clients/hydra/go/api_public.go | 1771 ----- clients/hydra/go/api_wellknown.go | 151 + clients/hydra/go/client.go | 88 +- clients/hydra/go/configuration.go | 13 +- ...quest.md => AcceptOAuth2ConsentRequest.md} | 64 +- .../docs/AcceptOAuth2ConsentRequestSession.md | 102 + ...Request.md => AcceptOAuth2LoginRequest.md} | 80 +- clients/hydra/go/docs/AdminApi.md | 2356 ------ .../hydra/go/docs/ConsentRequestSession.md | 82 - .../hydra/go/docs/ContainerWaitOKBodyError.md | 56 - clients/hydra/go/docs/CreateJsonWebKeySet.md | 93 + .../go/docs/{JsonError.md => ErrorOAuth2.md} | 80 +- .../docs/FlushInactiveOAuth2TokensRequest.md | 56 - clients/hydra/go/docs/GenericError.md | 18 +- .../hydra/go/docs/GetVersion200Response.md | 56 + ...spection.md => IntrospectedOAuth2Token.md} | 124 +- clients/hydra/go/docs/IsReady200Response.md | 56 + clients/hydra/go/docs/IsReady503Response.md | 56 + .../docs/{PatchDocument.md => JsonPatch.md} | 60 +- .../go/docs/{JSONWebKey.md => JsonWebKey.md} | 142 +- .../{JSONWebKeySet.md => JsonWebKeySet.md} | 24 +- .../go/docs/JsonWebKeySetGeneratorRequest.md | 93 - clients/hydra/go/docs/JwkApi.md | 516 ++ clients/hydra/go/docs/MetadataApi.md | 144 +- clients/hydra/go/docs/OAuth2Api.md | 1936 +++++ clients/hydra/go/docs/OAuth2Client.md | 346 +- .../go/docs/OAuth2ClientTokenLifespans.md | 290 + ...sentRequest.md => OAuth2ConsentRequest.md} | 130 +- ...uth2ConsentRequestOpenIDConnectContext.md} | 54 +- ...sentSession.md => OAuth2ConsentSession.md} | 104 +- .../go/docs/OAuth2ConsentSessionExpiresAt.md | 160 + ...{LoginRequest.md => OAuth2LoginRequest.md} | 74 +- ...ogoutRequest.md => OAuth2LogoutRequest.md} | 62 +- ...ompletedRequest.md => OAuth2RedirectTo.md} | 22 +- ...okenResponse.md => OAuth2TokenExchange.md} | 74 +- clients/hydra/go/docs/OidcApi.md | 472 ++ clients/hydra/go/docs/OidcConfiguration.md | 739 ++ .../{UserinfoResponse.md => OidcUserInfo.md} | 166 +- clients/hydra/go/docs/Pagination.md | 82 + clients/hydra/go/docs/PaginationHeaders.md | 82 + clients/hydra/go/docs/PluginConfig.md | 381 - clients/hydra/go/docs/PluginConfigArgs.md | 114 - .../hydra/go/docs/PluginConfigInterface.md | 98 - clients/hydra/go/docs/PluginConfigLinux.md | 93 - clients/hydra/go/docs/PluginConfigNetwork.md | 51 - clients/hydra/go/docs/PluginConfigRootfs.md | 82 - clients/hydra/go/docs/PluginConfigUser.md | 82 - clients/hydra/go/docs/PluginDevice.md | 114 - clients/hydra/go/docs/PluginEnv.md | 114 - clients/hydra/go/docs/PluginInterfaceType.md | 93 - clients/hydra/go/docs/PluginMount.md | 177 - clients/hydra/go/docs/PluginSettings.md | 114 - clients/hydra/go/docs/PublicApi.md | 796 -- ...ejectRequest.md => RejectOAuth2Request.md} | 54 +- .../go/docs/RequestWasHandledResponse.md | 51 - clients/hydra/go/docs/TokenPagination.md | 82 + .../hydra/go/docs/TokenPaginationHeaders.md | 82 + .../docs/TokenPaginationRequestParameters.md | 82 + .../go/docs/TokenPaginationResponseHeaders.md | 82 + .../hydra/go/docs/TrustJwtGrantIssuerBody.md | 135 - .../go/docs/TrustOAuth2JwtGrantIssuer.md | 166 + ...suer.md => TrustedOAuth2JwtGrantIssuer.md} | 98 +- ....md => TrustedOAuth2JwtGrantJsonWebKey.md} | 30 +- clients/hydra/go/docs/Volume.md | 234 - clients/hydra/go/docs/VolumeUsageData.md | 72 - clients/hydra/go/docs/WellKnown.md | 697 -- clients/hydra/go/docs/WellknownApi.md | 70 + clients/hydra/go/git_push.sh | 7 +- clients/hydra/go/go.mod | 4 +- clients/hydra/go/go.sum | 359 +- ...> model_accept_o_auth2_consent_request.go} | 105 +- ..._accept_o_auth2_consent_request_session.go | 156 + ... => model_accept_o_auth2_login_request.go} | 120 +- clients/hydra/go/model_completed_request.go | 109 - .../hydra/go/model_consent_request_session.go | 153 - .../go/model_container_wait_ok_body_error.go | 116 - .../hydra/go/model_create_json_web_key_set.go | 170 + ...l_json_error.go => model_error_o_auth2.go} | 128 +- ...l_flush_inactive_o_auth2_tokens_request.go | 117 - clients/hydra/go/model_generic_error.go | 34 +- .../go/model_get_version_200_response.go | 117 + .../hydra/go/model_health_not_ready_status.go | 13 +- clients/hydra/go/model_health_status.go | 13 +- ...go => model_introspected_o_auth2_token.go} | 163 +- .../hydra/go/model_is_ready_200_response.go | 117 + .../hydra/go/model_is_ready_503_response.go | 117 + ..._patch_document.go => model_json_patch.go} | 104 +- clients/hydra/go/model_json_web_key.go | 187 +- clients/hydra/go/model_json_web_key_set.go | 67 +- ...odel_json_web_key_set_generator_request.go | 169 - clients/hydra/go/model_o_auth2_client.go | 474 +- .../model_o_auth2_client_token_lifespans.go | 450 ++ ...st.go => model_o_auth2_consent_request.go} | 174 +- ...onsent_request_open_id_connect_context.go} | 91 +- ...on.go => model_o_auth2_consent_session.go} | 159 +- ...odel_o_auth2_consent_session_expires_at.go | 261 + ...uest.go => model_o_auth2_login_request.go} | 129 +- ...est.go => model_o_auth2_logout_request.go} | 99 +- clients/hydra/go/model_o_auth2_redirect_to.go | 110 + ...nse.go => model_o_auth2_token_exchange.go} | 117 +- ...l_known.go => model_oidc_configuration.go} | 381 +- ...fo_response.go => model_oidc_user_info.go} | 203 +- clients/hydra/go/model_pagination.go | 162 + clients/hydra/go/model_pagination_headers.go | 154 + clients/hydra/go/model_plugin_config.go | 574 -- clients/hydra/go/model_plugin_config_args.go | 199 - .../hydra/go/model_plugin_config_interface.go | 176 - .../hydra/go/model_plugin_config_linux_.go | 169 - .../hydra/go/model_plugin_config_network.go | 109 - .../hydra/go/model_plugin_config_rootfs.go | 153 - clients/hydra/go/model_plugin_config_user.go | 153 - clients/hydra/go/model_plugin_device.go | 199 - clients/hydra/go/model_plugin_env.go | 199 - .../hydra/go/model_plugin_interface_type.go | 169 - clients/hydra/go/model_plugin_mount.go | 289 - clients/hydra/go/model_plugin_settings.go | 199 - ...est.go => model_reject_o_auth2_request.go} | 91 +- .../go/model_request_was_handled_response.go | 109 - clients/hydra/go/model_token_pagination.go | 162 + .../go/model_token_pagination_headers.go | 154 + ...del_token_pagination_request_parameters.go | 162 + ...model_token_pagination_response_headers.go | 154 + .../go/model_trust_jwt_grant_issuer_body.go | 229 - .../model_trust_o_auth2_jwt_grant_issuer.go | 274 + ...model_trusted_o_auth2_jwt_grant_issuer.go} | 150 +- ...trusted_o_auth2_jwt_grant_json_web_key.go} | 67 +- clients/hydra/go/model_version.go | 13 +- clients/hydra/go/model_volume.go | 369 - clients/hydra/go/model_volume_usage_data.go | 139 - clients/hydra/go/response.go | 15 +- clients/hydra/go/utils.go | 13 +- .../hydra/java/.github/workflows/maven.yml | 30 + clients/hydra/java/.openapi-generator/FILES | 236 +- clients/hydra/java/.openapi-generator/VERSION | 2 +- clients/hydra/java/README.md | 198 +- clients/hydra/java/api/openapi.yaml | 5778 +++++++-------- clients/hydra/java/build.gradle | 41 +- clients/hydra/java/build.sbt | 20 +- .../hydra/java/docs/AcceptConsentRequest.md | 18 - clients/hydra/java/docs/AcceptLoginRequest.md | 19 - .../java/docs/AcceptOAuth2ConsentRequest.md | 18 + .../docs/AcceptOAuth2ConsentRequestSession.md | 14 + .../java/docs/AcceptOAuth2LoginRequest.md | 19 + clients/hydra/java/docs/AdminApi.md | 2248 ------ clients/hydra/java/docs/CompletedRequest.md | 13 - clients/hydra/java/docs/ConsentRequest.md | 25 - .../hydra/java/docs/ConsentRequestSession.md | 14 - .../java/docs/ContainerWaitOKBodyError.md | 14 - .../hydra/java/docs/CreateJsonWebKeySet.md | 16 + clients/hydra/java/docs/ErrorOAuth2.md | 18 + .../docs/FlushInactiveOAuth2TokensRequest.md | 13 - clients/hydra/java/docs/GenericError.md | 20 +- .../hydra/java/docs/GetVersion200Response.md | 13 + .../hydra/java/docs/HealthNotReadyStatus.md | 6 +- clients/hydra/java/docs/HealthStatus.md | 6 +- .../java/docs/IntrospectedOAuth2Token.md | 27 + clients/hydra/java/docs/IsReady200Response.md | 13 + clients/hydra/java/docs/IsReady503Response.md | 13 + clients/hydra/java/docs/JSONWebKey.md | 30 - clients/hydra/java/docs/JSONWebKeySet.md | 14 - clients/hydra/java/docs/JsonError.md | 17 - clients/hydra/java/docs/JsonPatch.md | 17 + clients/hydra/java/docs/JsonWebKey.md | 29 + clients/hydra/java/docs/JsonWebKeySet.md | 14 + .../docs/JsonWebKeySetGeneratorRequest.md | 15 - clients/hydra/java/docs/JwkApi.md | 466 ++ clients/hydra/java/docs/LoginRequest.md | 21 - clients/hydra/java/docs/LogoutRequest.md | 18 - clients/hydra/java/docs/MetadataApi.md | 147 +- clients/hydra/java/docs/OAuth2Api.md | 1858 +++++ clients/hydra/java/docs/OAuth2Client.md | 85 +- .../java/docs/OAuth2ClientTokenLifespans.md | 23 + .../hydra/java/docs/OAuth2ConsentRequest.md | 25 + ...Auth2ConsentRequestOpenIDConnectContext.md | 17 + .../hydra/java/docs/OAuth2ConsentSession.md | 21 + .../docs/OAuth2ConsentSessionExpiresAt.md | 17 + clients/hydra/java/docs/OAuth2LoginRequest.md | 21 + .../hydra/java/docs/OAuth2LogoutRequest.md | 18 + clients/hydra/java/docs/OAuth2RedirectTo.md | 14 + .../hydra/java/docs/OAuth2TokenExchange.md | 19 + .../java/docs/OAuth2TokenIntrospection.md | 27 - .../hydra/java/docs/Oauth2TokenResponse.md | 19 - clients/hydra/java/docs/OidcApi.md | 465 ++ clients/hydra/java/docs/OidcConfiguration.md | 42 + clients/hydra/java/docs/OidcUserInfo.md | 32 + .../hydra/java/docs/OpenIDConnectContext.md | 17 - clients/hydra/java/docs/Pagination.md | 14 + clients/hydra/java/docs/PaginationHeaders.md | 14 + clients/hydra/java/docs/PatchDocument.md | 17 - clients/hydra/java/docs/PluginConfig.md | 28 - clients/hydra/java/docs/PluginConfigArgs.md | 17 - .../hydra/java/docs/PluginConfigInterface.md | 16 - clients/hydra/java/docs/PluginConfigLinux.md | 16 - .../hydra/java/docs/PluginConfigNetwork.md | 14 - clients/hydra/java/docs/PluginConfigRootfs.md | 15 - clients/hydra/java/docs/PluginConfigUser.md | 15 - clients/hydra/java/docs/PluginDevice.md | 17 - clients/hydra/java/docs/PluginEnv.md | 17 - .../hydra/java/docs/PluginInterfaceType.md | 16 - clients/hydra/java/docs/PluginMount.md | 20 - clients/hydra/java/docs/PluginSettings.md | 16 - .../hydra/java/docs/PreviousConsentSession.md | 20 - clients/hydra/java/docs/PublicApi.md | 788 -- .../hydra/java/docs/RejectOAuth2Request.md | 17 + clients/hydra/java/docs/RejectRequest.md | 17 - .../java/docs/RequestWasHandledResponse.md | 13 - clients/hydra/java/docs/TokenPagination.md | 14 + .../hydra/java/docs/TokenPaginationHeaders.md | 14 + .../docs/TokenPaginationRequestParameters.md | 15 + .../docs/TokenPaginationResponseHeaders.md | 15 + .../java/docs/TrustJwtGrantIssuerBody.md | 17 - .../java/docs/TrustOAuth2JwtGrantIssuer.md | 19 + clients/hydra/java/docs/TrustedJsonWebKey.md | 14 - .../hydra/java/docs/TrustedJwtGrantIssuer.md | 19 - .../java/docs/TrustedOAuth2JwtGrantIssuer.md | 21 + .../docs/TrustedOAuth2JwtGrantJsonWebKey.md | 15 + clients/hydra/java/docs/UserinfoResponse.md | 32 - clients/hydra/java/docs/Version.md | 6 +- clients/hydra/java/docs/Volume.md | 22 - clients/hydra/java/docs/VolumeUsageData.md | 15 - clients/hydra/java/docs/WellKnown.md | 40 - clients/hydra/java/docs/WellknownApi.md | 68 + clients/hydra/java/pom.xml | 40 +- .../main/java/sh/ory/hydra/ApiCallback.java | 8 +- .../src/main/java/sh/ory/hydra/ApiClient.java | 90 +- .../main/java/sh/ory/hydra/ApiException.java | 22 +- .../main/java/sh/ory/hydra/ApiResponse.java | 8 +- .../main/java/sh/ory/hydra/Configuration.java | 10 +- .../sh/ory/hydra/GzipRequestInterceptor.java | 8 +- .../java/src/main/java/sh/ory/hydra/JSON.java | 124 +- .../java/src/main/java/sh/ory/hydra/Pair.java | 10 +- .../sh/ory/hydra/ProgressRequestBody.java | 8 +- .../sh/ory/hydra/ProgressResponseBody.java | 8 +- .../sh/ory/hydra/ServerConfiguration.java | 2 +- .../main/java/sh/ory/hydra/StringUtil.java | 10 +- .../main/java/sh/ory/hydra/api/AdminApi.java | 4853 ------------- .../main/java/sh/ory/hydra/api/JwkApi.java | 1035 +++ .../java/sh/ory/hydra/api/MetadataApi.java | 307 +- .../main/java/sh/ory/hydra/api/OAuth2Api.java | 3937 ++++++++++ .../main/java/sh/ory/hydra/api/OidcApi.java | 971 +++ .../main/java/sh/ory/hydra/api/PublicApi.java | 1656 ----- .../java/sh/ory/hydra/api/WellknownApi.java | 198 + .../java/sh/ory/hydra/auth/ApiKeyAuth.java | 10 +- .../sh/ory/hydra/auth/Authentication.java | 8 +- .../java/sh/ory/hydra/auth/HttpBasicAuth.java | 8 +- .../sh/ory/hydra/auth/HttpBearerAuth.java | 10 +- .../main/java/sh/ory/hydra/auth/OAuth.java | 10 +- .../java/sh/ory/hydra/auth/OAuthFlow.java | 21 +- .../java/sh/ory/hydra/auth/RetryingOAuth.java | 50 +- .../hydra/model/AbstractOpenApiSchema.java | 149 + .../ory/hydra/model/AcceptConsentRequest.java | 265 - .../model/AcceptOAuth2ConsentRequest.java | 388 + .../AcceptOAuth2ConsentRequestSession.java | 248 + ...est.java => AcceptOAuth2LoginRequest.java} | 197 +- .../sh/ory/hydra/model/CompletedRequest.java | 100 - .../hydra/model/ConsentRequestSession.java | 129 - .../hydra/model/ContainerWaitOKBodyError.java | 101 - .../ory/hydra/model/CreateJsonWebKeySet.java | 286 + .../java/sh/ory/hydra/model/ErrorOAuth2.java | 339 + .../FlushInactiveOAuth2TokensRequest.java | 101 - .../java/sh/ory/hydra/model/GenericError.java | 163 +- .../hydra/model/GetVersion200Response.java | 209 + .../ory/hydra/model/HealthNotReadyStatus.java | 116 +- .../java/sh/ory/hydra/model/HealthStatus.java | 119 +- ...tion.java => IntrospectedOAuth2Token.java} | 251 +- .../ory/hydra/model/IsReady200Response.java | 209 + .../ory/hydra/model/IsReady503Response.java | 217 + .../sh/ory/hydra/model/JSONWebKeySet.java | 112 - .../java/sh/ory/hydra/model/JsonError.java | 188 - .../java/sh/ory/hydra/model/JsonPatch.java | 327 + .../{JSONWebKey.java => JsonWebKey.java} | 276 +- .../sh/ory/hydra/model/JsonWebKeySet.java | 230 + .../model/JsonWebKeySetGeneratorRequest.java | 158 - .../sh/ory/hydra/model/LogoutRequest.java | 246 - .../java/sh/ory/hydra/model/OAuth2Client.java | 697 +- .../model/OAuth2ClientTokenLifespans.java | 507 ++ ...Request.java => OAuth2ConsentRequest.java} | 264 +- ...h2ConsentRequestOpenIDConnectContext.java} | 184 +- .../ory/hydra/model/OAuth2ConsentSession.java | 459 ++ .../model/OAuth2ConsentSessionExpiresAt.java | 327 + ...inRequest.java => OAuth2LoginRequest.java} | 224 +- .../ory/hydra/model/OAuth2LogoutRequest.java | 373 + .../sh/ory/hydra/model/OAuth2RedirectTo.java | 218 + .../ory/hydra/model/OAuth2TokenExchange.java | 366 + .../ory/hydra/model/Oauth2TokenResponse.java | 246 - .../sh/ory/hydra/model/OidcConfiguration.java | 1230 ++++ ...serinfoResponse.java => OidcUserInfo.java} | 270 +- .../java/sh/ory/hydra/model/Pagination.java | 241 + .../sh/ory/hydra/model/PaginationHeaders.java | 242 + .../sh/ory/hydra/model/PatchDocument.java | 188 - .../java/sh/ory/hydra/model/PluginConfig.java | 560 -- .../sh/ory/hydra/model/PluginConfigArgs.java | 200 - .../hydra/model/PluginConfigInterface.java | 167 - .../sh/ory/hydra/model/PluginConfigLinux.java | 172 - .../ory/hydra/model/PluginConfigNetwork.java | 101 - .../ory/hydra/model/PluginConfigRootfs.java | 140 - .../sh/ory/hydra/model/PluginConfigUser.java | 130 - .../java/sh/ory/hydra/model/PluginDevice.java | 195 - .../java/sh/ory/hydra/model/PluginEnv.java | 195 - .../ory/hydra/model/PluginInterfaceType.java | 159 - .../java/sh/ory/hydra/model/PluginMount.java | 287 - .../sh/ory/hydra/model/PluginSettings.java | 211 - .../hydra/model/PreviousConsentSession.java | 296 - .../ory/hydra/model/RejectOAuth2Request.java | 338 + .../sh/ory/hydra/model/RejectRequest.java | 216 - .../model/RequestWasHandledResponse.java | 100 - .../sh/ory/hydra/model/TokenPagination.java | 241 + .../hydra/model/TokenPaginationHeaders.java | 242 + .../TokenPaginationRequestParameters.java | 242 + .../model/TokenPaginationResponseHeaders.java | 240 + .../hydra/model/TrustJwtGrantIssuerBody.java | 225 - .../model/TrustOAuth2JwtGrantIssuer.java | 391 + .../sh/ory/hydra/model/TrustedJsonWebKey.java | 129 - .../hydra/model/TrustedJwtGrantIssuer.java | 286 - .../model/TrustedOAuth2JwtGrantIssuer.java | 446 ++ .../TrustedOAuth2JwtGrantJsonWebKey.java | 243 + .../main/java/sh/ory/hydra/model/Version.java | 119 +- .../main/java/sh/ory/hydra/model/Volume.java | 347 - .../sh/ory/hydra/model/VolumeUsageData.java | 130 - .../java/sh/ory/hydra/model/WellKnown.java | 936 --- .../java/sh/ory/hydra/api/AdminApiTest.java | 585 -- .../java/sh/ory/hydra/api/JwkApiTest.java | 141 + .../sh/ory/hydra/api/MetadataApiTest.java | 59 +- .../java/sh/ory/hydra/api/OAuth2ApiTest.java | 462 ++ .../java/sh/ory/hydra/api/OidcApiTest.java | 134 + .../java/sh/ory/hydra/api/PublicApiTest.java | 221 - .../sh/ory/hydra/api/WellknownApiTest.java | 48 + ...cceptOAuth2ConsentRequestSessionTest.java} | 26 +- ...va => AcceptOAuth2ConsentRequestTest.java} | 27 +- ...java => AcceptOAuth2LoginRequestTest.java} | 26 +- .../model/ContainerWaitOKBodyErrorTest.java | 51 - ...Test.java => CreateJsonWebKeySetTest.java} | 25 +- ...tRequestTest.java => ErrorOAuth2Test.java} | 25 +- .../FlushInactiveOAuth2TokensRequestTest.java | 52 - .../sh/ory/hydra/model/GenericErrorTest.java | 14 +- ...st.java => GetVersion200ResponseTest.java} | 31 +- .../hydra/model/HealthNotReadyStatusTest.java | 13 +- .../sh/ory/hydra/model/HealthStatusTest.java | 13 +- ....java => IntrospectedOAuth2TokenTest.java} | 27 +- .../hydra/model/IsReady200ResponseTest.java | 50 + .../hydra/model/IsReady503ResponseTest.java | 53 + ...chDocumentTest.java => JsonPatchTest.java} | 26 +- ...KeySetTest.java => JsonWebKeySetTest.java} | 27 +- ...SONWebKeyTest.java => JsonWebKeyTest.java} | 25 +- .../sh/ory/hydra/model/OAuth2ClientTest.java | 94 +- .../model/OAuth2ClientTokenLifespansTest.java | 122 + ...nsentRequestOpenIDConnectContextTest.java} | 27 +- ...est.java => OAuth2ConsentRequestTest.java} | 28 +- .../OAuth2ConsentSessionExpiresAtTest.java | 83 + ...est.java => OAuth2ConsentSessionTest.java} | 38 +- ...tTest.java => OAuth2LoginRequestTest.java} | 27 +- ...Test.java => OAuth2LogoutRequestTest.java} | 25 +- ...estTest.java => OAuth2RedirectToTest.java} | 25 +- ...Test.java => OAuth2TokenExchangeTest.java} | 25 +- ...wnTest.java => OidcConfigurationTest.java} | 41 +- ...esponseTest.java => OidcUserInfoTest.java} | 25 +- .../hydra/model/PaginationHeadersTest.java | 58 + .../sh/ory/hydra/model/PaginationTest.java | 58 + .../ory/hydra/model/PluginConfigArgsTest.java | 77 - .../model/PluginConfigInterfaceTest.java | 70 - .../hydra/model/PluginConfigLinuxTest.java | 70 - .../hydra/model/PluginConfigRootfsTest.java | 61 - .../sh/ory/hydra/model/PluginConfigTest.java | 181 - .../ory/hydra/model/PluginConfigUserTest.java | 59 - .../sh/ory/hydra/model/PluginDeviceTest.java | 77 - .../sh/ory/hydra/model/PluginEnvTest.java | 77 - .../hydra/model/PluginInterfaceTypeTest.java | 67 - .../sh/ory/hydra/model/PluginMountTest.java | 101 - .../ory/hydra/model/PluginSettingsTest.java | 79 - ...Test.java => RejectOAuth2RequestTest.java} | 33 +- .../model/RequestWasHandledResponseTest.java | 51 - .../model/TokenPaginationHeadersTest.java | 58 + .../TokenPaginationRequestParametersTest.java | 58 + .../TokenPaginationResponseHeadersTest.java | 58 + .../ory/hydra/model/TokenPaginationTest.java | 58 + ...ava => TrustOAuth2JwtGrantIssuerTest.java} | 35 +- ...a => TrustedOAuth2JwtGrantIssuerTest.java} | 35 +- ... TrustedOAuth2JwtGrantJsonWebKeyTest.java} | 25 +- .../java/sh/ory/hydra/model/VersionTest.java | 13 +- .../java/sh/ory/hydra/model/VolumeTest.java | 119 - .../ory/hydra/model/VolumeUsageDataTest.java | 59 - clients/hydra/php/.openapi-generator/FILES | 234 +- clients/hydra/php/README.md | 187 +- clients/hydra/php/composer.json | 4 +- clients/hydra/php/composer.lock | 3699 ++++++++++ clients/hydra/php/docs/Api/AdminApi.md | 1972 ----- clients/hydra/php/docs/Api/JwkApi.md | 416 ++ clients/hydra/php/docs/Api/MetadataApi.md | 127 +- clients/hydra/php/docs/Api/OAuth2Api.md | 1653 +++++ clients/hydra/php/docs/Api/OidcApi.md | 413 ++ clients/hydra/php/docs/Api/PublicApi.md | 701 -- clients/hydra/php/docs/Api/WellknownApi.md | 61 + ...quest.md => AcceptOAuth2ConsentRequest.md} | 4 +- .../AcceptOAuth2ConsentRequestSession.md | 10 + ...Request.md => AcceptOAuth2LoginRequest.md} | 4 +- .../php/docs/Model/ConsentRequestSession.md | 10 - .../php/docs/Model/CreateJsonWebKeySet.md | 11 + clients/hydra/php/docs/Model/ErrorOAuth2.md | 13 + .../Model/FlushInactiveOAuth2TokensRequest.md | 9 - clients/hydra/php/docs/Model/GenericError.md | 2 +- ...nConfigNetwork.md => InlineResponse200.md} | 4 +- ...itOKBodyError.md => InlineResponse2001.md} | 4 +- ...uginConfigUser.md => InlineResponse503.md} | 5 +- ...spection.md => IntrospectedOAuth2Token.md} | 4 +- clients/hydra/php/docs/Model/JSONWebKeySet.md | 9 - clients/hydra/php/docs/Model/JsonError.md | 12 - clients/hydra/php/docs/Model/JsonPatch.md | 12 + .../Model/{JSONWebKey.md => JsonWebKey.md} | 2 +- clients/hydra/php/docs/Model/JsonWebKeySet.md | 9 + .../Model/JsonWebKeySetGeneratorRequest.md | 11 - clients/hydra/php/docs/Model/OAuth2Client.md | 64 +- .../docs/Model/OAuth2ClientTokenLifespans.md | 18 + ...sentRequest.md => OAuth2ConsentRequest.md} | 6 +- ...uth2ConsentRequestOpenIDConnectContext.md} | 4 +- .../php/docs/Model/OAuth2ConsentSession.md | 16 + .../Model/OAuth2ConsentSessionExpiresAt.md | 13 + ...{LoginRequest.md => OAuth2LoginRequest.md} | 4 +- ...ogoutRequest.md => OAuth2LogoutRequest.md} | 2 +- ...ompletedRequest.md => OAuth2RedirectTo.md} | 4 +- .../php/docs/Model/OAuth2TokenExchange.md | 14 + .../php/docs/Model/Oauth2TokenResponse.md | 14 - .../hydra/php/docs/Model/OidcConfiguration.md | 37 + .../{UserinfoResponse.md => OidcUserInfo.md} | 2 +- clients/hydra/php/docs/Model/Pagination.md | 10 + .../hydra/php/docs/Model/PaginationHeaders.md | 10 + clients/hydra/php/docs/Model/PatchDocument.md | 12 - clients/hydra/php/docs/Model/PluginConfig.md | 24 - .../hydra/php/docs/Model/PluginConfigArgs.md | 12 - .../php/docs/Model/PluginConfigInterface.md | 11 - .../hydra/php/docs/Model/PluginConfigLinux.md | 11 - .../php/docs/Model/PluginConfigRootfs.md | 10 - clients/hydra/php/docs/Model/PluginDevice.md | 12 - clients/hydra/php/docs/Model/PluginEnv.md | 12 - .../php/docs/Model/PluginInterfaceType.md | 11 - clients/hydra/php/docs/Model/PluginMount.md | 15 - .../hydra/php/docs/Model/PluginSettings.md | 12 - .../php/docs/Model/PreviousConsentSession.md | 15 - ...ejectRequest.md => RejectOAuth2Request.md} | 2 +- .../docs/Model/RequestWasHandledResponse.md | 9 - .../hydra/php/docs/Model/TokenPagination.md | 10 + .../php/docs/Model/TokenPaginationHeaders.md | 10 + .../Model/TokenPaginationRequestParameters.md | 10 + .../Model/TokenPaginationResponseHeaders.md | 10 + ...erBody.md => TrustOAuth2JwtGrantIssuer.md} | 7 +- ...suer.md => TrustedOAuth2JwtGrantIssuer.md} | 5 +- ....md => TrustedOAuth2JwtGrantJsonWebKey.md} | 2 +- clients/hydra/php/docs/Model/Volume.md | 17 - .../hydra/php/docs/Model/VolumeUsageData.md | 10 - clients/hydra/php/docs/Model/WellKnown.md | 35 - clients/hydra/php/lib/Api/JwkApi.php | 2156 ++++++ clients/hydra/php/lib/Api/MetadataApi.php | 646 +- .../lib/Api/{AdminApi.php => OAuth2Api.php} | 5132 ++++--------- clients/hydra/php/lib/Api/OidcApi.php | 2066 ++++++ clients/hydra/php/lib/Api/PublicApi.php | 3437 --------- clients/hydra/php/lib/Api/WellknownApi.php | 409 ++ clients/hydra/php/lib/ApiException.php | 7 +- clients/hydra/php/lib/Configuration.php | 9 +- clients/hydra/php/lib/HeaderSelector.php | 7 +- ...est.php => AcceptOAuth2ConsentRequest.php} | 21 +- ... => AcceptOAuth2ConsentRequestSession.php} | 27 +- ...quest.php => AcceptOAuth2LoginRequest.php} | 21 +- ...torRequest.php => CreateJsonWebKeySet.php} | 22 +- .../Model/{JsonError.php => ErrorOAuth2.php} | 55 +- clients/hydra/php/lib/Model/GenericError.php | 13 +- .../php/lib/Model/HealthNotReadyStatus.php | 7 +- clients/hydra/php/lib/Model/HealthStatus.php | 7 +- ...tOKBodyError.php => InlineResponse200.php} | 42 +- ...nfigNetwork.php => InlineResponse2001.php} | 47 +- ...okensRequest.php => InlineResponse503.php} | 43 +- ...ection.php => IntrospectedOAuth2Token.php} | 23 +- .../{PatchDocument.php => JsonPatch.php} | 27 +- .../Model/{JSONWebKey.php => JsonWebKey.php} | 16 +- .../{JSONWebKeySet.php => JsonWebKeySet.php} | 23 +- .../hydra/php/lib/Model/ModelInterface.php | 7 +- clients/hydra/php/lib/Model/OAuth2Client.php | 465 +- .../lib/Model/OAuth2ClientTokenLifespans.php | 682 ++ ...ntRequest.php => OAuth2ConsentRequest.php} | 27 +- ...th2ConsentRequestOpenIDConnectContext.php} | 21 +- ...ntSession.php => OAuth2ConsentSession.php} | 63 +- ....php => OAuth2ConsentSessionExpiresAt.php} | 170 +- ...oginRequest.php => OAuth2LoginRequest.php} | 21 +- ...outRequest.php => OAuth2LogoutRequest.php} | 15 +- ...pletedRequest.php => OAuth2RedirectTo.php} | 18 +- ...enResponse.php => OAuth2TokenExchange.php} | 41 +- .../{WellKnown.php => OidcConfiguration.php} | 137 +- ...{UserinfoResponse.php => OidcUserInfo.php} | 17 +- ...uginConfigInterface.php => Pagination.php} | 118 +- ...ConfigRootfs.php => PaginationHeaders.php} | 70 +- clients/hydra/php/lib/Model/PluginConfig.php | 809 --- .../hydra/php/lib/Model/PluginConfigLinux.php | 390 - clients/hydra/php/lib/Model/PluginEnv.php | 423 -- .../php/lib/Model/PluginInterfaceType.php | 390 - clients/hydra/php/lib/Model/PluginMount.php | 522 -- .../hydra/php/lib/Model/PluginSettings.php | 422 -- ...ectRequest.php => RejectOAuth2Request.php} | 15 +- .../lib/Model/RequestWasHandledResponse.php | 323 - ...olumeUsageData.php => TokenPagination.php} | 92 +- ...figUser.php => TokenPaginationHeaders.php} | 72 +- ...p => TokenPaginationRequestParameters.php} | 151 +- .../Model/TokenPaginationResponseHeaders.php | 352 + ...Body.php => TrustOAuth2JwtGrantIssuer.php} | 59 +- ...er.php => TrustedOAuth2JwtGrantIssuer.php} | 52 +- ...hp => TrustedOAuth2JwtGrantJsonWebKey.php} | 16 +- clients/hydra/php/lib/Model/Version.php | 7 +- clients/hydra/php/lib/Model/Volume.php | 579 -- clients/hydra/php/lib/ObjectSerializer.php | 7 +- clients/hydra/php/test/Api/JwkApiTest.php | 158 + .../hydra/php/test/Api/MetadataApiTest.php | 37 +- .../{AdminApiTest.php => OAuth2ApiTest.php} | 237 +- clients/hydra/php/test/Api/OidcApiTest.php | 158 + clients/hydra/php/test/Api/PublicApiTest.php | 217 - .../hydra/php/test/Api/WellknownApiTest.php | 86 + ...AcceptOAuth2ConsentRequestSessionTest.php} | 19 +- ...php => AcceptOAuth2ConsentRequestTest.php} | 19 +- ...t.php => AcceptOAuth2LoginRequestTest.php} | 19 +- ...stTest.php => CreateJsonWebKeySetTest.php} | 19 +- ...ectRequestTest.php => ErrorOAuth2Test.php} | 19 +- .../FlushInactiveOAuth2TokensRequestTest.php | 90 - .../hydra/php/test/Model/GenericErrorTest.php | 7 +- .../test/Model/HealthNotReadyStatusTest.php | 7 +- .../hydra/php/test/Model/HealthStatusTest.php | 7 +- ...orkTest.php => InlineResponse2001Test.php} | 23 +- ...onseTest.php => InlineResponse200Test.php} | 23 +- ...rrorTest.php => InlineResponse503Test.php} | 23 +- ...st.php => IntrospectedOAuth2TokenTest.php} | 19 +- .../php/test/Model/JSONWebKeySetTest.php | 90 - ...atchDocumentTest.php => JsonPatchTest.php} | 17 +- .../php/test/Model/JsonWebKeySetTest.php | 91 + ...{JSONWebKeyTest.php => JsonWebKeyTest.php} | 19 +- .../hydra/php/test/Model/OAuth2ClientTest.php | 99 +- ...php => OAuth2ClientTokenLifespansTest.php} | 64 +- ...onsentRequestOpenIDConnectContextTest.php} | 19 +- ...tTest.php => OAuth2ConsentRequestTest.php} | 19 +- .../OAuth2ConsentSessionExpiresAtTest.php | 127 + ...nTest.php => OAuth2ConsentSessionTest.php} | 28 +- ...estTest.php => OAuth2LoginRequestTest.php} | 19 +- ...stTest.php => OAuth2LogoutRequestTest.php} | 19 +- ...questTest.php => OAuth2RedirectToTest.php} | 19 +- ...seTest.php => OAuth2TokenExchangeTest.php} | 19 +- ...nownTest.php => OidcConfigurationTest.php} | 37 +- ...oResponseTest.php => OidcUserInfoTest.php} | 19 +- ...UserTest.php => PaginationHeadersTest.php} | 27 +- ...onfigRootfsTest.php => PaginationTest.php} | 27 +- .../php/test/Model/PluginConfigArgsTest.php | 117 - .../test/Model/PluginConfigInterfaceTest.php | 108 - .../php/test/Model/PluginConfigLinuxTest.php | 108 - .../hydra/php/test/Model/PluginConfigTest.php | 225 - .../hydra/php/test/Model/PluginDeviceTest.php | 117 - .../hydra/php/test/Model/PluginEnvTest.php | 117 - .../test/Model/PluginInterfaceTypeTest.php | 108 - .../hydra/php/test/Model/PluginMountTest.php | 144 - .../php/test/Model/PluginSettingsTest.php | 117 - ...orTest.php => RejectOAuth2RequestTest.php} | 28 +- .../test/Model/TokenPaginationHeadersTest.php | 100 + .../TokenPaginationRequestParametersTest.php | 100 + .../TokenPaginationResponseHeadersTest.php | 100 + .../php/test/Model/TokenPaginationTest.php | 100 + ....php => TrustOAuth2JwtGrantIssuerTest.php} | 28 +- ...hp => TrustedOAuth2JwtGrantIssuerTest.php} | 28 +- ...> TrustedOAuth2JwtGrantJsonWebKeyTest.php} | 19 +- clients/hydra/php/test/Model/VersionTest.php | 7 +- .../php/test/Model/VolumeUsageDataTest.php | 99 - clients/hydra/python/.openapi-generator/FILES | 250 +- .../hydra/python/.openapi-generator/VERSION | 2 +- clients/hydra/python/README.md | 246 +- ...quest.md => AcceptOAuth2ConsentRequest.md} | 8 +- ...d => AcceptOAuth2ConsentRequestSession.md} | 2 +- ...Request.md => AcceptOAuth2LoginRequest.md} | 4 +- clients/hydra/python/docs/AdminApi.md | 2775 ------- .../hydra/python/docs/CreateJsonWebKeySet.md | 15 + clients/hydra/python/docs/ErrorOAuth2.md | 17 + ...figNetwork.md => GetVersion200Response.md} | 5 +- ...spection.md => IntrospectedOAuth2Token.md} | 6 +- ...ginConfigUser.md => IsReady200Response.md} | 6 +- ...itOKBodyError.md => IsReady503Response.md} | 5 +- clients/hydra/python/docs/JSONWebKeySet.md | 13 - clients/hydra/python/docs/JsonError.md | 16 - clients/hydra/python/docs/JsonPatch.md | 16 + .../hydra/python/docs/JsonPatchDocument.md | 12 + .../docs/{JSONWebKey.md => JsonWebKey.md} | 3 +- clients/hydra/python/docs/JsonWebKeySet.md | 13 + .../docs/JsonWebKeySetGeneratorRequest.md | 14 - clients/hydra/python/docs/JwkApi.md | 573 ++ clients/hydra/python/docs/MetadataApi.md | 156 +- .../docs/NullDuration.md} | 6 +- clients/hydra/python/docs/OAuth2Api.md | 2332 ++++++ clients/hydra/python/docs/OAuth2Client.md | 79 +- .../python/docs/OAuth2ClientTokenLifespans.md | 22 + ...sentRequest.md => OAuth2ConsentRequest.md} | 10 +- ...uth2ConsentRequestOpenIDConnectContext.md} | 4 +- .../hydra/python/docs/OAuth2ConsentSession.md | 20 + ...st.md => OAuth2ConsentSessionExpiresAt.md} | 8 +- .../python/docs/OAuth2ConsentSessions.md | 12 + ...{LoginRequest.md => OAuth2LoginRequest.md} | 8 +- ...ogoutRequest.md => OAuth2LogoutRequest.md} | 2 +- ...ompletedRequest.md => OAuth2RedirectTo.md} | 5 +- .../hydra/python/docs/OAuth2TokenExchange.md | 18 + clients/hydra/python/docs/OidcApi.md | 649 ++ .../hydra/python/docs/OidcConfiguration.md | 41 + .../{UserinfoResponse.md => OidcUserInfo.md} | 4 +- clients/hydra/python/docs/Pagination.md | 13 + ...2TokenResponse.md => PaginationHeaders.md} | 11 +- clients/hydra/python/docs/PatchDocument.md | 16 - clients/hydra/python/docs/PluginConfig.md | 27 - clients/hydra/python/docs/PluginConfigArgs.md | 16 - .../python/docs/PluginConfigInterface.md | 15 - .../hydra/python/docs/PluginConfigLinux.md | 15 - .../hydra/python/docs/PluginConfigRootfs.md | 14 - clients/hydra/python/docs/PluginDevice.md | 16 - clients/hydra/python/docs/PluginEnv.md | 16 - .../hydra/python/docs/PluginInterfaceType.md | 15 - clients/hydra/python/docs/PluginMount.md | 19 - clients/hydra/python/docs/PluginSettings.md | 15 - .../python/docs/PreviousConsentSession.md | 19 - clients/hydra/python/docs/PublicApi.md | 990 --- ...ejectRequest.md => RejectOAuth2Request.md} | 2 +- .../python/docs/RequestWasHandledResponse.md | 12 - ...eDelimiter.md => StringSliceJSONFormat.md} | 2 +- clients/hydra/python/docs/TokenPagination.md | 13 + .../python/docs/TokenPaginationHeaders.md | 13 + .../docs/TokenPaginationRequestParameters.md | 14 + .../docs/TokenPaginationResponseHeaders.md | 14 + ...erBody.md => TrustOAuth2JwtGrantIssuer.md} | 8 +- ...suer.md => TrustedOAuth2JwtGrantIssuer.md} | 6 +- .../docs/TrustedOAuth2JwtGrantIssuers.md} | 10 +- ....md => TrustedOAuth2JwtGrantJsonWebKey.md} | 3 +- clients/hydra/python/docs/Volume.md | 21 - clients/hydra/python/docs/VolumeUsageData.md | 14 - clients/hydra/python/docs/WellKnown.md | 39 - clients/hydra/python/docs/WellknownApi.md | 74 + .../hydra/python/ory_hydra_client/__init__.py | 9 +- .../python/ory_hydra_client/api/__init__.py | 2 +- .../python/ory_hydra_client/api/jwk_api.py | 1021 +++ .../ory_hydra_client/api/metadata_api.py | 281 +- .../api/{admin_api.py => o_auth2_api.py} | 2291 +++--- .../api/{public_api.py => oidc_api.py} | 946 +-- .../ory_hydra_client/api/wellknown_api.py | 160 + .../python/ory_hydra_client/api_client.py | 113 +- .../python/ory_hydra_client/apis/__init__.py | 8 +- .../python/ory_hydra_client/configuration.py | 18 +- .../python/ory_hydra_client/exceptions.py | 10 +- .../python/ory_hydra_client/model/__init__.py | 2 +- ...n.py => accept_o_auth2_consent_request.py} | 87 +- ...accept_o_auth2_consent_request_session.py} | 55 +- ...est.py => accept_o_auth2_login_request.py} | 65 +- ..._request.py => create_json_web_key_set.py} | 67 +- .../model/{json_error.py => error_o_auth2.py} | 75 +- .../ory_hydra_client/model/generic_error.py | 49 +- ...dy_error.py => get_version200_response.py} | 63 +- .../model/health_not_ready_status.py | 49 +- .../ory_hydra_client/model/health_status.py | 49 +- ...ction.py => introspected_o_auth2_token.py} | 61 +- ...ens_request.py => is_ready200_response.py} | 63 +- ...nfig_rootfs.py => is_ready503_response.py} | 67 +- .../{patch_document.py => json_patch.py} | 71 +- ...atch_request.py => json_patch_document.py} | 67 +- .../ory_hydra_client/model/json_web_key.py | 55 +- .../model/json_web_key_set.py | 65 +- ..._jwt_grant_issuers.py => null_duration.py} | 75 +- .../ory_hydra_client/model/o_auth2_client.py | 252 +- .../model/o_auth2_client_token_lifespans.py | 306 + ..._request.py => o_auth2_consent_request.py} | 87 +- ...onsent_request_open_id_connect_context.py} | 61 +- .../model/o_auth2_consent_session.py | 304 + .../o_auth2_consent_session_expires_at.py | 280 + ...gin_env.py => o_auth2_consent_sessions.py} | 209 +- ...in_request.py => o_auth2_login_request.py} | 81 +- ...t_request.py => o_auth2_logout_request.py} | 55 +- ...eted_request.py => o_auth2_redirect_to.py} | 59 +- ...t_request.py => o_auth2_token_exchange.py} | 111 +- .../model/oidc_configuration.py | 398 + ...userinfo_response.py => oidc_user_info.py} | 55 +- .../ory_hydra_client/model/pagination.py | 274 + ...n_config_user.py => pagination_headers.py} | 71 +- .../ory_hydra_client/model/plugin_config.py | 365 - .../model/plugin_config_args.py | 279 - .../model/plugin_config_interface.py | 277 - .../model/plugin_config_linux.py | 279 - .../model/plugin_config_network.py | 261 - .../ory_hydra_client/model/plugin_device.py | 279 - .../model/plugin_interface_type.py | 273 - .../ory_hydra_client/model/plugin_mount.py | 297 - .../ory_hydra_client/model/plugin_settings.py | 287 - ...t_request.py => reject_o_auth2_request.py} | 55 +- .../model/request_was_handled_response.py | 261 - ...limiter.py => string_slice_json_format.py} | 53 +- .../model/token_pagination.py | 274 + ...esponse.py => token_pagination_headers.py} | 87 +- .../token_pagination_request_parameters.py | 274 + .../token_pagination_response_headers.py | 268 + ...y.py => trust_o_auth2_jwt_grant_issuer.py} | 79 +- ...py => trusted_o_auth2_jwt_grant_issuer.py} | 69 +- .../trusted_o_auth2_jwt_grant_issuers.py | 292 + ...trusted_o_auth2_jwt_grant_json_web_key.py} | 55 +- .../python/ory_hydra_client/model/version.py | 49 +- .../python/ory_hydra_client/model/volume.py | 309 - .../model/volume_usage_data.py | 267 - .../ory_hydra_client/model/well_known.py | 377 - .../python/ory_hydra_client/model_utils.py | 122 +- .../ory_hydra_client/models/__init__.py | 80 +- clients/hydra/python/ory_hydra_client/rest.py | 33 +- clients/hydra/python/setup.py | 18 +- .../test/test_accept_consent_request.py | 39 - .../python/test/test_accept_login_request.py | 37 - .../test_accept_o_auth2_consent_request.py | 40 + ..._accept_o_auth2_consent_request_session.py | 36 + .../test/test_accept_o_auth2_login_request.py | 38 + clients/hydra/python/test/test_admin_api.py | 266 - .../python/test/test_completed_request.py | 35 - .../hydra/python/test/test_consent_request.py | 41 - .../test/test_consent_request_session.py | 35 - .../test/test_container_wait_ok_body_error.py | 35 - .../test/test_create_json_web_key_set.py | 36 + .../hydra/python/test/test_error_o_auth2.py | 36 + ...t_flush_inactive_o_auth2_tokens_request.py | 35 - .../hydra/python/test/test_generic_error.py | 7 +- .../test/test_get_version200_response.py | 36 + .../test/test_health_not_ready_status.py | 7 +- .../hydra/python/test/test_health_status.py | 7 +- .../test/test_introspected_o_auth2_token.py | 36 + .../python/test/test_is_ready200_response.py | 36 + .../python/test/test_is_ready503_response.py | 36 + clients/hydra/python/test/test_json_error.py | 35 - clients/hydra/python/test/test_json_patch.py | 36 + .../python/test/test_json_patch_document.py | 38 + .../hydra/python/test/test_json_web_key.py | 19 +- .../python/test/test_json_web_key_set.py | 23 +- ...test_json_web_key_set_generator_request.py | 35 - clients/hydra/python/test/test_jwk_api.py | 78 + .../hydra/python/test/test_login_request.py | 41 - .../hydra/python/test/test_logout_request.py | 37 - .../hydra/python/test/test_metadata_api.py | 27 +- .../hydra/python/test/test_null_duration.py | 36 + clients/hydra/python/test/test_o_auth2_api.py | 225 + .../hydra/python/test/test_o_auth2_client.py | 13 +- .../test_o_auth2_client_token_lifespans.py | 38 + .../test/test_o_auth2_consent_request.py | 42 + ...consent_request_open_id_connect_context.py | 36 + .../test/test_o_auth2_consent_session.py | 44 + ...test_o_auth2_consent_session_expires_at.py | 36 + .../test/test_o_auth2_consent_sessions.py | 38 + .../python/test/test_o_auth2_login_request.py | 42 + .../test/test_o_auth2_logout_request.py | 38 + .../python/test/test_o_auth2_redirect_to.py | 36 + .../test/test_o_auth2_token_exchange.py | 36 + .../test/test_o_auth2_token_introspection.py | 35 - .../python/test/test_oauth2_token_response.py | 35 - clients/hydra/python/test/test_oidc_api.py | 78 + .../python/test/test_oidc_configuration.py | 36 + .../hydra/python/test/test_oidc_user_info.py | 36 + .../test/test_open_id_connect_context.py | 35 - clients/hydra/python/test/test_pagination.py | 36 + .../python/test/test_pagination_headers.py | 36 + .../hydra/python/test/test_patch_document.py | 35 - .../hydra/python/test/test_patch_request.py | 37 - .../hydra/python/test/test_plugin_config.py | 51 - .../python/test/test_plugin_config_args.py | 35 - .../test/test_plugin_config_interface.py | 37 - .../python/test/test_plugin_config_linux.py | 37 - .../python/test/test_plugin_config_network.py | 35 - .../python/test/test_plugin_config_rootfs.py | 35 - .../python/test/test_plugin_config_user.py | 35 - .../hydra/python/test/test_plugin_device.py | 35 - clients/hydra/python/test/test_plugin_env.py | 35 - .../python/test/test_plugin_interface_type.py | 35 - .../hydra/python/test/test_plugin_mount.py | 35 - .../hydra/python/test/test_plugin_settings.py | 39 - .../test/test_previous_consent_session.py | 41 - clients/hydra/python/test/test_public_api.py | 112 - .../test/test_reject_o_auth2_request.py | 36 + .../hydra/python/test/test_reject_request.py | 35 - .../test/test_request_was_handled_response.py | 35 - .../test/test_string_slice_json_format.py | 36 + .../test/test_string_slice_pipe_delimiter.py | 35 - .../python/test/test_token_pagination.py | 36 + .../test/test_token_pagination_headers.py | 36 + ...est_token_pagination_request_parameters.py | 36 + .../test_token_pagination_response_headers.py | 36 + .../test/test_trust_jwt_grant_issuer_body.py | 37 - .../test_trust_o_auth2_jwt_grant_issuer.py | 38 + .../python/test/test_trusted_json_web_key.py | 35 - .../test/test_trusted_jwt_grant_issuer.py | 37 - .../test/test_trusted_jwt_grant_issuers.py | 37 - .../test_trusted_o_auth2_jwt_grant_issuer.py | 38 + .../test_trusted_o_auth2_jwt_grant_issuers.py | 38 + ..._trusted_o_auth2_jwt_grant_json_web_key.py | 36 + .../python/test/test_userinfo_response.py | 35 - clients/hydra/python/test/test_version.py | 7 +- clients/hydra/python/test/test_volume.py | 37 - .../python/test/test_volume_usage_data.py | 35 - clients/hydra/python/test/test_well_known.py | 35 - .../hydra/python/test/test_wellknown_api.py | 36 + clients/hydra/ruby/.gitlab-ci.yml | 26 + clients/hydra/ruby/.openapi-generator/FILES | 227 +- clients/hydra/ruby/.openapi-generator/VERSION | 2 +- clients/hydra/ruby/Gemfile.lock | 70 + clients/hydra/ruby/README.md | 198 +- ...quest.md => AcceptOAuth2ConsentRequest.md} | 6 +- ...d => AcceptOAuth2ConsentRequestSession.md} | 4 +- ...Request.md => AcceptOAuth2LoginRequest.md} | 4 +- clients/hydra/ruby/docs/AdminApi.md | 2272 ------ .../ruby/docs/ContainerWaitOKBodyError.md | 18 - .../hydra/ruby/docs/CreateJsonWebKeySet.md | 22 + clients/hydra/ruby/docs/ErrorOAuth2.md | 26 + .../docs/FlushInactiveOAuth2TokensRequest.md | 18 - .../hydra/ruby/docs/GetVersion200Response.md | 18 + ...spection.md => IntrospectedOAuth2Token.md} | 6 +- clients/hydra/ruby/docs/IsReady200Response.md | 18 + clients/hydra/ruby/docs/IsReady503Response.md | 18 + clients/hydra/ruby/docs/JSONWebKeySet.md | 18 - clients/hydra/ruby/docs/JsonError.md | 24 - clients/hydra/ruby/docs/JsonPatch.md | 24 + .../docs/{JSONWebKey.md => JsonWebKey.md} | 4 +- clients/hydra/ruby/docs/JsonWebKeySet.md | 18 + .../docs/JsonWebKeySetGeneratorRequest.md | 22 - clients/hydra/ruby/docs/JwkApi.md | 476 ++ clients/hydra/ruby/docs/MetadataApi.md | 159 +- clients/hydra/ruby/docs/OAuth2Api.md | 1901 +++++ clients/hydra/ruby/docs/OAuth2Client.md | 74 +- .../ruby/docs/OAuth2ClientTokenLifespans.md | 36 + ...sentRequest.md => OAuth2ConsentRequest.md} | 6 +- ...uth2ConsentRequestOpenIDConnectContext.md} | 6 +- .../hydra/ruby/docs/OAuth2ConsentSession.md | 32 + .../docs/OAuth2ConsentSessionExpiresAt.md | 26 + ...{LoginRequest.md => OAuth2LoginRequest.md} | 6 +- ...ogoutRequest.md => OAuth2LogoutRequest.md} | 4 +- ...ompletedRequest.md => OAuth2RedirectTo.md} | 6 +- .../hydra/ruby/docs/OAuth2TokenExchange.md | 28 + .../hydra/ruby/docs/Oauth2TokenResponse.md | 28 - clients/hydra/ruby/docs/OidcApi.md | 473 ++ clients/hydra/ruby/docs/OidcConfiguration.md | 74 + .../{UserinfoResponse.md => OidcUserInfo.md} | 4 +- clients/hydra/ruby/docs/Pagination.md | 20 + clients/hydra/ruby/docs/PaginationHeaders.md | 20 + clients/hydra/ruby/docs/PatchDocument.md | 24 - clients/hydra/ruby/docs/PluginConfig.md | 48 - clients/hydra/ruby/docs/PluginConfigArgs.md | 24 - .../hydra/ruby/docs/PluginConfigInterface.md | 22 - clients/hydra/ruby/docs/PluginConfigLinux.md | 22 - .../hydra/ruby/docs/PluginConfigNetwork.md | 18 - clients/hydra/ruby/docs/PluginConfigRootfs.md | 20 - clients/hydra/ruby/docs/PluginConfigUser.md | 20 - clients/hydra/ruby/docs/PluginDevice.md | 24 - clients/hydra/ruby/docs/PluginEnv.md | 24 - .../hydra/ruby/docs/PluginInterfaceType.md | 22 - clients/hydra/ruby/docs/PluginMount.md | 30 - clients/hydra/ruby/docs/PluginSettings.md | 24 - .../hydra/ruby/docs/PreviousConsentSession.md | 30 - clients/hydra/ruby/docs/PublicApi.md | 800 -- ...ejectRequest.md => RejectOAuth2Request.md} | 4 +- .../ruby/docs/RequestWasHandledResponse.md | 18 - clients/hydra/ruby/docs/TokenPagination.md | 20 + .../hydra/ruby/docs/TokenPaginationHeaders.md | 20 + .../docs/TokenPaginationRequestParameters.md | 20 + .../docs/TokenPaginationResponseHeaders.md | 20 + ...erBody.md => TrustOAuth2JwtGrantIssuer.md} | 12 +- ...suer.md => TrustedOAuth2JwtGrantIssuer.md} | 10 +- ....md => TrustedOAuth2JwtGrantJsonWebKey.md} | 4 +- clients/hydra/ruby/docs/Volume.md | 34 - clients/hydra/ruby/docs/VolumeUsageData.md | 20 - clients/hydra/ruby/docs/WellKnown.md | 70 - clients/hydra/ruby/docs/WellknownApi.md | 69 + clients/hydra/ruby/lib/ory-hydra-client.rb | 84 +- .../lib/ory-hydra-client/api/admin_api.rb | 2292 ------ .../ruby/lib/ory-hydra-client/api/jwk_api.rb | 506 ++ .../lib/ory-hydra-client/api/metadata_api.rb | 156 +- .../lib/ory-hydra-client/api/o_auth2_api.rb | 1926 +++++ .../ruby/lib/ory-hydra-client/api/oidc_api.rb | 459 ++ .../lib/ory-hydra-client/api/public_api.rb | 780 -- .../lib/ory-hydra-client/api/wellknown_api.rb | 79 + .../ruby/lib/ory-hydra-client/api_client.rb | 14 +- .../ruby/lib/ory-hydra-client/api_error.rb | 10 +- .../lib/ory-hydra-client/configuration.rb | 20 +- ...t.rb => accept_o_auth2_consent_request.rb} | 19 +- ...accept_o_auth2_consent_request_session.rb} | 19 +- ...est.rb => accept_o_auth2_login_request.rb} | 18 +- ..._request.rb => create_json_web_key_set.rb} | 24 +- .../{json_error.rb => error_o_auth2.rb} | 39 +- .../ory-hydra-client/models/generic_error.rb | 12 +- ...dy_error.rb => get_version200_response.rb} | 34 +- .../models/health_not_ready_status.rb | 11 +- .../ory-hydra-client/models/health_status.rb | 11 +- ...ction.rb => introspected_o_auth2_token.rb} | 25 +- ...fig_network.rb => is_ready200_response.rb} | 39 +- ...config_user.rb => is_ready503_response.rb} | 46 +- .../{patch_document.rb => json_patch.rb} | 26 +- .../ory-hydra-client/models/json_web_key.rb | 18 +- .../models/json_web_key_set.rb | 23 +- .../ory-hydra-client/models/o_auth2_client.rb | 340 +- .../models/o_auth2_client_token_lifespans.rb | 481 ++ ..._request.rb => o_auth2_consent_request.rb} | 20 +- ...onsent_request_open_id_connect_context.rb} | 23 +- ..._session.rb => o_auth2_consent_session.rb} | 38 +- .../o_auth2_consent_session_expires_at.rb | 255 + ...in_request.rb => o_auth2_login_request.rb} | 19 +- ...t_request.rb => o_auth2_logout_request.rb} | 17 +- ...eted_request.rb => o_auth2_redirect_to.rb} | 20 +- ..._response.rb => o_auth2_token_exchange.rb} | 29 +- .../{well_known.rb => oidc_configuration.rb} | 109 +- ...userinfo_response.rb => oidc_user_info.rb} | 19 +- .../{plugin_settings.rb => pagination.rb} | 121 +- ...config_rootfs.rb => pagination_headers.rb} | 50 +- .../ory-hydra-client/models/plugin_config.rb | 434 -- .../models/plugin_config_args.rb | 274 - .../models/plugin_config_interface.rb | 252 - .../models/plugin_config_linux.rb | 259 - .../ory-hydra-client/models/plugin_device.rb | 272 - .../lib/ory-hydra-client/models/plugin_env.rb | 272 - .../models/plugin_interface_type.rb | 255 - .../ory-hydra-client/models/plugin_mount.rb | 319 - ...t_request.rb => reject_o_auth2_request.rb} | 17 +- .../models/request_was_handled_response.rb | 224 - ...lume_usage_data.rb => token_pagination.rb} | 84 +- .../models/token_pagination_headers.rb | 230 + ...=> token_pagination_request_parameters.rb} | 78 +- .../token_pagination_response_headers.rb | 231 + ...y.rb => trust_o_auth2_jwt_grant_issuer.rb} | 37 +- ...rb => trusted_o_auth2_jwt_grant_issuer.rb} | 32 +- ...trusted_o_auth2_jwt_grant_json_web_key.rb} | 18 +- .../lib/ory-hydra-client/models/version.rb | 11 +- .../lib/ory-hydra-client/models/volume.rb | 333 - .../ruby/lib/ory-hydra-client/version.rb | 12 +- clients/hydra/ruby/ory-hydra-client.gemspec | 14 +- clients/hydra/ruby/spec/api/admin_api_spec.rb | 462 -- clients/hydra/ruby/spec/api/jwk_api_spec.rb | 125 + .../hydra/ruby/spec/api/metadata_api_spec.rb | 42 +- .../hydra/ruby/spec/api/o_auth2_api_spec.rb | 391 + clients/hydra/ruby/spec/api/oidc_api_spec.rb | 117 + .../hydra/ruby/spec/api/public_api_spec.rb | 178 - .../hydra/ruby/spec/api/wellknown_api_spec.rb | 46 + clients/hydra/ruby/spec/api_client_spec.rb | 10 +- clients/hydra/ruby/spec/configuration_spec.rb | 10 +- ...t_o_auth2_consent_request_session_spec.rb} | 22 +- ...=> accept_o_auth2_consent_request_spec.rb} | 22 +- ...b => accept_o_auth2_login_request_spec.rb} | 22 +- .../spec/models/completed_request_spec.rb | 34 - .../container_wait_ok_body_error_spec.rb | 34 - ...pec.rb => create_json_web_key_set_spec.rb} | 22 +- ..._request_spec.rb => error_o_auth2_spec.rb} | 22 +- ...sh_inactive_o_auth2_tokens_request_spec.rb | 34 - .../ruby/spec/models/generic_error_spec.rb | 10 +- .../models/get_version200_response_spec.rb | 34 + .../models/health_not_ready_status_spec.rb | 10 +- .../ruby/spec/models/health_status_spec.rb | 10 +- ....rb => introspected_o_auth2_token_spec.rb} | 22 +- .../spec/models/is_ready200_response_spec.rb | 34 + .../spec/models/is_ready503_response_spec.rb | 34 + ...ch_document_spec.rb => json_patch_spec.rb} | 22 +- .../ruby/spec/models/json_web_key_set_spec.rb | 22 +- .../ruby/spec/models/json_web_key_spec.rb | 22 +- .../ruby/spec/models/o_auth2_client_spec.rb | 70 +- ...=> o_auth2_client_token_lifespans_spec.rb} | 46 +- ...t_request_open_id_connect_context_spec.rb} | 22 +- ...pec.rb => o_auth2_consent_request_spec.rb} | 22 +- ...o_auth2_consent_session_expires_at_spec.rb | 58 + ...pec.rb => o_auth2_consent_session_spec.rb} | 28 +- ..._spec.rb => o_auth2_login_request_spec.rb} | 22 +- ...spec.rb => o_auth2_logout_request_spec.rb} | 22 +- .../spec/models/o_auth2_redirect_to_spec.rb | 34 + ...spec.rb => o_auth2_token_exchange_spec.rb} | 22 +- ...own_spec.rb => oidc_configuration_spec.rb} | 34 +- ...esponse_spec.rb => oidc_user_info_spec.rb} | 22 +- .../spec/models/pagination_headers_spec.rb | 40 + .../hydra/ruby/spec/models/pagination_spec.rb | 40 + .../spec/models/plugin_config_args_spec.rb | 52 - .../models/plugin_config_interface_spec.rb | 46 - .../spec/models/plugin_config_linux_spec.rb | 46 - .../spec/models/plugin_config_network_spec.rb | 34 - .../spec/models/plugin_config_rootfs_spec.rb | 40 - .../ruby/spec/models/plugin_config_spec.rb | 124 - .../spec/models/plugin_config_user_spec.rb | 40 - .../ruby/spec/models/plugin_device_spec.rb | 52 - .../hydra/ruby/spec/models/plugin_env_spec.rb | 52 - .../spec/models/plugin_interface_type_spec.rb | 46 - .../ruby/spec/models/plugin_mount_spec.rb | 70 - .../ruby/spec/models/plugin_settings_spec.rb | 52 - ...spec.rb => reject_o_auth2_request_spec.rb} | 28 +- .../request_was_handled_response_spec.rb | 34 - .../models/token_pagination_headers_spec.rb | 40 + ...oken_pagination_request_parameters_spec.rb | 40 + .../token_pagination_response_headers_spec.rb | 40 + .../ruby/spec/models/token_pagination_spec.rb | 40 + ...=> trust_o_auth2_jwt_grant_issuer_spec.rb} | 28 +- ... trusted_o_auth2_jwt_grant_issuer_spec.rb} | 28 +- ...ed_o_auth2_jwt_grant_json_web_key_spec.rb} | 22 +- .../hydra/ruby/spec/models/version_spec.rb | 10 +- .../spec/models/volume_usage_data_spec.rb | 40 - clients/hydra/ruby/spec/spec_helper.rb | 10 +- clients/hydra/rust/.gitignore | 4 +- clients/hydra/rust/.openapi-generator/FILES | 148 +- clients/hydra/rust/.openapi-generator/VERSION | 2 +- clients/hydra/rust/Cargo.lock | 747 ++ clients/hydra/rust/Cargo.toml | 3 +- clients/hydra/rust/README.md | 177 +- ...quest.md => AcceptOAuth2ConsentRequest.md} | 4 +- ...d => AcceptOAuth2ConsentRequestSession.md} | 2 +- ...Request.md => AcceptOAuth2LoginRequest.md} | 2 +- clients/hydra/rust/docs/AdminApi.md | 1077 --- .../hydra/rust/docs/CreateJsonWebKeySet.md | 13 + clients/hydra/rust/docs/ErrorOAuth2.md | 15 + .../docs/FlushInactiveOAuth2TokensRequest.md | 11 - .../docs/GetVersion200Response.md} | 6 +- ...spection.md => IntrospectedOAuth2Token.md} | 4 +- ...itOkBodyError.md => IsReady200Response.md} | 4 +- clients/hydra/rust/docs/IsReady503Response.md | 11 + clients/hydra/rust/docs/JsonError.md | 14 - clients/hydra/rust/docs/JsonPatch.md | 14 + clients/hydra/rust/docs/JsonWebKeySet.md | 2 +- .../docs/JsonWebKeySetGeneratorRequest.md | 13 - clients/hydra/rust/docs/JwkApi.md | 231 + clients/hydra/rust/docs/MetadataApi.md | 70 +- clients/hydra/rust/docs/OAuth2Api.md | 894 +++ clients/hydra/rust/docs/OAuth2Client.md | 62 +- .../rust/docs/OAuth2ClientTokenLifespans.md | 20 + ...sentRequest.md => OAuth2ConsentRequest.md} | 4 +- ...uth2ConsentRequestOpenIdConnectContext.md} | 4 +- .../hydra/rust/docs/OAuth2ConsentSession.md | 18 + ...se.md => OAuth2ConsentSessionExpiresAt.md} | 7 +- ...{LoginRequest.md => OAuth2LoginRequest.md} | 4 +- ...ogoutRequest.md => OAuth2LogoutRequest.md} | 2 +- ...ompletedRequest.md => OAuth2RedirectTo.md} | 4 +- .../hydra/rust/docs/OAuth2TokenExchange.md | 16 + clients/hydra/rust/docs/OidcApi.md | 217 + clients/hydra/rust/docs/OidcConfiguration.md | 39 + .../{UserinfoResponse.md => OidcUserInfo.md} | 2 +- clients/hydra/rust/docs/Pagination.md | 12 + clients/hydra/rust/docs/PaginationHeaders.md | 12 + clients/hydra/rust/docs/PatchDocument.md | 14 - clients/hydra/rust/docs/PluginConfig.md | 26 - clients/hydra/rust/docs/PluginConfigArgs.md | 14 - .../hydra/rust/docs/PluginConfigInterface.md | 13 - clients/hydra/rust/docs/PluginConfigLinux.md | 13 - clients/hydra/rust/docs/PluginConfigRootfs.md | 12 - clients/hydra/rust/docs/PluginConfigUser.md | 12 - clients/hydra/rust/docs/PluginDevice.md | 14 - clients/hydra/rust/docs/PluginEnv.md | 14 - .../hydra/rust/docs/PluginInterfaceType.md | 13 - clients/hydra/rust/docs/PluginMount.md | 17 - clients/hydra/rust/docs/PluginSettings.md | 14 - .../hydra/rust/docs/PreviousConsentSession.md | 17 - clients/hydra/rust/docs/PublicApi.md | 367 - ...ejectRequest.md => RejectOAuth2Request.md} | 2 +- .../rust/docs/RequestWasHandledResponse.md | 11 - clients/hydra/rust/docs/TokenPagination.md | 12 + .../hydra/rust/docs/TokenPaginationHeaders.md | 12 + .../docs/TokenPaginationRequestParameters.md | 12 + .../docs/TokenPaginationResponseHeaders.md | 12 + ...erBody.md => TrustOAuth2JwtGrantIssuer.md} | 7 +- ...suer.md => TrustedOAuth2JwtGrantIssuer.md} | 5 +- ....md => TrustedOAuth2JwtGrantJsonWebKey.md} | 2 +- clients/hydra/rust/docs/Volume.md | 19 - clients/hydra/rust/docs/VolumeUsageData.md | 12 - clients/hydra/rust/docs/WellKnown.md | 37 - clients/hydra/rust/docs/WellknownApi.md | 36 + clients/hydra/rust/src/apis/admin_api.rs | 1306 ---- clients/hydra/rust/src/apis/configuration.rs | 10 +- clients/hydra/rust/src/apis/jwk_api.rs | 282 + clients/hydra/rust/src/apis/metadata_api.rs | 108 +- clients/hydra/rust/src/apis/mod.rs | 6 +- clients/hydra/rust/src/apis/o_auth2_api.rs | 1112 +++ clients/hydra/rust/src/apis/oidc_api.rs | 294 + clients/hydra/rust/src/apis/public_api.rs | 478 -- clients/hydra/rust/src/apis/wellknown_api.rs | 69 + ...t.rs => accept_o_auth2_consent_request.rs} | 36 +- ...accept_o_auth2_consent_request_session.rs} | 26 +- ...est.rs => accept_o_auth2_login_request.rs} | 31 +- .../rust/src/models/completed_request.rs | 29 - .../models/container_wait_ok_body_error.rs | 31 - .../src/models/create_json_web_key_set.rs | 40 + .../hydra/rust/src/models/error_o_auth2.rs | 53 + .../flush_inactive_o_auth2_tokens_request.rs | 29 - .../hydra/rust/src/models/generic_error.rs | 25 +- .../src/models/get_version_200_response.rs | 35 + .../src/models/health_not_ready_status.rs | 16 +- .../hydra/rust/src/models/health_status.rs | 16 +- ...ction.rs => introspected_o_auth2_token.rs} | 51 +- .../rust/src/models/is_ready_200_response.rs | 35 + .../rust/src/models/is_ready_503_response.rs | 35 + clients/hydra/rust/src/models/json_error.rs | 43 - clients/hydra/rust/src/models/json_patch.rs | 44 + clients/hydra/rust/src/models/json_web_key.rs | 45 +- .../hydra/rust/src/models/json_web_key_set.rs | 22 +- .../json_web_key_set_generator_request.rs | 37 - clients/hydra/rust/src/models/mod.rs | 136 +- .../hydra/rust/src/models/o_auth2_client.rs | 177 +- .../models/o_auth2_client_token_lifespans.rs | 73 + ..._request.rs => o_auth2_consent_request.rs} | 45 +- ...onsent_request_open_id_connect_context.rs} | 34 +- .../src/models/o_auth2_consent_session.rs | 59 + .../o_auth2_consent_session_expires_at.rs | 46 + ...in_request.rs => o_auth2_login_request.rs} | 37 +- ...t_request.rs => o_auth2_logout_request.rs} | 34 +- .../rust/src/models/o_auth2_redirect_to.rs | 32 + .../rust/src/models/o_auth2_token_exchange.rs | 57 + .../rust/src/models/oauth2_token_response.rs | 45 - .../rust/src/models/oidc_configuration.rs | 144 + ...userinfo_response.rs => oidc_user_info.rs} | 64 +- clients/hydra/rust/src/models/pagination.rs | 39 + .../rust/src/models/pagination_headers.rs | 39 + .../hydra/rust/src/models/patch_document.rs | 43 - .../hydra/rust/src/models/plugin_config.rs | 83 - .../rust/src/models/plugin_config_args.rs | 43 - .../src/models/plugin_config_interface.rs | 39 - .../rust/src/models/plugin_config_linux.rs | 39 - .../rust/src/models/plugin_config_network.rs | 31 - .../rust/src/models/plugin_config_rootfs.rs | 35 - .../rust/src/models/plugin_config_user.rs | 35 - .../hydra/rust/src/models/plugin_device.rs | 43 - clients/hydra/rust/src/models/plugin_env.rs | 43 - .../rust/src/models/plugin_interface_type.rs | 39 - clients/hydra/rust/src/models/plugin_mount.rs | 55 - .../hydra/rust/src/models/plugin_settings.rs | 41 - .../src/models/previous_consent_session.rs | 50 - ...t_request.rs => reject_o_auth2_request.rs} | 32 +- .../models/request_was_handled_response.rs | 29 - .../hydra/rust/src/models/token_pagination.rs | 39 + .../src/models/token_pagination_headers.rs | 39 + .../token_pagination_request_parameters.rs | 41 + .../token_pagination_response_headers.rs | 41 + .../src/models/trust_jwt_grant_issuer_body.rs | 44 - .../models/trust_o_auth2_jwt_grant_issuer.rs | 51 + .../rust/src/models/trusted_json_web_key.rs | 33 - ...rs => trusted_o_auth2_jwt_grant_issuer.rs} | 44 +- .../trusted_o_auth2_jwt_grant_json_web_key.rs | 41 + clients/hydra/rust/src/models/version.rs | 16 +- clients/hydra/rust/src/models/volume.rs | 62 - .../rust/src/models/volume_usage_data.rs | 35 - clients/hydra/rust/src/models/well_known.rs | 135 - clients/hydra/typescript/README.md | 4 +- clients/hydra/typescript/api.ts | 6303 ++++++++-------- clients/hydra/typescript/base.ts | 8 +- clients/hydra/typescript/common.ts | 8 +- clients/hydra/typescript/configuration.ts | 8 +- clients/hydra/typescript/index.ts | 8 +- clients/hydra/typescript/package-lock.json | 93 + clients/hydra/typescript/package.json | 2 +- spec/hydra/v2.0.1.json | 3647 +--------- 1671 files changed, 135292 insertions(+), 136978 deletions(-) rename clients/hydra/dart/doc/{AcceptConsentRequest.md => AcceptOAuth2ConsentRequest.md} (73%) rename clients/hydra/dart/doc/{ConsentRequestSession.md => AcceptOAuth2ConsentRequestSession.md} (94%) rename clients/hydra/dart/doc/{AcceptLoginRequest.md => AcceptOAuth2LoginRequest.md} (96%) delete mode 100644 clients/hydra/dart/doc/AdminApi.md create mode 100644 clients/hydra/dart/doc/CreateJsonWebKeySet.md create mode 100644 clients/hydra/dart/doc/ErrorOAuth2.md delete mode 100644 clients/hydra/dart/doc/FlushInactiveOAuth2TokensRequest.md rename clients/hydra/dart/doc/{ContainerWaitOKBodyError.md => GetVersion200Response.md} (75%) rename clients/hydra/dart/doc/{OAuth2TokenIntrospection.md => IntrospectedOAuth2Token.md} (89%) rename clients/hydra/dart/doc/{PluginConfigNetwork.md => IsReady200Response.md} (78%) rename clients/hydra/dart/doc/{PluginConfigRootfs.md => IsReady503Response.md} (67%) delete mode 100644 clients/hydra/dart/doc/JSONWebKeySet.md delete mode 100644 clients/hydra/dart/doc/JsonError.md create mode 100644 clients/hydra/dart/doc/JsonPatch.md rename clients/hydra/dart/doc/{JSONWebKey.md => JsonWebKey.md} (82%) create mode 100644 clients/hydra/dart/doc/JsonWebKeySet.md delete mode 100644 clients/hydra/dart/doc/JsonWebKeySetGeneratorRequest.md create mode 100644 clients/hydra/dart/doc/JwkApi.md create mode 100644 clients/hydra/dart/doc/OAuth2Api.md create mode 100644 clients/hydra/dart/doc/OAuth2ClientTokenLifespans.md rename clients/hydra/dart/doc/{ConsentRequest.md => OAuth2ConsentRequest.md} (86%) rename clients/hydra/dart/doc/{OpenIDConnectContext.md => OAuth2ConsentRequestOpenIDConnectContext.md} (52%) create mode 100644 clients/hydra/dart/doc/OAuth2ConsentSession.md create mode 100644 clients/hydra/dart/doc/OAuth2ConsentSessionExpiresAt.md rename clients/hydra/dart/doc/{LoginRequest.md => OAuth2LoginRequest.md} (87%) rename clients/hydra/dart/doc/{LogoutRequest.md => OAuth2LogoutRequest.md} (95%) rename clients/hydra/dart/doc/{CompletedRequest.md => OAuth2RedirectTo.md} (76%) create mode 100644 clients/hydra/dart/doc/OAuth2TokenExchange.md create mode 100644 clients/hydra/dart/doc/OidcApi.md create mode 100644 clients/hydra/dart/doc/OidcConfiguration.md rename clients/hydra/dart/doc/{UserinfoResponse.md => OidcUserInfo.md} (99%) create mode 100644 clients/hydra/dart/doc/Pagination.md rename clients/hydra/dart/doc/{Oauth2TokenResponse.md => PaginationHeaders.md} (50%) delete mode 100644 clients/hydra/dart/doc/PatchDocument.md delete mode 100644 clients/hydra/dart/doc/PluginConfig.md delete mode 100644 clients/hydra/dart/doc/PluginConfigArgs.md delete mode 100644 clients/hydra/dart/doc/PluginConfigInterface.md delete mode 100644 clients/hydra/dart/doc/PluginConfigLinux.md delete mode 100644 clients/hydra/dart/doc/PluginDevice.md delete mode 100644 clients/hydra/dart/doc/PluginEnv.md delete mode 100644 clients/hydra/dart/doc/PluginInterfaceType.md delete mode 100644 clients/hydra/dart/doc/PluginMount.md delete mode 100644 clients/hydra/dart/doc/PluginSettings.md delete mode 100644 clients/hydra/dart/doc/PreviousConsentSession.md delete mode 100644 clients/hydra/dart/doc/PublicApi.md rename clients/hydra/dart/doc/{RejectRequest.md => RejectOAuth2Request.md} (95%) delete mode 100644 clients/hydra/dart/doc/RequestWasHandledResponse.md create mode 100644 clients/hydra/dart/doc/TokenPagination.md create mode 100644 clients/hydra/dart/doc/TokenPaginationHeaders.md create mode 100644 clients/hydra/dart/doc/TokenPaginationRequestParameters.md create mode 100644 clients/hydra/dart/doc/TokenPaginationResponseHeaders.md rename clients/hydra/dart/doc/{TrustJwtGrantIssuerBody.md => TrustOAuth2JwtGrantIssuer.md} (61%) rename clients/hydra/dart/doc/{TrustedJwtGrantIssuer.md => TrustedOAuth2JwtGrantIssuer.md} (66%) rename clients/hydra/dart/doc/{TrustedJsonWebKey.md => TrustedOAuth2JwtGrantJsonWebKey.md} (91%) delete mode 100644 clients/hydra/dart/doc/Volume.md delete mode 100644 clients/hydra/dart/doc/VolumeUsageData.md delete mode 100644 clients/hydra/dart/doc/WellKnown.md create mode 100644 clients/hydra/dart/doc/WellknownApi.md delete mode 100644 clients/hydra/dart/lib/api.dart delete mode 100644 clients/hydra/dart/lib/api/admin_api.dart delete mode 100644 clients/hydra/dart/lib/api/metadata_api.dart delete mode 100644 clients/hydra/dart/lib/api/public_api.dart delete mode 100644 clients/hydra/dart/lib/api_util.dart delete mode 100644 clients/hydra/dart/lib/auth/api_key_auth.dart delete mode 100644 clients/hydra/dart/lib/auth/auth.dart delete mode 100644 clients/hydra/dart/lib/auth/basic_auth.dart delete mode 100644 clients/hydra/dart/lib/auth/oauth.dart delete mode 100644 clients/hydra/dart/lib/model/accept_consent_request.dart delete mode 100644 clients/hydra/dart/lib/model/accept_login_request.dart delete mode 100644 clients/hydra/dart/lib/model/completed_request.dart delete mode 100644 clients/hydra/dart/lib/model/consent_request.dart delete mode 100644 clients/hydra/dart/lib/model/consent_request_session.dart delete mode 100644 clients/hydra/dart/lib/model/container_wait_ok_body_error.dart delete mode 100644 clients/hydra/dart/lib/model/flush_inactive_o_auth2_tokens_request.dart delete mode 100644 clients/hydra/dart/lib/model/generic_error.dart delete mode 100644 clients/hydra/dart/lib/model/health_not_ready_status.dart delete mode 100644 clients/hydra/dart/lib/model/health_status.dart delete mode 100644 clients/hydra/dart/lib/model/json_error.dart delete mode 100644 clients/hydra/dart/lib/model/json_web_key.dart delete mode 100644 clients/hydra/dart/lib/model/json_web_key_set.dart delete mode 100644 clients/hydra/dart/lib/model/json_web_key_set_generator_request.dart delete mode 100644 clients/hydra/dart/lib/model/login_request.dart delete mode 100644 clients/hydra/dart/lib/model/logout_request.dart delete mode 100644 clients/hydra/dart/lib/model/o_auth2_client.dart delete mode 100644 clients/hydra/dart/lib/model/o_auth2_token_introspection.dart delete mode 100644 clients/hydra/dart/lib/model/oauth2_token_response.dart delete mode 100644 clients/hydra/dart/lib/model/open_id_connect_context.dart delete mode 100644 clients/hydra/dart/lib/model/patch_document.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_config.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_config_args.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_config_interface.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_config_linux.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_config_network.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_config_rootfs.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_config_user.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_device.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_env.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_interface_type.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_mount.dart delete mode 100644 clients/hydra/dart/lib/model/plugin_settings.dart delete mode 100644 clients/hydra/dart/lib/model/previous_consent_session.dart delete mode 100644 clients/hydra/dart/lib/model/reject_request.dart delete mode 100644 clients/hydra/dart/lib/model/request_was_handled_response.dart delete mode 100644 clients/hydra/dart/lib/model/trust_jwt_grant_issuer_body.dart delete mode 100644 clients/hydra/dart/lib/model/trusted_json_web_key.dart delete mode 100644 clients/hydra/dart/lib/model/trusted_jwt_grant_issuer.dart delete mode 100644 clients/hydra/dart/lib/model/userinfo_response.dart delete mode 100644 clients/hydra/dart/lib/model/version.dart delete mode 100644 clients/hydra/dart/lib/model/volume.dart delete mode 100644 clients/hydra/dart/lib/model/volume_usage_data.dart delete mode 100644 clients/hydra/dart/lib/model/well_known.dart create mode 100644 clients/hydra/dart/lib/ory_hydra_client.dart delete mode 100644 clients/hydra/dart/lib/serializers.dart create mode 100644 clients/hydra/dart/lib/src/api.dart create mode 100644 clients/hydra/dart/lib/src/api/jwk_api.dart create mode 100644 clients/hydra/dart/lib/src/api/metadata_api.dart create mode 100644 clients/hydra/dart/lib/src/api/o_auth2_api.dart create mode 100644 clients/hydra/dart/lib/src/api/oidc_api.dart create mode 100644 clients/hydra/dart/lib/src/api/wellknown_api.dart create mode 100644 clients/hydra/dart/lib/src/api_util.dart create mode 100644 clients/hydra/dart/lib/src/auth/api_key_auth.dart create mode 100644 clients/hydra/dart/lib/src/auth/auth.dart create mode 100644 clients/hydra/dart/lib/src/auth/basic_auth.dart create mode 100644 clients/hydra/dart/lib/src/auth/bearer_auth.dart create mode 100644 clients/hydra/dart/lib/src/auth/oauth.dart create mode 100644 clients/hydra/dart/lib/src/date_serializer.dart create mode 100644 clients/hydra/dart/lib/src/model/accept_o_auth2_consent_request.dart create mode 100644 clients/hydra/dart/lib/src/model/accept_o_auth2_consent_request_session.dart create mode 100644 clients/hydra/dart/lib/src/model/accept_o_auth2_login_request.dart create mode 100644 clients/hydra/dart/lib/src/model/create_json_web_key_set.dart create mode 100644 clients/hydra/dart/lib/src/model/date.dart create mode 100644 clients/hydra/dart/lib/src/model/error_o_auth2.dart create mode 100644 clients/hydra/dart/lib/src/model/generic_error.dart create mode 100644 clients/hydra/dart/lib/src/model/get_version200_response.dart create mode 100644 clients/hydra/dart/lib/src/model/health_not_ready_status.dart create mode 100644 clients/hydra/dart/lib/src/model/health_status.dart create mode 100644 clients/hydra/dart/lib/src/model/introspected_o_auth2_token.dart create mode 100644 clients/hydra/dart/lib/src/model/is_ready200_response.dart create mode 100644 clients/hydra/dart/lib/src/model/is_ready503_response.dart create mode 100644 clients/hydra/dart/lib/src/model/json_patch.dart create mode 100644 clients/hydra/dart/lib/src/model/json_web_key.dart create mode 100644 clients/hydra/dart/lib/src/model/json_web_key_set.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_client.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_client_token_lifespans.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_consent_request.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_consent_request_open_id_connect_context.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_consent_session.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_consent_session_expires_at.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_login_request.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_logout_request.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_redirect_to.dart create mode 100644 clients/hydra/dart/lib/src/model/o_auth2_token_exchange.dart create mode 100644 clients/hydra/dart/lib/src/model/oidc_configuration.dart create mode 100644 clients/hydra/dart/lib/src/model/oidc_user_info.dart create mode 100644 clients/hydra/dart/lib/src/model/pagination.dart create mode 100644 clients/hydra/dart/lib/src/model/pagination_headers.dart create mode 100644 clients/hydra/dart/lib/src/model/reject_o_auth2_request.dart create mode 100644 clients/hydra/dart/lib/src/model/token_pagination.dart create mode 100644 clients/hydra/dart/lib/src/model/token_pagination_headers.dart create mode 100644 clients/hydra/dart/lib/src/model/token_pagination_request_parameters.dart create mode 100644 clients/hydra/dart/lib/src/model/token_pagination_response_headers.dart create mode 100644 clients/hydra/dart/lib/src/model/trust_o_auth2_jwt_grant_issuer.dart create mode 100644 clients/hydra/dart/lib/src/model/trusted_o_auth2_jwt_grant_issuer.dart create mode 100644 clients/hydra/dart/lib/src/model/trusted_o_auth2_jwt_grant_json_web_key.dart create mode 100644 clients/hydra/dart/lib/src/model/version.dart create mode 100644 clients/hydra/dart/lib/src/serializers.dart rename clients/hydra/dart/test/{consent_request_session_test.dart => accept_o_auth2_consent_request_session_test.dart} (76%) rename clients/hydra/dart/test/{accept_consent_request_test.dart => accept_o_auth2_consent_request_test.dart} (77%) rename clients/hydra/dart/test/{accept_login_request_test.dart => accept_o_auth2_login_request_test.dart} (91%) delete mode 100644 clients/hydra/dart/test/admin_api_test.dart delete mode 100644 clients/hydra/dart/test/completed_request_test.dart delete mode 100644 clients/hydra/dart/test/container_wait_ok_body_error_test.dart create mode 100644 clients/hydra/dart/test/create_json_web_key_set_test.dart rename clients/hydra/dart/test/{json_error_test.dart => error_o_auth2_test.dart} (51%) delete mode 100644 clients/hydra/dart/test/flush_inactive_o_auth2_tokens_request_test.dart create mode 100644 clients/hydra/dart/test/get_version200_response_test.dart rename clients/hydra/dart/test/{o_auth2_token_introspection_test.dart => introspected_o_auth2_token_test.dart} (91%) create mode 100644 clients/hydra/dart/test/is_ready200_response_test.dart create mode 100644 clients/hydra/dart/test/is_ready503_response_test.dart create mode 100644 clients/hydra/dart/test/json_patch_test.dart delete mode 100644 clients/hydra/dart/test/json_web_key_set_generator_request_test.dart create mode 100644 clients/hydra/dart/test/jwk_api_test.dart create mode 100644 clients/hydra/dart/test/o_auth2_api_test.dart create mode 100644 clients/hydra/dart/test/o_auth2_client_token_lifespans_test.dart rename clients/hydra/dart/test/{open_id_connect_context_test.dart => o_auth2_consent_request_open_id_connect_context_test.dart} (91%) rename clients/hydra/dart/test/{consent_request_test.dart => o_auth2_consent_request_test.dart} (91%) create mode 100644 clients/hydra/dart/test/o_auth2_consent_session_expires_at_test.dart rename clients/hydra/dart/test/{previous_consent_session_test.dart => o_auth2_consent_session_test.dart} (52%) rename clients/hydra/dart/test/{login_request_test.dart => o_auth2_login_request_test.dart} (89%) rename clients/hydra/dart/test/{logout_request_test.dart => o_auth2_logout_request_test.dart} (82%) create mode 100644 clients/hydra/dart/test/o_auth2_redirect_to_test.dart create mode 100644 clients/hydra/dart/test/o_auth2_token_exchange_test.dart delete mode 100644 clients/hydra/dart/test/oauth2_token_response_test.dart create mode 100644 clients/hydra/dart/test/oidc_api_test.dart create mode 100644 clients/hydra/dart/test/oidc_configuration_test.dart rename clients/hydra/dart/test/{userinfo_response_test.dart => oidc_user_info_test.dart} (96%) create mode 100644 clients/hydra/dart/test/pagination_headers_test.dart create mode 100644 clients/hydra/dart/test/pagination_test.dart delete mode 100644 clients/hydra/dart/test/patch_document_test.dart delete mode 100644 clients/hydra/dart/test/plugin_config_args_test.dart delete mode 100644 clients/hydra/dart/test/plugin_config_interface_test.dart delete mode 100644 clients/hydra/dart/test/plugin_config_linux_test.dart delete mode 100644 clients/hydra/dart/test/plugin_config_network_test.dart delete mode 100644 clients/hydra/dart/test/plugin_config_rootfs_test.dart delete mode 100644 clients/hydra/dart/test/plugin_config_test.dart delete mode 100644 clients/hydra/dart/test/plugin_config_user_test.dart delete mode 100644 clients/hydra/dart/test/plugin_device_test.dart delete mode 100644 clients/hydra/dart/test/plugin_env_test.dart delete mode 100644 clients/hydra/dart/test/plugin_interface_type_test.dart delete mode 100644 clients/hydra/dart/test/plugin_mount_test.dart delete mode 100644 clients/hydra/dart/test/plugin_settings_test.dart delete mode 100644 clients/hydra/dart/test/public_api_test.dart rename clients/hydra/dart/test/{reject_request_test.dart => reject_o_auth2_request_test.dart} (81%) delete mode 100644 clients/hydra/dart/test/request_was_handled_response_test.dart create mode 100644 clients/hydra/dart/test/token_pagination_headers_test.dart create mode 100644 clients/hydra/dart/test/token_pagination_request_parameters_test.dart create mode 100644 clients/hydra/dart/test/token_pagination_response_headers_test.dart create mode 100644 clients/hydra/dart/test/token_pagination_test.dart rename clients/hydra/dart/test/{trust_jwt_grant_issuer_body_test.dart => trust_o_auth2_jwt_grant_issuer_test.dart} (69%) rename clients/hydra/dart/test/{trusted_jwt_grant_issuer_test.dart => trusted_o_auth2_jwt_grant_issuer_test.dart} (72%) rename clients/hydra/dart/test/{trusted_json_web_key_test.dart => trusted_o_auth2_jwt_grant_json_web_key_test.dart} (63%) delete mode 100644 clients/hydra/dart/test/volume_test.dart delete mode 100644 clients/hydra/dart/test/volume_usage_data_test.dart delete mode 100644 clients/hydra/dart/test/well_known_test.dart create mode 100644 clients/hydra/dart/test/wellknown_api_test.dart delete mode 100644 clients/hydra/dotnet/docs/AdminApi.md rename clients/hydra/dotnet/docs/{HydraAcceptConsentRequest.md => HydraAcceptOAuth2ConsentRequest.md} (83%) rename clients/hydra/dotnet/docs/{HydraConsentRequestSession.md => HydraAcceptOAuth2ConsentRequestSession.md} (93%) rename clients/hydra/dotnet/docs/{HydraAcceptLoginRequest.md => HydraAcceptOAuth2LoginRequest.md} (97%) delete mode 100644 clients/hydra/dotnet/docs/HydraContainerWaitOKBodyError.md create mode 100644 clients/hydra/dotnet/docs/HydraCreateJsonWebKeySet.md create mode 100644 clients/hydra/dotnet/docs/HydraErrorOAuth2.md delete mode 100644 clients/hydra/dotnet/docs/HydraFlushInactiveOAuth2TokensRequest.md rename clients/hydra/{python/docs/PatchRequest.md => dotnet/docs/HydraInlineResponse200.md} (71%) create mode 100644 clients/hydra/dotnet/docs/HydraInlineResponse2001.md rename clients/hydra/dotnet/docs/{HydraPluginConfigNetwork.md => HydraInlineResponse503.md} (60%) rename clients/hydra/dotnet/docs/{HydraOAuth2TokenIntrospection.md => HydraIntrospectedOAuth2Token.md} (90%) delete mode 100644 clients/hydra/dotnet/docs/HydraJSONWebKeySet.md delete mode 100644 clients/hydra/dotnet/docs/HydraJsonError.md create mode 100644 clients/hydra/dotnet/docs/HydraJsonPatch.md rename clients/hydra/dotnet/docs/{HydraJSONWebKey.md => HydraJsonWebKey.md} (94%) create mode 100644 clients/hydra/dotnet/docs/HydraJsonWebKeySet.md delete mode 100644 clients/hydra/dotnet/docs/HydraJsonWebKeySetGeneratorRequest.md create mode 100644 clients/hydra/dotnet/docs/HydraOAuth2ClientTokenLifespans.md rename clients/hydra/dotnet/docs/{HydraConsentRequest.md => HydraOAuth2ConsentRequest.md} (93%) rename clients/hydra/dotnet/docs/{HydraOpenIDConnectContext.md => HydraOAuth2ConsentRequestOpenIDConnectContext.md} (90%) create mode 100644 clients/hydra/dotnet/docs/HydraOAuth2ConsentSession.md create mode 100644 clients/hydra/dotnet/docs/HydraOAuth2ConsentSessionExpiresAt.md rename clients/hydra/dotnet/docs/{HydraLoginRequest.md => HydraOAuth2LoginRequest.md} (91%) rename clients/hydra/dotnet/docs/{HydraLogoutRequest.md => HydraOAuth2LogoutRequest.md} (95%) rename clients/hydra/dotnet/docs/{HydraCompletedRequest.md => HydraOAuth2RedirectTo.md} (61%) create mode 100644 clients/hydra/dotnet/docs/HydraOAuth2TokenExchange.md delete mode 100644 clients/hydra/dotnet/docs/HydraOauth2TokenResponse.md create mode 100644 clients/hydra/dotnet/docs/HydraOidcConfiguration.md rename clients/hydra/dotnet/docs/{HydraUserinfoResponse.md => HydraOidcUserInfo.md} (98%) create mode 100644 clients/hydra/dotnet/docs/HydraPagination.md create mode 100644 clients/hydra/dotnet/docs/HydraPaginationHeaders.md delete mode 100644 clients/hydra/dotnet/docs/HydraPatchDocument.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginConfig.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginConfigArgs.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginConfigInterface.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginConfigLinux.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginConfigRootfs.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginConfigUser.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginDevice.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginEnv.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginInterfaceType.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginMount.md delete mode 100644 clients/hydra/dotnet/docs/HydraPluginSettings.md delete mode 100644 clients/hydra/dotnet/docs/HydraPreviousConsentSession.md rename clients/hydra/dotnet/docs/{HydraRejectRequest.md => HydraRejectOAuth2Request.md} (94%) delete mode 100644 clients/hydra/dotnet/docs/HydraRequestWasHandledResponse.md create mode 100644 clients/hydra/dotnet/docs/HydraTokenPagination.md create mode 100644 clients/hydra/dotnet/docs/HydraTokenPaginationHeaders.md create mode 100644 clients/hydra/dotnet/docs/HydraTokenPaginationRequestParameters.md create mode 100644 clients/hydra/dotnet/docs/HydraTokenPaginationResponseHeaders.md rename clients/hydra/dotnet/docs/{HydraTrustJwtGrantIssuerBody.md => HydraTrustOAuth2JwtGrantIssuer.md} (67%) rename clients/hydra/dotnet/docs/{HydraTrustedJwtGrantIssuer.md => HydraTrustedOAuth2JwtGrantIssuer.md} (72%) rename clients/hydra/dotnet/docs/{HydraTrustedJsonWebKey.md => HydraTrustedOAuth2JwtGrantJsonWebKey.md} (82%) delete mode 100644 clients/hydra/dotnet/docs/HydraVolume.md delete mode 100644 clients/hydra/dotnet/docs/HydraVolumeUsageData.md delete mode 100644 clients/hydra/dotnet/docs/HydraWellKnown.md create mode 100644 clients/hydra/dotnet/docs/JwkApi.md create mode 100644 clients/hydra/dotnet/docs/OAuth2Api.md create mode 100644 clients/hydra/dotnet/docs/OidcApi.md delete mode 100644 clients/hydra/dotnet/docs/PublicApi.md create mode 100644 clients/hydra/dotnet/docs/WellknownApi.md delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/AdminApiTests.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/JwkApiTests.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OAuth2ApiTests.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OidcApiTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/PublicApiTests.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/WellknownApiTests.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraConsentRequestSessionTests.cs => HydraAcceptOAuth2ConsentRequestSessionTests.cs} (61%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraAcceptConsentRequestTests.cs => HydraAcceptOAuth2ConsentRequestTests.cs} (76%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraAcceptLoginRequestTests.cs => HydraAcceptOAuth2LoginRequestTests.cs} (78%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraJsonWebKeySetGeneratorRequestTests.cs => HydraCreateJsonWebKeySetTests.cs} (64%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraJsonErrorTests.cs => HydraErrorOAuth2Tests.cs} (68%) delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraFlushInactiveOAuth2TokensRequestTests.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraPluginConfigNetworkTests.cs => HydraInlineResponse2001Tests.cs} (54%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraContainerWaitOKBodyErrorTests.cs => HydraInlineResponse200Tests.cs} (52%) create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse503Tests.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraOAuth2TokenIntrospectionTests.cs => HydraIntrospectedOAuth2TokenTests.cs} (82%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraPatchDocumentTests.cs => HydraJsonPatchTests.cs} (72%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraJSONWebKeySetTests.cs => HydraJsonWebKeySetTests.cs} (63%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraJSONWebKeyTests.cs => HydraJsonWebKeyTests.cs} (86%) create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTokenLifespansTests.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraOpenIDConnectContextTests.cs => HydraOAuth2ConsentRequestOpenIDConnectContextTests.cs} (68%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraConsentRequestTests.cs => HydraOAuth2ConsentRequestTests.cs} (84%) create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionExpiresAtTests.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraPreviousConsentSessionTests.cs => HydraOAuth2ConsentSessionTests.cs} (72%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraLoginRequestTests.cs => HydraOAuth2LoginRequestTests.cs} (80%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraLogoutRequestTests.cs => HydraOAuth2LogoutRequestTests.cs} (75%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraCompletedRequestTests.cs => HydraOAuth2RedirectToTests.cs} (62%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraOauth2TokenResponseTests.cs => HydraOAuth2TokenExchangeTests.cs} (75%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraWellKnownTests.cs => HydraOidcConfigurationTests.cs} (86%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraUserinfoResponseTests.cs => HydraOidcUserInfoTests.cs} (87%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraVolumeUsageDataTests.cs => HydraPaginationHeadersTests.cs} (53%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraPluginConfigRootfsTests.cs => HydraPaginationTests.cs} (54%) delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigArgsTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigInterfaceTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigLinuxTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginDeviceTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginEnvTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginInterfaceTypeTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginMountTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginSettingsTests.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraRejectRequestTests.cs => HydraRejectOAuth2RequestTests.cs} (76%) delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRequestWasHandledResponseTests.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationHeadersTests.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationRequestParametersTests.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationResponseHeadersTests.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraPluginConfigUserTests.cs => HydraTokenPaginationTests.cs} (53%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraTrustJwtGrantIssuerBodyTests.cs => HydraTrustOAuth2JwtGrantIssuerTests.cs} (66%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraTrustedJwtGrantIssuerTests.cs => HydraTrustedOAuth2JwtGrantIssuerTests.cs} (71%) rename clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/{HydraTrustedJsonWebKeyTests.cs => HydraTrustedOAuth2JwtGrantJsonWebKeyTests.cs} (64%) delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVolumeTests.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Api/AdminApi.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OAuth2Api.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OidcApi.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Api/PublicApi.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Api/WellknownApi.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraAcceptConsentRequest.cs => HydraAcceptOAuth2ConsentRequest.cs} (87%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraConsentRequestSession.cs => HydraAcceptOAuth2ConsentRequestSession.cs} (84%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraAcceptLoginRequest.cs => HydraAcceptOAuth2LoginRequest.cs} (91%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraJsonWebKeySetGeneratorRequest.cs => HydraCreateJsonWebKeySet.cs} (67%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraJsonError.cs => HydraErrorOAuth2.cs} (70%) delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraFlushInactiveOAuth2TokensRequest.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraPluginConfigUser.cs => HydraInlineResponse200.cs} (64%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraContainerWaitOKBodyError.cs => HydraInlineResponse2001.cs} (68%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraPluginConfigNetwork.cs => HydraInlineResponse503.cs} (62%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraOAuth2TokenIntrospection.cs => HydraIntrospectedOAuth2Token.cs} (91%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraPatchDocument.cs => HydraJsonPatch.cs} (65%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraJSONWebKey.cs => HydraJsonWebKey.cs} (94%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraJSONWebKeySet.cs => HydraJsonWebKeySet.cs} (64%) create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraConsentRequest.cs => HydraOAuth2ConsentRequest.cs} (91%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraOpenIDConnectContext.cs => HydraOAuth2ConsentRequestOpenIDConnectContext.cs} (90%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraPreviousConsentSession.cs => HydraOAuth2ConsentSession.cs} (70%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraOauth2TokenResponse.cs => HydraOAuth2ConsentSessionExpiresAt.cs} (65%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraLoginRequest.cs => HydraOAuth2LoginRequest.cs} (89%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraLogoutRequest.cs => HydraOAuth2LogoutRequest.cs} (89%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraCompletedRequest.cs => HydraOAuth2RedirectTo.cs} (77%) create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraWellKnown.cs => HydraOidcConfiguration.cs} (51%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraUserinfoResponse.cs => HydraOidcUserInfo.cs} (95%) create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPagination.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraPluginConfigRootfs.cs => HydraPaginationHeaders.cs} (56%) delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfig.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigArgs.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigInterface.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigLinux.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginDevice.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginEnv.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginInterfaceType.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginMount.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginSettings.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraRejectRequest.cs => HydraRejectOAuth2Request.cs} (89%) delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRequestWasHandledResponse.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPagination.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs create mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraTrustJwtGrantIssuerBody.cs => HydraTrustOAuth2JwtGrantIssuer.cs} (77%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraTrustedJwtGrantIssuer.cs => HydraTrustedOAuth2JwtGrantIssuer.cs} (80%) rename clients/hydra/dotnet/src/Ory.Hydra.Client/Model/{HydraTrustedJsonWebKey.cs => HydraTrustedOAuth2JwtGrantJsonWebKey.cs} (84%) delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVolume.cs delete mode 100644 clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVolumeUsageData.cs create mode 100644 clients/hydra/elixir/.formatter.exs create mode 100644 clients/hydra/elixir/config/runtime.exs delete mode 100644 clients/hydra/elixir/lib/ory/api/admin.ex create mode 100644 clients/hydra/elixir/lib/ory/api/jwk.ex create mode 100644 clients/hydra/elixir/lib/ory/api/o_auth2.ex create mode 100644 clients/hydra/elixir/lib/ory/api/oidc.ex delete mode 100644 clients/hydra/elixir/lib/ory/api/public.ex create mode 100644 clients/hydra/elixir/lib/ory/api/wellknown.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/accept_consent_request.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/accept_login_request.ex create mode 100644 clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request.ex create mode 100644 clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request_session.ex create mode 100644 clients/hydra/elixir/lib/ory/model/accept_o_auth2_login_request.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/consent_request.ex rename clients/hydra/elixir/lib/ory/model/{container_wait_ok_body_error.ex => create_json_web_key_set.ex} (57%) create mode 100644 clients/hydra/elixir/lib/ory/model/error_o_auth2.ex rename clients/hydra/elixir/lib/ory/model/{request_was_handled_response.ex => get_version_200_response.ex} (65%) create mode 100644 clients/hydra/elixir/lib/ory/model/introspected_o_auth2_token.ex rename clients/hydra/elixir/lib/ory/model/{completed_request.ex => is_ready_200_response.ex} (68%) rename clients/hydra/elixir/lib/ory/model/{flush_inactive_o_auth2_tokens_request.ex => is_ready_503_response.ex} (63%) delete mode 100644 clients/hydra/elixir/lib/ory/model/json_error.ex create mode 100644 clients/hydra/elixir/lib/ory/model/json_patch.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/json_web_key_set_generator_request.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/login_request.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/logout_request.ex create mode 100644 clients/hydra/elixir/lib/ory/model/o_auth2_client_token_lifespans.ex create mode 100644 clients/hydra/elixir/lib/ory/model/o_auth2_consent_request.ex create mode 100644 clients/hydra/elixir/lib/ory/model/o_auth2_consent_request_open_id_connect_context.ex create mode 100644 clients/hydra/elixir/lib/ory/model/o_auth2_consent_session.ex create mode 100644 clients/hydra/elixir/lib/ory/model/o_auth2_consent_session_expires_at.ex create mode 100644 clients/hydra/elixir/lib/ory/model/o_auth2_login_request.ex create mode 100644 clients/hydra/elixir/lib/ory/model/o_auth2_logout_request.ex rename clients/hydra/elixir/lib/ory/model/{consent_request_session.ex => o_auth2_redirect_to.ex} (58%) create mode 100644 clients/hydra/elixir/lib/ory/model/o_auth2_token_exchange.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/o_auth2_token_introspection.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/oauth2_token_response.ex create mode 100644 clients/hydra/elixir/lib/ory/model/oidc_configuration.ex create mode 100644 clients/hydra/elixir/lib/ory/model/oidc_user_info.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/open_id_connect_context.ex rename clients/hydra/elixir/lib/ory/model/{trusted_json_web_key.ex => pagination.ex} (63%) create mode 100644 clients/hydra/elixir/lib/ory/model/pagination_headers.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/patch_document.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_config.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_config_args.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_config_interface.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_config_linux.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_config_network.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_config_rootfs.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_config_user.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_device.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_env.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_interface_type.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_mount.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/plugin_settings.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/previous_consent_session.ex create mode 100644 clients/hydra/elixir/lib/ory/model/reject_o_auth2_request.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/reject_request.ex create mode 100644 clients/hydra/elixir/lib/ory/model/token_pagination.ex create mode 100644 clients/hydra/elixir/lib/ory/model/token_pagination_headers.ex create mode 100644 clients/hydra/elixir/lib/ory/model/token_pagination_request_parameters.ex create mode 100644 clients/hydra/elixir/lib/ory/model/token_pagination_response_headers.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/trust_jwt_grant_issuer_body.ex create mode 100644 clients/hydra/elixir/lib/ory/model/trust_o_auth2_jwt_grant_issuer.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/trusted_jwt_grant_issuer.ex create mode 100644 clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_issuer.ex create mode 100644 clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_json_web_key.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/userinfo_response.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/volume.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/volume_usage_data.ex delete mode 100644 clients/hydra/elixir/lib/ory/model/well_known.ex delete mode 100644 clients/hydra/go/api_admin.go create mode 100644 clients/hydra/go/api_jwk.go create mode 100644 clients/hydra/go/api_o_auth2.go create mode 100644 clients/hydra/go/api_oidc.go delete mode 100644 clients/hydra/go/api_public.go create mode 100644 clients/hydra/go/api_wellknown.go rename clients/hydra/go/docs/{AcceptConsentRequest.md => AcceptOAuth2ConsentRequest.md} (64%) create mode 100644 clients/hydra/go/docs/AcceptOAuth2ConsentRequestSession.md rename clients/hydra/go/docs/{AcceptLoginRequest.md => AcceptOAuth2LoginRequest.md} (70%) delete mode 100644 clients/hydra/go/docs/AdminApi.md delete mode 100644 clients/hydra/go/docs/ConsentRequestSession.md delete mode 100644 clients/hydra/go/docs/ContainerWaitOKBodyError.md create mode 100644 clients/hydra/go/docs/CreateJsonWebKeySet.md rename clients/hydra/go/docs/{JsonError.md => ErrorOAuth2.md} (52%) delete mode 100644 clients/hydra/go/docs/FlushInactiveOAuth2TokensRequest.md create mode 100644 clients/hydra/go/docs/GetVersion200Response.md rename clients/hydra/go/docs/{OAuth2TokenIntrospection.md => IntrospectedOAuth2Token.md} (69%) create mode 100644 clients/hydra/go/docs/IsReady200Response.md create mode 100644 clients/hydra/go/docs/IsReady503Response.md rename clients/hydra/go/docs/{PatchDocument.md => JsonPatch.md} (50%) rename clients/hydra/go/docs/{JSONWebKey.md => JsonWebKey.md} (75%) rename clients/hydra/go/docs/{JSONWebKeySet.md => JsonWebKeySet.md} (53%) delete mode 100644 clients/hydra/go/docs/JsonWebKeySetGeneratorRequest.md create mode 100644 clients/hydra/go/docs/JwkApi.md create mode 100644 clients/hydra/go/docs/OAuth2Api.md create mode 100644 clients/hydra/go/docs/OAuth2ClientTokenLifespans.md rename clients/hydra/go/docs/{ConsentRequest.md => OAuth2ConsentRequest.md} (67%) rename clients/hydra/go/docs/{OpenIDConnectContext.md => OAuth2ConsentRequestOpenIDConnectContext.md} (72%) rename clients/hydra/go/docs/{PreviousConsentSession.md => OAuth2ConsentSession.md} (51%) create mode 100644 clients/hydra/go/docs/OAuth2ConsentSessionExpiresAt.md rename clients/hydra/go/docs/{LoginRequest.md => OAuth2LoginRequest.md} (70%) rename clients/hydra/go/docs/{LogoutRequest.md => OAuth2LogoutRequest.md} (69%) rename clients/hydra/go/docs/{CompletedRequest.md => OAuth2RedirectTo.md} (64%) rename clients/hydra/go/docs/{Oauth2TokenResponse.md => OAuth2TokenExchange.md} (55%) create mode 100644 clients/hydra/go/docs/OidcApi.md create mode 100644 clients/hydra/go/docs/OidcConfiguration.md rename clients/hydra/go/docs/{UserinfoResponse.md => OidcUserInfo.md} (76%) create mode 100644 clients/hydra/go/docs/Pagination.md create mode 100644 clients/hydra/go/docs/PaginationHeaders.md delete mode 100644 clients/hydra/go/docs/PluginConfig.md delete mode 100644 clients/hydra/go/docs/PluginConfigArgs.md delete mode 100644 clients/hydra/go/docs/PluginConfigInterface.md delete mode 100644 clients/hydra/go/docs/PluginConfigLinux.md delete mode 100644 clients/hydra/go/docs/PluginConfigNetwork.md delete mode 100644 clients/hydra/go/docs/PluginConfigRootfs.md delete mode 100644 clients/hydra/go/docs/PluginConfigUser.md delete mode 100644 clients/hydra/go/docs/PluginDevice.md delete mode 100644 clients/hydra/go/docs/PluginEnv.md delete mode 100644 clients/hydra/go/docs/PluginInterfaceType.md delete mode 100644 clients/hydra/go/docs/PluginMount.md delete mode 100644 clients/hydra/go/docs/PluginSettings.md delete mode 100644 clients/hydra/go/docs/PublicApi.md rename clients/hydra/go/docs/{RejectRequest.md => RejectOAuth2Request.md} (69%) delete mode 100644 clients/hydra/go/docs/RequestWasHandledResponse.md create mode 100644 clients/hydra/go/docs/TokenPagination.md create mode 100644 clients/hydra/go/docs/TokenPaginationHeaders.md create mode 100644 clients/hydra/go/docs/TokenPaginationRequestParameters.md create mode 100644 clients/hydra/go/docs/TokenPaginationResponseHeaders.md delete mode 100644 clients/hydra/go/docs/TrustJwtGrantIssuerBody.md create mode 100644 clients/hydra/go/docs/TrustOAuth2JwtGrantIssuer.md rename clients/hydra/go/docs/{TrustedJwtGrantIssuer.md => TrustedOAuth2JwtGrantIssuer.md} (56%) rename clients/hydra/go/docs/{TrustedJsonWebKey.md => TrustedOAuth2JwtGrantJsonWebKey.md} (62%) delete mode 100644 clients/hydra/go/docs/Volume.md delete mode 100644 clients/hydra/go/docs/VolumeUsageData.md delete mode 100644 clients/hydra/go/docs/WellKnown.md create mode 100644 clients/hydra/go/docs/WellknownApi.md rename clients/hydra/go/{model_accept_consent_request.go => model_accept_o_auth2_consent_request.go} (64%) create mode 100644 clients/hydra/go/model_accept_o_auth2_consent_request_session.go rename clients/hydra/go/{model_accept_login_request.go => model_accept_o_auth2_login_request.go} (69%) delete mode 100644 clients/hydra/go/model_completed_request.go delete mode 100644 clients/hydra/go/model_consent_request_session.go delete mode 100644 clients/hydra/go/model_container_wait_ok_body_error.go create mode 100644 clients/hydra/go/model_create_json_web_key_set.go rename clients/hydra/go/{model_json_error.go => model_error_o_auth2.go} (58%) delete mode 100644 clients/hydra/go/model_flush_inactive_o_auth2_tokens_request.go create mode 100644 clients/hydra/go/model_get_version_200_response.go rename clients/hydra/go/{model_o_auth2_token_introspection.go => model_introspected_o_auth2_token.go} (72%) create mode 100644 clients/hydra/go/model_is_ready_200_response.go create mode 100644 clients/hydra/go/model_is_ready_503_response.go rename clients/hydra/go/{model_patch_document.go => model_json_patch.go} (52%) delete mode 100644 clients/hydra/go/model_json_web_key_set_generator_request.go create mode 100644 clients/hydra/go/model_o_auth2_client_token_lifespans.go rename clients/hydra/go/{model_consent_request.go => model_o_auth2_consent_request.go} (70%) rename clients/hydra/go/{model_open_id_connect_context.go => model_o_auth2_consent_request_open_id_connect_context.go} (69%) rename clients/hydra/go/{model_previous_consent_session.go => model_o_auth2_consent_session.go} (55%) create mode 100644 clients/hydra/go/model_o_auth2_consent_session_expires_at.go rename clients/hydra/go/{model_login_request.go => model_o_auth2_login_request.go} (67%) rename clients/hydra/go/{model_logout_request.go => model_o_auth2_logout_request.go} (69%) create mode 100644 clients/hydra/go/model_o_auth2_redirect_to.go rename clients/hydra/go/{model_oauth2_token_response.go => model_o_auth2_token_exchange.go} (61%) rename clients/hydra/go/{model_well_known.go => model_oidc_configuration.go} (62%) rename clients/hydra/go/{model_userinfo_response.go => model_oidc_user_info.go} (79%) create mode 100644 clients/hydra/go/model_pagination.go create mode 100644 clients/hydra/go/model_pagination_headers.go delete mode 100644 clients/hydra/go/model_plugin_config.go delete mode 100644 clients/hydra/go/model_plugin_config_args.go delete mode 100644 clients/hydra/go/model_plugin_config_interface.go delete mode 100644 clients/hydra/go/model_plugin_config_linux_.go delete mode 100644 clients/hydra/go/model_plugin_config_network.go delete mode 100644 clients/hydra/go/model_plugin_config_rootfs.go delete mode 100644 clients/hydra/go/model_plugin_config_user.go delete mode 100644 clients/hydra/go/model_plugin_device.go delete mode 100644 clients/hydra/go/model_plugin_env.go delete mode 100644 clients/hydra/go/model_plugin_interface_type.go delete mode 100644 clients/hydra/go/model_plugin_mount.go delete mode 100644 clients/hydra/go/model_plugin_settings.go rename clients/hydra/go/{model_reject_request.go => model_reject_o_auth2_request.go} (69%) delete mode 100644 clients/hydra/go/model_request_was_handled_response.go create mode 100644 clients/hydra/go/model_token_pagination.go create mode 100644 clients/hydra/go/model_token_pagination_headers.go create mode 100644 clients/hydra/go/model_token_pagination_request_parameters.go create mode 100644 clients/hydra/go/model_token_pagination_response_headers.go delete mode 100644 clients/hydra/go/model_trust_jwt_grant_issuer_body.go create mode 100644 clients/hydra/go/model_trust_o_auth2_jwt_grant_issuer.go rename clients/hydra/go/{model_trusted_jwt_grant_issuer.go => model_trusted_o_auth2_jwt_grant_issuer.go} (56%) rename clients/hydra/go/{model_trusted_json_web_key.go => model_trusted_o_auth2_jwt_grant_json_web_key.go} (53%) delete mode 100644 clients/hydra/go/model_volume.go delete mode 100644 clients/hydra/go/model_volume_usage_data.go create mode 100644 clients/hydra/java/.github/workflows/maven.yml delete mode 100644 clients/hydra/java/docs/AcceptConsentRequest.md delete mode 100644 clients/hydra/java/docs/AcceptLoginRequest.md create mode 100644 clients/hydra/java/docs/AcceptOAuth2ConsentRequest.md create mode 100644 clients/hydra/java/docs/AcceptOAuth2ConsentRequestSession.md create mode 100644 clients/hydra/java/docs/AcceptOAuth2LoginRequest.md delete mode 100644 clients/hydra/java/docs/AdminApi.md delete mode 100644 clients/hydra/java/docs/CompletedRequest.md delete mode 100644 clients/hydra/java/docs/ConsentRequest.md delete mode 100644 clients/hydra/java/docs/ConsentRequestSession.md delete mode 100644 clients/hydra/java/docs/ContainerWaitOKBodyError.md create mode 100644 clients/hydra/java/docs/CreateJsonWebKeySet.md create mode 100644 clients/hydra/java/docs/ErrorOAuth2.md delete mode 100644 clients/hydra/java/docs/FlushInactiveOAuth2TokensRequest.md create mode 100644 clients/hydra/java/docs/GetVersion200Response.md create mode 100644 clients/hydra/java/docs/IntrospectedOAuth2Token.md create mode 100644 clients/hydra/java/docs/IsReady200Response.md create mode 100644 clients/hydra/java/docs/IsReady503Response.md delete mode 100644 clients/hydra/java/docs/JSONWebKey.md delete mode 100644 clients/hydra/java/docs/JSONWebKeySet.md delete mode 100644 clients/hydra/java/docs/JsonError.md create mode 100644 clients/hydra/java/docs/JsonPatch.md create mode 100644 clients/hydra/java/docs/JsonWebKey.md create mode 100644 clients/hydra/java/docs/JsonWebKeySet.md delete mode 100644 clients/hydra/java/docs/JsonWebKeySetGeneratorRequest.md create mode 100644 clients/hydra/java/docs/JwkApi.md delete mode 100644 clients/hydra/java/docs/LoginRequest.md delete mode 100644 clients/hydra/java/docs/LogoutRequest.md create mode 100644 clients/hydra/java/docs/OAuth2Api.md create mode 100644 clients/hydra/java/docs/OAuth2ClientTokenLifespans.md create mode 100644 clients/hydra/java/docs/OAuth2ConsentRequest.md create mode 100644 clients/hydra/java/docs/OAuth2ConsentRequestOpenIDConnectContext.md create mode 100644 clients/hydra/java/docs/OAuth2ConsentSession.md create mode 100644 clients/hydra/java/docs/OAuth2ConsentSessionExpiresAt.md create mode 100644 clients/hydra/java/docs/OAuth2LoginRequest.md create mode 100644 clients/hydra/java/docs/OAuth2LogoutRequest.md create mode 100644 clients/hydra/java/docs/OAuth2RedirectTo.md create mode 100644 clients/hydra/java/docs/OAuth2TokenExchange.md delete mode 100644 clients/hydra/java/docs/OAuth2TokenIntrospection.md delete mode 100644 clients/hydra/java/docs/Oauth2TokenResponse.md create mode 100644 clients/hydra/java/docs/OidcApi.md create mode 100644 clients/hydra/java/docs/OidcConfiguration.md create mode 100644 clients/hydra/java/docs/OidcUserInfo.md delete mode 100644 clients/hydra/java/docs/OpenIDConnectContext.md create mode 100644 clients/hydra/java/docs/Pagination.md create mode 100644 clients/hydra/java/docs/PaginationHeaders.md delete mode 100644 clients/hydra/java/docs/PatchDocument.md delete mode 100644 clients/hydra/java/docs/PluginConfig.md delete mode 100644 clients/hydra/java/docs/PluginConfigArgs.md delete mode 100644 clients/hydra/java/docs/PluginConfigInterface.md delete mode 100644 clients/hydra/java/docs/PluginConfigLinux.md delete mode 100644 clients/hydra/java/docs/PluginConfigNetwork.md delete mode 100644 clients/hydra/java/docs/PluginConfigRootfs.md delete mode 100644 clients/hydra/java/docs/PluginConfigUser.md delete mode 100644 clients/hydra/java/docs/PluginDevice.md delete mode 100644 clients/hydra/java/docs/PluginEnv.md delete mode 100644 clients/hydra/java/docs/PluginInterfaceType.md delete mode 100644 clients/hydra/java/docs/PluginMount.md delete mode 100644 clients/hydra/java/docs/PluginSettings.md delete mode 100644 clients/hydra/java/docs/PreviousConsentSession.md delete mode 100644 clients/hydra/java/docs/PublicApi.md create mode 100644 clients/hydra/java/docs/RejectOAuth2Request.md delete mode 100644 clients/hydra/java/docs/RejectRequest.md delete mode 100644 clients/hydra/java/docs/RequestWasHandledResponse.md create mode 100644 clients/hydra/java/docs/TokenPagination.md create mode 100644 clients/hydra/java/docs/TokenPaginationHeaders.md create mode 100644 clients/hydra/java/docs/TokenPaginationRequestParameters.md create mode 100644 clients/hydra/java/docs/TokenPaginationResponseHeaders.md delete mode 100644 clients/hydra/java/docs/TrustJwtGrantIssuerBody.md create mode 100644 clients/hydra/java/docs/TrustOAuth2JwtGrantIssuer.md delete mode 100644 clients/hydra/java/docs/TrustedJsonWebKey.md delete mode 100644 clients/hydra/java/docs/TrustedJwtGrantIssuer.md create mode 100644 clients/hydra/java/docs/TrustedOAuth2JwtGrantIssuer.md create mode 100644 clients/hydra/java/docs/TrustedOAuth2JwtGrantJsonWebKey.md delete mode 100644 clients/hydra/java/docs/UserinfoResponse.md delete mode 100644 clients/hydra/java/docs/Volume.md delete mode 100644 clients/hydra/java/docs/VolumeUsageData.md delete mode 100644 clients/hydra/java/docs/WellKnown.md create mode 100644 clients/hydra/java/docs/WellknownApi.md delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/api/AdminApi.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/api/JwkApi.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/api/OAuth2Api.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/api/OidcApi.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/api/PublicApi.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/api/WellknownApi.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/AbstractOpenApiSchema.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptConsentRequest.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequest.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSession.java rename clients/hydra/java/src/main/java/sh/ory/hydra/model/{AcceptLoginRequest.java => AcceptOAuth2LoginRequest.java} (54%) delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/CompletedRequest.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/ConsentRequestSession.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/ContainerWaitOKBodyError.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateJsonWebKeySet.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/ErrorOAuth2.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/GetVersion200Response.java rename clients/hydra/java/src/main/java/sh/ory/hydra/model/{OAuth2TokenIntrospection.java => IntrospectedOAuth2Token.java} (53%) create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady200Response.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady503Response.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/JSONWebKeySet.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonError.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonPatch.java rename clients/hydra/java/src/main/java/sh/ory/hydra/model/{JSONWebKey.java => JsonWebKey.java} (58%) create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySet.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySetGeneratorRequest.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/LogoutRequest.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ClientTokenLifespans.java rename clients/hydra/java/src/main/java/sh/ory/hydra/model/{ConsentRequest.java => OAuth2ConsentRequest.java} (52%) rename clients/hydra/java/src/main/java/sh/ory/hydra/model/{OpenIDConnectContext.java => OAuth2ConsentRequestOpenIDConnectContext.java} (56%) create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSession.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAt.java rename clients/hydra/java/src/main/java/sh/ory/hydra/model/{LoginRequest.java => OAuth2LoginRequest.java} (50%) create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LogoutRequest.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2RedirectTo.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2TokenExchange.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/Oauth2TokenResponse.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcConfiguration.java rename clients/hydra/java/src/main/java/sh/ory/hydra/model/{UserinfoResponse.java => OidcUserInfo.java} (64%) create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/Pagination.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PaginationHeaders.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PatchDocument.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfig.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigArgs.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigInterface.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigLinux.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigNetwork.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigRootfs.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigUser.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginDevice.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginEnv.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginInterfaceType.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginMount.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginSettings.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/PreviousConsentSession.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectOAuth2Request.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectRequest.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/RequestWasHandledResponse.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPagination.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationHeaders.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationRequestParameters.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationResponseHeaders.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustJwtGrantIssuerBody.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuer.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedJsonWebKey.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedJwtGrantIssuer.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuer.java create mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKey.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/Volume.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/VolumeUsageData.java delete mode 100644 clients/hydra/java/src/main/java/sh/ory/hydra/model/WellKnown.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/api/AdminApiTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/api/JwkApiTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/api/OAuth2ApiTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/api/OidcApiTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/api/PublicApiTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/api/WellknownApiTest.java rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{ConsentRequestSessionTest.java => AcceptOAuth2ConsentRequestSessionTest.java} (57%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{AcceptConsentRequestTest.java => AcceptOAuth2ConsentRequestTest.java} (71%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{AcceptLoginRequestTest.java => AcceptOAuth2LoginRequestTest.java} (73%) delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/ContainerWaitOKBodyErrorTest.java rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{JsonWebKeySetGeneratorRequestTest.java => CreateJsonWebKeySetTest.java} (61%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{RejectRequestTest.java => ErrorOAuth2Test.java} (72%) delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequestTest.java rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{PluginConfigNetworkTest.java => GetVersion200ResponseTest.java} (50%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{OAuth2TokenIntrospectionTest.java => IntrospectedOAuth2TokenTest.java} (81%) create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady200ResponseTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady503ResponseTest.java rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{PatchDocumentTest.java => JsonPatchTest.java} (68%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{JSONWebKeySetTest.java => JsonWebKeySetTest.java} (59%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{JSONWebKeyTest.java => JsonWebKeyTest.java} (84%) create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTokenLifespansTest.java rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{OpenIDConnectContextTest.java => OAuth2ConsentRequestOpenIDConnectContextTest.java} (66%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{ConsentRequestTest.java => OAuth2ConsentRequestTest.java} (80%) create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAtTest.java rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{PreviousConsentSessionTest.java => OAuth2ConsentSessionTest.java} (67%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{LoginRequestTest.java => OAuth2LoginRequestTest.java} (78%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{LogoutRequestTest.java => OAuth2LogoutRequestTest.java} (74%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{CompletedRequestTest.java => OAuth2RedirectToTest.java} (59%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{Oauth2TokenResponseTest.java => OAuth2TokenExchangeTest.java} (72%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{WellKnownTest.java => OidcConfigurationTest.java} (86%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{UserinfoResponseTest.java => OidcUserInfoTest.java} (86%) create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationHeadersTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigArgsTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigInterfaceTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigLinuxTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigRootfsTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigUserTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginDeviceTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginEnvTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginInterfaceTypeTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginMountTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginSettingsTest.java rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{JsonErrorTest.java => RejectOAuth2RequestTest.java} (64%) delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/RequestWasHandledResponseTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationHeadersTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationRequestParametersTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationResponseHeadersTest.java create mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationTest.java rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{TrustJwtGrantIssuerBodyTest.java => TrustOAuth2JwtGrantIssuerTest.java} (64%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{TrustedJwtGrantIssuerTest.java => TrustedOAuth2JwtGrantIssuerTest.java} (67%) rename clients/hydra/java/src/test/java/sh/ory/hydra/model/{TrustedJsonWebKeyTest.java => TrustedOAuth2JwtGrantJsonWebKeyTest.java} (59%) delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/VolumeTest.java delete mode 100644 clients/hydra/java/src/test/java/sh/ory/hydra/model/VolumeUsageDataTest.java create mode 100644 clients/hydra/php/composer.lock delete mode 100644 clients/hydra/php/docs/Api/AdminApi.md create mode 100644 clients/hydra/php/docs/Api/JwkApi.md create mode 100644 clients/hydra/php/docs/Api/OAuth2Api.md create mode 100644 clients/hydra/php/docs/Api/OidcApi.md delete mode 100644 clients/hydra/php/docs/Api/PublicApi.md create mode 100644 clients/hydra/php/docs/Api/WellknownApi.md rename clients/hydra/php/docs/Model/{AcceptConsentRequest.md => AcceptOAuth2ConsentRequest.md} (83%) create mode 100644 clients/hydra/php/docs/Model/AcceptOAuth2ConsentRequestSession.md rename clients/hydra/php/docs/Model/{AcceptLoginRequest.md => AcceptOAuth2LoginRequest.md} (97%) delete mode 100644 clients/hydra/php/docs/Model/ConsentRequestSession.md create mode 100644 clients/hydra/php/docs/Model/CreateJsonWebKeySet.md create mode 100644 clients/hydra/php/docs/Model/ErrorOAuth2.md delete mode 100644 clients/hydra/php/docs/Model/FlushInactiveOAuth2TokensRequest.md rename clients/hydra/php/docs/Model/{PluginConfigNetwork.md => InlineResponse200.md} (73%) rename clients/hydra/php/docs/Model/{ContainerWaitOKBodyError.md => InlineResponse2001.md} (73%) rename clients/hydra/php/docs/Model/{PluginConfigUser.md => InlineResponse503.md} (63%) rename clients/hydra/php/docs/Model/{OAuth2TokenIntrospection.md => IntrospectedOAuth2Token.md} (95%) delete mode 100644 clients/hydra/php/docs/Model/JSONWebKeySet.md delete mode 100644 clients/hydra/php/docs/Model/JsonError.md create mode 100644 clients/hydra/php/docs/Model/JsonPatch.md rename clients/hydra/php/docs/Model/{JSONWebKey.md => JsonWebKey.md} (99%) create mode 100644 clients/hydra/php/docs/Model/JsonWebKeySet.md delete mode 100644 clients/hydra/php/docs/Model/JsonWebKeySetGeneratorRequest.md create mode 100644 clients/hydra/php/docs/Model/OAuth2ClientTokenLifespans.md rename clients/hydra/php/docs/Model/{ConsentRequest.md => OAuth2ConsentRequest.md} (91%) rename clients/hydra/php/docs/Model/{OpenIDConnectContext.md => OAuth2ConsentRequestOpenIDConnectContext.md} (91%) create mode 100644 clients/hydra/php/docs/Model/OAuth2ConsentSession.md create mode 100644 clients/hydra/php/docs/Model/OAuth2ConsentSessionExpiresAt.md rename clients/hydra/php/docs/Model/{LoginRequest.md => OAuth2LoginRequest.md} (92%) rename clients/hydra/php/docs/Model/{LogoutRequest.md => OAuth2LogoutRequest.md} (97%) rename clients/hydra/php/docs/Model/{CompletedRequest.md => OAuth2RedirectTo.md} (73%) create mode 100644 clients/hydra/php/docs/Model/OAuth2TokenExchange.md delete mode 100644 clients/hydra/php/docs/Model/Oauth2TokenResponse.md create mode 100644 clients/hydra/php/docs/Model/OidcConfiguration.md rename clients/hydra/php/docs/Model/{UserinfoResponse.md => OidcUserInfo.md} (99%) create mode 100644 clients/hydra/php/docs/Model/Pagination.md create mode 100644 clients/hydra/php/docs/Model/PaginationHeaders.md delete mode 100644 clients/hydra/php/docs/Model/PatchDocument.md delete mode 100644 clients/hydra/php/docs/Model/PluginConfig.md delete mode 100644 clients/hydra/php/docs/Model/PluginConfigArgs.md delete mode 100644 clients/hydra/php/docs/Model/PluginConfigInterface.md delete mode 100644 clients/hydra/php/docs/Model/PluginConfigLinux.md delete mode 100644 clients/hydra/php/docs/Model/PluginConfigRootfs.md delete mode 100644 clients/hydra/php/docs/Model/PluginDevice.md delete mode 100644 clients/hydra/php/docs/Model/PluginEnv.md delete mode 100644 clients/hydra/php/docs/Model/PluginInterfaceType.md delete mode 100644 clients/hydra/php/docs/Model/PluginMount.md delete mode 100644 clients/hydra/php/docs/Model/PluginSettings.md delete mode 100644 clients/hydra/php/docs/Model/PreviousConsentSession.md rename clients/hydra/php/docs/Model/{RejectRequest.md => RejectOAuth2Request.md} (97%) delete mode 100644 clients/hydra/php/docs/Model/RequestWasHandledResponse.md create mode 100644 clients/hydra/php/docs/Model/TokenPagination.md create mode 100644 clients/hydra/php/docs/Model/TokenPaginationHeaders.md create mode 100644 clients/hydra/php/docs/Model/TokenPaginationRequestParameters.md create mode 100644 clients/hydra/php/docs/Model/TokenPaginationResponseHeaders.md rename clients/hydra/php/docs/Model/{TrustJwtGrantIssuerBody.md => TrustOAuth2JwtGrantIssuer.md} (70%) rename clients/hydra/php/docs/Model/{TrustedJwtGrantIssuer.md => TrustedOAuth2JwtGrantIssuer.md} (75%) rename clients/hydra/php/docs/Model/{TrustedJsonWebKey.md => TrustedOAuth2JwtGrantJsonWebKey.md} (93%) delete mode 100644 clients/hydra/php/docs/Model/Volume.md delete mode 100644 clients/hydra/php/docs/Model/VolumeUsageData.md delete mode 100644 clients/hydra/php/docs/Model/WellKnown.md create mode 100644 clients/hydra/php/lib/Api/JwkApi.php rename clients/hydra/php/lib/Api/{AdminApi.php => OAuth2Api.php} (61%) create mode 100644 clients/hydra/php/lib/Api/OidcApi.php delete mode 100644 clients/hydra/php/lib/Api/PublicApi.php create mode 100644 clients/hydra/php/lib/Api/WellknownApi.php rename clients/hydra/php/lib/Model/{AcceptConsentRequest.php => AcceptOAuth2ConsentRequest.php} (94%) rename clients/hydra/php/lib/Model/{ConsentRequestSession.php => AcceptOAuth2ConsentRequestSession.php} (85%) rename clients/hydra/php/lib/Model/{AcceptLoginRequest.php => AcceptOAuth2LoginRequest.php} (96%) rename clients/hydra/php/lib/Model/{JsonWebKeySetGeneratorRequest.php => CreateJsonWebKeySet.php} (89%) rename clients/hydra/php/lib/Model/{JsonError.php => ErrorOAuth2.php} (86%) rename clients/hydra/php/lib/Model/{ContainerWaitOKBodyError.php => InlineResponse200.php} (86%) rename clients/hydra/php/lib/Model/{PluginConfigNetwork.php => InlineResponse2001.php} (86%) rename clients/hydra/php/lib/Model/{FlushInactiveOAuth2TokensRequest.php => InlineResponse503.php} (84%) rename clients/hydra/php/lib/Model/{OAuth2TokenIntrospection.php => IntrospectedOAuth2Token.php} (95%) rename clients/hydra/php/lib/Model/{PatchDocument.php => JsonPatch.php} (88%) rename clients/hydra/php/lib/Model/{JSONWebKey.php => JsonWebKey.php} (97%) rename clients/hydra/php/lib/Model/{JSONWebKeySet.php => JsonWebKeySet.php} (85%) create mode 100644 clients/hydra/php/lib/Model/OAuth2ClientTokenLifespans.php rename clients/hydra/php/lib/Model/{ConsentRequest.php => OAuth2ConsentRequest.php} (95%) rename clients/hydra/php/lib/Model/{OpenIDConnectContext.php => OAuth2ConsentRequestOpenIDConnectContext.php} (93%) rename clients/hydra/php/lib/Model/{PreviousConsentSession.php => OAuth2ConsentSession.php} (83%) rename clients/hydra/php/lib/Model/{PluginDevice.php => OAuth2ConsentSessionExpiresAt.php} (65%) rename clients/hydra/php/lib/Model/{LoginRequest.php => OAuth2LoginRequest.php} (95%) rename clients/hydra/php/lib/Model/{LogoutRequest.php => OAuth2LogoutRequest.php} (96%) rename clients/hydra/php/lib/Model/{CompletedRequest.php => OAuth2RedirectTo.php} (93%) rename clients/hydra/php/lib/Model/{Oauth2TokenResponse.php => OAuth2TokenExchange.php} (88%) rename clients/hydra/php/lib/Model/{WellKnown.php => OidcConfiguration.php} (75%) rename clients/hydra/php/lib/Model/{UserinfoResponse.php => OidcUserInfo.php} (98%) rename clients/hydra/php/lib/Model/{PluginConfigInterface.php => Pagination.php} (71%) rename clients/hydra/php/lib/Model/{PluginConfigRootfs.php => PaginationHeaders.php} (80%) delete mode 100644 clients/hydra/php/lib/Model/PluginConfig.php delete mode 100644 clients/hydra/php/lib/Model/PluginConfigLinux.php delete mode 100644 clients/hydra/php/lib/Model/PluginEnv.php delete mode 100644 clients/hydra/php/lib/Model/PluginInterfaceType.php delete mode 100644 clients/hydra/php/lib/Model/PluginMount.php delete mode 100644 clients/hydra/php/lib/Model/PluginSettings.php rename clients/hydra/php/lib/Model/{RejectRequest.php => RejectOAuth2Request.php} (96%) delete mode 100644 clients/hydra/php/lib/Model/RequestWasHandledResponse.php rename clients/hydra/php/lib/Model/{VolumeUsageData.php => TokenPagination.php} (70%) rename clients/hydra/php/lib/Model/{PluginConfigUser.php => TokenPaginationHeaders.php} (79%) rename clients/hydra/php/lib/Model/{PluginConfigArgs.php => TokenPaginationRequestParameters.php} (66%) create mode 100644 clients/hydra/php/lib/Model/TokenPaginationResponseHeaders.php rename clients/hydra/php/lib/Model/{TrustJwtGrantIssuerBody.php => TrustOAuth2JwtGrantIssuer.php} (85%) rename clients/hydra/php/lib/Model/{TrustedJwtGrantIssuer.php => TrustedOAuth2JwtGrantIssuer.php} (87%) rename clients/hydra/php/lib/Model/{TrustedJsonWebKey.php => TrustedOAuth2JwtGrantJsonWebKey.php} (93%) delete mode 100644 clients/hydra/php/lib/Model/Volume.php create mode 100644 clients/hydra/php/test/Api/JwkApiTest.php rename clients/hydra/php/test/Api/{AdminApiTest.php => OAuth2ApiTest.php} (54%) create mode 100644 clients/hydra/php/test/Api/OidcApiTest.php delete mode 100644 clients/hydra/php/test/Api/PublicApiTest.php create mode 100644 clients/hydra/php/test/Api/WellknownApiTest.php rename clients/hydra/php/test/Model/{ConsentRequestSessionTest.php => AcceptOAuth2ConsentRequestSessionTest.php} (79%) rename clients/hydra/php/test/Model/{AcceptConsentRequestTest.php => AcceptOAuth2ConsentRequestTest.php} (85%) rename clients/hydra/php/test/Model/{AcceptLoginRequestTest.php => AcceptOAuth2LoginRequestTest.php} (86%) rename clients/hydra/php/test/Model/{JsonWebKeySetGeneratorRequestTest.php => CreateJsonWebKeySetTest.php} (79%) rename clients/hydra/php/test/Model/{RejectRequestTest.php => ErrorOAuth2Test.php} (85%) delete mode 100644 clients/hydra/php/test/Model/FlushInactiveOAuth2TokensRequestTest.php rename clients/hydra/php/test/Model/{PluginConfigNetworkTest.php => InlineResponse2001Test.php} (73%) rename clients/hydra/php/test/Model/{RequestWasHandledResponseTest.php => InlineResponse200Test.php} (72%) rename clients/hydra/php/test/Model/{ContainerWaitOKBodyErrorTest.php => InlineResponse503Test.php} (71%) rename clients/hydra/php/test/Model/{OAuth2TokenIntrospectionTest.php => IntrospectedOAuth2TokenTest.php} (88%) delete mode 100644 clients/hydra/php/test/Model/JSONWebKeySetTest.php rename clients/hydra/php/test/Model/{PatchDocumentTest.php => JsonPatchTest.php} (85%) create mode 100644 clients/hydra/php/test/Model/JsonWebKeySetTest.php rename clients/hydra/php/test/Model/{JSONWebKeyTest.php => JsonWebKeyTest.php} (89%) rename clients/hydra/php/test/Model/{VolumeTest.php => OAuth2ClientTokenLifespansTest.php} (54%) rename clients/hydra/php/test/Model/{OpenIDConnectContextTest.php => OAuth2ConsentRequestOpenIDConnectContextTest.php} (81%) rename clients/hydra/php/test/Model/{ConsentRequestTest.php => OAuth2ConsentRequestTest.php} (90%) create mode 100644 clients/hydra/php/test/Model/OAuth2ConsentSessionExpiresAtTest.php rename clients/hydra/php/test/Model/{PreviousConsentSessionTest.php => OAuth2ConsentSessionTest.php} (81%) rename clients/hydra/php/test/Model/{LoginRequestTest.php => OAuth2LoginRequestTest.php} (89%) rename clients/hydra/php/test/Model/{LogoutRequestTest.php => OAuth2LogoutRequestTest.php} (86%) rename clients/hydra/php/test/Model/{CompletedRequestTest.php => OAuth2RedirectToTest.php} (78%) rename clients/hydra/php/test/Model/{Oauth2TokenResponseTest.php => OAuth2TokenExchangeTest.php} (85%) rename clients/hydra/php/test/Model/{WellKnownTest.php => OidcConfigurationTest.php} (88%) rename clients/hydra/php/test/Model/{UserinfoResponseTest.php => OidcUserInfoTest.php} (92%) rename clients/hydra/php/test/Model/{PluginConfigUserTest.php => PaginationHeadersTest.php} (73%) rename clients/hydra/php/test/Model/{PluginConfigRootfsTest.php => PaginationTest.php} (72%) delete mode 100644 clients/hydra/php/test/Model/PluginConfigArgsTest.php delete mode 100644 clients/hydra/php/test/Model/PluginConfigInterfaceTest.php delete mode 100644 clients/hydra/php/test/Model/PluginConfigLinuxTest.php delete mode 100644 clients/hydra/php/test/Model/PluginConfigTest.php delete mode 100644 clients/hydra/php/test/Model/PluginDeviceTest.php delete mode 100644 clients/hydra/php/test/Model/PluginEnvTest.php delete mode 100644 clients/hydra/php/test/Model/PluginInterfaceTypeTest.php delete mode 100644 clients/hydra/php/test/Model/PluginMountTest.php delete mode 100644 clients/hydra/php/test/Model/PluginSettingsTest.php rename clients/hydra/php/test/Model/{JsonErrorTest.php => RejectOAuth2RequestTest.php} (78%) create mode 100644 clients/hydra/php/test/Model/TokenPaginationHeadersTest.php create mode 100644 clients/hydra/php/test/Model/TokenPaginationRequestParametersTest.php create mode 100644 clients/hydra/php/test/Model/TokenPaginationResponseHeadersTest.php create mode 100644 clients/hydra/php/test/Model/TokenPaginationTest.php rename clients/hydra/php/test/Model/{TrustJwtGrantIssuerBodyTest.php => TrustOAuth2JwtGrantIssuerTest.php} (77%) rename clients/hydra/php/test/Model/{TrustedJwtGrantIssuerTest.php => TrustedOAuth2JwtGrantIssuerTest.php} (79%) rename clients/hydra/php/test/Model/{TrustedJsonWebKeyTest.php => TrustedOAuth2JwtGrantJsonWebKeyTest.php} (77%) delete mode 100644 clients/hydra/php/test/Model/VolumeUsageDataTest.php rename clients/hydra/python/docs/{AcceptConsentRequest.md => AcceptOAuth2ConsentRequest.md} (73%) rename clients/hydra/python/docs/{ConsentRequestSession.md => AcceptOAuth2ConsentRequestSession.md} (97%) rename clients/hydra/python/docs/{AcceptLoginRequest.md => AcceptOAuth2LoginRequest.md} (96%) delete mode 100644 clients/hydra/python/docs/AdminApi.md create mode 100644 clients/hydra/python/docs/CreateJsonWebKeySet.md create mode 100644 clients/hydra/python/docs/ErrorOAuth2.md rename clients/hydra/python/docs/{PluginConfigNetwork.md => GetVersion200Response.md} (82%) rename clients/hydra/python/docs/{OAuth2TokenIntrospection.md => IntrospectedOAuth2Token.md} (90%) rename clients/hydra/python/docs/{PluginConfigUser.md => IsReady200Response.md} (77%) rename clients/hydra/python/docs/{ContainerWaitOKBodyError.md => IsReady503Response.md} (75%) delete mode 100644 clients/hydra/python/docs/JSONWebKeySet.md delete mode 100644 clients/hydra/python/docs/JsonError.md create mode 100644 clients/hydra/python/docs/JsonPatch.md create mode 100644 clients/hydra/python/docs/JsonPatchDocument.md rename clients/hydra/python/docs/{JSONWebKey.md => JsonWebKey.md} (95%) create mode 100644 clients/hydra/python/docs/JsonWebKeySet.md delete mode 100644 clients/hydra/python/docs/JsonWebKeySetGeneratorRequest.md create mode 100644 clients/hydra/python/docs/JwkApi.md rename clients/hydra/{rust/docs/PluginConfigNetwork.md => python/docs/NullDuration.md} (83%) create mode 100644 clients/hydra/python/docs/OAuth2Api.md create mode 100644 clients/hydra/python/docs/OAuth2ClientTokenLifespans.md rename clients/hydra/python/docs/{ConsentRequest.md => OAuth2ConsentRequest.md} (85%) rename clients/hydra/python/docs/{OpenIDConnectContext.md => OAuth2ConsentRequestOpenIDConnectContext.md} (90%) create mode 100644 clients/hydra/python/docs/OAuth2ConsentSession.md rename clients/hydra/python/docs/{FlushInactiveOAuth2TokensRequest.md => OAuth2ConsentSessionExpiresAt.md} (61%) create mode 100644 clients/hydra/python/docs/OAuth2ConsentSessions.md rename clients/hydra/python/docs/{LoginRequest.md => OAuth2LoginRequest.md} (86%) rename clients/hydra/python/docs/{LogoutRequest.md => OAuth2LogoutRequest.md} (98%) rename clients/hydra/python/docs/{CompletedRequest.md => OAuth2RedirectTo.md} (73%) create mode 100644 clients/hydra/python/docs/OAuth2TokenExchange.md create mode 100644 clients/hydra/python/docs/OidcApi.md create mode 100644 clients/hydra/python/docs/OidcConfiguration.md rename clients/hydra/python/docs/{UserinfoResponse.md => OidcUserInfo.md} (99%) create mode 100644 clients/hydra/python/docs/Pagination.md rename clients/hydra/python/docs/{Oauth2TokenResponse.md => PaginationHeaders.md} (57%) delete mode 100644 clients/hydra/python/docs/PatchDocument.md delete mode 100644 clients/hydra/python/docs/PluginConfig.md delete mode 100644 clients/hydra/python/docs/PluginConfigArgs.md delete mode 100644 clients/hydra/python/docs/PluginConfigInterface.md delete mode 100644 clients/hydra/python/docs/PluginConfigLinux.md delete mode 100644 clients/hydra/python/docs/PluginConfigRootfs.md delete mode 100644 clients/hydra/python/docs/PluginDevice.md delete mode 100644 clients/hydra/python/docs/PluginEnv.md delete mode 100644 clients/hydra/python/docs/PluginInterfaceType.md delete mode 100644 clients/hydra/python/docs/PluginMount.md delete mode 100644 clients/hydra/python/docs/PluginSettings.md delete mode 100644 clients/hydra/python/docs/PreviousConsentSession.md delete mode 100644 clients/hydra/python/docs/PublicApi.md rename clients/hydra/python/docs/{RejectRequest.md => RejectOAuth2Request.md} (98%) delete mode 100644 clients/hydra/python/docs/RequestWasHandledResponse.md rename clients/hydra/python/docs/{StringSlicePipeDelimiter.md => StringSliceJSONFormat.md} (91%) create mode 100644 clients/hydra/python/docs/TokenPagination.md create mode 100644 clients/hydra/python/docs/TokenPaginationHeaders.md create mode 100644 clients/hydra/python/docs/TokenPaginationRequestParameters.md create mode 100644 clients/hydra/python/docs/TokenPaginationResponseHeaders.md rename clients/hydra/python/docs/{TrustJwtGrantIssuerBody.md => TrustOAuth2JwtGrantIssuer.md} (73%) rename clients/hydra/python/docs/{TrustedJwtGrantIssuer.md => TrustedOAuth2JwtGrantIssuer.md} (76%) rename clients/hydra/{dart/doc/PluginConfigUser.md => python/docs/TrustedOAuth2JwtGrantIssuers.md} (54%) rename clients/hydra/python/docs/{TrustedJsonWebKey.md => TrustedOAuth2JwtGrantJsonWebKey.md} (88%) delete mode 100644 clients/hydra/python/docs/Volume.md delete mode 100644 clients/hydra/python/docs/VolumeUsageData.md delete mode 100644 clients/hydra/python/docs/WellKnown.md create mode 100644 clients/hydra/python/docs/WellknownApi.md create mode 100644 clients/hydra/python/ory_hydra_client/api/jwk_api.py rename clients/hydra/python/ory_hydra_client/api/{admin_api.py => o_auth2_api.py} (67%) rename clients/hydra/python/ory_hydra_client/api/{public_api.py => oidc_api.py} (50%) create mode 100644 clients/hydra/python/ory_hydra_client/api/wellknown_api.py rename clients/hydra/python/ory_hydra_client/model/{previous_consent_session.py => accept_o_auth2_consent_request.py} (82%) rename clients/hydra/python/ory_hydra_client/model/{consent_request_session.py => accept_o_auth2_consent_request_session.py} (89%) rename clients/hydra/python/ory_hydra_client/model/{accept_login_request.py => accept_o_auth2_login_request.py} (89%) rename clients/hydra/python/ory_hydra_client/model/{json_web_key_set_generator_request.py => create_json_web_key_set.py} (80%) rename clients/hydra/python/ory_hydra_client/model/{json_error.py => error_o_auth2.py} (81%) rename clients/hydra/python/ory_hydra_client/model/{container_wait_ok_body_error.py => get_version200_response.py} (85%) rename clients/hydra/python/ory_hydra_client/model/{o_auth2_token_introspection.py => introspected_o_auth2_token.py} (89%) rename clients/hydra/python/ory_hydra_client/model/{flush_inactive_o_auth2_tokens_request.py => is_ready200_response.py} (85%) rename clients/hydra/python/ory_hydra_client/model/{plugin_config_rootfs.py => is_ready503_response.py} (84%) rename clients/hydra/python/ory_hydra_client/model/{patch_document.py => json_patch.py} (79%) rename clients/hydra/python/ory_hydra_client/model/{patch_request.py => json_patch_document.py} (84%) rename clients/hydra/python/ory_hydra_client/model/{trusted_jwt_grant_issuers.py => null_duration.py} (85%) create mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_client_token_lifespans.py rename clients/hydra/python/ory_hydra_client/model/{consent_request.py => o_auth2_consent_request.py} (85%) rename clients/hydra/python/ory_hydra_client/model/{open_id_connect_context.py => o_auth2_consent_request_open_id_connect_context.py} (87%) create mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session.py create mode 100644 clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session_expires_at.py rename clients/hydra/python/ory_hydra_client/model/{plugin_env.py => o_auth2_consent_sessions.py} (70%) rename clients/hydra/python/ory_hydra_client/model/{login_request.py => o_auth2_login_request.py} (85%) rename clients/hydra/python/ory_hydra_client/model/{logout_request.py => o_auth2_logout_request.py} (89%) rename clients/hydra/python/ory_hydra_client/model/{completed_request.py => o_auth2_redirect_to.py} (86%) rename clients/hydra/python/ory_hydra_client/model/{accept_consent_request.py => o_auth2_token_exchange.py} (73%) create mode 100644 clients/hydra/python/ory_hydra_client/model/oidc_configuration.py rename clients/hydra/python/ory_hydra_client/model/{userinfo_response.py => oidc_user_info.py} (94%) create mode 100644 clients/hydra/python/ory_hydra_client/model/pagination.py rename clients/hydra/python/ory_hydra_client/model/{plugin_config_user.py => pagination_headers.py} (81%) delete mode 100644 clients/hydra/python/ory_hydra_client/model/plugin_config.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/plugin_config_args.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/plugin_config_interface.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/plugin_config_linux.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/plugin_config_network.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/plugin_device.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/plugin_interface_type.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/plugin_mount.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/plugin_settings.py rename clients/hydra/python/ory_hydra_client/model/{reject_request.py => reject_o_auth2_request.py} (89%) delete mode 100644 clients/hydra/python/ory_hydra_client/model/request_was_handled_response.py rename clients/hydra/python/ory_hydra_client/model/{string_slice_pipe_delimiter.py => string_slice_json_format.py} (88%) create mode 100644 clients/hydra/python/ory_hydra_client/model/token_pagination.py rename clients/hydra/python/ory_hydra_client/model/{oauth2_token_response.py => token_pagination_headers.py} (81%) create mode 100644 clients/hydra/python/ory_hydra_client/model/token_pagination_request_parameters.py create mode 100644 clients/hydra/python/ory_hydra_client/model/token_pagination_response_headers.py rename clients/hydra/python/ory_hydra_client/model/{trust_jwt_grant_issuer_body.py => trust_o_auth2_jwt_grant_issuer.py} (83%) rename clients/hydra/python/ory_hydra_client/model/{trusted_jwt_grant_issuer.py => trusted_o_auth2_jwt_grant_issuer.py} (83%) create mode 100644 clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuers.py rename clients/hydra/python/ory_hydra_client/model/{trusted_json_web_key.py => trusted_o_auth2_jwt_grant_json_web_key.py} (88%) delete mode 100644 clients/hydra/python/ory_hydra_client/model/volume.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/volume_usage_data.py delete mode 100644 clients/hydra/python/ory_hydra_client/model/well_known.py delete mode 100644 clients/hydra/python/test/test_accept_consent_request.py delete mode 100644 clients/hydra/python/test/test_accept_login_request.py create mode 100644 clients/hydra/python/test/test_accept_o_auth2_consent_request.py create mode 100644 clients/hydra/python/test/test_accept_o_auth2_consent_request_session.py create mode 100644 clients/hydra/python/test/test_accept_o_auth2_login_request.py delete mode 100644 clients/hydra/python/test/test_admin_api.py delete mode 100644 clients/hydra/python/test/test_completed_request.py delete mode 100644 clients/hydra/python/test/test_consent_request.py delete mode 100644 clients/hydra/python/test/test_consent_request_session.py delete mode 100644 clients/hydra/python/test/test_container_wait_ok_body_error.py create mode 100644 clients/hydra/python/test/test_create_json_web_key_set.py create mode 100644 clients/hydra/python/test/test_error_o_auth2.py delete mode 100644 clients/hydra/python/test/test_flush_inactive_o_auth2_tokens_request.py create mode 100644 clients/hydra/python/test/test_get_version200_response.py create mode 100644 clients/hydra/python/test/test_introspected_o_auth2_token.py create mode 100644 clients/hydra/python/test/test_is_ready200_response.py create mode 100644 clients/hydra/python/test/test_is_ready503_response.py delete mode 100644 clients/hydra/python/test/test_json_error.py create mode 100644 clients/hydra/python/test/test_json_patch.py create mode 100644 clients/hydra/python/test/test_json_patch_document.py delete mode 100644 clients/hydra/python/test/test_json_web_key_set_generator_request.py create mode 100644 clients/hydra/python/test/test_jwk_api.py delete mode 100644 clients/hydra/python/test/test_login_request.py delete mode 100644 clients/hydra/python/test/test_logout_request.py create mode 100644 clients/hydra/python/test/test_null_duration.py create mode 100644 clients/hydra/python/test/test_o_auth2_api.py create mode 100644 clients/hydra/python/test/test_o_auth2_client_token_lifespans.py create mode 100644 clients/hydra/python/test/test_o_auth2_consent_request.py create mode 100644 clients/hydra/python/test/test_o_auth2_consent_request_open_id_connect_context.py create mode 100644 clients/hydra/python/test/test_o_auth2_consent_session.py create mode 100644 clients/hydra/python/test/test_o_auth2_consent_session_expires_at.py create mode 100644 clients/hydra/python/test/test_o_auth2_consent_sessions.py create mode 100644 clients/hydra/python/test/test_o_auth2_login_request.py create mode 100644 clients/hydra/python/test/test_o_auth2_logout_request.py create mode 100644 clients/hydra/python/test/test_o_auth2_redirect_to.py create mode 100644 clients/hydra/python/test/test_o_auth2_token_exchange.py delete mode 100644 clients/hydra/python/test/test_o_auth2_token_introspection.py delete mode 100644 clients/hydra/python/test/test_oauth2_token_response.py create mode 100644 clients/hydra/python/test/test_oidc_api.py create mode 100644 clients/hydra/python/test/test_oidc_configuration.py create mode 100644 clients/hydra/python/test/test_oidc_user_info.py delete mode 100644 clients/hydra/python/test/test_open_id_connect_context.py create mode 100644 clients/hydra/python/test/test_pagination.py create mode 100644 clients/hydra/python/test/test_pagination_headers.py delete mode 100644 clients/hydra/python/test/test_patch_document.py delete mode 100644 clients/hydra/python/test/test_patch_request.py delete mode 100644 clients/hydra/python/test/test_plugin_config.py delete mode 100644 clients/hydra/python/test/test_plugin_config_args.py delete mode 100644 clients/hydra/python/test/test_plugin_config_interface.py delete mode 100644 clients/hydra/python/test/test_plugin_config_linux.py delete mode 100644 clients/hydra/python/test/test_plugin_config_network.py delete mode 100644 clients/hydra/python/test/test_plugin_config_rootfs.py delete mode 100644 clients/hydra/python/test/test_plugin_config_user.py delete mode 100644 clients/hydra/python/test/test_plugin_device.py delete mode 100644 clients/hydra/python/test/test_plugin_env.py delete mode 100644 clients/hydra/python/test/test_plugin_interface_type.py delete mode 100644 clients/hydra/python/test/test_plugin_mount.py delete mode 100644 clients/hydra/python/test/test_plugin_settings.py delete mode 100644 clients/hydra/python/test/test_previous_consent_session.py delete mode 100644 clients/hydra/python/test/test_public_api.py create mode 100644 clients/hydra/python/test/test_reject_o_auth2_request.py delete mode 100644 clients/hydra/python/test/test_reject_request.py delete mode 100644 clients/hydra/python/test/test_request_was_handled_response.py create mode 100644 clients/hydra/python/test/test_string_slice_json_format.py delete mode 100644 clients/hydra/python/test/test_string_slice_pipe_delimiter.py create mode 100644 clients/hydra/python/test/test_token_pagination.py create mode 100644 clients/hydra/python/test/test_token_pagination_headers.py create mode 100644 clients/hydra/python/test/test_token_pagination_request_parameters.py create mode 100644 clients/hydra/python/test/test_token_pagination_response_headers.py delete mode 100644 clients/hydra/python/test/test_trust_jwt_grant_issuer_body.py create mode 100644 clients/hydra/python/test/test_trust_o_auth2_jwt_grant_issuer.py delete mode 100644 clients/hydra/python/test/test_trusted_json_web_key.py delete mode 100644 clients/hydra/python/test/test_trusted_jwt_grant_issuer.py delete mode 100644 clients/hydra/python/test/test_trusted_jwt_grant_issuers.py create mode 100644 clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuer.py create mode 100644 clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuers.py create mode 100644 clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_json_web_key.py delete mode 100644 clients/hydra/python/test/test_userinfo_response.py delete mode 100644 clients/hydra/python/test/test_volume.py delete mode 100644 clients/hydra/python/test/test_volume_usage_data.py delete mode 100644 clients/hydra/python/test/test_well_known.py create mode 100644 clients/hydra/python/test/test_wellknown_api.py create mode 100644 clients/hydra/ruby/.gitlab-ci.yml create mode 100644 clients/hydra/ruby/Gemfile.lock rename clients/hydra/ruby/docs/{AcceptConsentRequest.md => AcceptOAuth2ConsentRequest.md} (80%) rename clients/hydra/ruby/docs/{ConsentRequestSession.md => AcceptOAuth2ConsentRequestSession.md} (88%) rename clients/hydra/ruby/docs/{AcceptLoginRequest.md => AcceptOAuth2LoginRequest.md} (96%) delete mode 100644 clients/hydra/ruby/docs/AdminApi.md delete mode 100644 clients/hydra/ruby/docs/ContainerWaitOKBodyError.md create mode 100644 clients/hydra/ruby/docs/CreateJsonWebKeySet.md create mode 100644 clients/hydra/ruby/docs/ErrorOAuth2.md delete mode 100644 clients/hydra/ruby/docs/FlushInactiveOAuth2TokensRequest.md create mode 100644 clients/hydra/ruby/docs/GetVersion200Response.md rename clients/hydra/ruby/docs/{OAuth2TokenIntrospection.md => IntrospectedOAuth2Token.md} (93%) create mode 100644 clients/hydra/ruby/docs/IsReady200Response.md create mode 100644 clients/hydra/ruby/docs/IsReady503Response.md delete mode 100644 clients/hydra/ruby/docs/JSONWebKeySet.md delete mode 100644 clients/hydra/ruby/docs/JsonError.md create mode 100644 clients/hydra/ruby/docs/JsonPatch.md rename clients/hydra/ruby/docs/{JSONWebKey.md => JsonWebKey.md} (98%) create mode 100644 clients/hydra/ruby/docs/JsonWebKeySet.md delete mode 100644 clients/hydra/ruby/docs/JsonWebKeySetGeneratorRequest.md create mode 100644 clients/hydra/ruby/docs/JwkApi.md create mode 100644 clients/hydra/ruby/docs/OAuth2Api.md create mode 100644 clients/hydra/ruby/docs/OAuth2ClientTokenLifespans.md rename clients/hydra/ruby/docs/{ConsentRequest.md => OAuth2ConsentRequest.md} (92%) rename clients/hydra/ruby/docs/{OpenIDConnectContext.md => OAuth2ConsentRequestOpenIDConnectContext.md} (88%) create mode 100644 clients/hydra/ruby/docs/OAuth2ConsentSession.md create mode 100644 clients/hydra/ruby/docs/OAuth2ConsentSessionExpiresAt.md rename clients/hydra/ruby/docs/{LoginRequest.md => OAuth2LoginRequest.md} (90%) rename clients/hydra/ruby/docs/{LogoutRequest.md => OAuth2LogoutRequest.md} (91%) rename clients/hydra/ruby/docs/{CompletedRequest.md => OAuth2RedirectTo.md} (56%) create mode 100644 clients/hydra/ruby/docs/OAuth2TokenExchange.md delete mode 100644 clients/hydra/ruby/docs/Oauth2TokenResponse.md create mode 100644 clients/hydra/ruby/docs/OidcApi.md create mode 100644 clients/hydra/ruby/docs/OidcConfiguration.md rename clients/hydra/ruby/docs/{UserinfoResponse.md => OidcUserInfo.md} (98%) create mode 100644 clients/hydra/ruby/docs/Pagination.md create mode 100644 clients/hydra/ruby/docs/PaginationHeaders.md delete mode 100644 clients/hydra/ruby/docs/PatchDocument.md delete mode 100644 clients/hydra/ruby/docs/PluginConfig.md delete mode 100644 clients/hydra/ruby/docs/PluginConfigArgs.md delete mode 100644 clients/hydra/ruby/docs/PluginConfigInterface.md delete mode 100644 clients/hydra/ruby/docs/PluginConfigLinux.md delete mode 100644 clients/hydra/ruby/docs/PluginConfigNetwork.md delete mode 100644 clients/hydra/ruby/docs/PluginConfigRootfs.md delete mode 100644 clients/hydra/ruby/docs/PluginConfigUser.md delete mode 100644 clients/hydra/ruby/docs/PluginDevice.md delete mode 100644 clients/hydra/ruby/docs/PluginEnv.md delete mode 100644 clients/hydra/ruby/docs/PluginInterfaceType.md delete mode 100644 clients/hydra/ruby/docs/PluginMount.md delete mode 100644 clients/hydra/ruby/docs/PluginSettings.md delete mode 100644 clients/hydra/ruby/docs/PreviousConsentSession.md delete mode 100644 clients/hydra/ruby/docs/PublicApi.md rename clients/hydra/ruby/docs/{RejectRequest.md => RejectOAuth2Request.md} (91%) delete mode 100644 clients/hydra/ruby/docs/RequestWasHandledResponse.md create mode 100644 clients/hydra/ruby/docs/TokenPagination.md create mode 100644 clients/hydra/ruby/docs/TokenPaginationHeaders.md create mode 100644 clients/hydra/ruby/docs/TokenPaginationRequestParameters.md create mode 100644 clients/hydra/ruby/docs/TokenPaginationResponseHeaders.md rename clients/hydra/ruby/docs/{TrustJwtGrantIssuerBody.md => TrustOAuth2JwtGrantIssuer.md} (63%) rename clients/hydra/ruby/docs/{TrustedJwtGrantIssuer.md => TrustedOAuth2JwtGrantIssuer.md} (70%) rename clients/hydra/ruby/docs/{TrustedJsonWebKey.md => TrustedOAuth2JwtGrantJsonWebKey.md} (81%) delete mode 100644 clients/hydra/ruby/docs/Volume.md delete mode 100644 clients/hydra/ruby/docs/VolumeUsageData.md delete mode 100644 clients/hydra/ruby/docs/WellKnown.md create mode 100644 clients/hydra/ruby/docs/WellknownApi.md delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/api/admin_api.rb create mode 100644 clients/hydra/ruby/lib/ory-hydra-client/api/jwk_api.rb create mode 100644 clients/hydra/ruby/lib/ory-hydra-client/api/o_auth2_api.rb create mode 100644 clients/hydra/ruby/lib/ory-hydra-client/api/oidc_api.rb delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/api/public_api.rb create mode 100644 clients/hydra/ruby/lib/ory-hydra-client/api/wellknown_api.rb rename clients/hydra/ruby/lib/ory-hydra-client/models/{accept_consent_request.rb => accept_o_auth2_consent_request.rb} (93%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{consent_request_session.rb => accept_o_auth2_consent_request_session.rb} (92%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{accept_login_request.rb => accept_o_auth2_login_request.rb} (95%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{json_web_key_set_generator_request.rb => create_json_web_key_set.rb} (87%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{json_error.rb => error_o_auth2.rb} (87%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{container_wait_ok_body_error.rb => get_version200_response.rb} (88%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{o_auth2_token_introspection.rb => introspected_o_auth2_token.rb} (93%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{plugin_config_network.rb => is_ready200_response.rb} (87%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{plugin_config_user.rb => is_ready503_response.rb} (86%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{patch_document.rb => json_patch.rb} (86%) create mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client_token_lifespans.rb rename clients/hydra/ruby/lib/ory-hydra-client/models/{consent_request.rb => o_auth2_consent_request.rb} (95%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{open_id_connect_context.rb => o_auth2_consent_request_open_id_connect_context.rb} (93%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{previous_consent_session.rb => o_auth2_consent_session.rb} (84%) create mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session_expires_at.rb rename clients/hydra/ruby/lib/ory-hydra-client/models/{login_request.rb => o_auth2_login_request.rb} (95%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{logout_request.rb => o_auth2_logout_request.rb} (94%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{completed_request.rb => o_auth2_redirect_to.rb} (91%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{oauth2_token_response.rb => o_auth2_token_exchange.rb} (88%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{well_known.rb => oidc_configuration.rb} (68%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{userinfo_response.rb => oidc_user_info.rb} (97%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{plugin_settings.rb => pagination.rb} (70%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{plugin_config_rootfs.rb => pagination_headers.rb} (83%) delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config.rb delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_args.rb delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_interface.rb delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_linux.rb delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/plugin_device.rb delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/plugin_env.rb delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/plugin_interface_type.rb delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/plugin_mount.rb rename clients/hydra/ruby/lib/ory-hydra-client/models/{reject_request.rb => reject_o_auth2_request.rb} (94%) delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/request_was_handled_response.rb rename clients/hydra/ruby/lib/ory-hydra-client/models/{volume_usage_data.rb => token_pagination.rb} (71%) create mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_headers.rb rename clients/hydra/ruby/lib/ory-hydra-client/models/{flush_inactive_o_auth2_tokens_request.rb => token_pagination_request_parameters.rb} (67%) create mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_response_headers.rb rename clients/hydra/ruby/lib/ory-hydra-client/models/{trust_jwt_grant_issuer_body.rb => trust_o_auth2_jwt_grant_issuer.rb} (88%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{trusted_jwt_grant_issuer.rb => trusted_o_auth2_jwt_grant_issuer.rb} (87%) rename clients/hydra/ruby/lib/ory-hydra-client/models/{trusted_json_web_key.rb => trusted_o_auth2_jwt_grant_json_web_key.rb} (91%) delete mode 100644 clients/hydra/ruby/lib/ory-hydra-client/models/volume.rb delete mode 100644 clients/hydra/ruby/spec/api/admin_api_spec.rb create mode 100644 clients/hydra/ruby/spec/api/jwk_api_spec.rb create mode 100644 clients/hydra/ruby/spec/api/o_auth2_api_spec.rb create mode 100644 clients/hydra/ruby/spec/api/oidc_api_spec.rb delete mode 100644 clients/hydra/ruby/spec/api/public_api_spec.rb create mode 100644 clients/hydra/ruby/spec/api/wellknown_api_spec.rb rename clients/hydra/ruby/spec/models/{consent_request_session_spec.rb => accept_o_auth2_consent_request_session_spec.rb} (51%) rename clients/hydra/ruby/spec/models/{accept_consent_request_spec.rb => accept_o_auth2_consent_request_spec.rb} (71%) rename clients/hydra/ruby/spec/models/{accept_login_request_spec.rb => accept_o_auth2_login_request_spec.rb} (74%) delete mode 100644 clients/hydra/ruby/spec/models/completed_request_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/container_wait_ok_body_error_spec.rb rename clients/hydra/ruby/spec/models/{json_web_key_set_generator_request_spec.rb => create_json_web_key_set_spec.rb} (56%) rename clients/hydra/ruby/spec/models/{reject_request_spec.rb => error_o_auth2_spec.rb} (69%) delete mode 100644 clients/hydra/ruby/spec/models/flush_inactive_o_auth2_tokens_request_spec.rb create mode 100644 clients/hydra/ruby/spec/models/get_version200_response_spec.rb rename clients/hydra/ruby/spec/models/{o_auth2_token_introspection_spec.rb => introspected_o_auth2_token_spec.rb} (82%) create mode 100644 clients/hydra/ruby/spec/models/is_ready200_response_spec.rb create mode 100644 clients/hydra/ruby/spec/models/is_ready503_response_spec.rb rename clients/hydra/ruby/spec/models/{patch_document_spec.rb => json_patch_spec.rb} (65%) rename clients/hydra/ruby/spec/models/{volume_spec.rb => o_auth2_client_token_lifespans_spec.rb} (51%) rename clients/hydra/ruby/spec/models/{open_id_connect_context_spec.rb => o_auth2_consent_request_open_id_connect_context_spec.rb} (65%) rename clients/hydra/ruby/spec/models/{consent_request_spec.rb => o_auth2_consent_request_spec.rb} (83%) create mode 100644 clients/hydra/ruby/spec/models/o_auth2_consent_session_expires_at_spec.rb rename clients/hydra/ruby/spec/models/{previous_consent_session_spec.rb => o_auth2_consent_session_spec.rb} (69%) rename clients/hydra/ruby/spec/models/{login_request_spec.rb => o_auth2_login_request_spec.rb} (79%) rename clients/hydra/ruby/spec/models/{logout_request_spec.rb => o_auth2_logout_request_spec.rb} (72%) create mode 100644 clients/hydra/ruby/spec/models/o_auth2_redirect_to_spec.rb rename clients/hydra/ruby/spec/models/{oauth2_token_response_spec.rb => o_auth2_token_exchange_spec.rb} (71%) rename clients/hydra/ruby/spec/models/{well_known_spec.rb => oidc_configuration_spec.rb} (86%) rename clients/hydra/ruby/spec/models/{userinfo_response_spec.rb => oidc_user_info_spec.rb} (87%) create mode 100644 clients/hydra/ruby/spec/models/pagination_headers_spec.rb create mode 100644 clients/hydra/ruby/spec/models/pagination_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_config_args_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_config_interface_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_config_linux_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_config_network_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_config_rootfs_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_config_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_config_user_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_device_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_env_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_interface_type_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_mount_spec.rb delete mode 100644 clients/hydra/ruby/spec/models/plugin_settings_spec.rb rename clients/hydra/ruby/spec/models/{json_error_spec.rb => reject_o_auth2_request_spec.rb} (58%) delete mode 100644 clients/hydra/ruby/spec/models/request_was_handled_response_spec.rb create mode 100644 clients/hydra/ruby/spec/models/token_pagination_headers_spec.rb create mode 100644 clients/hydra/ruby/spec/models/token_pagination_request_parameters_spec.rb create mode 100644 clients/hydra/ruby/spec/models/token_pagination_response_headers_spec.rb create mode 100644 clients/hydra/ruby/spec/models/token_pagination_spec.rb rename clients/hydra/ruby/spec/models/{trust_jwt_grant_issuer_body_spec.rb => trust_o_auth2_jwt_grant_issuer_spec.rb} (61%) rename clients/hydra/ruby/spec/models/{trusted_jwt_grant_issuer_spec.rb => trusted_o_auth2_jwt_grant_issuer_spec.rb} (69%) rename clients/hydra/ruby/spec/models/{trusted_json_web_key_spec.rb => trusted_o_auth2_jwt_grant_json_web_key_spec.rb} (56%) delete mode 100644 clients/hydra/ruby/spec/models/volume_usage_data_spec.rb create mode 100644 clients/hydra/rust/Cargo.lock rename clients/hydra/rust/docs/{AcceptConsentRequest.md => AcceptOAuth2ConsentRequest.md} (84%) rename clients/hydra/rust/docs/{ConsentRequestSession.md => AcceptOAuth2ConsentRequestSession.md} (96%) rename clients/hydra/rust/docs/{AcceptLoginRequest.md => AcceptOAuth2LoginRequest.md} (98%) delete mode 100644 clients/hydra/rust/docs/AdminApi.md create mode 100644 clients/hydra/rust/docs/CreateJsonWebKeySet.md create mode 100644 clients/hydra/rust/docs/ErrorOAuth2.md delete mode 100644 clients/hydra/rust/docs/FlushInactiveOAuth2TokensRequest.md rename clients/hydra/{python/docs/TrustedJwtGrantIssuers.md => rust/docs/GetVersion200Response.md} (73%) rename clients/hydra/rust/docs/{OAuth2TokenIntrospection.md => IntrospectedOAuth2Token.md} (93%) rename clients/hydra/rust/docs/{ContainerWaitOkBodyError.md => IsReady200Response.md} (74%) create mode 100644 clients/hydra/rust/docs/IsReady503Response.md delete mode 100644 clients/hydra/rust/docs/JsonError.md create mode 100644 clients/hydra/rust/docs/JsonPatch.md delete mode 100644 clients/hydra/rust/docs/JsonWebKeySetGeneratorRequest.md create mode 100644 clients/hydra/rust/docs/JwkApi.md create mode 100644 clients/hydra/rust/docs/OAuth2Api.md create mode 100644 clients/hydra/rust/docs/OAuth2ClientTokenLifespans.md rename clients/hydra/rust/docs/{ConsentRequest.md => OAuth2ConsentRequest.md} (93%) rename clients/hydra/rust/docs/{OpenIdConnectContext.md => OAuth2ConsentRequestOpenIdConnectContext.md} (89%) create mode 100644 clients/hydra/rust/docs/OAuth2ConsentSession.md rename clients/hydra/rust/docs/{Oauth2TokenResponse.md => OAuth2ConsentSessionExpiresAt.md} (71%) rename clients/hydra/rust/docs/{LoginRequest.md => OAuth2LoginRequest.md} (92%) rename clients/hydra/rust/docs/{LogoutRequest.md => OAuth2LogoutRequest.md} (97%) rename clients/hydra/rust/docs/{CompletedRequest.md => OAuth2RedirectTo.md} (76%) create mode 100644 clients/hydra/rust/docs/OAuth2TokenExchange.md create mode 100644 clients/hydra/rust/docs/OidcApi.md create mode 100644 clients/hydra/rust/docs/OidcConfiguration.md rename clients/hydra/rust/docs/{UserinfoResponse.md => OidcUserInfo.md} (99%) create mode 100644 clients/hydra/rust/docs/Pagination.md create mode 100644 clients/hydra/rust/docs/PaginationHeaders.md delete mode 100644 clients/hydra/rust/docs/PatchDocument.md delete mode 100644 clients/hydra/rust/docs/PluginConfig.md delete mode 100644 clients/hydra/rust/docs/PluginConfigArgs.md delete mode 100644 clients/hydra/rust/docs/PluginConfigInterface.md delete mode 100644 clients/hydra/rust/docs/PluginConfigLinux.md delete mode 100644 clients/hydra/rust/docs/PluginConfigRootfs.md delete mode 100644 clients/hydra/rust/docs/PluginConfigUser.md delete mode 100644 clients/hydra/rust/docs/PluginDevice.md delete mode 100644 clients/hydra/rust/docs/PluginEnv.md delete mode 100644 clients/hydra/rust/docs/PluginInterfaceType.md delete mode 100644 clients/hydra/rust/docs/PluginMount.md delete mode 100644 clients/hydra/rust/docs/PluginSettings.md delete mode 100644 clients/hydra/rust/docs/PreviousConsentSession.md delete mode 100644 clients/hydra/rust/docs/PublicApi.md rename clients/hydra/rust/docs/{RejectRequest.md => RejectOAuth2Request.md} (97%) delete mode 100644 clients/hydra/rust/docs/RequestWasHandledResponse.md create mode 100644 clients/hydra/rust/docs/TokenPagination.md create mode 100644 clients/hydra/rust/docs/TokenPaginationHeaders.md create mode 100644 clients/hydra/rust/docs/TokenPaginationRequestParameters.md create mode 100644 clients/hydra/rust/docs/TokenPaginationResponseHeaders.md rename clients/hydra/rust/docs/{TrustJwtGrantIssuerBody.md => TrustOAuth2JwtGrantIssuer.md} (64%) rename clients/hydra/rust/docs/{TrustedJwtGrantIssuer.md => TrustedOAuth2JwtGrantIssuer.md} (75%) rename clients/hydra/rust/docs/{TrustedJsonWebKey.md => TrustedOAuth2JwtGrantJsonWebKey.md} (94%) delete mode 100644 clients/hydra/rust/docs/Volume.md delete mode 100644 clients/hydra/rust/docs/VolumeUsageData.md delete mode 100644 clients/hydra/rust/docs/WellKnown.md create mode 100644 clients/hydra/rust/docs/WellknownApi.md delete mode 100644 clients/hydra/rust/src/apis/admin_api.rs create mode 100644 clients/hydra/rust/src/apis/jwk_api.rs create mode 100644 clients/hydra/rust/src/apis/o_auth2_api.rs create mode 100644 clients/hydra/rust/src/apis/oidc_api.rs delete mode 100644 clients/hydra/rust/src/apis/public_api.rs create mode 100644 clients/hydra/rust/src/apis/wellknown_api.rs rename clients/hydra/rust/src/models/{accept_consent_request.rs => accept_o_auth2_consent_request.rs} (62%) rename clients/hydra/rust/src/models/{consent_request_session.rs => accept_o_auth2_consent_request_session.rs} (67%) rename clients/hydra/rust/src/models/{accept_login_request.rs => accept_o_auth2_login_request.rs} (84%) delete mode 100644 clients/hydra/rust/src/models/completed_request.rs delete mode 100644 clients/hydra/rust/src/models/container_wait_ok_body_error.rs create mode 100644 clients/hydra/rust/src/models/create_json_web_key_set.rs create mode 100644 clients/hydra/rust/src/models/error_o_auth2.rs delete mode 100644 clients/hydra/rust/src/models/flush_inactive_o_auth2_tokens_request.rs create mode 100644 clients/hydra/rust/src/models/get_version_200_response.rs rename clients/hydra/rust/src/models/{o_auth2_token_introspection.rs => introspected_o_auth2_token.rs} (76%) create mode 100644 clients/hydra/rust/src/models/is_ready_200_response.rs create mode 100644 clients/hydra/rust/src/models/is_ready_503_response.rs delete mode 100644 clients/hydra/rust/src/models/json_error.rs create mode 100644 clients/hydra/rust/src/models/json_patch.rs delete mode 100644 clients/hydra/rust/src/models/json_web_key_set_generator_request.rs create mode 100644 clients/hydra/rust/src/models/o_auth2_client_token_lifespans.rs rename clients/hydra/rust/src/models/{consent_request.rs => o_auth2_consent_request.rs} (79%) rename clients/hydra/rust/src/models/{open_id_connect_context.rs => o_auth2_consent_request_open_id_connect_context.rs} (83%) create mode 100644 clients/hydra/rust/src/models/o_auth2_consent_session.rs create mode 100644 clients/hydra/rust/src/models/o_auth2_consent_session_expires_at.rs rename clients/hydra/rust/src/models/{login_request.rs => o_auth2_login_request.rs} (79%) rename clients/hydra/rust/src/models/{logout_request.rs => o_auth2_logout_request.rs} (69%) create mode 100644 clients/hydra/rust/src/models/o_auth2_redirect_to.rs create mode 100644 clients/hydra/rust/src/models/o_auth2_token_exchange.rs delete mode 100644 clients/hydra/rust/src/models/oauth2_token_response.rs create mode 100644 clients/hydra/rust/src/models/oidc_configuration.rs rename clients/hydra/rust/src/models/{userinfo_response.rs => oidc_user_info.rs} (87%) create mode 100644 clients/hydra/rust/src/models/pagination.rs create mode 100644 clients/hydra/rust/src/models/pagination_headers.rs delete mode 100644 clients/hydra/rust/src/models/patch_document.rs delete mode 100644 clients/hydra/rust/src/models/plugin_config.rs delete mode 100644 clients/hydra/rust/src/models/plugin_config_args.rs delete mode 100644 clients/hydra/rust/src/models/plugin_config_interface.rs delete mode 100644 clients/hydra/rust/src/models/plugin_config_linux.rs delete mode 100644 clients/hydra/rust/src/models/plugin_config_network.rs delete mode 100644 clients/hydra/rust/src/models/plugin_config_rootfs.rs delete mode 100644 clients/hydra/rust/src/models/plugin_config_user.rs delete mode 100644 clients/hydra/rust/src/models/plugin_device.rs delete mode 100644 clients/hydra/rust/src/models/plugin_env.rs delete mode 100644 clients/hydra/rust/src/models/plugin_interface_type.rs delete mode 100644 clients/hydra/rust/src/models/plugin_mount.rs delete mode 100644 clients/hydra/rust/src/models/plugin_settings.rs delete mode 100644 clients/hydra/rust/src/models/previous_consent_session.rs rename clients/hydra/rust/src/models/{reject_request.rs => reject_o_auth2_request.rs} (68%) delete mode 100644 clients/hydra/rust/src/models/request_was_handled_response.rs create mode 100644 clients/hydra/rust/src/models/token_pagination.rs create mode 100644 clients/hydra/rust/src/models/token_pagination_headers.rs create mode 100644 clients/hydra/rust/src/models/token_pagination_request_parameters.rs create mode 100644 clients/hydra/rust/src/models/token_pagination_response_headers.rs delete mode 100644 clients/hydra/rust/src/models/trust_jwt_grant_issuer_body.rs create mode 100644 clients/hydra/rust/src/models/trust_o_auth2_jwt_grant_issuer.rs delete mode 100644 clients/hydra/rust/src/models/trusted_json_web_key.rs rename clients/hydra/rust/src/models/{trusted_jwt_grant_issuer.rs => trusted_o_auth2_jwt_grant_issuer.rs} (54%) create mode 100644 clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_json_web_key.rs delete mode 100644 clients/hydra/rust/src/models/volume.rs delete mode 100644 clients/hydra/rust/src/models/volume_usage_data.rs delete mode 100644 clients/hydra/rust/src/models/well_known.rs create mode 100644 clients/hydra/typescript/package-lock.json diff --git a/clients/hydra/dart/.openapi-generator/FILES b/clients/hydra/dart/.openapi-generator/FILES index 02107bcec41..2f8f8b1e98c 100644 --- a/clients/hydra/dart/.openapi-generator/FILES +++ b/clients/hydra/dart/.openapi-generator/FILES @@ -2,152 +2,144 @@ .openapi-generator-ignore README.md analysis_options.yaml -doc/AcceptConsentRequest.md -doc/AcceptLoginRequest.md -doc/AdminApi.md -doc/CompletedRequest.md -doc/ConsentRequest.md -doc/ConsentRequestSession.md -doc/ContainerWaitOKBodyError.md -doc/FlushInactiveOAuth2TokensRequest.md +doc/AcceptOAuth2ConsentRequest.md +doc/AcceptOAuth2ConsentRequestSession.md +doc/AcceptOAuth2LoginRequest.md +doc/CreateJsonWebKeySet.md +doc/ErrorOAuth2.md doc/GenericError.md +doc/GetVersion200Response.md doc/HealthNotReadyStatus.md doc/HealthStatus.md -doc/JSONWebKey.md -doc/JSONWebKeySet.md -doc/JsonError.md -doc/JsonWebKeySetGeneratorRequest.md -doc/LoginRequest.md -doc/LogoutRequest.md +doc/IntrospectedOAuth2Token.md +doc/IsReady200Response.md +doc/IsReady503Response.md +doc/JsonPatch.md +doc/JsonWebKey.md +doc/JsonWebKeySet.md +doc/JwkApi.md doc/MetadataApi.md +doc/OAuth2Api.md doc/OAuth2Client.md -doc/OAuth2TokenIntrospection.md -doc/Oauth2TokenResponse.md -doc/OpenIDConnectContext.md -doc/PatchDocument.md -doc/PluginConfig.md -doc/PluginConfigArgs.md -doc/PluginConfigInterface.md -doc/PluginConfigLinux.md -doc/PluginConfigNetwork.md -doc/PluginConfigRootfs.md -doc/PluginConfigUser.md -doc/PluginDevice.md -doc/PluginEnv.md -doc/PluginInterfaceType.md -doc/PluginMount.md -doc/PluginSettings.md -doc/PreviousConsentSession.md -doc/PublicApi.md -doc/RejectRequest.md -doc/RequestWasHandledResponse.md -doc/TrustJwtGrantIssuerBody.md -doc/TrustedJsonWebKey.md -doc/TrustedJwtGrantIssuer.md -doc/UserinfoResponse.md +doc/OAuth2ClientTokenLifespans.md +doc/OAuth2ConsentRequest.md +doc/OAuth2ConsentRequestOpenIDConnectContext.md +doc/OAuth2ConsentSession.md +doc/OAuth2ConsentSessionExpiresAt.md +doc/OAuth2LoginRequest.md +doc/OAuth2LogoutRequest.md +doc/OAuth2RedirectTo.md +doc/OAuth2TokenExchange.md +doc/OidcApi.md +doc/OidcConfiguration.md +doc/OidcUserInfo.md +doc/Pagination.md +doc/PaginationHeaders.md +doc/RejectOAuth2Request.md +doc/TokenPagination.md +doc/TokenPaginationHeaders.md +doc/TokenPaginationRequestParameters.md +doc/TokenPaginationResponseHeaders.md +doc/TrustOAuth2JwtGrantIssuer.md +doc/TrustedOAuth2JwtGrantIssuer.md +doc/TrustedOAuth2JwtGrantJsonWebKey.md doc/Version.md -doc/Volume.md -doc/VolumeUsageData.md -doc/WellKnown.md -lib/api.dart -lib/api/admin_api.dart -lib/api/metadata_api.dart -lib/api/public_api.dart -lib/api_util.dart -lib/auth/api_key_auth.dart -lib/auth/auth.dart -lib/auth/basic_auth.dart -lib/auth/oauth.dart -lib/model/accept_consent_request.dart -lib/model/accept_login_request.dart -lib/model/completed_request.dart -lib/model/consent_request.dart -lib/model/consent_request_session.dart -lib/model/container_wait_ok_body_error.dart -lib/model/flush_inactive_o_auth2_tokens_request.dart -lib/model/generic_error.dart -lib/model/health_not_ready_status.dart -lib/model/health_status.dart -lib/model/json_error.dart -lib/model/json_web_key.dart -lib/model/json_web_key_set.dart -lib/model/json_web_key_set_generator_request.dart -lib/model/login_request.dart -lib/model/logout_request.dart -lib/model/o_auth2_client.dart -lib/model/o_auth2_token_introspection.dart -lib/model/oauth2_token_response.dart -lib/model/open_id_connect_context.dart -lib/model/patch_document.dart -lib/model/plugin_config.dart -lib/model/plugin_config_args.dart -lib/model/plugin_config_interface.dart -lib/model/plugin_config_linux.dart -lib/model/plugin_config_network.dart -lib/model/plugin_config_rootfs.dart -lib/model/plugin_config_user.dart -lib/model/plugin_device.dart -lib/model/plugin_env.dart -lib/model/plugin_interface_type.dart -lib/model/plugin_mount.dart -lib/model/plugin_settings.dart -lib/model/previous_consent_session.dart -lib/model/reject_request.dart -lib/model/request_was_handled_response.dart -lib/model/trust_jwt_grant_issuer_body.dart -lib/model/trusted_json_web_key.dart -lib/model/trusted_jwt_grant_issuer.dart -lib/model/userinfo_response.dart -lib/model/version.dart -lib/model/volume.dart -lib/model/volume_usage_data.dart -lib/model/well_known.dart -lib/serializers.dart +doc/WellknownApi.md +lib/ory_hydra_client.dart +lib/src/api.dart +lib/src/api/jwk_api.dart +lib/src/api/metadata_api.dart +lib/src/api/o_auth2_api.dart +lib/src/api/oidc_api.dart +lib/src/api/wellknown_api.dart +lib/src/api_util.dart +lib/src/auth/api_key_auth.dart +lib/src/auth/auth.dart +lib/src/auth/basic_auth.dart +lib/src/auth/bearer_auth.dart +lib/src/auth/oauth.dart +lib/src/date_serializer.dart +lib/src/model/accept_o_auth2_consent_request.dart +lib/src/model/accept_o_auth2_consent_request_session.dart +lib/src/model/accept_o_auth2_login_request.dart +lib/src/model/create_json_web_key_set.dart +lib/src/model/date.dart +lib/src/model/error_o_auth2.dart +lib/src/model/generic_error.dart +lib/src/model/get_version200_response.dart +lib/src/model/health_not_ready_status.dart +lib/src/model/health_status.dart +lib/src/model/introspected_o_auth2_token.dart +lib/src/model/is_ready200_response.dart +lib/src/model/is_ready503_response.dart +lib/src/model/json_patch.dart +lib/src/model/json_web_key.dart +lib/src/model/json_web_key_set.dart +lib/src/model/o_auth2_client.dart +lib/src/model/o_auth2_client_token_lifespans.dart +lib/src/model/o_auth2_consent_request.dart +lib/src/model/o_auth2_consent_request_open_id_connect_context.dart +lib/src/model/o_auth2_consent_session.dart +lib/src/model/o_auth2_consent_session_expires_at.dart +lib/src/model/o_auth2_login_request.dart +lib/src/model/o_auth2_logout_request.dart +lib/src/model/o_auth2_redirect_to.dart +lib/src/model/o_auth2_token_exchange.dart +lib/src/model/oidc_configuration.dart +lib/src/model/oidc_user_info.dart +lib/src/model/pagination.dart +lib/src/model/pagination_headers.dart +lib/src/model/reject_o_auth2_request.dart +lib/src/model/token_pagination.dart +lib/src/model/token_pagination_headers.dart +lib/src/model/token_pagination_request_parameters.dart +lib/src/model/token_pagination_response_headers.dart +lib/src/model/trust_o_auth2_jwt_grant_issuer.dart +lib/src/model/trusted_o_auth2_jwt_grant_issuer.dart +lib/src/model/trusted_o_auth2_jwt_grant_json_web_key.dart +lib/src/model/version.dart +lib/src/serializers.dart pubspec.yaml -test/accept_consent_request_test.dart -test/accept_login_request_test.dart -test/admin_api_test.dart -test/completed_request_test.dart -test/consent_request_session_test.dart -test/consent_request_test.dart -test/container_wait_ok_body_error_test.dart -test/flush_inactive_o_auth2_tokens_request_test.dart +test/accept_o_auth2_consent_request_session_test.dart +test/accept_o_auth2_consent_request_test.dart +test/accept_o_auth2_login_request_test.dart +test/create_json_web_key_set_test.dart +test/error_o_auth2_test.dart test/generic_error_test.dart +test/get_version200_response_test.dart test/health_not_ready_status_test.dart test/health_status_test.dart -test/json_error_test.dart -test/json_web_key_set_generator_request_test.dart +test/introspected_o_auth2_token_test.dart +test/is_ready200_response_test.dart +test/is_ready503_response_test.dart +test/json_patch_test.dart test/json_web_key_set_test.dart test/json_web_key_test.dart -test/login_request_test.dart -test/logout_request_test.dart +test/jwk_api_test.dart test/metadata_api_test.dart +test/o_auth2_api_test.dart test/o_auth2_client_test.dart -test/o_auth2_token_introspection_test.dart -test/oauth2_token_response_test.dart -test/open_id_connect_context_test.dart -test/patch_document_test.dart -test/plugin_config_args_test.dart -test/plugin_config_interface_test.dart -test/plugin_config_linux_test.dart -test/plugin_config_network_test.dart -test/plugin_config_rootfs_test.dart -test/plugin_config_test.dart -test/plugin_config_user_test.dart -test/plugin_device_test.dart -test/plugin_env_test.dart -test/plugin_interface_type_test.dart -test/plugin_mount_test.dart -test/plugin_settings_test.dart -test/previous_consent_session_test.dart -test/public_api_test.dart -test/reject_request_test.dart -test/request_was_handled_response_test.dart -test/trust_jwt_grant_issuer_body_test.dart -test/trusted_json_web_key_test.dart -test/trusted_jwt_grant_issuer_test.dart -test/userinfo_response_test.dart +test/o_auth2_client_token_lifespans_test.dart +test/o_auth2_consent_request_open_id_connect_context_test.dart +test/o_auth2_consent_request_test.dart +test/o_auth2_consent_session_expires_at_test.dart +test/o_auth2_consent_session_test.dart +test/o_auth2_login_request_test.dart +test/o_auth2_logout_request_test.dart +test/o_auth2_redirect_to_test.dart +test/o_auth2_token_exchange_test.dart +test/oidc_api_test.dart +test/oidc_configuration_test.dart +test/oidc_user_info_test.dart +test/pagination_headers_test.dart +test/pagination_test.dart +test/reject_o_auth2_request_test.dart +test/token_pagination_headers_test.dart +test/token_pagination_request_parameters_test.dart +test/token_pagination_response_headers_test.dart +test/token_pagination_test.dart +test/trust_o_auth2_jwt_grant_issuer_test.dart +test/trusted_o_auth2_jwt_grant_issuer_test.dart +test/trusted_o_auth2_jwt_grant_json_web_key_test.dart test/version_test.dart -test/volume_test.dart -test/volume_usage_data_test.dart -test/well_known_test.dart +test/wellknown_api_test.dart diff --git a/clients/hydra/dart/.openapi-generator/VERSION b/clients/hydra/dart/.openapi-generator/VERSION index 1e20ec35c64..358e78e6074 100644 --- a/clients/hydra/dart/.openapi-generator/VERSION +++ b/clients/hydra/dart/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0 \ No newline at end of file +6.1.0 \ No newline at end of file diff --git a/clients/hydra/dart/README.md b/clients/hydra/dart/README.md index e791ebe0b56..38343f9d546 100644 --- a/clients/hydra/dart/README.md +++ b/clients/hydra/dart/README.md @@ -1,32 +1,39 @@ -# ory_hydra_client -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. +# ory_hydra_client (EXPERIMENTAL) +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: v1.11.0 +- API version: v2.0.1 - Build package: org.openapitools.codegen.languages.DartDioClientCodegen ## Requirements -Dart 2.7.0 or later OR Flutter 1.12 or later +* Dart 2.12.0 or later OR Flutter 1.26.0 or later +* Dio 4.0.0+ ## Installation & Usage +### pub.dev +To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml +```yaml +dependencies: + ory_hydra_client: 2.0.1 +``` + ### Github If this Dart package is published to Github, please include the following in pubspec.yaml -``` -name: ory_hydra_client -version: 1.11.0 -description: OpenAPI API client +```yaml dependencies: ory_hydra_client: - git: https://github.com/ory/sdk.git - version: 'any' + git: + url: https://github.com/ory/sdk.git + #ref: main ``` -### Local -To use the package in your local drive, please include the following in pubspec.yaml -``` +### Local development +To use the package from your local drive, please include the following in pubspec.yaml +```yaml dependencies: ory_hydra_client: path: /path/to/ory_hydra_client @@ -37,18 +44,18 @@ dependencies: Please follow the [installation procedure](#installation--usage) and then run the following: ```dart -import 'package:ory_hydra_client/api.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -final api = AdminApi(); -final consentChallenge = consentChallenge_example; // String | -final body = AcceptConsentRequest(); // AcceptConsentRequest | +final api = OryHydraClient().getJwkApi(); +final String set_ = set__example; // String | The JSON Web Key Set ID +final CreateJsonWebKeySet createJsonWebKeySet = ; // CreateJsonWebKeySet | try { - final response = await api.acceptConsentRequest(consentChallenge, body); + final response = await api.createJsonWebKeySet(set_, createJsonWebKeySet); print(response); -} catch (e) { - print("Exception when calling AdminApi->acceptConsentRequest: $e\n"); +} catch on DioError (e) { + print("Exception when calling JwkApi->createJsonWebKeySet: $e\n"); } ``` @@ -59,101 +66,94 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdminApi* | [**acceptConsentRequest**](doc/AdminApi.md#acceptconsentrequest) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -*AdminApi* | [**acceptLoginRequest**](doc/AdminApi.md#acceptloginrequest) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -*AdminApi* | [**acceptLogoutRequest**](doc/AdminApi.md#acceptlogoutrequest) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -*AdminApi* | [**createJsonWebKeySet**](doc/AdminApi.md#createjsonwebkeyset) | **POST** /keys/{set} | Generate a New JSON Web Key -*AdminApi* | [**createOAuth2Client**](doc/AdminApi.md#createoauth2client) | **POST** /clients | Create an OAuth 2.0 Client -*AdminApi* | [**deleteJsonWebKey**](doc/AdminApi.md#deletejsonwebkey) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -*AdminApi* | [**deleteJsonWebKeySet**](doc/AdminApi.md#deletejsonwebkeyset) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -*AdminApi* | [**deleteOAuth2Client**](doc/AdminApi.md#deleteoauth2client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -*AdminApi* | [**deleteOAuth2Token**](doc/AdminApi.md#deleteoauth2token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -*AdminApi* | [**deleteTrustedJwtGrantIssuer**](doc/AdminApi.md#deletetrustedjwtgrantissuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**flushInactiveOAuth2Tokens**](doc/AdminApi.md#flushinactiveoauth2tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -*AdminApi* | [**getConsentRequest**](doc/AdminApi.md#getconsentrequest) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -*AdminApi* | [**getJsonWebKey**](doc/AdminApi.md#getjsonwebkey) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -*AdminApi* | [**getJsonWebKeySet**](doc/AdminApi.md#getjsonwebkeyset) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -*AdminApi* | [**getLoginRequest**](doc/AdminApi.md#getloginrequest) | **GET** /oauth2/auth/requests/login | Get a Login Request -*AdminApi* | [**getLogoutRequest**](doc/AdminApi.md#getlogoutrequest) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -*AdminApi* | [**getOAuth2Client**](doc/AdminApi.md#getoauth2client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -*AdminApi* | [**getTrustedJwtGrantIssuer**](doc/AdminApi.md#gettrustedjwtgrantissuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**getVersion**](doc/AdminApi.md#getversion) | **GET** /version | Get Service Version -*AdminApi* | [**introspectOAuth2Token**](doc/AdminApi.md#introspectoauth2token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -*AdminApi* | [**isInstanceAlive**](doc/AdminApi.md#isinstancealive) | **GET** /health/alive | Check Alive Status -*AdminApi* | [**listOAuth2Clients**](doc/AdminApi.md#listoauth2clients) | **GET** /clients | List OAuth 2.0 Clients -*AdminApi* | [**listSubjectConsentSessions**](doc/AdminApi.md#listsubjectconsentsessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -*AdminApi* | [**listTrustedJwtGrantIssuers**](doc/AdminApi.md#listtrustedjwtgrantissuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -*AdminApi* | [**patchOAuth2Client**](doc/AdminApi.md#patchoauth2client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -*AdminApi* | [**rejectConsentRequest**](doc/AdminApi.md#rejectconsentrequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -*AdminApi* | [**rejectLoginRequest**](doc/AdminApi.md#rejectloginrequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -*AdminApi* | [**rejectLogoutRequest**](doc/AdminApi.md#rejectlogoutrequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -*AdminApi* | [**revokeAuthenticationSession**](doc/AdminApi.md#revokeauthenticationsession) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -*AdminApi* | [**revokeConsentSessions**](doc/AdminApi.md#revokeconsentsessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -*AdminApi* | [**trustJwtGrantIssuer**](doc/AdminApi.md#trustjwtgrantissuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**updateJsonWebKey**](doc/AdminApi.md#updatejsonwebkey) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -*AdminApi* | [**updateJsonWebKeySet**](doc/AdminApi.md#updatejsonwebkeyset) | **PUT** /keys/{set} | Update a JSON Web Key Set -*AdminApi* | [**updateOAuth2Client**](doc/AdminApi.md#updateoauth2client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client -*MetadataApi* | [**prometheus**](doc/MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: -*PublicApi* | [**disconnectUser**](doc/PublicApi.md#disconnectuser) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -*PublicApi* | [**discoverOpenIDConfiguration**](doc/PublicApi.md#discoveropenidconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -*PublicApi* | [**dynamicClientRegistrationCreateOAuth2Client**](doc/PublicApi.md#dynamicclientregistrationcreateoauth2client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamicClientRegistrationDeleteOAuth2Client**](doc/PublicApi.md#dynamicclientregistrationdeleteoauth2client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamicClientRegistrationGetOAuth2Client**](doc/PublicApi.md#dynamicclientregistrationgetoauth2client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamicClientRegistrationUpdateOAuth2Client**](doc/PublicApi.md#dynamicclientregistrationupdateoauth2client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**isInstanceReady**](doc/PublicApi.md#isinstanceready) | **GET** /health/ready | Check Readiness Status -*PublicApi* | [**oauth2Token**](doc/PublicApi.md#oauth2token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -*PublicApi* | [**oauthAuth**](doc/PublicApi.md#oauthauth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -*PublicApi* | [**revokeOAuth2Token**](doc/PublicApi.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -*PublicApi* | [**userinfo**](doc/PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -*PublicApi* | [**wellKnown**](doc/PublicApi.md#wellknown) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery +[*JwkApi*](doc/JwkApi.md) | [**createJsonWebKeySet**](doc/JwkApi.md#createjsonwebkeyset) | **POST** /admin/keys/{set} | Create JSON Web Key +[*JwkApi*](doc/JwkApi.md) | [**deleteJsonWebKey**](doc/JwkApi.md#deletejsonwebkey) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key +[*JwkApi*](doc/JwkApi.md) | [**deleteJsonWebKeySet**](doc/JwkApi.md#deletejsonwebkeyset) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set +[*JwkApi*](doc/JwkApi.md) | [**getJsonWebKey**](doc/JwkApi.md#getjsonwebkey) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key +[*JwkApi*](doc/JwkApi.md) | [**getJsonWebKeySet**](doc/JwkApi.md#getjsonwebkeyset) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set +[*JwkApi*](doc/JwkApi.md) | [**setJsonWebKey**](doc/JwkApi.md#setjsonwebkey) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key +[*JwkApi*](doc/JwkApi.md) | [**setJsonWebKeySet**](doc/JwkApi.md#setjsonwebkeyset) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set +[*MetadataApi*](doc/MetadataApi.md) | [**getVersion**](doc/MetadataApi.md#getversion) | **GET** /version | Return Running Software Version. +[*MetadataApi*](doc/MetadataApi.md) | [**isAlive**](doc/MetadataApi.md#isalive) | **GET** /health/alive | Check HTTP Server Status +[*MetadataApi*](doc/MetadataApi.md) | [**isReady**](doc/MetadataApi.md#isready) | **GET** /health/ready | Check HTTP Server and Database Status +[*OAuth2Api*](doc/OAuth2Api.md) | [**acceptOAuth2ConsentRequest**](doc/OAuth2Api.md#acceptoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +[*OAuth2Api*](doc/OAuth2Api.md) | [**acceptOAuth2LoginRequest**](doc/OAuth2Api.md#acceptoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +[*OAuth2Api*](doc/OAuth2Api.md) | [**acceptOAuth2LogoutRequest**](doc/OAuth2Api.md#acceptoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +[*OAuth2Api*](doc/OAuth2Api.md) | [**createOAuth2Client**](doc/OAuth2Api.md#createoauth2client) | **POST** /admin/clients | Create OAuth 2.0 Client +[*OAuth2Api*](doc/OAuth2Api.md) | [**deleteOAuth2Client**](doc/OAuth2Api.md#deleteoauth2client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client +[*OAuth2Api*](doc/OAuth2Api.md) | [**deleteOAuth2Token**](doc/OAuth2Api.md#deleteoauth2token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +[*OAuth2Api*](doc/OAuth2Api.md) | [**deleteTrustedOAuth2JwtGrantIssuer**](doc/OAuth2Api.md#deletetrustedoauth2jwtgrantissuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +[*OAuth2Api*](doc/OAuth2Api.md) | [**getOAuth2Client**](doc/OAuth2Api.md#getoauth2client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client +[*OAuth2Api*](doc/OAuth2Api.md) | [**getOAuth2ConsentRequest**](doc/OAuth2Api.md#getoauth2consentrequest) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +[*OAuth2Api*](doc/OAuth2Api.md) | [**getOAuth2LoginRequest**](doc/OAuth2Api.md#getoauth2loginrequest) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +[*OAuth2Api*](doc/OAuth2Api.md) | [**getOAuth2LogoutRequest**](doc/OAuth2Api.md#getoauth2logoutrequest) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +[*OAuth2Api*](doc/OAuth2Api.md) | [**getTrustedOAuth2JwtGrantIssuer**](doc/OAuth2Api.md#gettrustedoauth2jwtgrantissuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +[*OAuth2Api*](doc/OAuth2Api.md) | [**introspectOAuth2Token**](doc/OAuth2Api.md#introspectoauth2token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +[*OAuth2Api*](doc/OAuth2Api.md) | [**listOAuth2Clients**](doc/OAuth2Api.md#listoauth2clients) | **GET** /admin/clients | List OAuth 2.0 Clients +[*OAuth2Api*](doc/OAuth2Api.md) | [**listOAuth2ConsentSessions**](doc/OAuth2Api.md#listoauth2consentsessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +[*OAuth2Api*](doc/OAuth2Api.md) | [**listTrustedOAuth2JwtGrantIssuers**](doc/OAuth2Api.md#listtrustedoauth2jwtgrantissuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +[*OAuth2Api*](doc/OAuth2Api.md) | [**oAuth2Authorize**](doc/OAuth2Api.md#oauth2authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint +[*OAuth2Api*](doc/OAuth2Api.md) | [**oauth2TokenExchange**](doc/OAuth2Api.md#oauth2tokenexchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint +[*OAuth2Api*](doc/OAuth2Api.md) | [**patchOAuth2Client**](doc/OAuth2Api.md#patchoauth2client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client +[*OAuth2Api*](doc/OAuth2Api.md) | [**rejectOAuth2ConsentRequest**](doc/OAuth2Api.md#rejectoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +[*OAuth2Api*](doc/OAuth2Api.md) | [**rejectOAuth2LoginRequest**](doc/OAuth2Api.md#rejectoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +[*OAuth2Api*](doc/OAuth2Api.md) | [**rejectOAuth2LogoutRequest**](doc/OAuth2Api.md#rejectoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +[*OAuth2Api*](doc/OAuth2Api.md) | [**revokeOAuth2ConsentSessions**](doc/OAuth2Api.md#revokeoauth2consentsessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +[*OAuth2Api*](doc/OAuth2Api.md) | [**revokeOAuth2LoginSessions**](doc/OAuth2Api.md#revokeoauth2loginsessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +[*OAuth2Api*](doc/OAuth2Api.md) | [**revokeOAuth2Token**](doc/OAuth2Api.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +[*OAuth2Api*](doc/OAuth2Api.md) | [**setOAuth2Client**](doc/OAuth2Api.md#setoauth2client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client +[*OAuth2Api*](doc/OAuth2Api.md) | [**setOAuth2ClientLifespans**](doc/OAuth2Api.md#setoauth2clientlifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +[*OAuth2Api*](doc/OAuth2Api.md) | [**trustOAuth2JwtGrantIssuer**](doc/OAuth2Api.md#trustoauth2jwtgrantissuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer +[*OidcApi*](doc/OidcApi.md) | [**createOidcDynamicClient**](doc/OidcApi.md#createoidcdynamicclient) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +[*OidcApi*](doc/OidcApi.md) | [**deleteOidcDynamicClient**](doc/OidcApi.md#deleteoidcdynamicclient) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +[*OidcApi*](doc/OidcApi.md) | [**discoverOidcConfiguration**](doc/OidcApi.md#discoveroidcconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery +[*OidcApi*](doc/OidcApi.md) | [**getOidcDynamicClient**](doc/OidcApi.md#getoidcdynamicclient) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +[*OidcApi*](doc/OidcApi.md) | [**getOidcUserInfo**](doc/OidcApi.md#getoidcuserinfo) | **GET** /userinfo | OpenID Connect Userinfo +[*OidcApi*](doc/OidcApi.md) | [**revokeOidcSession**](doc/OidcApi.md#revokeoidcsession) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +[*OidcApi*](doc/OidcApi.md) | [**setOidcDynamicClient**](doc/OidcApi.md#setoidcdynamicclient) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration +[*WellknownApi*](doc/WellknownApi.md) | [**discoverJsonWebKeys**](doc/WellknownApi.md#discoverjsonwebkeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys ## Documentation For Models - - [AcceptConsentRequest](doc/AcceptConsentRequest.md) - - [AcceptLoginRequest](doc/AcceptLoginRequest.md) - - [CompletedRequest](doc/CompletedRequest.md) - - [ConsentRequest](doc/ConsentRequest.md) - - [ConsentRequestSession](doc/ConsentRequestSession.md) - - [ContainerWaitOKBodyError](doc/ContainerWaitOKBodyError.md) - - [FlushInactiveOAuth2TokensRequest](doc/FlushInactiveOAuth2TokensRequest.md) + - [AcceptOAuth2ConsentRequest](doc/AcceptOAuth2ConsentRequest.md) + - [AcceptOAuth2ConsentRequestSession](doc/AcceptOAuth2ConsentRequestSession.md) + - [AcceptOAuth2LoginRequest](doc/AcceptOAuth2LoginRequest.md) + - [CreateJsonWebKeySet](doc/CreateJsonWebKeySet.md) + - [ErrorOAuth2](doc/ErrorOAuth2.md) - [GenericError](doc/GenericError.md) + - [GetVersion200Response](doc/GetVersion200Response.md) - [HealthNotReadyStatus](doc/HealthNotReadyStatus.md) - [HealthStatus](doc/HealthStatus.md) - - [JSONWebKey](doc/JSONWebKey.md) - - [JSONWebKeySet](doc/JSONWebKeySet.md) - - [JsonError](doc/JsonError.md) - - [JsonWebKeySetGeneratorRequest](doc/JsonWebKeySetGeneratorRequest.md) - - [LoginRequest](doc/LoginRequest.md) - - [LogoutRequest](doc/LogoutRequest.md) + - [IntrospectedOAuth2Token](doc/IntrospectedOAuth2Token.md) + - [IsReady200Response](doc/IsReady200Response.md) + - [IsReady503Response](doc/IsReady503Response.md) + - [JsonPatch](doc/JsonPatch.md) + - [JsonWebKey](doc/JsonWebKey.md) + - [JsonWebKeySet](doc/JsonWebKeySet.md) - [OAuth2Client](doc/OAuth2Client.md) - - [OAuth2TokenIntrospection](doc/OAuth2TokenIntrospection.md) - - [Oauth2TokenResponse](doc/Oauth2TokenResponse.md) - - [OpenIDConnectContext](doc/OpenIDConnectContext.md) - - [PatchDocument](doc/PatchDocument.md) - - [PluginConfig](doc/PluginConfig.md) - - [PluginConfigArgs](doc/PluginConfigArgs.md) - - [PluginConfigInterface](doc/PluginConfigInterface.md) - - [PluginConfigLinux](doc/PluginConfigLinux.md) - - [PluginConfigNetwork](doc/PluginConfigNetwork.md) - - [PluginConfigRootfs](doc/PluginConfigRootfs.md) - - [PluginConfigUser](doc/PluginConfigUser.md) - - [PluginDevice](doc/PluginDevice.md) - - [PluginEnv](doc/PluginEnv.md) - - [PluginInterfaceType](doc/PluginInterfaceType.md) - - [PluginMount](doc/PluginMount.md) - - [PluginSettings](doc/PluginSettings.md) - - [PreviousConsentSession](doc/PreviousConsentSession.md) - - [RejectRequest](doc/RejectRequest.md) - - [RequestWasHandledResponse](doc/RequestWasHandledResponse.md) - - [TrustJwtGrantIssuerBody](doc/TrustJwtGrantIssuerBody.md) - - [TrustedJsonWebKey](doc/TrustedJsonWebKey.md) - - [TrustedJwtGrantIssuer](doc/TrustedJwtGrantIssuer.md) - - [UserinfoResponse](doc/UserinfoResponse.md) + - [OAuth2ClientTokenLifespans](doc/OAuth2ClientTokenLifespans.md) + - [OAuth2ConsentRequest](doc/OAuth2ConsentRequest.md) + - [OAuth2ConsentRequestOpenIDConnectContext](doc/OAuth2ConsentRequestOpenIDConnectContext.md) + - [OAuth2ConsentSession](doc/OAuth2ConsentSession.md) + - [OAuth2ConsentSessionExpiresAt](doc/OAuth2ConsentSessionExpiresAt.md) + - [OAuth2LoginRequest](doc/OAuth2LoginRequest.md) + - [OAuth2LogoutRequest](doc/OAuth2LogoutRequest.md) + - [OAuth2RedirectTo](doc/OAuth2RedirectTo.md) + - [OAuth2TokenExchange](doc/OAuth2TokenExchange.md) + - [OidcConfiguration](doc/OidcConfiguration.md) + - [OidcUserInfo](doc/OidcUserInfo.md) + - [Pagination](doc/Pagination.md) + - [PaginationHeaders](doc/PaginationHeaders.md) + - [RejectOAuth2Request](doc/RejectOAuth2Request.md) + - [TokenPagination](doc/TokenPagination.md) + - [TokenPaginationHeaders](doc/TokenPaginationHeaders.md) + - [TokenPaginationRequestParameters](doc/TokenPaginationRequestParameters.md) + - [TokenPaginationResponseHeaders](doc/TokenPaginationResponseHeaders.md) + - [TrustOAuth2JwtGrantIssuer](doc/TrustOAuth2JwtGrantIssuer.md) + - [TrustedOAuth2JwtGrantIssuer](doc/TrustedOAuth2JwtGrantIssuer.md) + - [TrustedOAuth2JwtGrantJsonWebKey](doc/TrustedOAuth2JwtGrantJsonWebKey.md) - [Version](doc/Version.md) - - [Volume](doc/Volume.md) - - [VolumeUsageData](doc/VolumeUsageData.md) - - [WellKnown](doc/WellKnown.md) ## Documentation For Authorization @@ -163,6 +163,10 @@ Class | Method | HTTP request | Description - **Type**: HTTP basic authentication +## bearer + +- **Type**: HTTP basic authentication + ## oauth2 - **Type**: OAuth @@ -176,5 +180,5 @@ Class | Method | HTTP request | Description ## Author - +hi@ory.sh diff --git a/clients/hydra/dart/doc/AcceptConsentRequest.md b/clients/hydra/dart/doc/AcceptOAuth2ConsentRequest.md similarity index 73% rename from clients/hydra/dart/doc/AcceptConsentRequest.md rename to clients/hydra/dart/doc/AcceptOAuth2ConsentRequest.md index fd966c1f0a6..c7535b3bce7 100644 --- a/clients/hydra/dart/doc/AcceptConsentRequest.md +++ b/clients/hydra/dart/doc/AcceptOAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.AcceptConsentRequest +# ory_hydra_client.model.AcceptOAuth2ConsentRequest ## Load the model package ```dart @@ -8,12 +8,12 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**grantAccessTokenAudience** | **BuiltList** | | [optional] -**grantScope** | **BuiltList** | | [optional] +**grantAccessTokenAudience** | **BuiltList<String>** | | [optional] +**grantScope** | **BuiltList<String>** | | [optional] **handledAt** | [**DateTime**](DateTime.md) | | [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] **rememberFor** | **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** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] +**session** | [**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/dart/doc/ConsentRequestSession.md b/clients/hydra/dart/doc/AcceptOAuth2ConsentRequestSession.md similarity index 94% rename from clients/hydra/dart/doc/ConsentRequestSession.md rename to clients/hydra/dart/doc/AcceptOAuth2ConsentRequestSession.md index 8f76390e7eb..f13fde29495 100644 --- a/clients/hydra/dart/doc/ConsentRequestSession.md +++ b/clients/hydra/dart/doc/AcceptOAuth2ConsentRequestSession.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.ConsentRequestSession +# ory_hydra_client.model.AcceptOAuth2ConsentRequestSession ## Load the model package ```dart diff --git a/clients/hydra/dart/doc/AcceptLoginRequest.md b/clients/hydra/dart/doc/AcceptOAuth2LoginRequest.md similarity index 96% rename from clients/hydra/dart/doc/AcceptLoginRequest.md rename to clients/hydra/dart/doc/AcceptOAuth2LoginRequest.md index 6ad253f9efa..e103323c9ff 100644 --- a/clients/hydra/dart/doc/AcceptLoginRequest.md +++ b/clients/hydra/dart/doc/AcceptOAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.AcceptLoginRequest +# ory_hydra_client.model.AcceptOAuth2LoginRequest ## Load the model package ```dart @@ -9,7 +9,7 @@ import 'package:ory_hydra_client/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **acr** | **String** | 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** | **BuiltList** | | [optional] +**amr** | **BuiltList<String>** | | [optional] **context** | [**JsonObject**](.md) | | [optional] **forceSubjectIdentifier** | **String** | 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] **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] diff --git a/clients/hydra/dart/doc/AdminApi.md b/clients/hydra/dart/doc/AdminApi.md deleted file mode 100644 index cf9250bc606..00000000000 --- a/clients/hydra/dart/doc/AdminApi.md +++ /dev/null @@ -1,1534 +0,0 @@ -# ory_hydra_client.api.AdminApi - -## Load the API package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**acceptConsentRequest**](AdminApi.md#acceptconsentrequest) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -[**acceptLoginRequest**](AdminApi.md#acceptloginrequest) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -[**acceptLogoutRequest**](AdminApi.md#acceptlogoutrequest) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -[**createJsonWebKeySet**](AdminApi.md#createjsonwebkeyset) | **POST** /keys/{set} | Generate a New JSON Web Key -[**createOAuth2Client**](AdminApi.md#createoauth2client) | **POST** /clients | Create an OAuth 2.0 Client -[**deleteJsonWebKey**](AdminApi.md#deletejsonwebkey) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -[**deleteJsonWebKeySet**](AdminApi.md#deletejsonwebkeyset) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -[**deleteOAuth2Client**](AdminApi.md#deleteoauth2client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -[**deleteOAuth2Token**](AdminApi.md#deleteoauth2token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -[**deleteTrustedJwtGrantIssuer**](AdminApi.md#deletetrustedjwtgrantissuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**flushInactiveOAuth2Tokens**](AdminApi.md#flushinactiveoauth2tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -[**getConsentRequest**](AdminApi.md#getconsentrequest) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -[**getJsonWebKey**](AdminApi.md#getjsonwebkey) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -[**getJsonWebKeySet**](AdminApi.md#getjsonwebkeyset) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -[**getLoginRequest**](AdminApi.md#getloginrequest) | **GET** /oauth2/auth/requests/login | Get a Login Request -[**getLogoutRequest**](AdminApi.md#getlogoutrequest) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -[**getOAuth2Client**](AdminApi.md#getoauth2client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -[**getTrustedJwtGrantIssuer**](AdminApi.md#gettrustedjwtgrantissuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**getVersion**](AdminApi.md#getversion) | **GET** /version | Get Service Version -[**introspectOAuth2Token**](AdminApi.md#introspectoauth2token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -[**isInstanceAlive**](AdminApi.md#isinstancealive) | **GET** /health/alive | Check Alive Status -[**listOAuth2Clients**](AdminApi.md#listoauth2clients) | **GET** /clients | List OAuth 2.0 Clients -[**listSubjectConsentSessions**](AdminApi.md#listsubjectconsentsessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -[**listTrustedJwtGrantIssuers**](AdminApi.md#listtrustedjwtgrantissuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -[**patchOAuth2Client**](AdminApi.md#patchoauth2client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -[**rejectConsentRequest**](AdminApi.md#rejectconsentrequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -[**rejectLoginRequest**](AdminApi.md#rejectloginrequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -[**rejectLogoutRequest**](AdminApi.md#rejectlogoutrequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -[**revokeAuthenticationSession**](AdminApi.md#revokeauthenticationsession) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -[**revokeConsentSessions**](AdminApi.md#revokeconsentsessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -[**trustJwtGrantIssuer**](AdminApi.md#trustjwtgrantissuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -[**updateJsonWebKey**](AdminApi.md#updatejsonwebkey) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -[**updateJsonWebKeySet**](AdminApi.md#updatejsonwebkeyset) | **PUT** /keys/{set} | Update a JSON Web Key Set -[**updateOAuth2Client**](AdminApi.md#updateoauth2client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client - - -# **acceptConsentRequest** -> CompletedRequest acceptConsentRequest(consentChallenge, body) - -Accept a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var consentChallenge = consentChallenge_example; // String | -var body = new AcceptConsentRequest(); // AcceptConsentRequest | - -try { - var result = api_instance.acceptConsentRequest(consentChallenge, body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->acceptConsentRequest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **String**| | - **body** | [**AcceptConsentRequest**](AcceptConsentRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **acceptLoginRequest** -> CompletedRequest acceptLoginRequest(loginChallenge, body) - -Accept a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var loginChallenge = loginChallenge_example; // String | -var body = new AcceptLoginRequest(); // AcceptLoginRequest | - -try { - var result = api_instance.acceptLoginRequest(loginChallenge, body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->acceptLoginRequest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **String**| | - **body** | [**AcceptLoginRequest**](AcceptLoginRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **acceptLogoutRequest** -> CompletedRequest acceptLogoutRequest(logoutChallenge) - -Accept a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var logoutChallenge = logoutChallenge_example; // String | - -try { - var result = api_instance.acceptLogoutRequest(logoutChallenge); - print(result); -} catch (e) { - print('Exception when calling AdminApi->acceptLogoutRequest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **String**| | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **createJsonWebKeySet** -> JSONWebKeySet createJsonWebKeySet(set_, body) - -Generate a New 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var set_ = set__example; // String | The set -var body = new JsonWebKeySetGeneratorRequest(); // JsonWebKeySetGeneratorRequest | - -try { - var result = api_instance.createJsonWebKeySet(set_, body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->createJsonWebKeySet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set_** | **String**| The set | - **body** | [**JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md)| | [optional] - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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** -> OAuth2Client createOAuth2Client(body) - -Create an OAuth 2.0 Client - -Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var body = new OAuth2Client(); // OAuth2Client | - -try { - var result = api_instance.createOAuth2Client(body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->createOAuth2Client: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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** -> deleteJsonWebKey(kid, set_) - -Delete a 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var kid = kid_example; // String | The kid of the desired key -var set_ = set__example; // String | The set - -try { - api_instance.deleteJsonWebKey(kid, set_); -} catch (e) { - print('Exception when calling AdminApi->deleteJsonWebKey: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **String**| The kid of the desired key | - **set_** | **String**| The set | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> deleteJsonWebKeySet(set_) - -Delete a 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var set_ = set__example; // String | The set - -try { - api_instance.deleteJsonWebKeySet(set_); -} catch (e) { - print('Exception when calling AdminApi->deleteJsonWebKeySet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set_** | **String**| The set | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> deleteOAuth2Client(id) - -Deletes an 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var id = id_example; // String | The id of the OAuth 2.0 Client. - -try { - api_instance.deleteOAuth2Client(id); -} catch (e) { - print('Exception when calling AdminApi->deleteOAuth2Client: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> deleteOAuth2Token(clientId) - -Delete OAuth2 Access Tokens from a Client - -This endpoint deletes OAuth2 access tokens issued for a client from the database - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var clientId = clientId_example; // String | - -try { - api_instance.deleteOAuth2Token(clientId); -} catch (e) { - print('Exception when calling AdminApi->deleteOAuth2Token: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **clientId** | **String**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **deleteTrustedJwtGrantIssuer** -> deleteTrustedJwtGrantIssuer(id) - -Delete a 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var id = id_example; // String | The id of the desired grant - -try { - api_instance.deleteTrustedJwtGrantIssuer(id); -} catch (e) { - print('Exception when calling AdminApi->deleteTrustedJwtGrantIssuer: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the desired grant | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **flushInactiveOAuth2Tokens** -> flushInactiveOAuth2Tokens(body) - -Flush Expired OAuth2 Access Tokens - -This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var body = new FlushInactiveOAuth2TokensRequest(); // FlushInactiveOAuth2TokensRequest | - -try { - api_instance.flushInactiveOAuth2Tokens(body); -} catch (e) { - print('Exception when calling AdminApi->flushInactiveOAuth2Tokens: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **getConsentRequest** -> ConsentRequest getConsentRequest(consentChallenge) - -Get Consent Request Information - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var consentChallenge = consentChallenge_example; // String | - -try { - var result = api_instance.getConsentRequest(consentChallenge); - print(result); -} catch (e) { - print('Exception when calling AdminApi->getConsentRequest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **String**| | - -### Return type - -[**ConsentRequest**](ConsentRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> JSONWebKeySet getJsonWebKey(kid, set_) - -Fetch a JSON Web Key - -This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var kid = kid_example; // String | The kid of the desired key -var set_ = set__example; // String | The set - -try { - var result = api_instance.getJsonWebKey(kid, set_); - print(result); -} catch (e) { - print('Exception when calling AdminApi->getJsonWebKey: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **String**| The kid of the desired key | - **set_** | **String**| The set | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> JSONWebKeySet getJsonWebKeySet(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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var set_ = set__example; // String | The set - -try { - var result = api_instance.getJsonWebKeySet(set_); - print(result); -} catch (e) { - print('Exception when calling AdminApi->getJsonWebKeySet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set_** | **String**| The set | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **getLoginRequest** -> LoginRequest getLoginRequest(loginChallenge) - -Get a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var loginChallenge = loginChallenge_example; // String | - -try { - var result = api_instance.getLoginRequest(loginChallenge); - print(result); -} catch (e) { - print('Exception when calling AdminApi->getLoginRequest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **String**| | - -### Return type - -[**LoginRequest**](LoginRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **getLogoutRequest** -> LogoutRequest getLogoutRequest(logoutChallenge) - -Get a Logout Request - -Use this endpoint to fetch a logout request. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var logoutChallenge = logoutChallenge_example; // String | - -try { - var result = api_instance.getLogoutRequest(logoutChallenge); - print(result); -} catch (e) { - print('Exception when calling AdminApi->getLogoutRequest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **String**| | - -### Return type - -[**LogoutRequest**](LogoutRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> OAuth2Client getOAuth2Client(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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var id = id_example; // String | The id of the OAuth 2.0 Client. - -try { - var result = api_instance.getOAuth2Client(id); - print(result); -} catch (e) { - print('Exception when calling AdminApi->getOAuth2Client: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **getTrustedJwtGrantIssuer** -> TrustedJwtGrantIssuer getTrustedJwtGrantIssuer(id) - -Get a 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var id = id_example; // String | The id of the desired grant - -try { - var result = api_instance.getTrustedJwtGrantIssuer(id); - print(result); -} catch (e) { - print('Exception when calling AdminApi->getTrustedJwtGrantIssuer: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the desired grant | - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **getVersion** -> Version getVersion() - -Get Service Version - -This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); - -try { - var result = api_instance.getVersion(); - print(result); -} catch (e) { - print('Exception when calling AdminApi->getVersion: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Version**](Version.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> OAuth2TokenIntrospection introspectOAuth2Token(token, scope) - -Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -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. - -try { - var result = api_instance.introspectOAuth2Token(token, scope); - print(result); -} catch (e) { - print('Exception when calling AdminApi->introspectOAuth2Token: $e\n'); -} -``` - -### 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] - -### Return type - -[**OAuth2TokenIntrospection**](OAuth2TokenIntrospection.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -[[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) - -# **isInstanceAlive** -> HealthStatus isInstanceAlive() - -Check Alive Status - -This endpoint returns a 200 status code when the HTTP server is up running. 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); - -try { - var result = api_instance.isInstanceAlive(); - print(result); -} catch (e) { - print('Exception when calling AdminApi->isInstanceAlive: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> BuiltList listOAuth2Clients(limit, offset, clientName, 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var limit = 789; // int | The maximum amount of clients to returned, upper bound is 500 clients. -var offset = 789; // int | The offset from where to start looking. -var clientName = clientName_example; // String | The name of the clients to filter by. -var owner = owner_example; // String | The owner of the clients to filter by. - -try { - var result = api_instance.listOAuth2Clients(limit, offset, clientName, owner); - print(result); -} catch (e) { - print('Exception when calling AdminApi->listOAuth2Clients: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int**| The maximum amount of clients to returned, upper bound is 500 clients. | [optional] - **offset** | **int**| The offset from where to start looking. | [optional] - **clientName** | **String**| The name of the clients to filter by. | [optional] - **owner** | **String**| The owner of the clients to filter by. | [optional] - -### Return type - -[**BuiltList**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **listSubjectConsentSessions** -> BuiltList listSubjectConsentSessions(subject) - -Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var subject = subject_example; // String | - -try { - var result = api_instance.listSubjectConsentSessions(subject); - print(result); -} catch (e) { - print('Exception when calling AdminApi->listSubjectConsentSessions: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **String**| | - -### Return type - -[**BuiltList**](PreviousConsentSession.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **listTrustedJwtGrantIssuers** -> BuiltList listTrustedJwtGrantIssuers(issuer, limit, offset) - -List Trusted OAuth2 JWT Bearer Grant Type Issuers - -Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var issuer = issuer_example; // String | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. -var limit = 789; // int | The maximum amount of policies returned, upper bound is 500 policies -var offset = 789; // int | The offset from where to start looking. - -try { - var result = api_instance.listTrustedJwtGrantIssuers(issuer, limit, offset); - print(result); -} catch (e) { - print('Exception when calling AdminApi->listTrustedJwtGrantIssuers: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **issuer** | **String**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] - **limit** | **int**| The maximum amount of policies returned, upper bound is 500 policies | [optional] - **offset** | **int**| The offset from where to start looking. | [optional] - -### Return type - -[**BuiltList**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> OAuth2Client patchOAuth2Client(id, body) - -Patch an OAuth 2.0 Client - -Patch an existing OAuth 2.0 Client. 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var id = id_example; // String | The id of the OAuth 2.0 Client. -var body = [new BuiltList()]; // BuiltList | - -try { - var result = api_instance.patchOAuth2Client(id, body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->patchOAuth2Client: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - **body** | [**BuiltList**](PatchDocument.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **rejectConsentRequest** -> CompletedRequest rejectConsentRequest(consentChallenge, body) - -Reject a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var consentChallenge = consentChallenge_example; // String | -var body = new RejectRequest(); // RejectRequest | - -try { - var result = api_instance.rejectConsentRequest(consentChallenge, body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->rejectConsentRequest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **String**| | - **body** | [**RejectRequest**](RejectRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **rejectLoginRequest** -> CompletedRequest rejectLoginRequest(loginChallenge, body) - -Reject a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var loginChallenge = loginChallenge_example; // String | -var body = new RejectRequest(); // RejectRequest | - -try { - var result = api_instance.rejectLoginRequest(loginChallenge, body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->rejectLoginRequest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **String**| | - **body** | [**RejectRequest**](RejectRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **rejectLogoutRequest** -> rejectLogoutRequest(logoutChallenge, body) - -Reject a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var logoutChallenge = logoutChallenge_example; // String | -var body = new RejectRequest(); // RejectRequest | - -try { - api_instance.rejectLogoutRequest(logoutChallenge, body); -} catch (e) { - print('Exception when calling AdminApi->rejectLogoutRequest: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **String**| | - **body** | [**RejectRequest**](RejectRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - -[[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) - -# **revokeAuthenticationSession** -> revokeAuthenticationSession(subject) - -Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - -This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var subject = subject_example; // String | - -try { - api_instance.revokeAuthenticationSession(subject); -} catch (e) { - print('Exception when calling AdminApi->revokeAuthenticationSession: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **String**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **revokeConsentSessions** -> revokeConsentSessions(subject, client, all) - -Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - -This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var subject = subject_example; // String | The subject (Subject) who's consent sessions should be deleted. -var client = client_example; // String | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID -var all = true; // bool | If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. - -try { - api_instance.revokeConsentSessions(subject, client, all); -} catch (e) { - print('Exception when calling AdminApi->revokeConsentSessions: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **String**| The subject (Subject) who's consent sessions should be deleted. | - **client** | **String**| If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | [optional] - **all** | **bool**| If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **trustJwtGrantIssuer** -> TrustedJwtGrantIssuer trustJwtGrantIssuer(body) - -Trust an 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). - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var body = new TrustJwtGrantIssuerBody(); // TrustJwtGrantIssuerBody | - -try { - var result = api_instance.trustJwtGrantIssuer(body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->trustJwtGrantIssuer: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**TrustJwtGrantIssuerBody**](TrustJwtGrantIssuerBody.md)| | [optional] - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **updateJsonWebKey** -> JSONWebKey updateJsonWebKey(kid, set_, body) - -Update a 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var kid = kid_example; // String | The kid of the desired key -var set_ = set__example; // String | The set -var body = new JSONWebKey(); // JSONWebKey | - -try { - var result = api_instance.updateJsonWebKey(kid, set_, body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->updateJsonWebKey: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **String**| The kid of the desired key | - **set_** | **String**| The set | - **body** | [**JSONWebKey**](JSONWebKey.md)| | [optional] - -### Return type - -[**JSONWebKey**](JSONWebKey.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **updateJsonWebKeySet** -> JSONWebKeySet updateJsonWebKeySet(set_, body) - -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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var set_ = set__example; // String | The set -var body = new JSONWebKeySet(); // JSONWebKeySet | - -try { - var result = api_instance.updateJsonWebKeySet(set_, body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->updateJsonWebKeySet: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set_** | **String**| The set | - **body** | [**JSONWebKeySet**](JSONWebKeySet.md)| | [optional] - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **updateOAuth2Client** -> OAuth2Client updateOAuth2Client(id, body) - -Update an OAuth 2.0 Client - -Update an existing OAuth 2.0 Client. 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new AdminApi(); -var id = id_example; // String | The id of the OAuth 2.0 Client. -var body = new OAuth2Client(); // OAuth2Client | - -try { - var result = api_instance.updateOAuth2Client(id, body); - print(result); -} catch (e) { - print('Exception when calling AdminApi->updateOAuth2Client: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - diff --git a/clients/hydra/dart/doc/CreateJsonWebKeySet.md b/clients/hydra/dart/doc/CreateJsonWebKeySet.md new file mode 100644 index 00000000000..0b055175396 --- /dev/null +++ b/clients/hydra/dart/doc/CreateJsonWebKeySet.md @@ -0,0 +1,17 @@ +# ory_hydra_client.model.CreateJsonWebKeySet + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +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\". | + +[[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/dart/doc/ErrorOAuth2.md b/clients/hydra/dart/doc/ErrorOAuth2.md new file mode 100644 index 00000000000..29895527f36 --- /dev/null +++ b/clients/hydra/dart/doc/ErrorOAuth2.md @@ -0,0 +1,19 @@ +# ory_hydra_client.model.ErrorOAuth2 + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **String** | Error | [optional] +**errorDebug** | **String** | Error Debug Information Only available in dev mode. | [optional] +**errorDescription** | **String** | Error Description | [optional] +**errorHint** | **String** | Error Hint Helps the user identify the error cause. | [optional] +**statusCode** | **int** | HTTP Status Code | [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/dart/doc/FlushInactiveOAuth2TokensRequest.md b/clients/hydra/dart/doc/FlushInactiveOAuth2TokensRequest.md deleted file mode 100644 index f511cbdaef3..00000000000 --- a/clients/hydra/dart/doc/FlushInactiveOAuth2TokensRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# ory_hydra_client.model.FlushInactiveOAuth2TokensRequest - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**notAfter** | [**DateTime**](DateTime.md) | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. | [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/dart/doc/ContainerWaitOKBodyError.md b/clients/hydra/dart/doc/GetVersion200Response.md similarity index 75% rename from clients/hydra/dart/doc/ContainerWaitOKBodyError.md rename to clients/hydra/dart/doc/GetVersion200Response.md index c3ea1a41481..d48dc0a4a5c 100644 --- a/clients/hydra/dart/doc/ContainerWaitOKBodyError.md +++ b/clients/hydra/dart/doc/GetVersion200Response.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.ContainerWaitOKBodyError +# ory_hydra_client.model.GetVersion200Response ## Load the model package ```dart @@ -8,7 +8,7 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **String** | Details of an error | [optional] +**version** | **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/dart/doc/HealthNotReadyStatus.md b/clients/hydra/dart/doc/HealthNotReadyStatus.md index a901987e6f3..9652b77e7c9 100644 --- a/clients/hydra/dart/doc/HealthNotReadyStatus.md +++ b/clients/hydra/dart/doc/HealthNotReadyStatus.md @@ -8,7 +8,7 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**errors** | **BuiltMap** | Errors contains a list of errors that caused the not ready status. | [optional] +**errors** | **BuiltMap<String, String>** | 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/dart/doc/OAuth2TokenIntrospection.md b/clients/hydra/dart/doc/IntrospectedOAuth2Token.md similarity index 89% rename from clients/hydra/dart/doc/OAuth2TokenIntrospection.md rename to clients/hydra/dart/doc/IntrospectedOAuth2Token.md index e52471c7d8b..b0d6c6fd629 100644 --- a/clients/hydra/dart/doc/OAuth2TokenIntrospection.md +++ b/clients/hydra/dart/doc/IntrospectedOAuth2Token.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.OAuth2TokenIntrospection +# ory_hydra_client.model.IntrospectedOAuth2Token ## Load the model package ```dart @@ -9,10 +9,10 @@ import 'package:ory_hydra_client/api.dart'; 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** | **BuiltList** | Audience contains a list of the token's intended audiences. | [optional] +**aud** | **BuiltList<String>** | Audience contains a list of the token's intended audiences. | [optional] **clientId** | **String** | 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** | [**JsonObject**](.md) | Extra is arbitrary data set by the session. | [optional] +**ext** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | 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** | **String** | 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] diff --git a/clients/hydra/dart/doc/PluginConfigNetwork.md b/clients/hydra/dart/doc/IsReady200Response.md similarity index 78% rename from clients/hydra/dart/doc/PluginConfigNetwork.md rename to clients/hydra/dart/doc/IsReady200Response.md index 350f714b877..0198842b277 100644 --- a/clients/hydra/dart/doc/PluginConfigNetwork.md +++ b/clients/hydra/dart/doc/IsReady200Response.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.PluginConfigNetwork +# ory_hydra_client.model.IsReady200Response ## Load the model package ```dart @@ -8,7 +8,7 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **String** | type | +**status** | **String** | Always \"ok\". | [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/dart/doc/PluginConfigRootfs.md b/clients/hydra/dart/doc/IsReady503Response.md similarity index 67% rename from clients/hydra/dart/doc/PluginConfigRootfs.md rename to clients/hydra/dart/doc/IsReady503Response.md index 54467eabc0d..b122e3a5217 100644 --- a/clients/hydra/dart/doc/PluginConfigRootfs.md +++ b/clients/hydra/dart/doc/IsReady503Response.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.PluginConfigRootfs +# ory_hydra_client.model.IsReady503Response ## Load the model package ```dart @@ -8,8 +8,7 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**diffIds** | **BuiltList** | diff ids | [optional] -**type** | **String** | type | [optional] +**errors** | **BuiltMap<String, String>** | 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/dart/doc/JSONWebKeySet.md b/clients/hydra/dart/doc/JSONWebKeySet.md deleted file mode 100644 index 1ef5c145bf9..00000000000 --- a/clients/hydra/dart/doc/JSONWebKeySet.md +++ /dev/null @@ -1,15 +0,0 @@ -# ory_hydra_client.model.JSONWebKeySet - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**keys** | [**BuiltList**](JSONWebKey.md) | The value of the \"keys\" parameter is an array of 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/dart/doc/JsonError.md b/clients/hydra/dart/doc/JsonError.md deleted file mode 100644 index 1409091654f..00000000000 --- a/clients/hydra/dart/doc/JsonError.md +++ /dev/null @@ -1,18 +0,0 @@ -# ory_hydra_client.model.JsonError - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **String** | Name is the error name. | [optional] -**errorDebug** | **String** | Debug contains debug information. This is usually not available and has to be enabled. | [optional] -**errorDescription** | **String** | Description contains further information on the nature of the error. | [optional] -**statusCode** | **int** | Code represents the error status code (404, 403, 401, ...). | [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/dart/doc/JsonPatch.md b/clients/hydra/dart/doc/JsonPatch.md new file mode 100644 index 00000000000..9279323f611 --- /dev/null +++ b/clients/hydra/dart/doc/JsonPatch.md @@ -0,0 +1,18 @@ +# ory_hydra_client.model.JsonPatch + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **String** | 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** | **String** | The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". | +**path** | **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). | +**value** | [**JsonObject**](.md) | The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). | [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/dart/doc/JSONWebKey.md b/clients/hydra/dart/doc/JsonWebKey.md similarity index 82% rename from clients/hydra/dart/doc/JSONWebKey.md rename to clients/hydra/dart/doc/JsonWebKey.md index 8c7fdda7e93..0125a2d32f6 100644 --- a/clients/hydra/dart/doc/JSONWebKey.md +++ b/clients/hydra/dart/doc/JsonWebKey.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.JSONWebKey +# ory_hydra_client.model.JsonWebKey ## Load the model package ```dart @@ -23,7 +23,7 @@ Name | Type | Description | Notes **qi** | **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). | **x** | **String** | | [optional] -**x5c** | **BuiltList** | 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** | **BuiltList<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. | [optional] **y** | **String** | | [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/dart/doc/JsonWebKeySet.md b/clients/hydra/dart/doc/JsonWebKeySet.md new file mode 100644 index 00000000000..29881b3983f --- /dev/null +++ b/clients/hydra/dart/doc/JsonWebKeySet.md @@ -0,0 +1,15 @@ +# ory_hydra_client.model.JsonWebKeySet + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keys** | [**BuiltList<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] + +[[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/dart/doc/JsonWebKeySetGeneratorRequest.md b/clients/hydra/dart/doc/JsonWebKeySetGeneratorRequest.md deleted file mode 100644 index 78e3b4a1901..00000000000 --- a/clients/hydra/dart/doc/JsonWebKeySetGeneratorRequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# ory_hydra_client.model.JsonWebKeySetGeneratorRequest - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alg** | **String** | The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" | -**kid** | **String** | The kid of the key to be created | -**use** | **String** | 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/dart/doc/JwkApi.md b/clients/hydra/dart/doc/JwkApi.md new file mode 100644 index 00000000000..6ba462e1e1d --- /dev/null +++ b/clients/hydra/dart/doc/JwkApi.md @@ -0,0 +1,331 @@ +# ory_hydra_client.api.JwkApi + +## Load the API package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +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 + + +# **createJsonWebKeySet** +> JsonWebKeySet createJsonWebKeySet(set_, createJsonWebKeySet) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getJwkApi(); +final String set_ = set__example; // String | The JSON Web Key Set ID +final CreateJsonWebKeySet createJsonWebKeySet = ; // CreateJsonWebKeySet | + +try { + final response = api.createJsonWebKeySet(set_, createJsonWebKeySet); + print(response); +} catch on DioError (e) { + print('Exception when calling JwkApi->createJsonWebKeySet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_** | **String**| The JSON Web Key Set ID | + **createJsonWebKeySet** | [**CreateJsonWebKeySet**](CreateJsonWebKeySet.md)| | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> deleteJsonWebKey(set_, kid) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getJwkApi(); +final String set_ = set__example; // String | The JSON Web Key Set +final String kid = kid_example; // String | The JSON Web Key ID (kid) + +try { + api.deleteJsonWebKey(set_, kid); +} catch on DioError (e) { + print('Exception when calling JwkApi->deleteJsonWebKey: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_** | **String**| The JSON Web Key Set | + **kid** | **String**| The JSON Web Key ID (kid) | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> deleteJsonWebKeySet(set_) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getJwkApi(); +final String set_ = set__example; // String | The JSON Web Key Set + +try { + api.deleteJsonWebKeySet(set_); +} catch on DioError (e) { + print('Exception when calling JwkApi->deleteJsonWebKeySet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_** | **String**| The JSON Web Key Set | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> JsonWebKeySet getJsonWebKey(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). + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getJwkApi(); +final String set_ = set__example; // String | JSON Web Key Set ID +final String kid = kid_example; // String | JSON Web Key ID + +try { + final response = api.getJsonWebKey(set_, kid); + print(response); +} catch on DioError (e) { + print('Exception when calling JwkApi->getJsonWebKey: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_** | **String**| JSON Web Key Set ID | + **kid** | **String**| JSON Web Key ID | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> JsonWebKeySet getJsonWebKeySet(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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getJwkApi(); +final String set_ = set__example; // String | JSON Web Key Set ID + +try { + final response = api.getJsonWebKeySet(set_); + print(response); +} catch on DioError (e) { + print('Exception when calling JwkApi->getJsonWebKeySet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_** | **String**| JSON Web Key Set ID | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> JsonWebKey setJsonWebKey(set_, kid, 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getJwkApi(); +final String set_ = set__example; // String | The JSON Web Key Set ID +final String kid = kid_example; // String | JSON Web Key ID +final JsonWebKey jsonWebKey = ; // JsonWebKey | + +try { + final response = api.setJsonWebKey(set_, kid, jsonWebKey); + print(response); +} catch on DioError (e) { + print('Exception when calling JwkApi->setJsonWebKey: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_** | **String**| The JSON Web Key Set ID | + **kid** | **String**| JSON Web Key ID | + **jsonWebKey** | [**JsonWebKey**](JsonWebKey.md)| | [optional] + +### Return type + +[**JsonWebKey**](JsonWebKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> JsonWebKeySet setJsonWebKeySet(set_, 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getJwkApi(); +final String set_ = set__example; // String | The JSON Web Key Set ID +final JsonWebKeySet jsonWebKeySet = ; // JsonWebKeySet | + +try { + final response = api.setJsonWebKeySet(set_, jsonWebKeySet); + print(response); +} catch on DioError (e) { + print('Exception when calling JwkApi->setJsonWebKeySet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set_** | **String**| The JSON Web Key Set ID | + **jsonWebKeySet** | [**JsonWebKeySet**](JsonWebKeySet.md)| | [optional] + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + diff --git a/clients/hydra/dart/doc/MetadataApi.md b/clients/hydra/dart/doc/MetadataApi.md index ccd6a09ac4d..d7237ff6723 100644 --- a/clients/hydra/dart/doc/MetadataApi.md +++ b/clients/hydra/dart/doc/MetadataApi.md @@ -9,26 +9,29 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**prometheus**](MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +[**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 -# **prometheus** -> prometheus() +# **getVersion** +> GetVersion200Response getVersion() -Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +Return Running Software Version. -``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` +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. ### Example ```dart import 'package:ory_hydra_client/api.dart'; -var api_instance = new MetadataApi(); +final api = OryHydraClient().getMetadataApi(); try { - api_instance.prometheus(); -} catch (e) { - print('Exception when calling MetadataApi->prometheus: $e\n'); + final response = api.getVersion(); + print(response); +} catch on DioError (e) { + print('Exception when calling MetadataApi->getVersion: $e\n'); } ``` @@ -37,7 +40,7 @@ This endpoint does not need any parameter. ### Return type -void (empty response body) +[**GetVersion200Response**](GetVersion200Response.md) ### Authorization @@ -46,7 +49,85 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json + +[[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** +> HealthStatus 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getMetadataApi(); + +try { + final response = api.isAlive(); + print(response); +} catch on DioError (e) { + print('Exception when calling MetadataApi->isAlive: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HealthStatus**](HealthStatus.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> IsReady200Response 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getMetadataApi(); + +try { + final response = api.isReady(); + print(response); +} catch on DioError (e) { + print('Exception when calling MetadataApi->isReady: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IsReady200Response**](IsReady200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json [[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) diff --git a/clients/hydra/dart/doc/OAuth2Api.md b/clients/hydra/dart/doc/OAuth2Api.md new file mode 100644 index 00000000000..4646585c2d9 --- /dev/null +++ b/clients/hydra/dart/doc/OAuth2Api.md @@ -0,0 +1,1286 @@ +# ory_hydra_client.api.OAuth2Api + +## Load the API package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +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 All OAuth 2.0 Login Sessions of a Subject +[**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** +> OAuth2RedirectTo acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String consentChallenge = consentChallenge_example; // String | OAuth 2.0 Consent Request Challenge +final AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest = ; // AcceptOAuth2ConsentRequest | + +try { + final response = api.acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->acceptOAuth2ConsentRequest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **consentChallenge** | **String**| OAuth 2.0 Consent Request Challenge | + **acceptOAuth2ConsentRequest** | [**AcceptOAuth2ConsentRequest**](AcceptOAuth2ConsentRequest.md)| | [optional] + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> OAuth2RedirectTo acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String loginChallenge = loginChallenge_example; // String | OAuth 2.0 Login Request Challenge +final AcceptOAuth2LoginRequest acceptOAuth2LoginRequest = ; // AcceptOAuth2LoginRequest | + +try { + final response = api.acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->acceptOAuth2LoginRequest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginChallenge** | **String**| OAuth 2.0 Login Request Challenge | + **acceptOAuth2LoginRequest** | [**AcceptOAuth2LoginRequest**](AcceptOAuth2LoginRequest.md)| | [optional] + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> OAuth2RedirectTo acceptOAuth2LogoutRequest(logoutChallenge) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String logoutChallenge = logoutChallenge_example; // String | OAuth 2.0 Logout Request Challenge + +try { + final response = api.acceptOAuth2LogoutRequest(logoutChallenge); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->acceptOAuth2LogoutRequest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **String**| OAuth 2.0 Logout Request Challenge | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> OAuth2Client createOAuth2Client(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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final OAuth2Client oAuth2Client = ; // OAuth2Client | OAuth 2.0 Client Request Body + +try { + final response = api.createOAuth2Client(oAuth2Client); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->createOAuth2Client: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oAuth2Client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> deleteOAuth2Client(id) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String id = id_example; // String | The id of the OAuth 2.0 Client. + +try { + api.deleteOAuth2Client(id); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->deleteOAuth2Client: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the OAuth 2.0 Client. | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> deleteOAuth2Token(clientId) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String clientId = clientId_example; // String | OAuth 2.0 Client ID + +try { + api.deleteOAuth2Token(clientId); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->deleteOAuth2Token: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **clientId** | **String**| OAuth 2.0 Client ID | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> deleteTrustedOAuth2JwtGrantIssuer(id) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String id = id_example; // String | The id of the desired grant + +try { + api.deleteTrustedOAuth2JwtGrantIssuer(id); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->deleteTrustedOAuth2JwtGrantIssuer: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the desired grant | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> OAuth2Client getOAuth2Client(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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +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) { + print('Exception when calling OAuth2Api->getOAuth2Client: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the OAuth 2.0 Client. | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> OAuth2ConsentRequest getOAuth2ConsentRequest(consentChallenge) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String consentChallenge = consentChallenge_example; // String | OAuth 2.0 Consent Request Challenge + +try { + final response = api.getOAuth2ConsentRequest(consentChallenge); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->getOAuth2ConsentRequest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **consentChallenge** | **String**| OAuth 2.0 Consent Request Challenge | + +### Return type + +[**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> OAuth2LoginRequest getOAuth2LoginRequest(loginChallenge) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String loginChallenge = loginChallenge_example; // String | OAuth 2.0 Login Request Challenge + +try { + final response = api.getOAuth2LoginRequest(loginChallenge); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->getOAuth2LoginRequest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginChallenge** | **String**| OAuth 2.0 Login Request Challenge | + +### Return type + +[**OAuth2LoginRequest**](OAuth2LoginRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> OAuth2LogoutRequest getOAuth2LogoutRequest(logoutChallenge) + +Get OAuth 2.0 Session Logout Request + +Use this endpoint to fetch an Ory OAuth 2.0 logout request. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String logoutChallenge = logoutChallenge_example; // String | + +try { + final response = api.getOAuth2LogoutRequest(logoutChallenge); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->getOAuth2LogoutRequest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **String**| | + +### Return type + +[**OAuth2LogoutRequest**](OAuth2LogoutRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> TrustedOAuth2JwtGrantIssuer getTrustedOAuth2JwtGrantIssuer(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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String id = id_example; // String | The id of the desired grant + +try { + final response = api.getTrustedOAuth2JwtGrantIssuer(id); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->getTrustedOAuth2JwtGrantIssuer: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the desired grant | + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> IntrospectedOAuth2Token introspectOAuth2Token(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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String 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. +final String 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. + +try { + final response = api.introspectOAuth2Token(token, scope); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->introspectOAuth2Token: $e\n'); +} +``` + +### 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] + +### Return type + +[**IntrospectedOAuth2Token**](IntrospectedOAuth2Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +[[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** +> BuiltList listOAuth2Clients(pageSize, pageToken, clientName, 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final int pageSize = 789; // 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). +final String 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). +final String clientName = clientName_example; // String | The name of the clients to filter by. +final String owner = owner_example; // String | The owner of the clients to filter by. + +try { + final response = api.listOAuth2Clients(pageSize, pageToken, clientName, owner); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->listOAuth2Clients: $e\n'); +} +``` + +### 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] + +### Return type + +[**BuiltList<OAuth2Client>**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> BuiltList listOAuth2ConsentSessions(subject, pageSize, pageToken) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String subject = subject_example; // String | The subject to list the consent sessions for. +final int pageSize = 789; // 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). +final String 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). + +try { + final response = api.listOAuth2ConsentSessions(subject, pageSize, pageToken); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->listOAuth2ConsentSessions: $e\n'); +} +``` + +### 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'] + +### Return type + +[**BuiltList<OAuth2ConsentSession>**](OAuth2ConsentSession.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> BuiltList listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer) + +List Trusted OAuth2 JWT Bearer Grant Type Issuers + +Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final int maxItems = 789; // int | +final int defaultItems = 789; // int | +final String issuer = issuer_example; // String | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + +try { + final response = api.listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->listTrustedOAuth2JwtGrantIssuers: $e\n'); +} +``` + +### 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] + +### Return type + +[**BuiltList<TrustedOAuth2JwtGrantIssuer>**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> ErrorOAuth2 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); + +try { + final response = api.oAuth2Authorize(); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->oAuth2Authorize: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ErrorOAuth2**](ErrorOAuth2.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> OAuth2TokenExchange oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; +// TODO Configure HTTP basic authorization: basic +//defaultApiClient.getAuthentication('basic').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('basic').password = 'YOUR_PASSWORD'; +// TODO Configure OAuth2 access token for authorization: oauth2 +//defaultApiClient.getAuthentication('oauth2').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = OryHydraClient().getOAuth2Api(); +final String grantType = grantType_example; // String | +final String clientId = clientId_example; // String | +final String code = code_example; // String | +final String redirectUri = redirectUri_example; // String | +final String refreshToken = refreshToken_example; // String | + +try { + final response = api.oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->oauth2TokenExchange: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **grantType** | **String**| | + **clientId** | **String**| | [optional] + **code** | **String**| | [optional] + **redirectUri** | **String**| | [optional] + **refreshToken** | **String**| | [optional] + +### Return type + +[**OAuth2TokenExchange**](OAuth2TokenExchange.md) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +[[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** +> OAuth2Client patchOAuth2Client(id, jsonPatch) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String id = id_example; // String | The id of the OAuth 2.0 Client. +final BuiltList jsonPatch = ; // BuiltList | OAuth 2.0 Client JSON Patch Body + +try { + final response = api.patchOAuth2Client(id, jsonPatch); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->patchOAuth2Client: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the OAuth 2.0 Client. | + **jsonPatch** | [**BuiltList<JsonPatch>**](JsonPatch.md)| OAuth 2.0 Client JSON Patch Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> OAuth2RedirectTo rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String consentChallenge = consentChallenge_example; // String | OAuth 2.0 Consent Request Challenge +final RejectOAuth2Request rejectOAuth2Request = ; // RejectOAuth2Request | + +try { + final response = api.rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->rejectOAuth2ConsentRequest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **consentChallenge** | **String**| OAuth 2.0 Consent Request Challenge | + **rejectOAuth2Request** | [**RejectOAuth2Request**](RejectOAuth2Request.md)| | [optional] + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> OAuth2RedirectTo rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String loginChallenge = loginChallenge_example; // String | OAuth 2.0 Login Request Challenge +final RejectOAuth2Request rejectOAuth2Request = ; // RejectOAuth2Request | + +try { + final response = api.rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->rejectOAuth2LoginRequest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginChallenge** | **String**| OAuth 2.0 Login Request Challenge | + **rejectOAuth2Request** | [**RejectOAuth2Request**](RejectOAuth2Request.md)| | [optional] + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> rejectOAuth2LogoutRequest(logoutChallenge) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String logoutChallenge = logoutChallenge_example; // String | + +try { + api.rejectOAuth2LogoutRequest(logoutChallenge); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->rejectOAuth2LogoutRequest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **String**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> revokeOAuth2ConsentSessions(subject, client, all) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String subject = subject_example; // String | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. +final String 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. +final bool all = true; // bool | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + +try { + api.revokeOAuth2ConsentSessions(subject, client, all); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->revokeOAuth2ConsentSessions: $e\n'); +} +``` + +### 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] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> revokeOAuth2LoginSessions(subject) + +Revokes All OAuth 2.0 Login Sessions of a Subject + +This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String subject = subject_example; // String | OAuth 2.0 Subject The subject to revoke authentication sessions for. + +try { + api.revokeOAuth2LoginSessions(subject); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->revokeOAuth2LoginSessions: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subject** | **String**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> revokeOAuth2Token(token) + +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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; +// TODO Configure HTTP basic authorization: basic +//defaultApiClient.getAuthentication('basic').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('basic').password = 'YOUR_PASSWORD'; +// TODO Configure OAuth2 access token for authorization: oauth2 +//defaultApiClient.getAuthentication('oauth2').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = OryHydraClient().getOAuth2Api(); +final String token = token_example; // String | + +try { + api.revokeOAuth2Token(token); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->revokeOAuth2Token: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **String**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +[[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** +> OAuth2Client setOAuth2Client(id, 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String id = id_example; // String | OAuth 2.0 Client ID +final OAuth2Client oAuth2Client = ; // OAuth2Client | OAuth 2.0 Client Request Body + +try { + final response = api.setOAuth2Client(id, oAuth2Client); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->setOAuth2Client: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| OAuth 2.0 Client ID | + **oAuth2Client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> OAuth2Client setOAuth2ClientLifespans(id, oAuth2ClientTokenLifespans) + +Set OAuth2 Client Token Lifespans + +Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final String id = id_example; // String | OAuth 2.0 Client ID +final OAuth2ClientTokenLifespans oAuth2ClientTokenLifespans = ; // OAuth2ClientTokenLifespans | + +try { + final response = api.setOAuth2ClientLifespans(id, oAuth2ClientTokenLifespans); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->setOAuth2ClientLifespans: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| OAuth 2.0 Client ID | + **oAuth2ClientTokenLifespans** | [**OAuth2ClientTokenLifespans**](OAuth2ClientTokenLifespans.md)| | [optional] + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> TrustedOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer) + +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). + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOAuth2Api(); +final TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer = ; // TrustOAuth2JwtGrantIssuer | + +try { + final response = api.trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer); + print(response); +} catch on DioError (e) { + print('Exception when calling OAuth2Api->trustOAuth2JwtGrantIssuer: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trustOAuth2JwtGrantIssuer** | [**TrustOAuth2JwtGrantIssuer**](TrustOAuth2JwtGrantIssuer.md)| | [optional] + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + diff --git a/clients/hydra/dart/doc/OAuth2Client.md b/clients/hydra/dart/doc/OAuth2Client.md index b1af4748e28..328aee48f28 100644 --- a/clients/hydra/dart/doc/OAuth2Client.md +++ b/clients/hydra/dart/doc/OAuth2Client.md @@ -8,41 +8,51 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**allowedCorsOrigins** | **BuiltList** | | [optional] -**audience** | **BuiltList** | | [optional] -**backchannelLogoutSessionRequired** | **bool** | 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] -**backchannelLogoutUri** | **String** | RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. | [optional] -**clientId** | **String** | ID is the id for this client. | [optional] -**clientName** | **String** | Name is the human-readable string name of the client to be presented to the end-user during authorization. | [optional] -**clientSecret** | **String** | Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. | [optional] -**clientSecretExpiresAt** | **int** | SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. | [optional] -**clientUri** | **String** | ClientURI is an 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** | **BuiltList** | | [optional] -**createdAt** | [**DateTime**](DateTime.md) | CreatedAt returns the timestamp of the client's creation. | [optional] -**frontchannelLogoutSessionRequired** | **bool** | 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] -**frontchannelLogoutUri** | **String** | 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] -**grantTypes** | **BuiltList** | | [optional] -**jwks** | [**JsonObject**](.md) | | [optional] -**jwksUri** | **String** | 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] -**logoUri** | **String** | LogoURI is an URL string that references a logo for the client. | [optional] +**allowedCorsOrigins** | **BuiltList<String>** | | [optional] +**audience** | **BuiltList<String>** | | [optional] +**authorizationCodeGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorizationCodeGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorizationCodeGrantRefreshTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**backchannelLogoutSessionRequired** | **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] +**backchannelLogoutUri** | **String** | 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] +**clientCredentialsGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**clientId** | **String** | OAuth 2.0 Client ID The ID is autogenerated and immutable. | [optional] +**clientName** | **String** | OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. | [optional] +**clientSecret** | **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. | [optional] +**clientSecretExpiresAt** | **int** | OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. | [optional] +**clientUri** | **String** | 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** | **BuiltList<String>** | | [optional] +**createdAt** | [**DateTime**](DateTime.md) | OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. | [optional] +**frontchannelLogoutSessionRequired** | **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] +**frontchannelLogoutUri** | **String** | 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] +**grantTypes** | **BuiltList<String>** | | [optional] +**implicitGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicitGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**jwks** | [**JsonObject**](.md) | 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] +**jwksUri** | **String** | OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | [optional] +**jwtBearerGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**logoUri** | **String** | OAuth 2.0 Client Logo URI A URL string referencing the client's logo. | [optional] **metadata** | [**JsonObject**](.md) | | [optional] -**owner** | **String** | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] -**policyUri** | **String** | 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] -**postLogoutRedirectUris** | **BuiltList** | | [optional] -**redirectUris** | **BuiltList** | | [optional] -**registrationAccessToken** | **String** | RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. | [optional] -**registrationClientUri** | **String** | RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] -**requestObjectSigningAlg** | **String** | 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] -**requestUris** | **BuiltList** | | [optional] -**responseTypes** | **BuiltList** | | [optional] -**scope** | **String** | 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] -**sectorIdentifierUri** | **String** | 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] -**subjectType** | **String** | SubjectType requested for responses to this Client. 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] -**tokenEndpointAuthMethod** | **String** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional] -**tokenEndpointAuthSigningAlg** | **String** | Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] -**tosUri** | **String** | TermsOfServiceURI is a URL string that points 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] -**updatedAt** | [**DateTime**](DateTime.md) | UpdatedAt returns the timestamp of the last update. | [optional] -**userinfoSignedResponseAlg** | **String** | 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] +**owner** | **String** | OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] +**policyUri** | **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. | [optional] +**postLogoutRedirectUris** | **BuiltList<String>** | | [optional] +**redirectUris** | **BuiltList<String>** | | [optional] +**refreshTokenGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantRefreshTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**registrationAccessToken** | **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. | [optional] +**registrationClientUri** | **String** | OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] +**requestObjectSigningAlg** | **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. | [optional] +**requestUris** | **BuiltList<String>** | | [optional] +**responseTypes** | **BuiltList<String>** | | [optional] +**scope** | **String** | 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] +**sectorIdentifierUri** | **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. | [optional] +**subjectType** | **String** | 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] +**tokenEndpointAuthMethod** | **String** | OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] +**tokenEndpointAuthSigningAlg** | **String** | OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] +**tosUri** | **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. | [optional] +**updatedAt** | [**DateTime**](DateTime.md) | OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. | [optional] +**userinfoSignedResponseAlg** | **String** | 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] [[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/dart/doc/OAuth2ClientTokenLifespans.md b/clients/hydra/dart/doc/OAuth2ClientTokenLifespans.md new file mode 100644 index 00000000000..b2dd13d8927 --- /dev/null +++ b/clients/hydra/dart/doc/OAuth2ClientTokenLifespans.md @@ -0,0 +1,24 @@ +# ory_hydra_client.model.OAuth2ClientTokenLifespans + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authorizationCodeGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorizationCodeGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorizationCodeGrantRefreshTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**clientCredentialsGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicitGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicitGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**jwtBearerGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantRefreshTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [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/dart/doc/ConsentRequest.md b/clients/hydra/dart/doc/OAuth2ConsentRequest.md similarity index 86% rename from clients/hydra/dart/doc/ConsentRequest.md rename to clients/hydra/dart/doc/OAuth2ConsentRequest.md index e21157195bc..6682a2f7aa1 100644 --- a/clients/hydra/dart/doc/ConsentRequest.md +++ b/clients/hydra/dart/doc/OAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.ConsentRequest +# ory_hydra_client.model.OAuth2ConsentRequest ## Load the model package ```dart @@ -9,16 +9,16 @@ import 'package:ory_hydra_client/api.dart'; 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** | **BuiltList** | | [optional] +**amr** | **BuiltList<String>** | | [optional] **challenge** | **String** | ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. | **client** | [**OAuth2Client**](OAuth2Client.md) | | [optional] **context** | [**JsonObject**](.md) | | [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] -**oidcContext** | [**OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**oidcContext** | [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.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. | [optional] -**requestedAccessTokenAudience** | **BuiltList** | | [optional] -**requestedScope** | **BuiltList** | | [optional] +**requestedAccessTokenAudience** | **BuiltList<String>** | | [optional] +**requestedScope** | **BuiltList<String>** | | [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** | **String** | 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] diff --git a/clients/hydra/dart/doc/OpenIDConnectContext.md b/clients/hydra/dart/doc/OAuth2ConsentRequestOpenIDConnectContext.md similarity index 52% rename from clients/hydra/dart/doc/OpenIDConnectContext.md rename to clients/hydra/dart/doc/OAuth2ConsentRequestOpenIDConnectContext.md index 0f22a5c7a99..072783d7af6 100644 --- a/clients/hydra/dart/doc/OpenIDConnectContext.md +++ b/clients/hydra/dart/doc/OAuth2ConsentRequestOpenIDConnectContext.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.OpenIDConnectContext +# ory_hydra_client.model.OAuth2ConsentRequestOpenIDConnectContext ## Load the model package ```dart @@ -8,11 +8,11 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**acrValues** | **BuiltList** | 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] +**acrValues** | **BuiltList<String>** | 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** | **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] -**idTokenHintClaims** | [**JsonObject**](.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] +**idTokenHintClaims** | [**BuiltMap<String, JsonObject>**](JsonObject.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] **loginHint** | **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] -**uiLocales** | **BuiltList** | 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] +**uiLocales** | **BuiltList<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. | [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/dart/doc/OAuth2ConsentSession.md b/clients/hydra/dart/doc/OAuth2ConsentSession.md new file mode 100644 index 00000000000..2b0284c42a5 --- /dev/null +++ b/clients/hydra/dart/doc/OAuth2ConsentSession.md @@ -0,0 +1,22 @@ +# ory_hydra_client.model.OAuth2ConsentSession + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**consentRequest** | [**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) | | [optional] +**expiresAt** | [**OAuth2ConsentSessionExpiresAt**](OAuth2ConsentSessionExpiresAt.md) | | [optional] +**grantAccessTokenAudience** | **BuiltList<String>** | | [optional] +**grantScope** | **BuiltList<String>** | | [optional] +**handledAt** | [**DateTime**](DateTime.md) | | [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] +**rememberFor** | **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] + +[[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/dart/doc/OAuth2ConsentSessionExpiresAt.md b/clients/hydra/dart/doc/OAuth2ConsentSessionExpiresAt.md new file mode 100644 index 00000000000..b4f5bcf874f --- /dev/null +++ b/clients/hydra/dart/doc/OAuth2ConsentSessionExpiresAt.md @@ -0,0 +1,19 @@ +# ory_hydra_client.model.OAuth2ConsentSessionExpiresAt + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessToken** | [**DateTime**](DateTime.md) | | [optional] +**authorizeCode** | [**DateTime**](DateTime.md) | | [optional] +**idToken** | [**DateTime**](DateTime.md) | | [optional] +**parContext** | [**DateTime**](DateTime.md) | | [optional] +**refreshToken** | [**DateTime**](DateTime.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/dart/doc/LoginRequest.md b/clients/hydra/dart/doc/OAuth2LoginRequest.md similarity index 87% rename from clients/hydra/dart/doc/LoginRequest.md rename to clients/hydra/dart/doc/OAuth2LoginRequest.md index 470f2c945b0..8bce661f47a 100644 --- a/clients/hydra/dart/doc/LoginRequest.md +++ b/clients/hydra/dart/doc/OAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.LoginRequest +# ory_hydra_client.model.OAuth2LoginRequest ## Load the model package ```dart @@ -10,10 +10,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **challenge** | **String** | ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. | **client** | [**OAuth2Client**](OAuth2Client.md) | | -**oidcContext** | [**OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**oidcContext** | [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.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** | **BuiltList** | | -**requestedScope** | **BuiltList** | | +**requestedAccessTokenAudience** | **BuiltList<String>** | | +**requestedScope** | **BuiltList<String>** | | **sessionId** | **String** | 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** | **String** | 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. | diff --git a/clients/hydra/dart/doc/LogoutRequest.md b/clients/hydra/dart/doc/OAuth2LogoutRequest.md similarity index 95% rename from clients/hydra/dart/doc/LogoutRequest.md rename to clients/hydra/dart/doc/OAuth2LogoutRequest.md index e946284a33c..1216414530b 100644 --- a/clients/hydra/dart/doc/LogoutRequest.md +++ b/clients/hydra/dart/doc/OAuth2LogoutRequest.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.LogoutRequest +# ory_hydra_client.model.OAuth2LogoutRequest ## Load the model package ```dart diff --git a/clients/hydra/dart/doc/CompletedRequest.md b/clients/hydra/dart/doc/OAuth2RedirectTo.md similarity index 76% rename from clients/hydra/dart/doc/CompletedRequest.md rename to clients/hydra/dart/doc/OAuth2RedirectTo.md index 8fad43b61f9..685859fa86e 100644 --- a/clients/hydra/dart/doc/CompletedRequest.md +++ b/clients/hydra/dart/doc/OAuth2RedirectTo.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.CompletedRequest +# ory_hydra_client.model.OAuth2RedirectTo ## Load the model package ```dart @@ -8,7 +8,7 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**redirectTo** | **String** | RedirectURL is the URL which you should redirect the user to once the authentication process is completed. | +**redirectTo** | **String** | RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. | [[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/dart/doc/OAuth2TokenExchange.md b/clients/hydra/dart/doc/OAuth2TokenExchange.md new file mode 100644 index 00000000000..101211fff69 --- /dev/null +++ b/clients/hydra/dart/doc/OAuth2TokenExchange.md @@ -0,0 +1,20 @@ +# ory_hydra_client.model.OAuth2TokenExchange + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessToken** | **String** | The access token issued by the authorization server. | [optional] +**expiresIn** | **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] +**idToken** | **int** | To retrieve a refresh token request the id_token scope. | [optional] +**refreshToken** | **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. | [optional] +**scope** | **int** | The scope of the access token | [optional] +**tokenType** | **String** | The type of the token issued | [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/dart/doc/OidcApi.md b/clients/hydra/dart/doc/OidcApi.md new file mode 100644 index 00000000000..dc4acdc59ed --- /dev/null +++ b/clients/hydra/dart/doc/OidcApi.md @@ -0,0 +1,320 @@ +# ory_hydra_client.api.OidcApi + +## Load the API package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +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 +[**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** +> OAuth2Client createOidcDynamicClient(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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOidcApi(); +final OAuth2Client oAuth2Client = ; // OAuth2Client | Dynamic Client Registration Request Body + +try { + final response = api.createOidcDynamicClient(oAuth2Client); + print(response); +} catch on DioError (e) { + print('Exception when calling OidcApi->createOidcDynamicClient: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oAuth2Client** | [**OAuth2Client**](OAuth2Client.md)| Dynamic Client Registration Request Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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** +> deleteOidcDynamicClient(id) + +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. + +### 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) { + print('Exception when calling OidcApi->deleteOidcDynamicClient: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the OAuth 2.0 Client. | + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> OidcConfiguration 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/ + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOidcApi(); + +try { + final response = api.discoverOidcConfiguration(); + print(response); +} catch on DioError (e) { + print('Exception when calling OidcApi->discoverOidcConfiguration: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OidcConfiguration**](OidcConfiguration.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> OAuth2Client getOidcDynamicClient(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. + +### 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 { + final response = api.getOidcDynamicClient(id); + print(response); +} catch on DioError (e) { + print('Exception when calling OidcApi->getOidcDynamicClient: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| The id of the OAuth 2.0 Client. | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> OidcUserInfo 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; +// TODO Configure OAuth2 access token for authorization: oauth2 +//defaultApiClient.getAuthentication('oauth2').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = OryHydraClient().getOidcApi(); + +try { + final response = api.getOidcUserInfo(); + print(response); +} catch on DioError (e) { + print('Exception when calling OidcApi->getOidcUserInfo: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OidcUserInfo**](OidcUserInfo.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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** +> 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getOidcApi(); + +try { + api.revokeOidcSession(); +} catch on DioError (e) { + print('Exception when calling OidcApi->revokeOidcSession: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[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** +> OAuth2Client setOidcDynamicClient(id, oAuth2Client) + +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. + +### 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 +final OAuth2Client oAuth2Client = ; // OAuth2Client | OAuth 2.0 Client Request Body + +try { + final response = api.setOidcDynamicClient(id, oAuth2Client); + print(response); +} catch on DioError (e) { + print('Exception when calling OidcApi->setOidcDynamicClient: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| OAuth 2.0 Client ID | + **oAuth2Client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + diff --git a/clients/hydra/dart/doc/OidcConfiguration.md b/clients/hydra/dart/doc/OidcConfiguration.md new file mode 100644 index 00000000000..4775aa881c6 --- /dev/null +++ b/clients/hydra/dart/doc/OidcConfiguration.md @@ -0,0 +1,43 @@ +# ory_hydra_client.model.OidcConfiguration + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authorizationEndpoint** | **String** | OAuth 2.0 Authorization Endpoint URL | +**backchannelLogoutSessionSupported** | **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] +**backchannelLogoutSupported** | **bool** | OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] +**claimsParameterSupported** | **bool** | OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] +**claimsSupported** | **BuiltList<String>** | 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] +**codeChallengeMethodsSupported** | **BuiltList<String>** | 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] +**endSessionEndpoint** | **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] +**frontchannelLogoutSessionSupported** | **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] +**frontchannelLogoutSupported** | **bool** | OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] +**grantTypesSupported** | **BuiltList<String>** | OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] +**idTokenSignedResponseAlg** | **BuiltList<String>** | OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. | +**idTokenSigningAlgValuesSupported** | **BuiltList<String>** | 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** | **String** | 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. | +**jwksUri** | **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. | +**registrationEndpoint** | **String** | OpenID Connect Dynamic Client Registration Endpoint URL | [optional] +**requestObjectSigningAlgValuesSupported** | **BuiltList<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). | [optional] +**requestParameterSupported** | **bool** | OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] +**requestUriParameterSupported** | **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] +**requireRequestUriRegistration** | **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] +**responseModesSupported** | **BuiltList<String>** | OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] +**responseTypesSupported** | **BuiltList<String>** | 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. | +**revocationEndpoint** | **String** | OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] +**scopesSupported** | **BuiltList<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 | [optional] +**subjectTypesSupported** | **BuiltList<String>** | 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. | +**tokenEndpoint** | **String** | OAuth 2.0 Token Endpoint URL | +**tokenEndpointAuthMethodsSupported** | **BuiltList<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 | [optional] +**userinfoEndpoint** | **String** | OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. | [optional] +**userinfoSignedResponseAlg** | **BuiltList<String>** | OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. | +**userinfoSigningAlgValuesSupported** | **BuiltList<String>** | 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] + +[[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/dart/doc/UserinfoResponse.md b/clients/hydra/dart/doc/OidcUserInfo.md similarity index 99% rename from clients/hydra/dart/doc/UserinfoResponse.md rename to clients/hydra/dart/doc/OidcUserInfo.md index 77e374fba0b..a576dc93a0d 100644 --- a/clients/hydra/dart/doc/UserinfoResponse.md +++ b/clients/hydra/dart/doc/OidcUserInfo.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.UserinfoResponse +# ory_hydra_client.model.OidcUserInfo ## Load the model package ```dart diff --git a/clients/hydra/dart/doc/Pagination.md b/clients/hydra/dart/doc/Pagination.md new file mode 100644 index 00000000000..4c4f684b88b --- /dev/null +++ b/clients/hydra/dart/doc/Pagination.md @@ -0,0 +1,16 @@ +# ory_hydra_client.model.Pagination + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +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'] + +[[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/dart/doc/Oauth2TokenResponse.md b/clients/hydra/dart/doc/PaginationHeaders.md similarity index 50% rename from clients/hydra/dart/doc/Oauth2TokenResponse.md rename to clients/hydra/dart/doc/PaginationHeaders.md index 5365138f46d..233c3288572 100644 --- a/clients/hydra/dart/doc/Oauth2TokenResponse.md +++ b/clients/hydra/dart/doc/PaginationHeaders.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.Oauth2TokenResponse +# ory_hydra_client.model.PaginationHeaders ## Load the model package ```dart @@ -8,12 +8,8 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**accessToken** | **String** | | [optional] -**expiresIn** | **int** | | [optional] -**idToken** | **String** | | [optional] -**refreshToken** | **String** | | [optional] -**scope** | **String** | | [optional] -**tokenType** | **String** | | [optional] +**link** | **String** | 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] +**xTotalCount** | **String** | The total number of clients. in: header | [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/dart/doc/PatchDocument.md b/clients/hydra/dart/doc/PatchDocument.md deleted file mode 100644 index 8fa8a87057c..00000000000 --- a/clients/hydra/dart/doc/PatchDocument.md +++ /dev/null @@ -1,18 +0,0 @@ -# ory_hydra_client.model.PatchDocument - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**from** | **String** | A JSON-pointer | [optional] -**op** | **String** | The operation to be performed | -**path** | **String** | A JSON-pointer | -**value** | [**JsonObject**](.md) | The value to be used within the operations | [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/dart/doc/PluginConfig.md b/clients/hydra/dart/doc/PluginConfig.md deleted file mode 100644 index f36631612b5..00000000000 --- a/clients/hydra/dart/doc/PluginConfig.md +++ /dev/null @@ -1,30 +0,0 @@ -# ory_hydra_client.model.PluginConfig - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | [**PluginConfigArgs**](PluginConfigArgs.md) | | -**description** | **String** | description | -**dockerVersion** | **String** | Docker Version used to create the plugin | [optional] -**documentation** | **String** | documentation | -**entrypoint** | **BuiltList** | entrypoint | -**env** | [**BuiltList**](PluginEnv.md) | env | -**interface_** | [**PluginConfigInterface**](PluginConfigInterface.md) | | -**ipcHost** | **bool** | ipc host | -**linux** | [**PluginConfigLinux**](PluginConfigLinux.md) | | -**mounts** | [**BuiltList**](PluginMount.md) | mounts | -**network** | [**PluginConfigNetwork**](PluginConfigNetwork.md) | | -**pidHost** | **bool** | pid host | -**propagatedMount** | **String** | propagated mount | -**user** | [**PluginConfigUser**](PluginConfigUser.md) | | [optional] -**workDir** | **String** | work dir | -**rootfs** | [**PluginConfigRootfs**](PluginConfigRootfs.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/dart/doc/PluginConfigArgs.md b/clients/hydra/dart/doc/PluginConfigArgs.md deleted file mode 100644 index cb530bb5084..00000000000 --- a/clients/hydra/dart/doc/PluginConfigArgs.md +++ /dev/null @@ -1,18 +0,0 @@ -# ory_hydra_client.model.PluginConfigArgs - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**name** | **String** | name | -**settable** | **BuiltList** | settable | -**value** | **BuiltList** | value | - -[[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/dart/doc/PluginConfigInterface.md b/clients/hydra/dart/doc/PluginConfigInterface.md deleted file mode 100644 index aa1dc0d68d0..00000000000 --- a/clients/hydra/dart/doc/PluginConfigInterface.md +++ /dev/null @@ -1,17 +0,0 @@ -# ory_hydra_client.model.PluginConfigInterface - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**protocolScheme** | **String** | Protocol to use for clients connecting to the plugin. | [optional] -**socket** | **String** | socket | -**types** | [**BuiltList**](PluginInterfaceType.md) | types | - -[[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/dart/doc/PluginConfigLinux.md b/clients/hydra/dart/doc/PluginConfigLinux.md deleted file mode 100644 index 2a4abd3cdda..00000000000 --- a/clients/hydra/dart/doc/PluginConfigLinux.md +++ /dev/null @@ -1,17 +0,0 @@ -# ory_hydra_client.model.PluginConfigLinux - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowAllDevices** | **bool** | allow all devices | -**capabilities** | **BuiltList** | capabilities | -**devices** | [**BuiltList**](PluginDevice.md) | devices | - -[[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/dart/doc/PluginDevice.md b/clients/hydra/dart/doc/PluginDevice.md deleted file mode 100644 index 458c3e947e9..00000000000 --- a/clients/hydra/dart/doc/PluginDevice.md +++ /dev/null @@ -1,18 +0,0 @@ -# ory_hydra_client.model.PluginDevice - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**name** | **String** | name | -**path** | **String** | path | -**settable** | **BuiltList** | settable | - -[[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/dart/doc/PluginEnv.md b/clients/hydra/dart/doc/PluginEnv.md deleted file mode 100644 index 4274d13186e..00000000000 --- a/clients/hydra/dart/doc/PluginEnv.md +++ /dev/null @@ -1,18 +0,0 @@ -# ory_hydra_client.model.PluginEnv - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**name** | **String** | name | -**settable** | **BuiltList** | settable | -**value** | **String** | value | - -[[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/dart/doc/PluginInterfaceType.md b/clients/hydra/dart/doc/PluginInterfaceType.md deleted file mode 100644 index 748f5e67a81..00000000000 --- a/clients/hydra/dart/doc/PluginInterfaceType.md +++ /dev/null @@ -1,17 +0,0 @@ -# ory_hydra_client.model.PluginInterfaceType - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capability** | **String** | capability | -**prefix** | **String** | prefix | -**version** | **String** | version | - -[[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/dart/doc/PluginMount.md b/clients/hydra/dart/doc/PluginMount.md deleted file mode 100644 index 90086db4750..00000000000 --- a/clients/hydra/dart/doc/PluginMount.md +++ /dev/null @@ -1,21 +0,0 @@ -# ory_hydra_client.model.PluginMount - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**destination** | **String** | destination | -**name** | **String** | name | -**options** | **BuiltList** | options | -**settable** | **BuiltList** | settable | -**source_** | **String** | source | -**type** | **String** | type | - -[[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/dart/doc/PluginSettings.md b/clients/hydra/dart/doc/PluginSettings.md deleted file mode 100644 index 2cae7389da2..00000000000 --- a/clients/hydra/dart/doc/PluginSettings.md +++ /dev/null @@ -1,18 +0,0 @@ -# ory_hydra_client.model.PluginSettings - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | **BuiltList** | args | -**devices** | [**BuiltList**](PluginDevice.md) | devices | -**env** | **BuiltList** | env | -**mounts** | [**BuiltList**](PluginMount.md) | mounts | - -[[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/dart/doc/PreviousConsentSession.md b/clients/hydra/dart/doc/PreviousConsentSession.md deleted file mode 100644 index de6689587e9..00000000000 --- a/clients/hydra/dart/doc/PreviousConsentSession.md +++ /dev/null @@ -1,21 +0,0 @@ -# ory_hydra_client.model.PreviousConsentSession - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**consentRequest** | [**ConsentRequest**](ConsentRequest.md) | | [optional] -**grantAccessTokenAudience** | **BuiltList** | | [optional] -**grantScope** | **BuiltList** | | [optional] -**handledAt** | [**DateTime**](DateTime.md) | | [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] -**rememberFor** | **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** | [**ConsentRequestSession**](ConsentRequestSession.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/dart/doc/PublicApi.md b/clients/hydra/dart/doc/PublicApi.md deleted file mode 100644 index 77ff26b287e..00000000000 --- a/clients/hydra/dart/doc/PublicApi.md +++ /dev/null @@ -1,535 +0,0 @@ -# ory_hydra_client.api.PublicApi - -## Load the API package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disconnectUser**](PublicApi.md#disconnectuser) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -[**discoverOpenIDConfiguration**](PublicApi.md#discoveropenidconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -[**dynamicClientRegistrationCreateOAuth2Client**](PublicApi.md#dynamicclientregistrationcreateoauth2client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamicClientRegistrationDeleteOAuth2Client**](PublicApi.md#dynamicclientregistrationdeleteoauth2client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamicClientRegistrationGetOAuth2Client**](PublicApi.md#dynamicclientregistrationgetoauth2client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamicClientRegistrationUpdateOAuth2Client**](PublicApi.md#dynamicclientregistrationupdateoauth2client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**isInstanceReady**](PublicApi.md#isinstanceready) | **GET** /health/ready | Check Readiness Status -[**oauth2Token**](PublicApi.md#oauth2token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -[**oauthAuth**](PublicApi.md#oauthauth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -[**revokeOAuth2Token**](PublicApi.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -[**userinfo**](PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -[**wellKnown**](PublicApi.md#wellknown) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery - - -# **disconnectUser** -> disconnectUser() - -OpenID Connect Front-Backchannel Enabled Logout - -This endpoint initiates and completes user logout at Ory Hydra 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 - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new PublicApi(); - -try { - api_instance.disconnectUser(); -} catch (e) { - print('Exception when calling PublicApi->disconnectUser: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -[[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) - -# **discoverOpenIDConfiguration** -> WellKnown discoverOpenIDConfiguration() - -OpenID Connect Discovery - -The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new PublicApi(); - -try { - var result = api_instance.discoverOpenIDConfiguration(); - print(result); -} catch (e) { - print('Exception when calling PublicApi->discoverOpenIDConfiguration: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**WellKnown**](WellKnown.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **dynamicClientRegistrationCreateOAuth2Client** -> OAuth2Client dynamicClientRegistrationCreateOAuth2Client(body) - -Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new PublicApi(); -var body = new OAuth2Client(); // OAuth2Client | - -try { - var result = api_instance.dynamicClientRegistrationCreateOAuth2Client(body); - print(result); -} catch (e) { - print('Exception when calling PublicApi->dynamicClientRegistrationCreateOAuth2Client: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **dynamicClientRegistrationDeleteOAuth2Client** -> dynamicClientRegistrationDeleteOAuth2Client(id) - -Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new PublicApi(); -var id = id_example; // String | The id of the OAuth 2.0 Client. - -try { - api_instance.dynamicClientRegistrationDeleteOAuth2Client(id); -} catch (e) { - print('Exception when calling PublicApi->dynamicClientRegistrationDeleteOAuth2Client: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **dynamicClientRegistrationGetOAuth2Client** -> OAuth2Client dynamicClientRegistrationGetOAuth2Client(id) - -Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new PublicApi(); -var id = id_example; // String | The id of the OAuth 2.0 Client. - -try { - var result = api_instance.dynamicClientRegistrationGetOAuth2Client(id); - print(result); -} catch (e) { - print('Exception when calling PublicApi->dynamicClientRegistrationGetOAuth2Client: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **dynamicClientRegistrationUpdateOAuth2Client** -> OAuth2Client dynamicClientRegistrationUpdateOAuth2Client(id, body) - -Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new PublicApi(); -var id = id_example; // String | The id of the OAuth 2.0 Client. -var body = new OAuth2Client(); // OAuth2Client | - -try { - var result = api_instance.dynamicClientRegistrationUpdateOAuth2Client(id, body); - print(result); -} catch (e) { - print('Exception when calling PublicApi->dynamicClientRegistrationUpdateOAuth2Client: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -[[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) - -# **isInstanceReady** -> HealthStatus isInstanceReady() - -Check Readiness Status - -This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new PublicApi(); - -try { - var result = api_instance.isInstanceReady(); - print(result); -} catch (e) { - print('Exception when calling PublicApi->isInstanceReady: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **oauth2Token** -> Oauth2TokenResponse oauth2Token(grantType, code, refreshToken, redirectUri, clientId) - -The OAuth 2.0 Token Endpoint - -The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; -// TODO Configure HTTP basic authorization: basic -//defaultApiClient.getAuthentication('basic').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('basic').password = 'YOUR_PASSWORD'; -// TODO Configure OAuth2 access token for authorization: oauth2 -//defaultApiClient.getAuthentication('oauth2').accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PublicApi(); -var grantType = grantType_example; // String | -var code = code_example; // String | -var refreshToken = refreshToken_example; // String | -var redirectUri = redirectUri_example; // String | -var clientId = clientId_example; // String | - -try { - var result = api_instance.oauth2Token(grantType, code, refreshToken, redirectUri, clientId); - print(result); -} catch (e) { - print('Exception when calling PublicApi->oauth2Token: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grantType** | **String**| | - **code** | **String**| | [optional] - **refreshToken** | **String**| | [optional] - **redirectUri** | **String**| | [optional] - **clientId** | **String**| | [optional] - -### Return type - -[**Oauth2TokenResponse**](Oauth2TokenResponse.md) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -[[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) - -# **oauthAuth** -> oauthAuth() - -The OAuth 2.0 Authorize Endpoint - -This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new PublicApi(); - -try { - api_instance.oauthAuth(); -} catch (e) { - print('Exception when calling PublicApi->oauthAuth: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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** -> revokeOAuth2Token(token) - -Revoke OAuth2 Tokens - -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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; -// TODO Configure HTTP basic authorization: basic -//defaultApiClient.getAuthentication('basic').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('basic').password = 'YOUR_PASSWORD'; -// TODO Configure OAuth2 access token for authorization: oauth2 -//defaultApiClient.getAuthentication('oauth2').accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PublicApi(); -var token = token_example; // String | - -try { - api_instance.revokeOAuth2Token(token); -} catch (e) { - print('Exception when calling PublicApi->revokeOAuth2Token: $e\n'); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **String**| | - -### Return type - -void (empty response body) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -[[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) - -# **userinfo** -> UserinfoResponse userinfo() - -OpenID Connect Userinfo - -This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; -// TODO Configure OAuth2 access token for authorization: oauth2 -//defaultApiClient.getAuthentication('oauth2').accessToken = 'YOUR_ACCESS_TOKEN'; - -var api_instance = new PublicApi(); - -try { - var result = api_instance.userinfo(); - print(result); -} catch (e) { - print('Exception when calling PublicApi->userinfo: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**UserinfoResponse**](UserinfoResponse.md) - -### Authorization - -[oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - -# **wellKnown** -> JSONWebKeySet wellKnown() - -JSON Web Keys Discovery - -This endpoint returns JSON Web Keys to be used as public keys for 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. - -### Example -```dart -import 'package:ory_hydra_client/api.dart'; - -var api_instance = new PublicApi(); - -try { - var result = api_instance.wellKnown(); - print(result); -} catch (e) { - print('Exception when calling PublicApi->wellKnown: $e\n'); -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -[[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) - diff --git a/clients/hydra/dart/doc/RejectRequest.md b/clients/hydra/dart/doc/RejectOAuth2Request.md similarity index 95% rename from clients/hydra/dart/doc/RejectRequest.md rename to clients/hydra/dart/doc/RejectOAuth2Request.md index 25377f01bb5..b17bb396884 100644 --- a/clients/hydra/dart/doc/RejectRequest.md +++ b/clients/hydra/dart/doc/RejectOAuth2Request.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.RejectRequest +# ory_hydra_client.model.RejectOAuth2Request ## Load the model package ```dart diff --git a/clients/hydra/dart/doc/RequestWasHandledResponse.md b/clients/hydra/dart/doc/RequestWasHandledResponse.md deleted file mode 100644 index 9b7f2bff671..00000000000 --- a/clients/hydra/dart/doc/RequestWasHandledResponse.md +++ /dev/null @@ -1,15 +0,0 @@ -# ory_hydra_client.model.RequestWasHandledResponse - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**redirectTo** | **String** | Original request URL to which you should redirect the user if request was already handled. | - -[[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/dart/doc/TokenPagination.md b/clients/hydra/dart/doc/TokenPagination.md new file mode 100644 index 00000000000..be049102537 --- /dev/null +++ b/clients/hydra/dart/doc/TokenPagination.md @@ -0,0 +1,16 @@ +# ory_hydra_client.model.TokenPagination + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +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'] + +[[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/dart/doc/TokenPaginationHeaders.md b/clients/hydra/dart/doc/TokenPaginationHeaders.md new file mode 100644 index 00000000000..f725f63018f --- /dev/null +++ b/clients/hydra/dart/doc/TokenPaginationHeaders.md @@ -0,0 +1,16 @@ +# ory_hydra_client.model.TokenPaginationHeaders + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **String** | 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] +**xTotalCount** | **String** | The total number of clients. in: header | [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/dart/doc/TokenPaginationRequestParameters.md b/clients/hydra/dart/doc/TokenPaginationRequestParameters.md new file mode 100644 index 00000000000..e6fb77a3957 --- /dev/null +++ b/clients/hydra/dart/doc/TokenPaginationRequestParameters.md @@ -0,0 +1,16 @@ +# ory_hydra_client.model.TokenPaginationRequestParameters + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +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'] + +[[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/dart/doc/TokenPaginationResponseHeaders.md b/clients/hydra/dart/doc/TokenPaginationResponseHeaders.md new file mode 100644 index 00000000000..ca7029e2bda --- /dev/null +++ b/clients/hydra/dart/doc/TokenPaginationResponseHeaders.md @@ -0,0 +1,16 @@ +# ory_hydra_client.model.TokenPaginationResponseHeaders + +## Load the model package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **String** | 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] +**xTotalCount** | **int** | The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. | [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/dart/doc/TrustJwtGrantIssuerBody.md b/clients/hydra/dart/doc/TrustOAuth2JwtGrantIssuer.md similarity index 61% rename from clients/hydra/dart/doc/TrustJwtGrantIssuerBody.md rename to clients/hydra/dart/doc/TrustOAuth2JwtGrantIssuer.md index 8e09458e767..a63f826adaa 100644 --- a/clients/hydra/dart/doc/TrustJwtGrantIssuerBody.md +++ b/clients/hydra/dart/doc/TrustOAuth2JwtGrantIssuer.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.TrustJwtGrantIssuerBody +# ory_hydra_client.model.TrustOAuth2JwtGrantIssuer ## Load the model package ```dart @@ -8,11 +8,12 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**allowAnySubject** | **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] **expiresAt** | [**DateTime**](DateTime.md) | 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** | [**JSONWebKey**](JSONWebKey.md) | | -**scope** | **BuiltList** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | -**subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | +**jwk** | [**JsonWebKey**](JsonWebKey.md) | | +**scope** | **BuiltList<String>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | +**subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | [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/dart/doc/TrustedJwtGrantIssuer.md b/clients/hydra/dart/doc/TrustedOAuth2JwtGrantIssuer.md similarity index 66% rename from clients/hydra/dart/doc/TrustedJwtGrantIssuer.md rename to clients/hydra/dart/doc/TrustedOAuth2JwtGrantIssuer.md index f3098e1516e..5fb23172120 100644 --- a/clients/hydra/dart/doc/TrustedJwtGrantIssuer.md +++ b/clients/hydra/dart/doc/TrustedOAuth2JwtGrantIssuer.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.TrustedJwtGrantIssuer +# ory_hydra_client.model.TrustedOAuth2JwtGrantIssuer ## Load the model package ```dart @@ -8,12 +8,13 @@ import 'package:ory_hydra_client/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**allowAnySubject** | **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] **createdAt** | [**DateTime**](DateTime.md) | The \"created_at\" indicates, when grant was created. | [optional] **expiresAt** | [**DateTime**](DateTime.md) | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | [optional] **id** | **String** | | [optional] **issuer** | **String** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] -**publicKey** | [**TrustedJsonWebKey**](TrustedJsonWebKey.md) | | [optional] -**scope** | **BuiltList** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] +**publicKey** | [**TrustedOAuth2JwtGrantJsonWebKey**](TrustedOAuth2JwtGrantJsonWebKey.md) | | [optional] +**scope** | **BuiltList<String>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] **subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | [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/dart/doc/TrustedJsonWebKey.md b/clients/hydra/dart/doc/TrustedOAuth2JwtGrantJsonWebKey.md similarity index 91% rename from clients/hydra/dart/doc/TrustedJsonWebKey.md rename to clients/hydra/dart/doc/TrustedOAuth2JwtGrantJsonWebKey.md index 6b954b56142..6c5d67b1d55 100644 --- a/clients/hydra/dart/doc/TrustedJsonWebKey.md +++ b/clients/hydra/dart/doc/TrustedOAuth2JwtGrantJsonWebKey.md @@ -1,4 +1,4 @@ -# ory_hydra_client.model.TrustedJsonWebKey +# ory_hydra_client.model.TrustedOAuth2JwtGrantJsonWebKey ## Load the model package ```dart diff --git a/clients/hydra/dart/doc/Volume.md b/clients/hydra/dart/doc/Volume.md deleted file mode 100644 index beb3b9d3d8c..00000000000 --- a/clients/hydra/dart/doc/Volume.md +++ /dev/null @@ -1,23 +0,0 @@ -# ory_hydra_client.model.Volume - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**createdAt** | **String** | Date/Time the volume was created. | [optional] -**driver** | **String** | Name of the volume driver used by the volume. | -**labels** | **BuiltMap** | User-defined key/value metadata. | -**mountpoint** | **String** | Mount path of the volume on the host. | -**name** | **String** | Name of the volume. | -**options** | **BuiltMap** | The driver specific options used when creating the volume. | -**scope** | **String** | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | -**status** | [**JsonObject**](.md) | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. | [optional] -**usageData** | [**VolumeUsageData**](VolumeUsageData.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/dart/doc/VolumeUsageData.md b/clients/hydra/dart/doc/VolumeUsageData.md deleted file mode 100644 index 6dcf8861ffe..00000000000 --- a/clients/hydra/dart/doc/VolumeUsageData.md +++ /dev/null @@ -1,16 +0,0 @@ -# ory_hydra_client.model.VolumeUsageData - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refCount** | **int** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | -**size** | **int** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | - -[[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/dart/doc/WellKnown.md b/clients/hydra/dart/doc/WellKnown.md deleted file mode 100644 index 7150b146404..00000000000 --- a/clients/hydra/dart/doc/WellKnown.md +++ /dev/null @@ -1,41 +0,0 @@ -# ory_hydra_client.model.WellKnown - -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorizationEndpoint** | **String** | URL of the OP's OAuth 2.0 Authorization Endpoint. | -**backchannelLogoutSessionSupported** | **bool** | 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] -**backchannelLogoutSupported** | **bool** | Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] -**claimsParameterSupported** | **bool** | Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] -**claimsSupported** | **BuiltList** | 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] -**codeChallengeMethodsSupported** | **BuiltList** | JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] -**endSessionEndpoint** | **String** | 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] -**frontchannelLogoutSessionSupported** | **bool** | 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] -**frontchannelLogoutSupported** | **bool** | Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] -**grantTypesSupported** | **BuiltList** | JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] -**idTokenSigningAlgValuesSupported** | **BuiltList** | 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** | **String** | 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. | -**jwksUri** | **String** | 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. | -**registrationEndpoint** | **String** | URL of the OP's Dynamic Client Registration Endpoint. | [optional] -**requestObjectSigningAlgValuesSupported** | **BuiltList** | 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] -**requestParameterSupported** | **bool** | Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] -**requestUriParameterSupported** | **bool** | Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] -**requireRequestUriRegistration** | **bool** | Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. | [optional] -**responseModesSupported** | **BuiltList** | JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] -**responseTypesSupported** | **BuiltList** | 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. | -**revocationEndpoint** | **String** | URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] -**scopesSupported** | **BuiltList** | SON 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] -**subjectTypesSupported** | **BuiltList** | JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | -**tokenEndpoint** | **String** | URL of the OP's OAuth 2.0 Token Endpoint | -**tokenEndpointAuthMethodsSupported** | **BuiltList** | 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] -**userinfoEndpoint** | **String** | URL of the OP's UserInfo Endpoint. | [optional] -**userinfoSigningAlgValuesSupported** | **BuiltList** | 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] - -[[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/dart/doc/WellknownApi.md b/clients/hydra/dart/doc/WellknownApi.md new file mode 100644 index 00000000000..bfe5ca67b1a --- /dev/null +++ b/clients/hydra/dart/doc/WellknownApi.md @@ -0,0 +1,53 @@ +# ory_hydra_client.api.WellknownApi + +## Load the API package +```dart +import 'package:ory_hydra_client/api.dart'; +``` + +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 + + +# **discoverJsonWebKeys** +> JsonWebKeySet 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. + +### Example +```dart +import 'package:ory_hydra_client/api.dart'; + +final api = OryHydraClient().getWellknownApi(); + +try { + final response = api.discoverJsonWebKeys(); + print(response); +} catch on DioError (e) { + print('Exception when calling WellknownApi->discoverJsonWebKeys: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[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) + diff --git a/clients/hydra/dart/lib/api.dart b/clients/hydra/dart/lib/api.dart deleted file mode 100644 index ee303aa128d..00000000000 --- a/clients/hydra/dart/lib/api.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -library ory_hydra_client.api; - -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; -import 'package:ory_hydra_client/serializers.dart'; -import 'package:ory_hydra_client/auth/api_key_auth.dart'; -import 'package:ory_hydra_client/auth/basic_auth.dart'; -import 'package:ory_hydra_client/auth/oauth.dart'; -import 'package:ory_hydra_client/api/admin_api.dart'; -import 'package:ory_hydra_client/api/metadata_api.dart'; -import 'package:ory_hydra_client/api/public_api.dart'; - - -final _defaultInterceptors = [ - OAuthInterceptor(), - BasicAuthInterceptor(), - ApiKeyAuthInterceptor(), -]; - -class OryHydraClient { - - static const String basePath = r'http://localhost'; - - final Dio dio; - - final Serializers serializers; - - OryHydraClient({ - Dio dio, - Serializers serializers, - String basePathOverride, - List interceptors, - }) : this.serializers = serializers ?? standardSerializers, - this.dio = dio ?? - Dio(BaseOptions( - baseUrl: basePathOverride ?? basePath, - connectTimeout: 5000, - receiveTimeout: 3000, - )) { - if (interceptors == null) { - this.dio.interceptors.addAll(_defaultInterceptors); - } else { - this.dio.interceptors.addAll(interceptors); - } - } - - void setOAuthToken(String name, String token) { - (this.dio.interceptors.firstWhere((element) => element is OAuthInterceptor, orElse: null) as OAuthInterceptor)?.tokens[name] = token; - } - - void setBasicAuth(String name, String username, String password) { - (this.dio.interceptors.firstWhere((element) => element is BasicAuthInterceptor, orElse: null) as BasicAuthInterceptor)?.authInfo[name] = BasicAuthInfo(username, password); - } - - void setApiKey(String name, String apiKey) { - (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor, orElse: null) as ApiKeyAuthInterceptor)?.apiKeys[name] = apiKey; - } - - - /** - * Get AdminApi instance, base route and serializer can be overridden by a given but be careful, - * by doing that all interceptors will not be executed - */ - AdminApi getAdminApi() { - return AdminApi(dio, serializers); - } - - - /** - * Get MetadataApi instance, base route and serializer can be overridden by a given but be careful, - * by doing that all interceptors will not be executed - */ - MetadataApi getMetadataApi() { - return MetadataApi(dio, serializers); - } - - - /** - * Get PublicApi instance, base route and serializer can be overridden by a given but be careful, - * by doing that all interceptors will not be executed - */ - PublicApi getPublicApi() { - return PublicApi(dio, serializers); - } - - -} diff --git a/clients/hydra/dart/lib/api/admin_api.dart b/clients/hydra/dart/lib/api/admin_api.dart deleted file mode 100644 index feceaf2fcdf..00000000000 --- a/clients/hydra/dart/lib/api/admin_api.dart +++ /dev/null @@ -1,1895 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/api_util.dart'; -import 'package:ory_hydra_client/model/accept_consent_request.dart'; -import 'package:ory_hydra_client/model/accept_login_request.dart'; -import 'package:ory_hydra_client/model/completed_request.dart'; -import 'package:ory_hydra_client/model/consent_request.dart'; -import 'package:ory_hydra_client/model/flush_inactive_o_auth2_tokens_request.dart'; -import 'package:ory_hydra_client/model/generic_error.dart'; -import 'package:ory_hydra_client/model/health_status.dart'; -import 'package:ory_hydra_client/model/json_error.dart'; -import 'package:ory_hydra_client/model/json_web_key.dart'; -import 'package:ory_hydra_client/model/json_web_key_set.dart'; -import 'package:ory_hydra_client/model/json_web_key_set_generator_request.dart'; -import 'package:ory_hydra_client/model/login_request.dart'; -import 'package:ory_hydra_client/model/logout_request.dart'; -import 'package:ory_hydra_client/model/o_auth2_client.dart'; -import 'package:ory_hydra_client/model/o_auth2_token_introspection.dart'; -import 'package:ory_hydra_client/model/patch_document.dart'; -import 'package:ory_hydra_client/model/previous_consent_session.dart'; -import 'package:ory_hydra_client/model/reject_request.dart'; -import 'package:ory_hydra_client/model/request_was_handled_response.dart'; -import 'package:ory_hydra_client/model/trust_jwt_grant_issuer_body.dart'; -import 'package:ory_hydra_client/model/trusted_jwt_grant_issuer.dart'; -import 'package:ory_hydra_client/model/version.dart'; - -class AdminApi { - - final Dio _dio; - - final Serializers _serializers; - - const AdminApi(this._dio, this._serializers); - - /// Accept a Consent Request - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - Future> acceptConsentRequest( - String consentChallenge, { - AcceptConsentRequest body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/requests/consent/accept', - method: 'PUT', - headers: { - ...?headers, - }, - queryParameters: { - r'consent_challenge': consentChallenge, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(AcceptConsentRequest); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(CompletedRequest); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as CompletedRequest; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Accept a Login Request - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - Future> acceptLoginRequest( - String loginChallenge, { - AcceptLoginRequest body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/requests/login/accept', - method: 'PUT', - headers: { - ...?headers, - }, - queryParameters: { - r'login_challenge': loginChallenge, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(AcceptLoginRequest); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(CompletedRequest); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as CompletedRequest; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Accept a Logout Request - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - Future> acceptLogoutRequest( - String logoutChallenge, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/requests/logout/accept', - method: 'PUT', - headers: { - ...?headers, - }, - queryParameters: { - r'logout_challenge': logoutChallenge, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(CompletedRequest); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as CompletedRequest; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Generate a New 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. - Future> createJsonWebKeySet( - String set_, { - JsonWebKeySetGeneratorRequest body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()), - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(JsonWebKeySetGeneratorRequest); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(JSONWebKeySet); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as JSONWebKeySet; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Create an OAuth 2.0 Client - /// - /// Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - Future> createOAuth2Client( - OAuth2Client body, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/clients', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(OAuth2Client); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OAuth2Client); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OAuth2Client; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Delete a 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. - Future> deleteJsonWebKey( - String kid, - String set_, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/keys/{set}/{kid}'.replaceAll('{' r'kid' '}', kid.toString()).replaceAll('{' r'set' '}', set_.toString()), - method: 'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Delete a 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. - Future> deleteJsonWebKeySet( - String set_, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()), - method: 'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Deletes an 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. - Future> deleteOAuth2Client( - String id, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/clients/{id}'.replaceAll('{' r'id' '}', id.toString()), - method: 'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Delete OAuth2 Access Tokens from a Client - /// - /// This endpoint deletes OAuth2 access tokens issued for a client from the database - Future> deleteOAuth2Token( - String clientId, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/tokens', - method: 'DELETE', - headers: { - ...?headers, - }, - queryParameters: { - r'client_id': clientId, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Delete a 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. - Future> deleteTrustedJwtGrantIssuer( - String id, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/trust/grants/jwt-bearer/issuers/{id}'.replaceAll('{' r'id' '}', id.toString()), - method: 'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Flush Expired OAuth2 Access Tokens - /// - /// This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - Future> flushInactiveOAuth2Tokens({ - FlushInactiveOAuth2TokensRequest body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/flush', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(FlushInactiveOAuth2TokensRequest); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Get Consent Request Information - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - Future> getConsentRequest( - String consentChallenge, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/requests/consent', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'consent_challenge': consentChallenge, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(ConsentRequest); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as ConsentRequest; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Fetch a JSON Web Key - /// - /// This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - Future> getJsonWebKey( - String kid, - String set_, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/keys/{set}/{kid}'.replaceAll('{' r'kid' '}', kid.toString()).replaceAll('{' r'set' '}', set_.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(JSONWebKeySet); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as JSONWebKeySet; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// 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. - Future> getJsonWebKeySet( - String set_, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(JSONWebKeySet); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as JSONWebKeySet; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Get a Login Request - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - Future> getLoginRequest( - String loginChallenge, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/requests/login', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'login_challenge': loginChallenge, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(LoginRequest); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as LoginRequest; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Get a Logout Request - /// - /// Use this endpoint to fetch a logout request. - Future> getLogoutRequest( - String logoutChallenge, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/requests/logout', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'logout_challenge': logoutChallenge, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(LogoutRequest); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as LogoutRequest; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// 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. - Future> getOAuth2Client( - String id, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/clients/{id}'.replaceAll('{' r'id' '}', id.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OAuth2Client); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OAuth2Client; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Get a 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. - Future> getTrustedJwtGrantIssuer( - String id, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/trust/grants/jwt-bearer/issuers/{id}'.replaceAll('{' r'id' '}', id.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(TrustedJwtGrantIssuer); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as TrustedJwtGrantIssuer; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Get Service Version - /// - /// This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - Future> getVersion({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/version', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Version); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Version; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - Future> introspectOAuth2Token( - String token, { - String scope, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/introspect', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/x-www-form-urlencoded', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = { - r'token': encodeFormParameter(_serializers, token, const FullType(String)), - if (scope != null) r'scope': encodeFormParameter(_serializers, scope, const FullType(String)), - }; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OAuth2TokenIntrospection); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OAuth2TokenIntrospection; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Check Alive Status - /// - /// This endpoint returns a 200 status code when the HTTP server is up running. 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. - Future> isInstanceAlive({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/health/alive', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(HealthStatus); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as HealthStatus; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - Future>> listOAuth2Clients({ - int limit, - int offset, - String clientName, - String owner, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/clients', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - if (limit != null) r'limit': limit, - if (offset != null) r'offset': offset, - if (clientName != null) r'client_name': clientName, - if (owner != null) r'owner': owner, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(BuiltList, [FullType(OAuth2Client)]); - final BuiltList _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as BuiltList; - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - Future>> listSubjectConsentSessions( - String subject, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/sessions/consent', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - r'subject': subject, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(BuiltList, [FullType(PreviousConsentSession)]); - final BuiltList _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as BuiltList; - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// List Trusted OAuth2 JWT Bearer Grant Type Issuers - /// - /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - Future>> listTrustedJwtGrantIssuers({ - String issuer, - int limit, - int offset, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/trust/grants/jwt-bearer/issuers', - method: 'GET', - headers: { - ...?headers, - }, - queryParameters: { - if (issuer != null) r'issuer': issuer, - if (limit != null) r'limit': limit, - if (offset != null) r'offset': offset, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(BuiltList, [FullType(TrustedJwtGrantIssuer)]); - final BuiltList _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as BuiltList; - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Patch an OAuth 2.0 Client - /// - /// Patch an existing OAuth 2.0 Client. 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. - Future> patchOAuth2Client( - String id, - BuiltList body, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/clients/{id}'.replaceAll('{' r'id' '}', id.toString()), - method: 'PATCH', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(BuiltList, [FullType(PatchDocument)]); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OAuth2Client); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OAuth2Client; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Reject a Consent Request - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - Future> rejectConsentRequest( - String consentChallenge, { - RejectRequest body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/requests/consent/reject', - method: 'PUT', - headers: { - ...?headers, - }, - queryParameters: { - r'consent_challenge': consentChallenge, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(RejectRequest); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(CompletedRequest); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as CompletedRequest; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Reject a Login Request - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - Future> rejectLoginRequest( - String loginChallenge, { - RejectRequest body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/requests/login/reject', - method: 'PUT', - headers: { - ...?headers, - }, - queryParameters: { - r'login_challenge': loginChallenge, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(RejectRequest); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(CompletedRequest); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as CompletedRequest; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Reject a Logout Request - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - Future> rejectLogoutRequest( - String logoutChallenge, { - RejectRequest body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/requests/logout/reject', - method: 'PUT', - headers: { - ...?headers, - }, - queryParameters: { - r'logout_challenge': logoutChallenge, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(RejectRequest); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - /// - /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - Future> revokeAuthenticationSession( - String subject, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/sessions/login', - method: 'DELETE', - headers: { - ...?headers, - }, - queryParameters: { - r'subject': subject, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - /// - /// This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - Future> revokeConsentSessions( - String subject, { - String client, - bool all, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth/sessions/consent', - method: 'DELETE', - headers: { - ...?headers, - }, - queryParameters: { - r'subject': subject, - if (client != null) r'client': client, - if (all != null) r'all': all, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Trust an 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). - Future> trustJwtGrantIssuer({ - TrustJwtGrantIssuerBody body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/trust/grants/jwt-bearer/issuers', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(TrustJwtGrantIssuerBody); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(TrustedJwtGrantIssuer); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as TrustedJwtGrantIssuer; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Update a 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. - Future> updateJsonWebKey( - String kid, - String set_, { - JSONWebKey body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/keys/{set}/{kid}'.replaceAll('{' r'kid' '}', kid.toString()).replaceAll('{' r'set' '}', set_.toString()), - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(JSONWebKey); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(JSONWebKey); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as JSONWebKey; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// 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. - Future> updateJsonWebKeySet( - String set_, { - JSONWebKeySet body, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()), - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(JSONWebKeySet); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(JSONWebKeySet); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as JSONWebKeySet; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Update an OAuth 2.0 Client - /// - /// Update an existing OAuth 2.0 Client. 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. - Future> updateOAuth2Client( - String id, - OAuth2Client body, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/clients/{id}'.replaceAll('{' r'id' '}', id.toString()), - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(OAuth2Client); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OAuth2Client); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OAuth2Client; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/clients/hydra/dart/lib/api/metadata_api.dart b/clients/hydra/dart/lib/api/metadata_api.dart deleted file mode 100644 index 1700222a406..00000000000 --- a/clients/hydra/dart/lib/api/metadata_api.dart +++ /dev/null @@ -1,60 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - - -class MetadataApi { - - final Dio _dio; - - final Serializers _serializers; - - const MetadataApi(this._dio, this._serializers); - - /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - /// - /// ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` - Future> prometheus({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/metrics/prometheus', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - -} diff --git a/clients/hydra/dart/lib/api/public_api.dart b/clients/hydra/dart/lib/api/public_api.dart deleted file mode 100644 index bca215ed5b9..00000000000 --- a/clients/hydra/dart/lib/api/public_api.dart +++ /dev/null @@ -1,668 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; - -import 'package:ory_hydra_client/api_util.dart'; -import 'package:ory_hydra_client/model/health_not_ready_status.dart'; -import 'package:ory_hydra_client/model/health_status.dart'; -import 'package:ory_hydra_client/model/json_error.dart'; -import 'package:ory_hydra_client/model/json_web_key_set.dart'; -import 'package:ory_hydra_client/model/o_auth2_client.dart'; -import 'package:ory_hydra_client/model/oauth2_token_response.dart'; -import 'package:ory_hydra_client/model/userinfo_response.dart'; -import 'package:ory_hydra_client/model/well_known.dart'; - -class PublicApi { - - final Dio _dio; - - final Serializers _serializers; - - const PublicApi(this._dio, this._serializers); - - /// OpenID Connect Front-Backchannel Enabled Logout - /// - /// This endpoint initiates and completes user logout at Ory Hydra 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 - Future> disconnectUser({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/sessions/logout', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// OpenID Connect Discovery - /// - /// The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - Future> discoverOpenIDConfiguration({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/.well-known/openid-configuration', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(WellKnown); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as WellKnown; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// 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. - Future> dynamicClientRegistrationCreateOAuth2Client( - OAuth2Client body, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/connect/register', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(OAuth2Client); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OAuth2Client); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OAuth2Client; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - Future> dynamicClientRegistrationDeleteOAuth2Client( - String id, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/connect/register/{id}'.replaceAll('{' r'id' '}', id.toString()), - method: 'DELETE', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// 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. 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. - Future> dynamicClientRegistrationGetOAuth2Client( - String id, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/connect/register/{id}'.replaceAll('{' r'id' '}', id.toString()), - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OAuth2Client); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OAuth2Client; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - Future> dynamicClientRegistrationUpdateOAuth2Client( - String id, - OAuth2Client body, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/connect/register/{id}'.replaceAll('{' r'id' '}', id.toString()), - method: 'PUT', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - const _type = FullType(OAuth2Client); - _bodyData = _serializers.serialize(body, specifiedType: _type); - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(OAuth2Client); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as OAuth2Client; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Check Readiness Status - /// - /// This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - Future> isInstanceReady({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/health/ready', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(HealthStatus); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as HealthStatus; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// The OAuth 2.0 Token Endpoint - /// - /// The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - Future> oauth2Token( - String grantType, { - String code, - String refreshToken, - String redirectUri, - String clientId, - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/token', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'http', - 'name': 'basic', - },{ - 'type': 'oauth2', - 'name': 'oauth2', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/x-www-form-urlencoded', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = { - r'grant_type': encodeFormParameter(_serializers, grantType, const FullType(String)), - if (code != null) r'code': encodeFormParameter(_serializers, code, const FullType(String)), - if (refreshToken != null) r'refresh_token': encodeFormParameter(_serializers, refreshToken, const FullType(String)), - if (redirectUri != null) r'redirect_uri': encodeFormParameter(_serializers, redirectUri, const FullType(String)), - if (clientId != null) r'client_id': encodeFormParameter(_serializers, clientId, const FullType(String)), - }; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(Oauth2TokenResponse); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as Oauth2TokenResponse; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// The OAuth 2.0 Authorize Endpoint - /// - /// This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - Future> oauthAuth({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/auth', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// Revoke OAuth2 Tokens - /// - /// 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. - Future> revokeOAuth2Token( - String token, { - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/oauth2/revoke', - method: 'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'http', - 'name': 'basic', - },{ - 'type': 'oauth2', - 'name': 'oauth2', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/x-www-form-urlencoded', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - _bodyData = { - r'token': encodeFormParameter(_serializers, token, const FullType(String)), - }; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - return _response; - } - - /// OpenID Connect Userinfo - /// - /// This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - Future> userinfo({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/userinfo', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[ - { - 'type': 'oauth2', - 'name': 'oauth2', - }, - ], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(UserinfoResponse); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as UserinfoResponse; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// JSON Web Keys Discovery - /// - /// This endpoint returns JSON Web Keys to be used as public keys for 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. - Future> wellKnown({ - CancelToken cancelToken, - Map headers, - Map extra, - ValidateStatus validateStatus, - ProgressCallback onSendProgress, - ProgressCallback onReceiveProgress, - }) async { - final _request = RequestOptions( - path: r'/.well-known/jwks.json', - method: 'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - contentType: 'application/json', - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - dynamic _bodyData; - - final _response = await _dio.request( - _request.path, - data: _bodyData, - options: _request, - ); - - const _responseType = FullType(JSONWebKeySet); - final _responseData = _serializers.deserialize( - _response.data, - specifiedType: _responseType, - ) as JSONWebKeySet; - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - request: _response.request, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - -} diff --git a/clients/hydra/dart/lib/api_util.dart b/clients/hydra/dart/lib/api_util.dart deleted file mode 100644 index a6ce78558cf..00000000000 --- a/clients/hydra/dart/lib/api_util.dart +++ /dev/null @@ -1,31 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:convert'; - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; - -/// Format the given form parameter object into something that Dio can handle. -/// Returns primitive or String. -/// Returns List/Map if the value is BuildList/BuiltMap. -dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) { - if (value == null) { - return ''; - } - if (value is String || value is num || value is bool) { - return value; - } - final serialized = serializers.serialize(value, specifiedType: type); - if (serialized is String) { - return serialized; - } - if (value is BuiltList || value is BuiltMap) { - return serialized; - } - return json.encode(serialized); -} diff --git a/clients/hydra/dart/lib/auth/api_key_auth.dart b/clients/hydra/dart/lib/auth/api_key_auth.dart deleted file mode 100644 index 3988709b37a..00000000000 --- a/clients/hydra/dart/lib/auth/api_key_auth.dart +++ /dev/null @@ -1,33 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:ory_hydra_client/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class ApiKeyAuthInterceptor extends AuthInterceptor { - Map apiKeys = {}; - - @override - Future onRequest(RequestOptions options) { - final authInfo = getAuthInfo(options, 'apiKey'); - for (final info in authInfo) { - final authName = info['name'] as String; - final authKeyName = info['keyName'] as String; - final authWhere = info['where'] as String; - final apiKey = apiKeys[authName]; - if (apiKey != null) { - if (authWhere == 'query') { - options.queryParameters[authKeyName] = apiKey; - } else { - options.headers[authKeyName] = apiKey; - } - } - } - return super.onRequest(options); - } -} diff --git a/clients/hydra/dart/lib/auth/auth.dart b/clients/hydra/dart/lib/auth/auth.dart deleted file mode 100644 index de1ee79ca20..00000000000 --- a/clients/hydra/dart/lib/auth/auth.dart +++ /dev/null @@ -1,27 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:dio/dio.dart'; - -abstract class AuthInterceptor extends Interceptor { - /// Get auth information on given route for the given type. - /// Can return an empty list if type is not present on auth data or - /// if route doesn't need authentication. - List> getAuthInfo(RequestOptions route, String type) { - if (route.extra.containsKey('secure')) { - final auth = route.extra['secure'] as List>; - final results = >[]; - for (final info in auth) { - if (info['type'] == type) { - results.add(info); - } - } - return results; - } - return []; - } -} diff --git a/clients/hydra/dart/lib/auth/basic_auth.dart b/clients/hydra/dart/lib/auth/basic_auth.dart deleted file mode 100644 index 1a8b6f32c00..00000000000 --- a/clients/hydra/dart/lib/auth/basic_auth.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'dart:convert'; -import 'package:ory_hydra_client/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class BasicAuthInfo { - final String username; - final String password; - - const BasicAuthInfo(this.username, this.password); -} - -class BasicAuthInterceptor extends AuthInterceptor { - Map authInfo = {}; - - @override - Future onRequest(RequestOptions options) { - final metadataAuthInfo = getAuthInfo(options, 'basic'); - for (final info in metadataAuthInfo) { - final authName = info['name'] as String; - final basicAuthInfo = authInfo[authName]; - if (basicAuthInfo != null) { - final basicAuth = 'Basic ' + base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}')); - options.headers['Authorization'] = basicAuth; - break; - } - } - - return super.onRequest(options); - } -} diff --git a/clients/hydra/dart/lib/auth/oauth.dart b/clients/hydra/dart/lib/auth/oauth.dart deleted file mode 100644 index bcb47d59c90..00000000000 --- a/clients/hydra/dart/lib/auth/oauth.dart +++ /dev/null @@ -1,27 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'dart:async'; -import 'package:ory_hydra_client/auth/auth.dart'; -import 'package:dio/dio.dart'; - -class OAuthInterceptor extends AuthInterceptor { - Map tokens = {}; - - @override - Future onRequest(RequestOptions options) { - final authInfo = getAuthInfo(options, 'oauth'); - for (final info in authInfo) { - final token = tokens[info['name']]; - if (token != null) { - options.headers['Authorization'] = 'Bearer ${token}'; - break; - } - } - return super.onRequest(options); - } -} diff --git a/clients/hydra/dart/lib/model/accept_consent_request.dart b/clients/hydra/dart/lib/model/accept_consent_request.dart deleted file mode 100644 index 42ccec9454a..00000000000 --- a/clients/hydra/dart/lib/model/accept_consent_request.dart +++ /dev/null @@ -1,143 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/consent_request_session.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'accept_consent_request.g.dart'; - -abstract class AcceptConsentRequest implements Built { - - @nullable - @BuiltValueField(wireName: r'grant_access_token_audience') - BuiltList get grantAccessTokenAudience; - - @nullable - @BuiltValueField(wireName: r'grant_scope') - BuiltList get grantScope; - - @nullable - @BuiltValueField(wireName: r'handled_at') - DateTime get handledAt; - - /// 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. - @nullable - @BuiltValueField(wireName: r'remember') - bool get remember; - - /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. - @nullable - @BuiltValueField(wireName: r'remember_for') - int get rememberFor; - - @nullable - @BuiltValueField(wireName: r'session') - ConsentRequestSession get session; - - AcceptConsentRequest._(); - - static void _initializeBuilder(AcceptConsentRequestBuilder b) => b; - - factory AcceptConsentRequest([void updates(AcceptConsentRequestBuilder b)]) = _$AcceptConsentRequest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AcceptConsentRequestSerializer(); -} - -class _$AcceptConsentRequestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [AcceptConsentRequest, _$AcceptConsentRequest]; - @override - final String wireName = r'AcceptConsentRequest'; - - @override - Iterable serialize(Serializers serializers, AcceptConsentRequest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.grantAccessTokenAudience != null) { - result - ..add(r'grant_access_token_audience') - ..add(serializers.serialize(object.grantAccessTokenAudience, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.grantScope != null) { - result - ..add(r'grant_scope') - ..add(serializers.serialize(object.grantScope, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.handledAt != null) { - result - ..add(r'handled_at') - ..add(serializers.serialize(object.handledAt, - specifiedType: const FullType(DateTime))); - } - if (object.remember != null) { - result - ..add(r'remember') - ..add(serializers.serialize(object.remember, - specifiedType: const FullType(bool))); - } - if (object.rememberFor != null) { - result - ..add(r'remember_for') - ..add(serializers.serialize(object.rememberFor, - specifiedType: const FullType(int))); - } - if (object.session != null) { - result - ..add(r'session') - ..add(serializers.serialize(object.session, - specifiedType: const FullType(ConsentRequestSession))); - } - return result; - } - - @override - AcceptConsentRequest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = AcceptConsentRequestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'grant_access_token_audience': - result.grantAccessTokenAudience.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'grant_scope': - result.grantScope.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'handled_at': - result.handledAt = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'remember': - result.remember = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'remember_for': - result.rememberFor = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'session': - result.session.replace(serializers.deserialize(value, - specifiedType: const FullType(ConsentRequestSession)) as ConsentRequestSession); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/accept_login_request.dart b/clients/hydra/dart/lib/model/accept_login_request.dart deleted file mode 100644 index e32d5989a1a..00000000000 --- a/clients/hydra/dart/lib/model/accept_login_request.dart +++ /dev/null @@ -1,157 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'accept_login_request.g.dart'; - -abstract class AcceptLoginRequest implements Built { - - /// 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. - @nullable - @BuiltValueField(wireName: r'acr') - String get acr; - - @nullable - @BuiltValueField(wireName: r'amr') - BuiltList get amr; - - @nullable - @BuiltValueField(wireName: r'context') - JsonObject get context; - - /// 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. - @nullable - @BuiltValueField(wireName: r'force_subject_identifier') - String get forceSubjectIdentifier; - - /// 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. - @nullable - @BuiltValueField(wireName: r'remember') - bool get remember; - - /// 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). - @nullable - @BuiltValueField(wireName: r'remember_for') - int get rememberFor; - - /// Subject is the user ID of the end-user that authenticated. - @BuiltValueField(wireName: r'subject') - String get subject; - - AcceptLoginRequest._(); - - static void _initializeBuilder(AcceptLoginRequestBuilder b) => b; - - factory AcceptLoginRequest([void updates(AcceptLoginRequestBuilder b)]) = _$AcceptLoginRequest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AcceptLoginRequestSerializer(); -} - -class _$AcceptLoginRequestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [AcceptLoginRequest, _$AcceptLoginRequest]; - @override - final String wireName = r'AcceptLoginRequest'; - - @override - Iterable serialize(Serializers serializers, AcceptLoginRequest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.acr != null) { - result - ..add(r'acr') - ..add(serializers.serialize(object.acr, - specifiedType: const FullType(String))); - } - if (object.amr != null) { - result - ..add(r'amr') - ..add(serializers.serialize(object.amr, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.context != null) { - result - ..add(r'context') - ..add(serializers.serialize(object.context, - specifiedType: const FullType(JsonObject))); - } - if (object.forceSubjectIdentifier != null) { - result - ..add(r'force_subject_identifier') - ..add(serializers.serialize(object.forceSubjectIdentifier, - specifiedType: const FullType(String))); - } - if (object.remember != null) { - result - ..add(r'remember') - ..add(serializers.serialize(object.remember, - specifiedType: const FullType(bool))); - } - if (object.rememberFor != null) { - result - ..add(r'remember_for') - ..add(serializers.serialize(object.rememberFor, - specifiedType: const FullType(int))); - } - result - ..add(r'subject') - ..add(serializers.serialize(object.subject, - specifiedType: const FullType(String))); - return result; - } - - @override - AcceptLoginRequest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = AcceptLoginRequestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'acr': - result.acr = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'amr': - result.amr.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'context': - result.context = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - case r'force_subject_identifier': - result.forceSubjectIdentifier = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'remember': - result.remember = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'remember_for': - result.rememberFor = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'subject': - result.subject = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/completed_request.dart b/clients/hydra/dart/lib/model/completed_request.dart deleted file mode 100644 index 7607780d841..00000000000 --- a/clients/hydra/dart/lib/model/completed_request.dart +++ /dev/null @@ -1,67 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'completed_request.g.dart'; - -abstract class CompletedRequest implements Built { - - /// RedirectURL is the URL which you should redirect the user to once the authentication process is completed. - @BuiltValueField(wireName: r'redirect_to') - String get redirectTo; - - CompletedRequest._(); - - static void _initializeBuilder(CompletedRequestBuilder b) => b; - - factory CompletedRequest([void updates(CompletedRequestBuilder b)]) = _$CompletedRequest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CompletedRequestSerializer(); -} - -class _$CompletedRequestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [CompletedRequest, _$CompletedRequest]; - @override - final String wireName = r'CompletedRequest'; - - @override - Iterable serialize(Serializers serializers, CompletedRequest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'redirect_to') - ..add(serializers.serialize(object.redirectTo, - specifiedType: const FullType(String))); - return result; - } - - @override - CompletedRequest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = CompletedRequestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'redirect_to': - result.redirectTo = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/consent_request.dart b/clients/hydra/dart/lib/model/consent_request.dart deleted file mode 100644 index fe82d76dd19..00000000000 --- a/clients/hydra/dart/lib/model/consent_request.dart +++ /dev/null @@ -1,245 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/open_id_connect_context.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/o_auth2_client.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'consent_request.g.dart'; - -abstract class ConsentRequest implements Built { - - /// 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. - @nullable - @BuiltValueField(wireName: r'acr') - String get acr; - - @nullable - @BuiltValueField(wireName: r'amr') - BuiltList get amr; - - /// ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. - @BuiltValueField(wireName: r'challenge') - String get challenge; - - @nullable - @BuiltValueField(wireName: r'client') - OAuth2Client get client; - - @nullable - @BuiltValueField(wireName: r'context') - JsonObject get 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. - @nullable - @BuiltValueField(wireName: r'login_challenge') - String get loginChallenge; - - /// 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. - @nullable - @BuiltValueField(wireName: r'login_session_id') - String get loginSessionId; - - @nullable - @BuiltValueField(wireName: r'oidc_context') - OpenIDConnectContext get 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. - @nullable - @BuiltValueField(wireName: r'request_url') - String get requestUrl; - - @nullable - @BuiltValueField(wireName: r'requested_access_token_audience') - BuiltList get requestedAccessTokenAudience; - - @nullable - @BuiltValueField(wireName: r'requested_scope') - BuiltList get 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. - @nullable - @BuiltValueField(wireName: r'skip') - bool get skip; - - /// 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. - @nullable - @BuiltValueField(wireName: r'subject') - String get subject; - - ConsentRequest._(); - - static void _initializeBuilder(ConsentRequestBuilder b) => b; - - factory ConsentRequest([void updates(ConsentRequestBuilder b)]) = _$ConsentRequest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ConsentRequestSerializer(); -} - -class _$ConsentRequestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ConsentRequest, _$ConsentRequest]; - @override - final String wireName = r'ConsentRequest'; - - @override - Iterable serialize(Serializers serializers, ConsentRequest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.acr != null) { - result - ..add(r'acr') - ..add(serializers.serialize(object.acr, - specifiedType: const FullType(String))); - } - if (object.amr != null) { - result - ..add(r'amr') - ..add(serializers.serialize(object.amr, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - result - ..add(r'challenge') - ..add(serializers.serialize(object.challenge, - specifiedType: const FullType(String))); - if (object.client != null) { - result - ..add(r'client') - ..add(serializers.serialize(object.client, - specifiedType: const FullType(OAuth2Client))); - } - if (object.context != null) { - result - ..add(r'context') - ..add(serializers.serialize(object.context, - specifiedType: const FullType(JsonObject))); - } - if (object.loginChallenge != null) { - result - ..add(r'login_challenge') - ..add(serializers.serialize(object.loginChallenge, - specifiedType: const FullType(String))); - } - if (object.loginSessionId != null) { - result - ..add(r'login_session_id') - ..add(serializers.serialize(object.loginSessionId, - specifiedType: const FullType(String))); - } - if (object.oidcContext != null) { - result - ..add(r'oidc_context') - ..add(serializers.serialize(object.oidcContext, - specifiedType: const FullType(OpenIDConnectContext))); - } - if (object.requestUrl != null) { - result - ..add(r'request_url') - ..add(serializers.serialize(object.requestUrl, - specifiedType: const FullType(String))); - } - if (object.requestedAccessTokenAudience != null) { - result - ..add(r'requested_access_token_audience') - ..add(serializers.serialize(object.requestedAccessTokenAudience, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.requestedScope != null) { - result - ..add(r'requested_scope') - ..add(serializers.serialize(object.requestedScope, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.skip != null) { - result - ..add(r'skip') - ..add(serializers.serialize(object.skip, - specifiedType: const FullType(bool))); - } - if (object.subject != null) { - result - ..add(r'subject') - ..add(serializers.serialize(object.subject, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ConsentRequest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ConsentRequestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'acr': - result.acr = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'amr': - result.amr.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'challenge': - result.challenge = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'client': - result.client.replace(serializers.deserialize(value, - specifiedType: const FullType(OAuth2Client)) as OAuth2Client); - break; - case r'context': - result.context = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - case r'login_challenge': - result.loginChallenge = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'login_session_id': - result.loginSessionId = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'oidc_context': - result.oidcContext.replace(serializers.deserialize(value, - specifiedType: const FullType(OpenIDConnectContext)) as OpenIDConnectContext); - break; - case r'request_url': - result.requestUrl = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'requested_access_token_audience': - result.requestedAccessTokenAudience.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'requested_scope': - result.requestedScope.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'skip': - result.skip = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'subject': - result.subject = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/consent_request_session.dart b/clients/hydra/dart/lib/model/consent_request_session.dart deleted file mode 100644 index 2d67971814c..00000000000 --- a/clients/hydra/dart/lib/model/consent_request_session.dart +++ /dev/null @@ -1,86 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'consent_request_session.g.dart'; - -abstract class ConsentRequestSession implements Built { - - /// 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! - @nullable - @BuiltValueField(wireName: r'access_token') - JsonObject get accessToken; - - /// 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! - @nullable - @BuiltValueField(wireName: r'id_token') - JsonObject get idToken; - - ConsentRequestSession._(); - - static void _initializeBuilder(ConsentRequestSessionBuilder b) => b; - - factory ConsentRequestSession([void updates(ConsentRequestSessionBuilder b)]) = _$ConsentRequestSession; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ConsentRequestSessionSerializer(); -} - -class _$ConsentRequestSessionSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ConsentRequestSession, _$ConsentRequestSession]; - @override - final String wireName = r'ConsentRequestSession'; - - @override - Iterable serialize(Serializers serializers, ConsentRequestSession object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.accessToken != null) { - result - ..add(r'access_token') - ..add(serializers.serialize(object.accessToken, - specifiedType: const FullType(JsonObject))); - } - if (object.idToken != null) { - result - ..add(r'id_token') - ..add(serializers.serialize(object.idToken, - specifiedType: const FullType(JsonObject))); - } - return result; - } - - @override - ConsentRequestSession deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ConsentRequestSessionBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'access_token': - result.accessToken = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - case r'id_token': - result.idToken = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/container_wait_ok_body_error.dart b/clients/hydra/dart/lib/model/container_wait_ok_body_error.dart deleted file mode 100644 index c0a23e0cfea..00000000000 --- a/clients/hydra/dart/lib/model/container_wait_ok_body_error.dart +++ /dev/null @@ -1,70 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'container_wait_ok_body_error.g.dart'; - -abstract class ContainerWaitOKBodyError implements Built { - - /// Details of an error - @nullable - @BuiltValueField(wireName: r'Message') - String get message; - - ContainerWaitOKBodyError._(); - - static void _initializeBuilder(ContainerWaitOKBodyErrorBuilder b) => b; - - factory ContainerWaitOKBodyError([void updates(ContainerWaitOKBodyErrorBuilder b)]) = _$ContainerWaitOKBodyError; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ContainerWaitOKBodyErrorSerializer(); -} - -class _$ContainerWaitOKBodyErrorSerializer implements StructuredSerializer { - - @override - final Iterable types = const [ContainerWaitOKBodyError, _$ContainerWaitOKBodyError]; - @override - final String wireName = r'ContainerWaitOKBodyError'; - - @override - Iterable serialize(Serializers serializers, ContainerWaitOKBodyError object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.message != null) { - result - ..add(r'Message') - ..add(serializers.serialize(object.message, - specifiedType: const FullType(String))); - } - return result; - } - - @override - ContainerWaitOKBodyError deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = ContainerWaitOKBodyErrorBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'Message': - result.message = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/flush_inactive_o_auth2_tokens_request.dart b/clients/hydra/dart/lib/model/flush_inactive_o_auth2_tokens_request.dart deleted file mode 100644 index e9bacd31d97..00000000000 --- a/clients/hydra/dart/lib/model/flush_inactive_o_auth2_tokens_request.dart +++ /dev/null @@ -1,70 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'flush_inactive_o_auth2_tokens_request.g.dart'; - -abstract class FlushInactiveOAuth2TokensRequest implements Built { - - /// NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. - @nullable - @BuiltValueField(wireName: r'notAfter') - DateTime get notAfter; - - FlushInactiveOAuth2TokensRequest._(); - - static void _initializeBuilder(FlushInactiveOAuth2TokensRequestBuilder b) => b; - - factory FlushInactiveOAuth2TokensRequest([void updates(FlushInactiveOAuth2TokensRequestBuilder b)]) = _$FlushInactiveOAuth2TokensRequest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$FlushInactiveOAuth2TokensRequestSerializer(); -} - -class _$FlushInactiveOAuth2TokensRequestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [FlushInactiveOAuth2TokensRequest, _$FlushInactiveOAuth2TokensRequest]; - @override - final String wireName = r'FlushInactiveOAuth2TokensRequest'; - - @override - Iterable serialize(Serializers serializers, FlushInactiveOAuth2TokensRequest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.notAfter != null) { - result - ..add(r'notAfter') - ..add(serializers.serialize(object.notAfter, - specifiedType: const FullType(DateTime))); - } - return result; - } - - @override - FlushInactiveOAuth2TokensRequest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = FlushInactiveOAuth2TokensRequestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'notAfter': - result.notAfter = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/generic_error.dart b/clients/hydra/dart/lib/model/generic_error.dart deleted file mode 100644 index 223c8c54130..00000000000 --- a/clients/hydra/dart/lib/model/generic_error.dart +++ /dev/null @@ -1,173 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'generic_error.g.dart'; - -abstract class GenericError implements Built { - - /// The status code - @nullable - @BuiltValueField(wireName: r'code') - int get code; - - /// Debug information This field is often not exposed to protect against leaking sensitive information. - @nullable - @BuiltValueField(wireName: r'debug') - String get debug; - - /// Further error details - @nullable - @BuiltValueField(wireName: r'details') - JsonObject get details; - - /// The error ID Useful when trying to identify various errors in application logic. - @nullable - @BuiltValueField(wireName: r'id') - String get id; - - /// Error message The error's message. - @BuiltValueField(wireName: r'message') - String get message; - - /// A human-readable reason for the error - @nullable - @BuiltValueField(wireName: r'reason') - String get reason; - - /// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. - @nullable - @BuiltValueField(wireName: r'request') - String get request; - - /// The status description - @nullable - @BuiltValueField(wireName: r'status') - String get status; - - GenericError._(); - - static void _initializeBuilder(GenericErrorBuilder b) => b; - - factory GenericError([void updates(GenericErrorBuilder b)]) = _$GenericError; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$GenericErrorSerializer(); -} - -class _$GenericErrorSerializer implements StructuredSerializer { - - @override - final Iterable types = const [GenericError, _$GenericError]; - @override - final String wireName = r'GenericError'; - - @override - Iterable serialize(Serializers serializers, GenericError object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.code != null) { - result - ..add(r'code') - ..add(serializers.serialize(object.code, - specifiedType: const FullType(int))); - } - if (object.debug != null) { - result - ..add(r'debug') - ..add(serializers.serialize(object.debug, - specifiedType: const FullType(String))); - } - if (object.details != null) { - result - ..add(r'details') - ..add(serializers.serialize(object.details, - specifiedType: const FullType(JsonObject))); - } - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(String))); - } - result - ..add(r'message') - ..add(serializers.serialize(object.message, - specifiedType: const FullType(String))); - if (object.reason != null) { - result - ..add(r'reason') - ..add(serializers.serialize(object.reason, - specifiedType: const FullType(String))); - } - if (object.request != null) { - result - ..add(r'request') - ..add(serializers.serialize(object.request, - specifiedType: const FullType(String))); - } - if (object.status != null) { - result - ..add(r'status') - ..add(serializers.serialize(object.status, - specifiedType: const FullType(String))); - } - return result; - } - - @override - GenericError deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = GenericErrorBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'code': - result.code = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'debug': - result.debug = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'details': - result.details = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'message': - result.message = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'reason': - result.reason = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'request': - result.request = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'status': - result.status = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/health_not_ready_status.dart b/clients/hydra/dart/lib/model/health_not_ready_status.dart deleted file mode 100644 index 9d2c997f3c9..00000000000 --- a/clients/hydra/dart/lib/model/health_not_ready_status.dart +++ /dev/null @@ -1,71 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'health_not_ready_status.g.dart'; - -abstract class HealthNotReadyStatus implements Built { - - /// Errors contains a list of errors that caused the not ready status. - @nullable - @BuiltValueField(wireName: r'errors') - BuiltMap get errors; - - HealthNotReadyStatus._(); - - static void _initializeBuilder(HealthNotReadyStatusBuilder b) => b; - - factory HealthNotReadyStatus([void updates(HealthNotReadyStatusBuilder b)]) = _$HealthNotReadyStatus; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$HealthNotReadyStatusSerializer(); -} - -class _$HealthNotReadyStatusSerializer implements StructuredSerializer { - - @override - final Iterable types = const [HealthNotReadyStatus, _$HealthNotReadyStatus]; - @override - final String wireName = r'HealthNotReadyStatus'; - - @override - Iterable serialize(Serializers serializers, HealthNotReadyStatus object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.errors != null) { - result - ..add(r'errors') - ..add(serializers.serialize(object.errors, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]))); - } - return result; - } - - @override - HealthNotReadyStatus deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = HealthNotReadyStatusBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'errors': - result.errors.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)])) as BuiltMap); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/health_status.dart b/clients/hydra/dart/lib/model/health_status.dart deleted file mode 100644 index 5383964880c..00000000000 --- a/clients/hydra/dart/lib/model/health_status.dart +++ /dev/null @@ -1,70 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'health_status.g.dart'; - -abstract class HealthStatus implements Built { - - /// Status always contains \"ok\". - @nullable - @BuiltValueField(wireName: r'status') - String get status; - - HealthStatus._(); - - static void _initializeBuilder(HealthStatusBuilder b) => b; - - factory HealthStatus([void updates(HealthStatusBuilder b)]) = _$HealthStatus; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$HealthStatusSerializer(); -} - -class _$HealthStatusSerializer implements StructuredSerializer { - - @override - final Iterable types = const [HealthStatus, _$HealthStatus]; - @override - final String wireName = r'HealthStatus'; - - @override - Iterable serialize(Serializers serializers, HealthStatus object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.status != null) { - result - ..add(r'status') - ..add(serializers.serialize(object.status, - specifiedType: const FullType(String))); - } - return result; - } - - @override - HealthStatus deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = HealthStatusBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'status': - result.status = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/json_error.dart b/clients/hydra/dart/lib/model/json_error.dart deleted file mode 100644 index 243db93d5ea..00000000000 --- a/clients/hydra/dart/lib/model/json_error.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'json_error.g.dart'; - -abstract class JsonError implements Built { - - /// Name is the error name. - @nullable - @BuiltValueField(wireName: r'error') - String get error; - - /// Debug contains debug information. This is usually not available and has to be enabled. - @nullable - @BuiltValueField(wireName: r'error_debug') - String get errorDebug; - - /// Description contains further information on the nature of the error. - @nullable - @BuiltValueField(wireName: r'error_description') - String get errorDescription; - - /// Code represents the error status code (404, 403, 401, ...). - @nullable - @BuiltValueField(wireName: r'status_code') - int get statusCode; - - JsonError._(); - - static void _initializeBuilder(JsonErrorBuilder b) => b; - - factory JsonError([void updates(JsonErrorBuilder b)]) = _$JsonError; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$JsonErrorSerializer(); -} - -class _$JsonErrorSerializer implements StructuredSerializer { - - @override - final Iterable types = const [JsonError, _$JsonError]; - @override - final String wireName = r'JsonError'; - - @override - Iterable serialize(Serializers serializers, JsonError object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.error != null) { - result - ..add(r'error') - ..add(serializers.serialize(object.error, - specifiedType: const FullType(String))); - } - if (object.errorDebug != null) { - result - ..add(r'error_debug') - ..add(serializers.serialize(object.errorDebug, - specifiedType: const FullType(String))); - } - if (object.errorDescription != null) { - result - ..add(r'error_description') - ..add(serializers.serialize(object.errorDescription, - specifiedType: const FullType(String))); - } - if (object.statusCode != null) { - result - ..add(r'status_code') - ..add(serializers.serialize(object.statusCode, - specifiedType: const FullType(int))); - } - return result; - } - - @override - JsonError deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = JsonErrorBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'error': - result.error = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'error_debug': - result.errorDebug = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'error_description': - result.errorDescription = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'status_code': - result.statusCode = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/json_web_key.dart b/clients/hydra/dart/lib/model/json_web_key.dart deleted file mode 100644 index 717df057a4b..00000000000 --- a/clients/hydra/dart/lib/model/json_web_key.dart +++ /dev/null @@ -1,287 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'json_web_key.g.dart'; - -abstract class JSONWebKey implements Built { - - /// 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. - @BuiltValueField(wireName: r'alg') - String get alg; - - @nullable - @BuiltValueField(wireName: r'crv') - String get crv; - - @nullable - @BuiltValueField(wireName: r'd') - String get d; - - @nullable - @BuiltValueField(wireName: r'dp') - String get dp; - - @nullable - @BuiltValueField(wireName: r'dq') - String get dq; - - @nullable - @BuiltValueField(wireName: r'e') - String get e; - - @nullable - @BuiltValueField(wireName: r'k') - String get k; - - /// 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. - @BuiltValueField(wireName: r'kid') - String get kid; - - /// 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. - @BuiltValueField(wireName: r'kty') - String get kty; - - @nullable - @BuiltValueField(wireName: r'n') - String get n; - - @nullable - @BuiltValueField(wireName: r'p') - String get p; - - @nullable - @BuiltValueField(wireName: r'q') - String get q; - - @nullable - @BuiltValueField(wireName: r'qi') - String get qi; - - /// 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). - @BuiltValueField(wireName: r'use') - String get use; - - @nullable - @BuiltValueField(wireName: r'x') - String get x; - - /// 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. - @nullable - @BuiltValueField(wireName: r'x5c') - BuiltList get x5c; - - @nullable - @BuiltValueField(wireName: r'y') - String get y; - - JSONWebKey._(); - - static void _initializeBuilder(JSONWebKeyBuilder b) => b; - - factory JSONWebKey([void updates(JSONWebKeyBuilder b)]) = _$JSONWebKey; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$JSONWebKeySerializer(); -} - -class _$JSONWebKeySerializer implements StructuredSerializer { - - @override - final Iterable types = const [JSONWebKey, _$JSONWebKey]; - @override - final String wireName = r'JSONWebKey'; - - @override - Iterable serialize(Serializers serializers, JSONWebKey object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'alg') - ..add(serializers.serialize(object.alg, - specifiedType: const FullType(String))); - if (object.crv != null) { - result - ..add(r'crv') - ..add(serializers.serialize(object.crv, - specifiedType: const FullType(String))); - } - if (object.d != null) { - result - ..add(r'd') - ..add(serializers.serialize(object.d, - specifiedType: const FullType(String))); - } - if (object.dp != null) { - result - ..add(r'dp') - ..add(serializers.serialize(object.dp, - specifiedType: const FullType(String))); - } - if (object.dq != null) { - result - ..add(r'dq') - ..add(serializers.serialize(object.dq, - specifiedType: const FullType(String))); - } - if (object.e != null) { - result - ..add(r'e') - ..add(serializers.serialize(object.e, - specifiedType: const FullType(String))); - } - if (object.k != null) { - result - ..add(r'k') - ..add(serializers.serialize(object.k, - specifiedType: const FullType(String))); - } - result - ..add(r'kid') - ..add(serializers.serialize(object.kid, - specifiedType: const FullType(String))); - result - ..add(r'kty') - ..add(serializers.serialize(object.kty, - specifiedType: const FullType(String))); - if (object.n != null) { - result - ..add(r'n') - ..add(serializers.serialize(object.n, - specifiedType: const FullType(String))); - } - if (object.p != null) { - result - ..add(r'p') - ..add(serializers.serialize(object.p, - specifiedType: const FullType(String))); - } - if (object.q != null) { - result - ..add(r'q') - ..add(serializers.serialize(object.q, - specifiedType: const FullType(String))); - } - if (object.qi != null) { - result - ..add(r'qi') - ..add(serializers.serialize(object.qi, - specifiedType: const FullType(String))); - } - result - ..add(r'use') - ..add(serializers.serialize(object.use, - specifiedType: const FullType(String))); - if (object.x != null) { - result - ..add(r'x') - ..add(serializers.serialize(object.x, - specifiedType: const FullType(String))); - } - if (object.x5c != null) { - result - ..add(r'x5c') - ..add(serializers.serialize(object.x5c, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.y != null) { - result - ..add(r'y') - ..add(serializers.serialize(object.y, - specifiedType: const FullType(String))); - } - return result; - } - - @override - JSONWebKey deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = JSONWebKeyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'alg': - result.alg = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'crv': - result.crv = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'd': - result.d = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'dp': - result.dp = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'dq': - result.dq = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'e': - result.e = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'k': - result.k = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'kid': - result.kid = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'kty': - result.kty = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'n': - result.n = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'p': - result.p = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'q': - result.q = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'qi': - result.qi = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'use': - result.use = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'x': - result.x = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'x5c': - result.x5c.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'y': - result.y = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/json_web_key_set.dart b/clients/hydra/dart/lib/model/json_web_key_set.dart deleted file mode 100644 index 8b05fe9d49d..00000000000 --- a/clients/hydra/dart/lib/model/json_web_key_set.dart +++ /dev/null @@ -1,72 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/json_web_key.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'json_web_key_set.g.dart'; - -abstract class JSONWebKeySet implements Built { - - /// The value of the \"keys\" parameter is an array of 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. - @nullable - @BuiltValueField(wireName: r'keys') - BuiltList get keys; - - JSONWebKeySet._(); - - static void _initializeBuilder(JSONWebKeySetBuilder b) => b; - - factory JSONWebKeySet([void updates(JSONWebKeySetBuilder b)]) = _$JSONWebKeySet; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$JSONWebKeySetSerializer(); -} - -class _$JSONWebKeySetSerializer implements StructuredSerializer { - - @override - final Iterable types = const [JSONWebKeySet, _$JSONWebKeySet]; - @override - final String wireName = r'JSONWebKeySet'; - - @override - Iterable serialize(Serializers serializers, JSONWebKeySet object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.keys != null) { - result - ..add(r'keys') - ..add(serializers.serialize(object.keys, - specifiedType: const FullType(BuiltList, [FullType(JSONWebKey)]))); - } - return result; - } - - @override - JSONWebKeySet deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = JSONWebKeySetBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'keys': - result.keys.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(JSONWebKey)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/json_web_key_set_generator_request.dart b/clients/hydra/dart/lib/model/json_web_key_set_generator_request.dart deleted file mode 100644 index 576548a01c2..00000000000 --- a/clients/hydra/dart/lib/model/json_web_key_set_generator_request.dart +++ /dev/null @@ -1,91 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'json_web_key_set_generator_request.g.dart'; - -abstract class JsonWebKeySetGeneratorRequest implements Built { - - /// The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" - @BuiltValueField(wireName: r'alg') - String get alg; - - /// The kid of the key to be created - @BuiltValueField(wireName: r'kid') - String get kid; - - /// 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\". - @BuiltValueField(wireName: r'use') - String get use; - - JsonWebKeySetGeneratorRequest._(); - - static void _initializeBuilder(JsonWebKeySetGeneratorRequestBuilder b) => b; - - factory JsonWebKeySetGeneratorRequest([void updates(JsonWebKeySetGeneratorRequestBuilder b)]) = _$JsonWebKeySetGeneratorRequest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$JsonWebKeySetGeneratorRequestSerializer(); -} - -class _$JsonWebKeySetGeneratorRequestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [JsonWebKeySetGeneratorRequest, _$JsonWebKeySetGeneratorRequest]; - @override - final String wireName = r'JsonWebKeySetGeneratorRequest'; - - @override - Iterable serialize(Serializers serializers, JsonWebKeySetGeneratorRequest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'alg') - ..add(serializers.serialize(object.alg, - specifiedType: const FullType(String))); - result - ..add(r'kid') - ..add(serializers.serialize(object.kid, - specifiedType: const FullType(String))); - result - ..add(r'use') - ..add(serializers.serialize(object.use, - specifiedType: const FullType(String))); - return result; - } - - @override - JsonWebKeySetGeneratorRequest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = JsonWebKeySetGeneratorRequestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'alg': - result.alg = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'kid': - result.kid = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'use': - result.use = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/login_request.dart b/clients/hydra/dart/lib/model/login_request.dart deleted file mode 100644 index d50e7cf541d..00000000000 --- a/clients/hydra/dart/lib/model/login_request.dart +++ /dev/null @@ -1,168 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/open_id_connect_context.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/o_auth2_client.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'login_request.g.dart'; - -abstract class LoginRequest implements Built { - - /// ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. - @BuiltValueField(wireName: r'challenge') - String get challenge; - - @BuiltValueField(wireName: r'client') - OAuth2Client get client; - - @nullable - @BuiltValueField(wireName: r'oidc_context') - OpenIDConnectContext get 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. - @BuiltValueField(wireName: r'request_url') - String get requestUrl; - - @BuiltValueField(wireName: r'requested_access_token_audience') - BuiltList get requestedAccessTokenAudience; - - @BuiltValueField(wireName: r'requested_scope') - BuiltList get requestedScope; - - /// 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. - @nullable - @BuiltValueField(wireName: r'session_id') - String get sessionId; - - /// 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. - @BuiltValueField(wireName: r'skip') - bool get skip; - - /// 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. - @BuiltValueField(wireName: r'subject') - String get subject; - - LoginRequest._(); - - static void _initializeBuilder(LoginRequestBuilder b) => b; - - factory LoginRequest([void updates(LoginRequestBuilder b)]) = _$LoginRequest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$LoginRequestSerializer(); -} - -class _$LoginRequestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [LoginRequest, _$LoginRequest]; - @override - final String wireName = r'LoginRequest'; - - @override - Iterable serialize(Serializers serializers, LoginRequest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'challenge') - ..add(serializers.serialize(object.challenge, - specifiedType: const FullType(String))); - result - ..add(r'client') - ..add(serializers.serialize(object.client, - specifiedType: const FullType(OAuth2Client))); - if (object.oidcContext != null) { - result - ..add(r'oidc_context') - ..add(serializers.serialize(object.oidcContext, - specifiedType: const FullType(OpenIDConnectContext))); - } - result - ..add(r'request_url') - ..add(serializers.serialize(object.requestUrl, - specifiedType: const FullType(String))); - result - ..add(r'requested_access_token_audience') - ..add(serializers.serialize(object.requestedAccessTokenAudience, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'requested_scope') - ..add(serializers.serialize(object.requestedScope, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - if (object.sessionId != null) { - result - ..add(r'session_id') - ..add(serializers.serialize(object.sessionId, - specifiedType: const FullType(String))); - } - result - ..add(r'skip') - ..add(serializers.serialize(object.skip, - specifiedType: const FullType(bool))); - result - ..add(r'subject') - ..add(serializers.serialize(object.subject, - specifiedType: const FullType(String))); - return result; - } - - @override - LoginRequest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = LoginRequestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'challenge': - result.challenge = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'client': - result.client.replace(serializers.deserialize(value, - specifiedType: const FullType(OAuth2Client)) as OAuth2Client); - break; - case r'oidc_context': - result.oidcContext.replace(serializers.deserialize(value, - specifiedType: const FullType(OpenIDConnectContext)) as OpenIDConnectContext); - break; - case r'request_url': - result.requestUrl = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'requested_access_token_audience': - result.requestedAccessTokenAudience.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'requested_scope': - result.requestedScope.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'session_id': - result.sessionId = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'skip': - result.skip = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'subject': - result.subject = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/logout_request.dart b/clients/hydra/dart/lib/model/logout_request.dart deleted file mode 100644 index c648a1ccc74..00000000000 --- a/clients/hydra/dart/lib/model/logout_request.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/o_auth2_client.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'logout_request.g.dart'; - -abstract class LogoutRequest implements Built { - - /// Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. - @nullable - @BuiltValueField(wireName: r'challenge') - String get challenge; - - @nullable - @BuiltValueField(wireName: r'client') - OAuth2Client get client; - - /// RequestURL is the original Logout URL requested. - @nullable - @BuiltValueField(wireName: r'request_url') - String get requestUrl; - - /// RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. - @nullable - @BuiltValueField(wireName: r'rp_initiated') - bool get rpInitiated; - - /// SessionID is the login session ID that was requested to log out. - @nullable - @BuiltValueField(wireName: r'sid') - String get sid; - - /// Subject is the user for whom the logout was request. - @nullable - @BuiltValueField(wireName: r'subject') - String get subject; - - LogoutRequest._(); - - static void _initializeBuilder(LogoutRequestBuilder b) => b; - - factory LogoutRequest([void updates(LogoutRequestBuilder b)]) = _$LogoutRequest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$LogoutRequestSerializer(); -} - -class _$LogoutRequestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [LogoutRequest, _$LogoutRequest]; - @override - final String wireName = r'LogoutRequest'; - - @override - Iterable serialize(Serializers serializers, LogoutRequest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.challenge != null) { - result - ..add(r'challenge') - ..add(serializers.serialize(object.challenge, - specifiedType: const FullType(String))); - } - if (object.client != null) { - result - ..add(r'client') - ..add(serializers.serialize(object.client, - specifiedType: const FullType(OAuth2Client))); - } - if (object.requestUrl != null) { - result - ..add(r'request_url') - ..add(serializers.serialize(object.requestUrl, - specifiedType: const FullType(String))); - } - if (object.rpInitiated != null) { - result - ..add(r'rp_initiated') - ..add(serializers.serialize(object.rpInitiated, - specifiedType: const FullType(bool))); - } - if (object.sid != null) { - result - ..add(r'sid') - ..add(serializers.serialize(object.sid, - specifiedType: const FullType(String))); - } - if (object.subject != null) { - result - ..add(r'subject') - ..add(serializers.serialize(object.subject, - specifiedType: const FullType(String))); - } - return result; - } - - @override - LogoutRequest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = LogoutRequestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'challenge': - result.challenge = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'client': - result.client.replace(serializers.deserialize(value, - specifiedType: const FullType(OAuth2Client)) as OAuth2Client); - break; - case r'request_url': - result.requestUrl = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'rp_initiated': - result.rpInitiated = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'sid': - result.sid = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'subject': - result.subject = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/o_auth2_client.dart b/clients/hydra/dart/lib/model/o_auth2_client.dart deleted file mode 100644 index 272660d355c..00000000000 --- a/clients/hydra/dart/lib/model/o_auth2_client.dart +++ /dev/null @@ -1,572 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'o_auth2_client.g.dart'; - -abstract class OAuth2Client implements Built { - - @nullable - @BuiltValueField(wireName: r'allowed_cors_origins') - BuiltList get allowedCorsOrigins; - - @nullable - @BuiltValueField(wireName: r'audience') - BuiltList get audience; - - /// 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. - @nullable - @BuiltValueField(wireName: r'backchannel_logout_session_required') - bool get backchannelLogoutSessionRequired; - - /// RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. - @nullable - @BuiltValueField(wireName: r'backchannel_logout_uri') - String get backchannelLogoutUri; - - /// ID is the id for this client. - @nullable - @BuiltValueField(wireName: r'client_id') - String get clientId; - - /// Name is the human-readable string name of the client to be presented to the end-user during authorization. - @nullable - @BuiltValueField(wireName: r'client_name') - String get clientName; - - /// Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. - @nullable - @BuiltValueField(wireName: r'client_secret') - String get clientSecret; - - /// SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. - @nullable - @BuiltValueField(wireName: r'client_secret_expires_at') - int get clientSecretExpiresAt; - - /// ClientURI is an 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. - @nullable - @BuiltValueField(wireName: r'client_uri') - String get clientUri; - - @nullable - @BuiltValueField(wireName: r'contacts') - BuiltList get contacts; - - /// CreatedAt returns the timestamp of the client's creation. - @nullable - @BuiltValueField(wireName: r'created_at') - DateTime get createdAt; - - /// 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. - @nullable - @BuiltValueField(wireName: r'frontchannel_logout_session_required') - bool get frontchannelLogoutSessionRequired; - - /// 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. - @nullable - @BuiltValueField(wireName: r'frontchannel_logout_uri') - String get frontchannelLogoutUri; - - @nullable - @BuiltValueField(wireName: r'grant_types') - BuiltList get grantTypes; - - @nullable - @BuiltValueField(wireName: r'jwks') - JsonObject get jwks; - - /// 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. - @nullable - @BuiltValueField(wireName: r'jwks_uri') - String get jwksUri; - - /// LogoURI is an URL string that references a logo for the client. - @nullable - @BuiltValueField(wireName: r'logo_uri') - String get logoUri; - - @nullable - @BuiltValueField(wireName: r'metadata') - JsonObject get metadata; - - /// Owner is a string identifying the owner of the OAuth 2.0 Client. - @nullable - @BuiltValueField(wireName: r'owner') - String get owner; - - /// 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. - @nullable - @BuiltValueField(wireName: r'policy_uri') - String get policyUri; - - @nullable - @BuiltValueField(wireName: r'post_logout_redirect_uris') - BuiltList get postLogoutRedirectUris; - - @nullable - @BuiltValueField(wireName: r'redirect_uris') - BuiltList get redirectUris; - - /// RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. - @nullable - @BuiltValueField(wireName: r'registration_access_token') - String get registrationAccessToken; - - /// RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. - @nullable - @BuiltValueField(wireName: r'registration_client_uri') - String get registrationClientUri; - - /// 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. - @nullable - @BuiltValueField(wireName: r'request_object_signing_alg') - String get requestObjectSigningAlg; - - @nullable - @BuiltValueField(wireName: r'request_uris') - BuiltList get requestUris; - - @nullable - @BuiltValueField(wireName: r'response_types') - BuiltList get responseTypes; - - /// 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. - @nullable - @BuiltValueField(wireName: r'scope') - String get scope; - - /// 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. - @nullable - @BuiltValueField(wireName: r'sector_identifier_uri') - String get sectorIdentifierUri; - - /// SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. - @nullable - @BuiltValueField(wireName: r'subject_type') - String get subjectType; - - /// Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. - @nullable - @BuiltValueField(wireName: r'token_endpoint_auth_method') - String get tokenEndpointAuthMethod; - - /// Requested Client Authentication signing algorithm for the Token Endpoint. - @nullable - @BuiltValueField(wireName: r'token_endpoint_auth_signing_alg') - String get tokenEndpointAuthSigningAlg; - - /// TermsOfServiceURI is a URL string that points 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. - @nullable - @BuiltValueField(wireName: r'tos_uri') - String get tosUri; - - /// UpdatedAt returns the timestamp of the last update. - @nullable - @BuiltValueField(wireName: r'updated_at') - DateTime get updatedAt; - - /// 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. - @nullable - @BuiltValueField(wireName: r'userinfo_signed_response_alg') - String get userinfoSignedResponseAlg; - - OAuth2Client._(); - - static void _initializeBuilder(OAuth2ClientBuilder b) => b; - - factory OAuth2Client([void updates(OAuth2ClientBuilder b)]) = _$OAuth2Client; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OAuth2ClientSerializer(); -} - -class _$OAuth2ClientSerializer implements StructuredSerializer { - - @override - final Iterable types = const [OAuth2Client, _$OAuth2Client]; - @override - final String wireName = r'OAuth2Client'; - - @override - Iterable serialize(Serializers serializers, OAuth2Client object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.allowedCorsOrigins != null) { - result - ..add(r'allowed_cors_origins') - ..add(serializers.serialize(object.allowedCorsOrigins, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.audience != null) { - result - ..add(r'audience') - ..add(serializers.serialize(object.audience, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.backchannelLogoutSessionRequired != null) { - result - ..add(r'backchannel_logout_session_required') - ..add(serializers.serialize(object.backchannelLogoutSessionRequired, - specifiedType: const FullType(bool))); - } - if (object.backchannelLogoutUri != null) { - result - ..add(r'backchannel_logout_uri') - ..add(serializers.serialize(object.backchannelLogoutUri, - specifiedType: const FullType(String))); - } - if (object.clientId != null) { - result - ..add(r'client_id') - ..add(serializers.serialize(object.clientId, - specifiedType: const FullType(String))); - } - if (object.clientName != null) { - result - ..add(r'client_name') - ..add(serializers.serialize(object.clientName, - specifiedType: const FullType(String))); - } - if (object.clientSecret != null) { - result - ..add(r'client_secret') - ..add(serializers.serialize(object.clientSecret, - specifiedType: const FullType(String))); - } - if (object.clientSecretExpiresAt != null) { - result - ..add(r'client_secret_expires_at') - ..add(serializers.serialize(object.clientSecretExpiresAt, - specifiedType: const FullType(int))); - } - if (object.clientUri != null) { - result - ..add(r'client_uri') - ..add(serializers.serialize(object.clientUri, - specifiedType: const FullType(String))); - } - if (object.contacts != null) { - result - ..add(r'contacts') - ..add(serializers.serialize(object.contacts, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.createdAt != null) { - result - ..add(r'created_at') - ..add(serializers.serialize(object.createdAt, - specifiedType: const FullType(DateTime))); - } - if (object.frontchannelLogoutSessionRequired != null) { - result - ..add(r'frontchannel_logout_session_required') - ..add(serializers.serialize(object.frontchannelLogoutSessionRequired, - specifiedType: const FullType(bool))); - } - if (object.frontchannelLogoutUri != null) { - result - ..add(r'frontchannel_logout_uri') - ..add(serializers.serialize(object.frontchannelLogoutUri, - specifiedType: const FullType(String))); - } - if (object.grantTypes != null) { - result - ..add(r'grant_types') - ..add(serializers.serialize(object.grantTypes, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.jwks != null) { - result - ..add(r'jwks') - ..add(serializers.serialize(object.jwks, - specifiedType: const FullType(JsonObject))); - } - if (object.jwksUri != null) { - result - ..add(r'jwks_uri') - ..add(serializers.serialize(object.jwksUri, - specifiedType: const FullType(String))); - } - if (object.logoUri != null) { - result - ..add(r'logo_uri') - ..add(serializers.serialize(object.logoUri, - specifiedType: const FullType(String))); - } - if (object.metadata != null) { - result - ..add(r'metadata') - ..add(serializers.serialize(object.metadata, - specifiedType: const FullType(JsonObject))); - } - if (object.owner != null) { - result - ..add(r'owner') - ..add(serializers.serialize(object.owner, - specifiedType: const FullType(String))); - } - if (object.policyUri != null) { - result - ..add(r'policy_uri') - ..add(serializers.serialize(object.policyUri, - specifiedType: const FullType(String))); - } - if (object.postLogoutRedirectUris != null) { - result - ..add(r'post_logout_redirect_uris') - ..add(serializers.serialize(object.postLogoutRedirectUris, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.redirectUris != null) { - result - ..add(r'redirect_uris') - ..add(serializers.serialize(object.redirectUris, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.registrationAccessToken != null) { - result - ..add(r'registration_access_token') - ..add(serializers.serialize(object.registrationAccessToken, - specifiedType: const FullType(String))); - } - if (object.registrationClientUri != null) { - result - ..add(r'registration_client_uri') - ..add(serializers.serialize(object.registrationClientUri, - specifiedType: const FullType(String))); - } - if (object.requestObjectSigningAlg != null) { - result - ..add(r'request_object_signing_alg') - ..add(serializers.serialize(object.requestObjectSigningAlg, - specifiedType: const FullType(String))); - } - if (object.requestUris != null) { - result - ..add(r'request_uris') - ..add(serializers.serialize(object.requestUris, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.responseTypes != null) { - result - ..add(r'response_types') - ..add(serializers.serialize(object.responseTypes, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.scope != null) { - result - ..add(r'scope') - ..add(serializers.serialize(object.scope, - specifiedType: const FullType(String))); - } - if (object.sectorIdentifierUri != null) { - result - ..add(r'sector_identifier_uri') - ..add(serializers.serialize(object.sectorIdentifierUri, - specifiedType: const FullType(String))); - } - if (object.subjectType != null) { - result - ..add(r'subject_type') - ..add(serializers.serialize(object.subjectType, - specifiedType: const FullType(String))); - } - if (object.tokenEndpointAuthMethod != null) { - result - ..add(r'token_endpoint_auth_method') - ..add(serializers.serialize(object.tokenEndpointAuthMethod, - specifiedType: const FullType(String))); - } - if (object.tokenEndpointAuthSigningAlg != null) { - result - ..add(r'token_endpoint_auth_signing_alg') - ..add(serializers.serialize(object.tokenEndpointAuthSigningAlg, - specifiedType: const FullType(String))); - } - if (object.tosUri != null) { - result - ..add(r'tos_uri') - ..add(serializers.serialize(object.tosUri, - specifiedType: const FullType(String))); - } - if (object.updatedAt != null) { - result - ..add(r'updated_at') - ..add(serializers.serialize(object.updatedAt, - specifiedType: const FullType(DateTime))); - } - if (object.userinfoSignedResponseAlg != null) { - result - ..add(r'userinfo_signed_response_alg') - ..add(serializers.serialize(object.userinfoSignedResponseAlg, - specifiedType: const FullType(String))); - } - return result; - } - - @override - OAuth2Client deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OAuth2ClientBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'allowed_cors_origins': - result.allowedCorsOrigins.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'audience': - result.audience.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'backchannel_logout_session_required': - result.backchannelLogoutSessionRequired = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'backchannel_logout_uri': - result.backchannelLogoutUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'client_id': - result.clientId = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'client_name': - result.clientName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'client_secret': - result.clientSecret = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'client_secret_expires_at': - result.clientSecretExpiresAt = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'client_uri': - result.clientUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'contacts': - result.contacts.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'created_at': - result.createdAt = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'frontchannel_logout_session_required': - result.frontchannelLogoutSessionRequired = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'frontchannel_logout_uri': - result.frontchannelLogoutUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'grant_types': - result.grantTypes.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'jwks': - result.jwks = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - case r'jwks_uri': - result.jwksUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'logo_uri': - result.logoUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'metadata': - result.metadata = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - case r'owner': - result.owner = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'policy_uri': - result.policyUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'post_logout_redirect_uris': - result.postLogoutRedirectUris.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'redirect_uris': - result.redirectUris.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'registration_access_token': - result.registrationAccessToken = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'registration_client_uri': - result.registrationClientUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'request_object_signing_alg': - result.requestObjectSigningAlg = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'request_uris': - result.requestUris.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'response_types': - result.responseTypes.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'scope': - result.scope = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'sector_identifier_uri': - result.sectorIdentifierUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'subject_type': - result.subjectType = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'token_endpoint_auth_method': - result.tokenEndpointAuthMethod = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'token_endpoint_auth_signing_alg': - result.tokenEndpointAuthSigningAlg = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'tos_uri': - result.tosUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'updated_at': - result.updatedAt = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'userinfo_signed_response_alg': - result.userinfoSignedResponseAlg = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/o_auth2_token_introspection.dart b/clients/hydra/dart/lib/model/o_auth2_token_introspection.dart deleted file mode 100644 index eb853354578..00000000000 --- a/clients/hydra/dart/lib/model/o_auth2_token_introspection.dart +++ /dev/null @@ -1,264 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'o_auth2_token_introspection.g.dart'; - -abstract class OAuth2TokenIntrospection implements Built { - - /// 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). - @BuiltValueField(wireName: r'active') - bool get active; - - /// Audience contains a list of the token's intended audiences. - @nullable - @BuiltValueField(wireName: r'aud') - BuiltList get aud; - - /// ID is aclient identifier for the OAuth 2.0 client that requested this token. - @nullable - @BuiltValueField(wireName: r'client_id') - String get clientId; - - /// Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. - @nullable - @BuiltValueField(wireName: r'exp') - int get exp; - - /// Extra is arbitrary data set by the session. - @nullable - @BuiltValueField(wireName: r'ext') - JsonObject get ext; - - /// Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued. - @nullable - @BuiltValueField(wireName: r'iat') - int get iat; - - /// IssuerURL is a string representing the issuer of this token - @nullable - @BuiltValueField(wireName: r'iss') - String get iss; - - /// 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. - @nullable - @BuiltValueField(wireName: r'nbf') - int get nbf; - - /// 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. - @nullable - @BuiltValueField(wireName: r'obfuscated_subject') - String get obfuscatedSubject; - - /// Scope is a JSON string containing a space-separated list of scopes associated with this token. - @nullable - @BuiltValueField(wireName: r'scope') - String get scope; - - /// Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. - @nullable - @BuiltValueField(wireName: r'sub') - String get sub; - - /// TokenType is the introspected token's type, typically `Bearer`. - @nullable - @BuiltValueField(wireName: r'token_type') - String get tokenType; - - /// TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. - @nullable - @BuiltValueField(wireName: r'token_use') - String get tokenUse; - - /// Username is a human-readable identifier for the resource owner who authorized this token. - @nullable - @BuiltValueField(wireName: r'username') - String get username; - - OAuth2TokenIntrospection._(); - - static void _initializeBuilder(OAuth2TokenIntrospectionBuilder b) => b; - - factory OAuth2TokenIntrospection([void updates(OAuth2TokenIntrospectionBuilder b)]) = _$OAuth2TokenIntrospection; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OAuth2TokenIntrospectionSerializer(); -} - -class _$OAuth2TokenIntrospectionSerializer implements StructuredSerializer { - - @override - final Iterable types = const [OAuth2TokenIntrospection, _$OAuth2TokenIntrospection]; - @override - final String wireName = r'OAuth2TokenIntrospection'; - - @override - Iterable serialize(Serializers serializers, OAuth2TokenIntrospection object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'active') - ..add(serializers.serialize(object.active, - specifiedType: const FullType(bool))); - if (object.aud != null) { - result - ..add(r'aud') - ..add(serializers.serialize(object.aud, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.clientId != null) { - result - ..add(r'client_id') - ..add(serializers.serialize(object.clientId, - specifiedType: const FullType(String))); - } - if (object.exp != null) { - result - ..add(r'exp') - ..add(serializers.serialize(object.exp, - specifiedType: const FullType(int))); - } - if (object.ext != null) { - result - ..add(r'ext') - ..add(serializers.serialize(object.ext, - specifiedType: const FullType(JsonObject))); - } - if (object.iat != null) { - result - ..add(r'iat') - ..add(serializers.serialize(object.iat, - specifiedType: const FullType(int))); - } - if (object.iss != null) { - result - ..add(r'iss') - ..add(serializers.serialize(object.iss, - specifiedType: const FullType(String))); - } - if (object.nbf != null) { - result - ..add(r'nbf') - ..add(serializers.serialize(object.nbf, - specifiedType: const FullType(int))); - } - if (object.obfuscatedSubject != null) { - result - ..add(r'obfuscated_subject') - ..add(serializers.serialize(object.obfuscatedSubject, - specifiedType: const FullType(String))); - } - if (object.scope != null) { - result - ..add(r'scope') - ..add(serializers.serialize(object.scope, - specifiedType: const FullType(String))); - } - if (object.sub != null) { - result - ..add(r'sub') - ..add(serializers.serialize(object.sub, - specifiedType: const FullType(String))); - } - if (object.tokenType != null) { - result - ..add(r'token_type') - ..add(serializers.serialize(object.tokenType, - specifiedType: const FullType(String))); - } - if (object.tokenUse != null) { - result - ..add(r'token_use') - ..add(serializers.serialize(object.tokenUse, - specifiedType: const FullType(String))); - } - if (object.username != null) { - result - ..add(r'username') - ..add(serializers.serialize(object.username, - specifiedType: const FullType(String))); - } - return result; - } - - @override - OAuth2TokenIntrospection deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OAuth2TokenIntrospectionBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'active': - result.active = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'aud': - result.aud.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'client_id': - result.clientId = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'exp': - result.exp = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'ext': - result.ext = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - case r'iat': - result.iat = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'iss': - result.iss = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'nbf': - result.nbf = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'obfuscated_subject': - result.obfuscatedSubject = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'scope': - result.scope = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'sub': - result.sub = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'token_type': - result.tokenType = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'token_use': - result.tokenUse = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'username': - result.username = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/oauth2_token_response.dart b/clients/hydra/dart/lib/model/oauth2_token_response.dart deleted file mode 100644 index d3fc6a222da..00000000000 --- a/clients/hydra/dart/lib/model/oauth2_token_response.dart +++ /dev/null @@ -1,139 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'oauth2_token_response.g.dart'; - -abstract class Oauth2TokenResponse implements Built { - - @nullable - @BuiltValueField(wireName: r'access_token') - String get accessToken; - - @nullable - @BuiltValueField(wireName: r'expires_in') - int get expiresIn; - - @nullable - @BuiltValueField(wireName: r'id_token') - String get idToken; - - @nullable - @BuiltValueField(wireName: r'refresh_token') - String get refreshToken; - - @nullable - @BuiltValueField(wireName: r'scope') - String get scope; - - @nullable - @BuiltValueField(wireName: r'token_type') - String get tokenType; - - Oauth2TokenResponse._(); - - static void _initializeBuilder(Oauth2TokenResponseBuilder b) => b; - - factory Oauth2TokenResponse([void updates(Oauth2TokenResponseBuilder b)]) = _$Oauth2TokenResponse; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$Oauth2TokenResponseSerializer(); -} - -class _$Oauth2TokenResponseSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Oauth2TokenResponse, _$Oauth2TokenResponse]; - @override - final String wireName = r'Oauth2TokenResponse'; - - @override - Iterable serialize(Serializers serializers, Oauth2TokenResponse object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.accessToken != null) { - result - ..add(r'access_token') - ..add(serializers.serialize(object.accessToken, - specifiedType: const FullType(String))); - } - if (object.expiresIn != null) { - result - ..add(r'expires_in') - ..add(serializers.serialize(object.expiresIn, - specifiedType: const FullType(int))); - } - if (object.idToken != null) { - result - ..add(r'id_token') - ..add(serializers.serialize(object.idToken, - specifiedType: const FullType(String))); - } - if (object.refreshToken != null) { - result - ..add(r'refresh_token') - ..add(serializers.serialize(object.refreshToken, - specifiedType: const FullType(String))); - } - if (object.scope != null) { - result - ..add(r'scope') - ..add(serializers.serialize(object.scope, - specifiedType: const FullType(String))); - } - if (object.tokenType != null) { - result - ..add(r'token_type') - ..add(serializers.serialize(object.tokenType, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Oauth2TokenResponse deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = Oauth2TokenResponseBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'access_token': - result.accessToken = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'expires_in': - result.expiresIn = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'id_token': - result.idToken = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'refresh_token': - result.refreshToken = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'scope': - result.scope = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'token_type': - result.tokenType = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/open_id_connect_context.dart b/clients/hydra/dart/lib/model/open_id_connect_context.dart deleted file mode 100644 index 6dd8e1df4a1..00000000000 --- a/clients/hydra/dart/lib/model/open_id_connect_context.dart +++ /dev/null @@ -1,132 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'open_id_connect_context.g.dart'; - -abstract class OpenIDConnectContext implements Built { - - /// 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. - @nullable - @BuiltValueField(wireName: r'acr_values') - BuiltList get acrValues; - - /// 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. - @nullable - @BuiltValueField(wireName: r'display') - String get display; - - /// 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. - @nullable - @BuiltValueField(wireName: r'id_token_hint_claims') - JsonObject get idTokenHintClaims; - - /// 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. - @nullable - @BuiltValueField(wireName: r'login_hint') - String get loginHint; - - /// 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. - @nullable - @BuiltValueField(wireName: r'ui_locales') - BuiltList get uiLocales; - - OpenIDConnectContext._(); - - static void _initializeBuilder(OpenIDConnectContextBuilder b) => b; - - factory OpenIDConnectContext([void updates(OpenIDConnectContextBuilder b)]) = _$OpenIDConnectContext; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OpenIDConnectContextSerializer(); -} - -class _$OpenIDConnectContextSerializer implements StructuredSerializer { - - @override - final Iterable types = const [OpenIDConnectContext, _$OpenIDConnectContext]; - @override - final String wireName = r'OpenIDConnectContext'; - - @override - Iterable serialize(Serializers serializers, OpenIDConnectContext object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.acrValues != null) { - result - ..add(r'acr_values') - ..add(serializers.serialize(object.acrValues, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.display != null) { - result - ..add(r'display') - ..add(serializers.serialize(object.display, - specifiedType: const FullType(String))); - } - if (object.idTokenHintClaims != null) { - result - ..add(r'id_token_hint_claims') - ..add(serializers.serialize(object.idTokenHintClaims, - specifiedType: const FullType(JsonObject))); - } - if (object.loginHint != null) { - result - ..add(r'login_hint') - ..add(serializers.serialize(object.loginHint, - specifiedType: const FullType(String))); - } - if (object.uiLocales != null) { - result - ..add(r'ui_locales') - ..add(serializers.serialize(object.uiLocales, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - return result; - } - - @override - OpenIDConnectContext deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = OpenIDConnectContextBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'acr_values': - result.acrValues.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'display': - result.display = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'id_token_hint_claims': - result.idTokenHintClaims = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - case r'login_hint': - result.loginHint = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'ui_locales': - result.uiLocales.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/patch_document.dart b/clients/hydra/dart/lib/model/patch_document.dart deleted file mode 100644 index bc690140691..00000000000 --- a/clients/hydra/dart/lib/model/patch_document.dart +++ /dev/null @@ -1,110 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'patch_document.g.dart'; - -abstract class PatchDocument implements Built { - - /// A JSON-pointer - @nullable - @BuiltValueField(wireName: r'from') - String get from; - - /// The operation to be performed - @BuiltValueField(wireName: r'op') - String get op; - - /// A JSON-pointer - @BuiltValueField(wireName: r'path') - String get path; - - /// The value to be used within the operations - @nullable - @BuiltValueField(wireName: r'value') - JsonObject get value; - - PatchDocument._(); - - static void _initializeBuilder(PatchDocumentBuilder b) => b; - - factory PatchDocument([void updates(PatchDocumentBuilder b)]) = _$PatchDocument; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PatchDocumentSerializer(); -} - -class _$PatchDocumentSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PatchDocument, _$PatchDocument]; - @override - final String wireName = r'PatchDocument'; - - @override - Iterable serialize(Serializers serializers, PatchDocument object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.from != null) { - result - ..add(r'from') - ..add(serializers.serialize(object.from, - specifiedType: const FullType(String))); - } - result - ..add(r'op') - ..add(serializers.serialize(object.op, - specifiedType: const FullType(String))); - result - ..add(r'path') - ..add(serializers.serialize(object.path, - specifiedType: const FullType(String))); - if (object.value != null) { - result - ..add(r'value') - ..add(serializers.serialize(object.value, - specifiedType: const FullType(JsonObject))); - } - return result; - } - - @override - PatchDocument deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PatchDocumentBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'from': - result.from = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'op': - result.op = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'path': - result.path = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'value': - result.value = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_config.dart b/clients/hydra/dart/lib/model/plugin_config.dart deleted file mode 100644 index 0d004efb2f2..00000000000 --- a/clients/hydra/dart/lib/model/plugin_config.dart +++ /dev/null @@ -1,259 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_env.dart'; -import 'package:ory_hydra_client/model/plugin_config_args.dart'; -import 'package:ory_hydra_client/model/plugin_config_network.dart'; -import 'package:ory_hydra_client/model/plugin_config_user.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/plugin_config_linux.dart'; -import 'package:ory_hydra_client/model/plugin_mount.dart'; -import 'package:ory_hydra_client/model/plugin_config_interface.dart'; -import 'package:ory_hydra_client/model/plugin_config_rootfs.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_config.g.dart'; - -abstract class PluginConfig implements Built { - - @BuiltValueField(wireName: r'Args') - PluginConfigArgs get args; - - /// description - @BuiltValueField(wireName: r'Description') - String get description; - - /// Docker Version used to create the plugin - @nullable - @BuiltValueField(wireName: r'DockerVersion') - String get dockerVersion; - - /// documentation - @BuiltValueField(wireName: r'Documentation') - String get documentation; - - /// entrypoint - @BuiltValueField(wireName: r'Entrypoint') - BuiltList get entrypoint; - - /// env - @BuiltValueField(wireName: r'Env') - BuiltList get env; - - @BuiltValueField(wireName: r'Interface') - PluginConfigInterface get interface_; - - /// ipc host - @BuiltValueField(wireName: r'IpcHost') - bool get ipcHost; - - @BuiltValueField(wireName: r'Linux') - PluginConfigLinux get linux; - - /// mounts - @BuiltValueField(wireName: r'Mounts') - BuiltList get mounts; - - @BuiltValueField(wireName: r'Network') - PluginConfigNetwork get network; - - /// pid host - @BuiltValueField(wireName: r'PidHost') - bool get pidHost; - - /// propagated mount - @BuiltValueField(wireName: r'PropagatedMount') - String get propagatedMount; - - @nullable - @BuiltValueField(wireName: r'User') - PluginConfigUser get user; - - /// work dir - @BuiltValueField(wireName: r'WorkDir') - String get workDir; - - @nullable - @BuiltValueField(wireName: r'rootfs') - PluginConfigRootfs get rootfs; - - PluginConfig._(); - - static void _initializeBuilder(PluginConfigBuilder b) => b; - - factory PluginConfig([void updates(PluginConfigBuilder b)]) = _$PluginConfig; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginConfigSerializer(); -} - -class _$PluginConfigSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginConfig, _$PluginConfig]; - @override - final String wireName = r'PluginConfig'; - - @override - Iterable serialize(Serializers serializers, PluginConfig object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'Args') - ..add(serializers.serialize(object.args, - specifiedType: const FullType(PluginConfigArgs))); - result - ..add(r'Description') - ..add(serializers.serialize(object.description, - specifiedType: const FullType(String))); - if (object.dockerVersion != null) { - result - ..add(r'DockerVersion') - ..add(serializers.serialize(object.dockerVersion, - specifiedType: const FullType(String))); - } - result - ..add(r'Documentation') - ..add(serializers.serialize(object.documentation, - specifiedType: const FullType(String))); - result - ..add(r'Entrypoint') - ..add(serializers.serialize(object.entrypoint, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'Env') - ..add(serializers.serialize(object.env, - specifiedType: const FullType(BuiltList, [FullType(PluginEnv)]))); - result - ..add(r'Interface') - ..add(serializers.serialize(object.interface_, - specifiedType: const FullType(PluginConfigInterface))); - result - ..add(r'IpcHost') - ..add(serializers.serialize(object.ipcHost, - specifiedType: const FullType(bool))); - result - ..add(r'Linux') - ..add(serializers.serialize(object.linux, - specifiedType: const FullType(PluginConfigLinux))); - result - ..add(r'Mounts') - ..add(serializers.serialize(object.mounts, - specifiedType: const FullType(BuiltList, [FullType(PluginMount)]))); - result - ..add(r'Network') - ..add(serializers.serialize(object.network, - specifiedType: const FullType(PluginConfigNetwork))); - result - ..add(r'PidHost') - ..add(serializers.serialize(object.pidHost, - specifiedType: const FullType(bool))); - result - ..add(r'PropagatedMount') - ..add(serializers.serialize(object.propagatedMount, - specifiedType: const FullType(String))); - if (object.user != null) { - result - ..add(r'User') - ..add(serializers.serialize(object.user, - specifiedType: const FullType(PluginConfigUser))); - } - result - ..add(r'WorkDir') - ..add(serializers.serialize(object.workDir, - specifiedType: const FullType(String))); - if (object.rootfs != null) { - result - ..add(r'rootfs') - ..add(serializers.serialize(object.rootfs, - specifiedType: const FullType(PluginConfigRootfs))); - } - return result; - } - - @override - PluginConfig deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginConfigBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'Args': - result.args.replace(serializers.deserialize(value, - specifiedType: const FullType(PluginConfigArgs)) as PluginConfigArgs); - break; - case r'Description': - result.description = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'DockerVersion': - result.dockerVersion = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Documentation': - result.documentation = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Entrypoint': - result.entrypoint.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'Env': - result.env.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(PluginEnv)])) as BuiltList); - break; - case r'Interface': - result.interface_.replace(serializers.deserialize(value, - specifiedType: const FullType(PluginConfigInterface)) as PluginConfigInterface); - break; - case r'IpcHost': - result.ipcHost = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'Linux': - result.linux.replace(serializers.deserialize(value, - specifiedType: const FullType(PluginConfigLinux)) as PluginConfigLinux); - break; - case r'Mounts': - result.mounts.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(PluginMount)])) as BuiltList); - break; - case r'Network': - result.network.replace(serializers.deserialize(value, - specifiedType: const FullType(PluginConfigNetwork)) as PluginConfigNetwork); - break; - case r'PidHost': - result.pidHost = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'PropagatedMount': - result.propagatedMount = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'User': - result.user.replace(serializers.deserialize(value, - specifiedType: const FullType(PluginConfigUser)) as PluginConfigUser); - break; - case r'WorkDir': - result.workDir = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'rootfs': - result.rootfs.replace(serializers.deserialize(value, - specifiedType: const FullType(PluginConfigRootfs)) as PluginConfigRootfs); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_config_args.dart b/clients/hydra/dart/lib/model/plugin_config_args.dart deleted file mode 100644 index 3a6754b4bfc..00000000000 --- a/clients/hydra/dart/lib/model/plugin_config_args.dart +++ /dev/null @@ -1,104 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_config_args.g.dart'; - -abstract class PluginConfigArgs implements Built { - - /// description - @BuiltValueField(wireName: r'Description') - String get description; - - /// name - @BuiltValueField(wireName: r'Name') - String get name; - - /// settable - @BuiltValueField(wireName: r'Settable') - BuiltList get settable; - - /// value - @BuiltValueField(wireName: r'Value') - BuiltList get value; - - PluginConfigArgs._(); - - static void _initializeBuilder(PluginConfigArgsBuilder b) => b; - - factory PluginConfigArgs([void updates(PluginConfigArgsBuilder b)]) = _$PluginConfigArgs; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginConfigArgsSerializer(); -} - -class _$PluginConfigArgsSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginConfigArgs, _$PluginConfigArgs]; - @override - final String wireName = r'PluginConfigArgs'; - - @override - Iterable serialize(Serializers serializers, PluginConfigArgs object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'Description') - ..add(serializers.serialize(object.description, - specifiedType: const FullType(String))); - result - ..add(r'Name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - result - ..add(r'Settable') - ..add(serializers.serialize(object.settable, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'Value') - ..add(serializers.serialize(object.value, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - return result; - } - - @override - PluginConfigArgs deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginConfigArgsBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'Description': - result.description = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Settable': - result.settable.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'Value': - result.value.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_config_interface.dart b/clients/hydra/dart/lib/model/plugin_config_interface.dart deleted file mode 100644 index 9621ac18314..00000000000 --- a/clients/hydra/dart/lib/model/plugin_config_interface.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_interface_type.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_config_interface.g.dart'; - -abstract class PluginConfigInterface implements Built { - - /// Protocol to use for clients connecting to the plugin. - @nullable - @BuiltValueField(wireName: r'ProtocolScheme') - String get protocolScheme; - - /// socket - @BuiltValueField(wireName: r'Socket') - String get socket; - - /// types - @BuiltValueField(wireName: r'Types') - BuiltList get types; - - PluginConfigInterface._(); - - static void _initializeBuilder(PluginConfigInterfaceBuilder b) => b; - - factory PluginConfigInterface([void updates(PluginConfigInterfaceBuilder b)]) = _$PluginConfigInterface; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginConfigInterfaceSerializer(); -} - -class _$PluginConfigInterfaceSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginConfigInterface, _$PluginConfigInterface]; - @override - final String wireName = r'PluginConfigInterface'; - - @override - Iterable serialize(Serializers serializers, PluginConfigInterface object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.protocolScheme != null) { - result - ..add(r'ProtocolScheme') - ..add(serializers.serialize(object.protocolScheme, - specifiedType: const FullType(String))); - } - result - ..add(r'Socket') - ..add(serializers.serialize(object.socket, - specifiedType: const FullType(String))); - result - ..add(r'Types') - ..add(serializers.serialize(object.types, - specifiedType: const FullType(BuiltList, [FullType(PluginInterfaceType)]))); - return result; - } - - @override - PluginConfigInterface deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginConfigInterfaceBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'ProtocolScheme': - result.protocolScheme = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Socket': - result.socket = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Types': - result.types.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(PluginInterfaceType)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_config_linux.dart b/clients/hydra/dart/lib/model/plugin_config_linux.dart deleted file mode 100644 index b54e675b312..00000000000 --- a/clients/hydra/dart/lib/model/plugin_config_linux.dart +++ /dev/null @@ -1,93 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/plugin_device.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_config_linux.g.dart'; - -abstract class PluginConfigLinux implements Built { - - /// allow all devices - @BuiltValueField(wireName: r'AllowAllDevices') - bool get allowAllDevices; - - /// capabilities - @BuiltValueField(wireName: r'Capabilities') - BuiltList get capabilities; - - /// devices - @BuiltValueField(wireName: r'Devices') - BuiltList get devices; - - PluginConfigLinux._(); - - static void _initializeBuilder(PluginConfigLinuxBuilder b) => b; - - factory PluginConfigLinux([void updates(PluginConfigLinuxBuilder b)]) = _$PluginConfigLinux; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginConfigLinuxSerializer(); -} - -class _$PluginConfigLinuxSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginConfigLinux, _$PluginConfigLinux]; - @override - final String wireName = r'PluginConfigLinux'; - - @override - Iterable serialize(Serializers serializers, PluginConfigLinux object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'AllowAllDevices') - ..add(serializers.serialize(object.allowAllDevices, - specifiedType: const FullType(bool))); - result - ..add(r'Capabilities') - ..add(serializers.serialize(object.capabilities, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'Devices') - ..add(serializers.serialize(object.devices, - specifiedType: const FullType(BuiltList, [FullType(PluginDevice)]))); - return result; - } - - @override - PluginConfigLinux deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginConfigLinuxBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'AllowAllDevices': - result.allowAllDevices = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'Capabilities': - result.capabilities.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'Devices': - result.devices.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(PluginDevice)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_config_network.dart b/clients/hydra/dart/lib/model/plugin_config_network.dart deleted file mode 100644 index c4e3a17b050..00000000000 --- a/clients/hydra/dart/lib/model/plugin_config_network.dart +++ /dev/null @@ -1,67 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_config_network.g.dart'; - -abstract class PluginConfigNetwork implements Built { - - /// type - @BuiltValueField(wireName: r'Type') - String get type; - - PluginConfigNetwork._(); - - static void _initializeBuilder(PluginConfigNetworkBuilder b) => b; - - factory PluginConfigNetwork([void updates(PluginConfigNetworkBuilder b)]) = _$PluginConfigNetwork; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginConfigNetworkSerializer(); -} - -class _$PluginConfigNetworkSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginConfigNetwork, _$PluginConfigNetwork]; - @override - final String wireName = r'PluginConfigNetwork'; - - @override - Iterable serialize(Serializers serializers, PluginConfigNetwork object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'Type') - ..add(serializers.serialize(object.type, - specifiedType: const FullType(String))); - return result; - } - - @override - PluginConfigNetwork deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginConfigNetworkBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'Type': - result.type = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_config_rootfs.dart b/clients/hydra/dart/lib/model/plugin_config_rootfs.dart deleted file mode 100644 index c13b960e29d..00000000000 --- a/clients/hydra/dart/lib/model/plugin_config_rootfs.dart +++ /dev/null @@ -1,86 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_config_rootfs.g.dart'; - -abstract class PluginConfigRootfs implements Built { - - /// diff ids - @nullable - @BuiltValueField(wireName: r'diff_ids') - BuiltList get diffIds; - - /// type - @nullable - @BuiltValueField(wireName: r'type') - String get type; - - PluginConfigRootfs._(); - - static void _initializeBuilder(PluginConfigRootfsBuilder b) => b; - - factory PluginConfigRootfs([void updates(PluginConfigRootfsBuilder b)]) = _$PluginConfigRootfs; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginConfigRootfsSerializer(); -} - -class _$PluginConfigRootfsSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginConfigRootfs, _$PluginConfigRootfs]; - @override - final String wireName = r'PluginConfigRootfs'; - - @override - Iterable serialize(Serializers serializers, PluginConfigRootfs object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.diffIds != null) { - result - ..add(r'diff_ids') - ..add(serializers.serialize(object.diffIds, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.type != null) { - result - ..add(r'type') - ..add(serializers.serialize(object.type, - specifiedType: const FullType(String))); - } - return result; - } - - @override - PluginConfigRootfs deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginConfigRootfsBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'diff_ids': - result.diffIds.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'type': - result.type = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_config_user.dart b/clients/hydra/dart/lib/model/plugin_config_user.dart deleted file mode 100644 index 194b0e48a54..00000000000 --- a/clients/hydra/dart/lib/model/plugin_config_user.dart +++ /dev/null @@ -1,85 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_config_user.g.dart'; - -abstract class PluginConfigUser implements Built { - - /// g ID - @nullable - @BuiltValueField(wireName: r'GID') - int get GID; - - /// UID - @nullable - @BuiltValueField(wireName: r'UID') - int get UID; - - PluginConfigUser._(); - - static void _initializeBuilder(PluginConfigUserBuilder b) => b; - - factory PluginConfigUser([void updates(PluginConfigUserBuilder b)]) = _$PluginConfigUser; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginConfigUserSerializer(); -} - -class _$PluginConfigUserSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginConfigUser, _$PluginConfigUser]; - @override - final String wireName = r'PluginConfigUser'; - - @override - Iterable serialize(Serializers serializers, PluginConfigUser object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.GID != null) { - result - ..add(r'GID') - ..add(serializers.serialize(object.GID, - specifiedType: const FullType(int))); - } - if (object.UID != null) { - result - ..add(r'UID') - ..add(serializers.serialize(object.UID, - specifiedType: const FullType(int))); - } - return result; - } - - @override - PluginConfigUser deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginConfigUserBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'GID': - result.GID = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'UID': - result.UID = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_device.dart b/clients/hydra/dart/lib/model/plugin_device.dart deleted file mode 100644 index befc56f2774..00000000000 --- a/clients/hydra/dart/lib/model/plugin_device.dart +++ /dev/null @@ -1,104 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_device.g.dart'; - -abstract class PluginDevice implements Built { - - /// description - @BuiltValueField(wireName: r'Description') - String get description; - - /// name - @BuiltValueField(wireName: r'Name') - String get name; - - /// path - @BuiltValueField(wireName: r'Path') - String get path; - - /// settable - @BuiltValueField(wireName: r'Settable') - BuiltList get settable; - - PluginDevice._(); - - static void _initializeBuilder(PluginDeviceBuilder b) => b; - - factory PluginDevice([void updates(PluginDeviceBuilder b)]) = _$PluginDevice; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginDeviceSerializer(); -} - -class _$PluginDeviceSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginDevice, _$PluginDevice]; - @override - final String wireName = r'PluginDevice'; - - @override - Iterable serialize(Serializers serializers, PluginDevice object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'Description') - ..add(serializers.serialize(object.description, - specifiedType: const FullType(String))); - result - ..add(r'Name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - result - ..add(r'Path') - ..add(serializers.serialize(object.path, - specifiedType: const FullType(String))); - result - ..add(r'Settable') - ..add(serializers.serialize(object.settable, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - return result; - } - - @override - PluginDevice deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginDeviceBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'Description': - result.description = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Path': - result.path = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Settable': - result.settable.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_env.dart b/clients/hydra/dart/lib/model/plugin_env.dart deleted file mode 100644 index e0338b319b3..00000000000 --- a/clients/hydra/dart/lib/model/plugin_env.dart +++ /dev/null @@ -1,104 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_env.g.dart'; - -abstract class PluginEnv implements Built { - - /// description - @BuiltValueField(wireName: r'Description') - String get description; - - /// name - @BuiltValueField(wireName: r'Name') - String get name; - - /// settable - @BuiltValueField(wireName: r'Settable') - BuiltList get settable; - - /// value - @BuiltValueField(wireName: r'Value') - String get value; - - PluginEnv._(); - - static void _initializeBuilder(PluginEnvBuilder b) => b; - - factory PluginEnv([void updates(PluginEnvBuilder b)]) = _$PluginEnv; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginEnvSerializer(); -} - -class _$PluginEnvSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginEnv, _$PluginEnv]; - @override - final String wireName = r'PluginEnv'; - - @override - Iterable serialize(Serializers serializers, PluginEnv object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'Description') - ..add(serializers.serialize(object.description, - specifiedType: const FullType(String))); - result - ..add(r'Name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - result - ..add(r'Settable') - ..add(serializers.serialize(object.settable, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'Value') - ..add(serializers.serialize(object.value, - specifiedType: const FullType(String))); - return result; - } - - @override - PluginEnv deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginEnvBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'Description': - result.description = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Settable': - result.settable.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'Value': - result.value = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_interface_type.dart b/clients/hydra/dart/lib/model/plugin_interface_type.dart deleted file mode 100644 index 6a82138a50e..00000000000 --- a/clients/hydra/dart/lib/model/plugin_interface_type.dart +++ /dev/null @@ -1,91 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_interface_type.g.dart'; - -abstract class PluginInterfaceType implements Built { - - /// capability - @BuiltValueField(wireName: r'Capability') - String get capability; - - /// prefix - @BuiltValueField(wireName: r'Prefix') - String get prefix; - - /// version - @BuiltValueField(wireName: r'Version') - String get version; - - PluginInterfaceType._(); - - static void _initializeBuilder(PluginInterfaceTypeBuilder b) => b; - - factory PluginInterfaceType([void updates(PluginInterfaceTypeBuilder b)]) = _$PluginInterfaceType; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginInterfaceTypeSerializer(); -} - -class _$PluginInterfaceTypeSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginInterfaceType, _$PluginInterfaceType]; - @override - final String wireName = r'PluginInterfaceType'; - - @override - Iterable serialize(Serializers serializers, PluginInterfaceType object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'Capability') - ..add(serializers.serialize(object.capability, - specifiedType: const FullType(String))); - result - ..add(r'Prefix') - ..add(serializers.serialize(object.prefix, - specifiedType: const FullType(String))); - result - ..add(r'Version') - ..add(serializers.serialize(object.version, - specifiedType: const FullType(String))); - return result; - } - - @override - PluginInterfaceType deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginInterfaceTypeBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'Capability': - result.capability = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Prefix': - result.prefix = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Version': - result.version = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_mount.dart b/clients/hydra/dart/lib/model/plugin_mount.dart deleted file mode 100644 index 6468c91dba0..00000000000 --- a/clients/hydra/dart/lib/model/plugin_mount.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_mount.g.dart'; - -abstract class PluginMount implements Built { - - /// description - @BuiltValueField(wireName: r'Description') - String get description; - - /// destination - @BuiltValueField(wireName: r'Destination') - String get destination; - - /// name - @BuiltValueField(wireName: r'Name') - String get name; - - /// options - @BuiltValueField(wireName: r'Options') - BuiltList get options; - - /// settable - @BuiltValueField(wireName: r'Settable') - BuiltList get settable; - - /// source - @BuiltValueField(wireName: r'Source') - String get source_; - - /// type - @BuiltValueField(wireName: r'Type') - String get type; - - PluginMount._(); - - static void _initializeBuilder(PluginMountBuilder b) => b; - - factory PluginMount([void updates(PluginMountBuilder b)]) = _$PluginMount; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginMountSerializer(); -} - -class _$PluginMountSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginMount, _$PluginMount]; - @override - final String wireName = r'PluginMount'; - - @override - Iterable serialize(Serializers serializers, PluginMount object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'Description') - ..add(serializers.serialize(object.description, - specifiedType: const FullType(String))); - result - ..add(r'Destination') - ..add(serializers.serialize(object.destination, - specifiedType: const FullType(String))); - result - ..add(r'Name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - result - ..add(r'Options') - ..add(serializers.serialize(object.options, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'Settable') - ..add(serializers.serialize(object.settable, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'Source') - ..add(serializers.serialize(object.source_, - specifiedType: const FullType(String))); - result - ..add(r'Type') - ..add(serializers.serialize(object.type, - specifiedType: const FullType(String))); - return result; - } - - @override - PluginMount deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginMountBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'Description': - result.description = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Destination': - result.destination = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Options': - result.options.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'Settable': - result.settable.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'Source': - result.source_ = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Type': - result.type = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/plugin_settings.dart b/clients/hydra/dart/lib/model/plugin_settings.dart deleted file mode 100644 index cec464c8945..00000000000 --- a/clients/hydra/dart/lib/model/plugin_settings.dart +++ /dev/null @@ -1,106 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/plugin_device.dart'; -import 'package:ory_hydra_client/model/plugin_mount.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'plugin_settings.g.dart'; - -abstract class PluginSettings implements Built { - - /// args - @BuiltValueField(wireName: r'Args') - BuiltList get args; - - /// devices - @BuiltValueField(wireName: r'Devices') - BuiltList get devices; - - /// env - @BuiltValueField(wireName: r'Env') - BuiltList get env; - - /// mounts - @BuiltValueField(wireName: r'Mounts') - BuiltList get mounts; - - PluginSettings._(); - - static void _initializeBuilder(PluginSettingsBuilder b) => b; - - factory PluginSettings([void updates(PluginSettingsBuilder b)]) = _$PluginSettings; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PluginSettingsSerializer(); -} - -class _$PluginSettingsSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PluginSettings, _$PluginSettings]; - @override - final String wireName = r'PluginSettings'; - - @override - Iterable serialize(Serializers serializers, PluginSettings object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'Args') - ..add(serializers.serialize(object.args, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'Devices') - ..add(serializers.serialize(object.devices, - specifiedType: const FullType(BuiltList, [FullType(PluginDevice)]))); - result - ..add(r'Env') - ..add(serializers.serialize(object.env, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'Mounts') - ..add(serializers.serialize(object.mounts, - specifiedType: const FullType(BuiltList, [FullType(PluginMount)]))); - return result; - } - - @override - PluginSettings deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PluginSettingsBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'Args': - result.args.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'Devices': - result.devices.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(PluginDevice)])) as BuiltList); - break; - case r'Env': - result.env.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'Mounts': - result.mounts.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(PluginMount)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/previous_consent_session.dart b/clients/hydra/dart/lib/model/previous_consent_session.dart deleted file mode 100644 index eb7f4f079e0..00000000000 --- a/clients/hydra/dart/lib/model/previous_consent_session.dart +++ /dev/null @@ -1,158 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/consent_request.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/consent_request_session.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'previous_consent_session.g.dart'; - -abstract class PreviousConsentSession implements Built { - - @nullable - @BuiltValueField(wireName: r'consent_request') - ConsentRequest get consentRequest; - - @nullable - @BuiltValueField(wireName: r'grant_access_token_audience') - BuiltList get grantAccessTokenAudience; - - @nullable - @BuiltValueField(wireName: r'grant_scope') - BuiltList get grantScope; - - @nullable - @BuiltValueField(wireName: r'handled_at') - DateTime get handledAt; - - /// 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. - @nullable - @BuiltValueField(wireName: r'remember') - bool get remember; - - /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. - @nullable - @BuiltValueField(wireName: r'remember_for') - int get rememberFor; - - @nullable - @BuiltValueField(wireName: r'session') - ConsentRequestSession get session; - - PreviousConsentSession._(); - - static void _initializeBuilder(PreviousConsentSessionBuilder b) => b; - - factory PreviousConsentSession([void updates(PreviousConsentSessionBuilder b)]) = _$PreviousConsentSession; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$PreviousConsentSessionSerializer(); -} - -class _$PreviousConsentSessionSerializer implements StructuredSerializer { - - @override - final Iterable types = const [PreviousConsentSession, _$PreviousConsentSession]; - @override - final String wireName = r'PreviousConsentSession'; - - @override - Iterable serialize(Serializers serializers, PreviousConsentSession object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.consentRequest != null) { - result - ..add(r'consent_request') - ..add(serializers.serialize(object.consentRequest, - specifiedType: const FullType(ConsentRequest))); - } - if (object.grantAccessTokenAudience != null) { - result - ..add(r'grant_access_token_audience') - ..add(serializers.serialize(object.grantAccessTokenAudience, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.grantScope != null) { - result - ..add(r'grant_scope') - ..add(serializers.serialize(object.grantScope, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.handledAt != null) { - result - ..add(r'handled_at') - ..add(serializers.serialize(object.handledAt, - specifiedType: const FullType(DateTime))); - } - if (object.remember != null) { - result - ..add(r'remember') - ..add(serializers.serialize(object.remember, - specifiedType: const FullType(bool))); - } - if (object.rememberFor != null) { - result - ..add(r'remember_for') - ..add(serializers.serialize(object.rememberFor, - specifiedType: const FullType(int))); - } - if (object.session != null) { - result - ..add(r'session') - ..add(serializers.serialize(object.session, - specifiedType: const FullType(ConsentRequestSession))); - } - return result; - } - - @override - PreviousConsentSession deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = PreviousConsentSessionBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'consent_request': - result.consentRequest.replace(serializers.deserialize(value, - specifiedType: const FullType(ConsentRequest)) as ConsentRequest); - break; - case r'grant_access_token_audience': - result.grantAccessTokenAudience.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'grant_scope': - result.grantScope.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'handled_at': - result.handledAt = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'remember': - result.remember = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'remember_for': - result.rememberFor = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'session': - result.session.replace(serializers.deserialize(value, - specifiedType: const FullType(ConsentRequestSession)) as ConsentRequestSession); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/reject_request.dart b/clients/hydra/dart/lib/model/reject_request.dart deleted file mode 100644 index 63dbe5bfd41..00000000000 --- a/clients/hydra/dart/lib/model/reject_request.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'reject_request.g.dart'; - -abstract class RejectRequest implements Built { - - /// The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. - @nullable - @BuiltValueField(wireName: r'error') - String get error; - - /// Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs. - @nullable - @BuiltValueField(wireName: r'error_debug') - String get errorDebug; - - /// Description of the error in a human readable format. - @nullable - @BuiltValueField(wireName: r'error_description') - String get errorDescription; - - /// Hint to help resolve the error. - @nullable - @BuiltValueField(wireName: r'error_hint') - String get errorHint; - - /// Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 - @nullable - @BuiltValueField(wireName: r'status_code') - int get statusCode; - - RejectRequest._(); - - static void _initializeBuilder(RejectRequestBuilder b) => b; - - factory RejectRequest([void updates(RejectRequestBuilder b)]) = _$RejectRequest; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$RejectRequestSerializer(); -} - -class _$RejectRequestSerializer implements StructuredSerializer { - - @override - final Iterable types = const [RejectRequest, _$RejectRequest]; - @override - final String wireName = r'RejectRequest'; - - @override - Iterable serialize(Serializers serializers, RejectRequest object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.error != null) { - result - ..add(r'error') - ..add(serializers.serialize(object.error, - specifiedType: const FullType(String))); - } - if (object.errorDebug != null) { - result - ..add(r'error_debug') - ..add(serializers.serialize(object.errorDebug, - specifiedType: const FullType(String))); - } - if (object.errorDescription != null) { - result - ..add(r'error_description') - ..add(serializers.serialize(object.errorDescription, - specifiedType: const FullType(String))); - } - if (object.errorHint != null) { - result - ..add(r'error_hint') - ..add(serializers.serialize(object.errorHint, - specifiedType: const FullType(String))); - } - if (object.statusCode != null) { - result - ..add(r'status_code') - ..add(serializers.serialize(object.statusCode, - specifiedType: const FullType(int))); - } - return result; - } - - @override - RejectRequest deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = RejectRequestBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'error': - result.error = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'error_debug': - result.errorDebug = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'error_description': - result.errorDescription = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'error_hint': - result.errorHint = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'status_code': - result.statusCode = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/request_was_handled_response.dart b/clients/hydra/dart/lib/model/request_was_handled_response.dart deleted file mode 100644 index 7983d6017de..00000000000 --- a/clients/hydra/dart/lib/model/request_was_handled_response.dart +++ /dev/null @@ -1,67 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'request_was_handled_response.g.dart'; - -abstract class RequestWasHandledResponse implements Built { - - /// Original request URL to which you should redirect the user if request was already handled. - @BuiltValueField(wireName: r'redirect_to') - String get redirectTo; - - RequestWasHandledResponse._(); - - static void _initializeBuilder(RequestWasHandledResponseBuilder b) => b; - - factory RequestWasHandledResponse([void updates(RequestWasHandledResponseBuilder b)]) = _$RequestWasHandledResponse; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$RequestWasHandledResponseSerializer(); -} - -class _$RequestWasHandledResponseSerializer implements StructuredSerializer { - - @override - final Iterable types = const [RequestWasHandledResponse, _$RequestWasHandledResponse]; - @override - final String wireName = r'RequestWasHandledResponse'; - - @override - Iterable serialize(Serializers serializers, RequestWasHandledResponse object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'redirect_to') - ..add(serializers.serialize(object.redirectTo, - specifiedType: const FullType(String))); - return result; - } - - @override - RequestWasHandledResponse deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = RequestWasHandledResponseBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'redirect_to': - result.redirectTo = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/trust_jwt_grant_issuer_body.dart b/clients/hydra/dart/lib/model/trust_jwt_grant_issuer_body.dart deleted file mode 100644 index 9c3be2b2e53..00000000000 --- a/clients/hydra/dart/lib/model/trust_jwt_grant_issuer_body.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/json_web_key.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'trust_jwt_grant_issuer_body.g.dart'; - -abstract class TrustJwtGrantIssuerBody implements Built { - - /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". - @BuiltValueField(wireName: r'expires_at') - DateTime get expiresAt; - - /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). - @BuiltValueField(wireName: r'issuer') - String get issuer; - - @BuiltValueField(wireName: r'jwk') - JSONWebKey get jwk; - - /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) - @BuiltValueField(wireName: r'scope') - BuiltList get scope; - - /// The \"subject\" identifies the principal that is the subject of the JWT. - @BuiltValueField(wireName: r'subject') - String get subject; - - TrustJwtGrantIssuerBody._(); - - static void _initializeBuilder(TrustJwtGrantIssuerBodyBuilder b) => b; - - factory TrustJwtGrantIssuerBody([void updates(TrustJwtGrantIssuerBodyBuilder b)]) = _$TrustJwtGrantIssuerBody; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$TrustJwtGrantIssuerBodySerializer(); -} - -class _$TrustJwtGrantIssuerBodySerializer implements StructuredSerializer { - - @override - final Iterable types = const [TrustJwtGrantIssuerBody, _$TrustJwtGrantIssuerBody]; - @override - final String wireName = r'TrustJwtGrantIssuerBody'; - - @override - Iterable serialize(Serializers serializers, TrustJwtGrantIssuerBody object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'expires_at') - ..add(serializers.serialize(object.expiresAt, - specifiedType: const FullType(DateTime))); - result - ..add(r'issuer') - ..add(serializers.serialize(object.issuer, - specifiedType: const FullType(String))); - result - ..add(r'jwk') - ..add(serializers.serialize(object.jwk, - specifiedType: const FullType(JSONWebKey))); - result - ..add(r'scope') - ..add(serializers.serialize(object.scope, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'subject') - ..add(serializers.serialize(object.subject, - specifiedType: const FullType(String))); - return result; - } - - @override - TrustJwtGrantIssuerBody deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = TrustJwtGrantIssuerBodyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'expires_at': - result.expiresAt = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'issuer': - result.issuer = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'jwk': - result.jwk.replace(serializers.deserialize(value, - specifiedType: const FullType(JSONWebKey)) as JSONWebKey); - break; - case r'scope': - result.scope.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'subject': - result.subject = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/trusted_json_web_key.dart b/clients/hydra/dart/lib/model/trusted_json_web_key.dart deleted file mode 100644 index 4cffce4dd74..00000000000 --- a/clients/hydra/dart/lib/model/trusted_json_web_key.dart +++ /dev/null @@ -1,85 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'trusted_json_web_key.g.dart'; - -abstract class TrustedJsonWebKey implements Built { - - /// The \"key_id\" is key unique identifier (same as kid header in jws/jwt). - @nullable - @BuiltValueField(wireName: r'kid') - String get kid; - - /// The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. - @nullable - @BuiltValueField(wireName: r'set') - String get set_; - - TrustedJsonWebKey._(); - - static void _initializeBuilder(TrustedJsonWebKeyBuilder b) => b; - - factory TrustedJsonWebKey([void updates(TrustedJsonWebKeyBuilder b)]) = _$TrustedJsonWebKey; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$TrustedJsonWebKeySerializer(); -} - -class _$TrustedJsonWebKeySerializer implements StructuredSerializer { - - @override - final Iterable types = const [TrustedJsonWebKey, _$TrustedJsonWebKey]; - @override - final String wireName = r'TrustedJsonWebKey'; - - @override - Iterable serialize(Serializers serializers, TrustedJsonWebKey object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.kid != null) { - result - ..add(r'kid') - ..add(serializers.serialize(object.kid, - specifiedType: const FullType(String))); - } - if (object.set_ != null) { - result - ..add(r'set') - ..add(serializers.serialize(object.set_, - specifiedType: const FullType(String))); - } - return result; - } - - @override - TrustedJsonWebKey deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = TrustedJsonWebKeyBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'kid': - result.kid = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'set': - result.set_ = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/trusted_jwt_grant_issuer.dart b/clients/hydra/dart/lib/model/trusted_jwt_grant_issuer.dart deleted file mode 100644 index 0fe4fef87b1..00000000000 --- a/clients/hydra/dart/lib/model/trusted_jwt_grant_issuer.dart +++ /dev/null @@ -1,160 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/trusted_json_web_key.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'trusted_jwt_grant_issuer.g.dart'; - -abstract class TrustedJwtGrantIssuer implements Built { - - /// The \"created_at\" indicates, when grant was created. - @nullable - @BuiltValueField(wireName: r'created_at') - DateTime get createdAt; - - /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". - @nullable - @BuiltValueField(wireName: r'expires_at') - DateTime get expiresAt; - - @nullable - @BuiltValueField(wireName: r'id') - String get id; - - /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). - @nullable - @BuiltValueField(wireName: r'issuer') - String get issuer; - - @nullable - @BuiltValueField(wireName: r'public_key') - TrustedJsonWebKey get publicKey; - - /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) - @nullable - @BuiltValueField(wireName: r'scope') - BuiltList get scope; - - /// The \"subject\" identifies the principal that is the subject of the JWT. - @nullable - @BuiltValueField(wireName: r'subject') - String get subject; - - TrustedJwtGrantIssuer._(); - - static void _initializeBuilder(TrustedJwtGrantIssuerBuilder b) => b; - - factory TrustedJwtGrantIssuer([void updates(TrustedJwtGrantIssuerBuilder b)]) = _$TrustedJwtGrantIssuer; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$TrustedJwtGrantIssuerSerializer(); -} - -class _$TrustedJwtGrantIssuerSerializer implements StructuredSerializer { - - @override - final Iterable types = const [TrustedJwtGrantIssuer, _$TrustedJwtGrantIssuer]; - @override - final String wireName = r'TrustedJwtGrantIssuer'; - - @override - Iterable serialize(Serializers serializers, TrustedJwtGrantIssuer object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.createdAt != null) { - result - ..add(r'created_at') - ..add(serializers.serialize(object.createdAt, - specifiedType: const FullType(DateTime))); - } - if (object.expiresAt != null) { - result - ..add(r'expires_at') - ..add(serializers.serialize(object.expiresAt, - specifiedType: const FullType(DateTime))); - } - if (object.id != null) { - result - ..add(r'id') - ..add(serializers.serialize(object.id, - specifiedType: const FullType(String))); - } - if (object.issuer != null) { - result - ..add(r'issuer') - ..add(serializers.serialize(object.issuer, - specifiedType: const FullType(String))); - } - if (object.publicKey != null) { - result - ..add(r'public_key') - ..add(serializers.serialize(object.publicKey, - specifiedType: const FullType(TrustedJsonWebKey))); - } - if (object.scope != null) { - result - ..add(r'scope') - ..add(serializers.serialize(object.scope, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.subject != null) { - result - ..add(r'subject') - ..add(serializers.serialize(object.subject, - specifiedType: const FullType(String))); - } - return result; - } - - @override - TrustedJwtGrantIssuer deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = TrustedJwtGrantIssuerBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'created_at': - result.createdAt = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'expires_at': - result.expiresAt = serializers.deserialize(value, - specifiedType: const FullType(DateTime)) as DateTime; - break; - case r'id': - result.id = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'issuer': - result.issuer = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'public_key': - result.publicKey.replace(serializers.deserialize(value, - specifiedType: const FullType(TrustedJsonWebKey)) as TrustedJsonWebKey); - break; - case r'scope': - result.scope.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'subject': - result.subject = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/userinfo_response.dart b/clients/hydra/dart/lib/model/userinfo_response.dart deleted file mode 100644 index aedf169aa62..00000000000 --- a/clients/hydra/dart/lib/model/userinfo_response.dart +++ /dev/null @@ -1,340 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'userinfo_response.g.dart'; - -abstract class UserinfoResponse implements Built { - - /// 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. - @nullable - @BuiltValueField(wireName: r'birthdate') - String get birthdate; - - /// 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. - @nullable - @BuiltValueField(wireName: r'email') - String get email; - - /// 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. - @nullable - @BuiltValueField(wireName: r'email_verified') - bool get emailVerified; - - /// 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. - @nullable - @BuiltValueField(wireName: r'family_name') - String get familyName; - - /// 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. - @nullable - @BuiltValueField(wireName: r'gender') - String get gender; - - /// 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. - @nullable - @BuiltValueField(wireName: r'given_name') - String get givenName; - - /// 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. - @nullable - @BuiltValueField(wireName: r'locale') - String get locale; - - /// 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. - @nullable - @BuiltValueField(wireName: r'middle_name') - String get middleName; - - /// 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. - @nullable - @BuiltValueField(wireName: r'name') - String get name; - - /// 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. - @nullable - @BuiltValueField(wireName: r'nickname') - String get nickname; - - /// 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. - @nullable - @BuiltValueField(wireName: r'phone_number') - String get phoneNumber; - - /// 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. - @nullable - @BuiltValueField(wireName: r'phone_number_verified') - bool get phoneNumberVerified; - - /// 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. - @nullable - @BuiltValueField(wireName: r'picture') - String get picture; - - /// 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. - @nullable - @BuiltValueField(wireName: r'preferred_username') - String get preferredUsername; - - /// URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. - @nullable - @BuiltValueField(wireName: r'profile') - String get profile; - - /// Subject - Identifier for the End-User at the IssuerURL. - @nullable - @BuiltValueField(wireName: r'sub') - String get sub; - - /// 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. - @nullable - @BuiltValueField(wireName: r'updated_at') - int get updatedAt; - - /// 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. - @nullable - @BuiltValueField(wireName: r'website') - String get website; - - /// String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. - @nullable - @BuiltValueField(wireName: r'zoneinfo') - String get zoneinfo; - - UserinfoResponse._(); - - static void _initializeBuilder(UserinfoResponseBuilder b) => b; - - factory UserinfoResponse([void updates(UserinfoResponseBuilder b)]) = _$UserinfoResponse; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$UserinfoResponseSerializer(); -} - -class _$UserinfoResponseSerializer implements StructuredSerializer { - - @override - final Iterable types = const [UserinfoResponse, _$UserinfoResponse]; - @override - final String wireName = r'UserinfoResponse'; - - @override - Iterable serialize(Serializers serializers, UserinfoResponse object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.birthdate != null) { - result - ..add(r'birthdate') - ..add(serializers.serialize(object.birthdate, - specifiedType: const FullType(String))); - } - if (object.email != null) { - result - ..add(r'email') - ..add(serializers.serialize(object.email, - specifiedType: const FullType(String))); - } - if (object.emailVerified != null) { - result - ..add(r'email_verified') - ..add(serializers.serialize(object.emailVerified, - specifiedType: const FullType(bool))); - } - if (object.familyName != null) { - result - ..add(r'family_name') - ..add(serializers.serialize(object.familyName, - specifiedType: const FullType(String))); - } - if (object.gender != null) { - result - ..add(r'gender') - ..add(serializers.serialize(object.gender, - specifiedType: const FullType(String))); - } - if (object.givenName != null) { - result - ..add(r'given_name') - ..add(serializers.serialize(object.givenName, - specifiedType: const FullType(String))); - } - if (object.locale != null) { - result - ..add(r'locale') - ..add(serializers.serialize(object.locale, - specifiedType: const FullType(String))); - } - if (object.middleName != null) { - result - ..add(r'middle_name') - ..add(serializers.serialize(object.middleName, - specifiedType: const FullType(String))); - } - if (object.name != null) { - result - ..add(r'name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - } - if (object.nickname != null) { - result - ..add(r'nickname') - ..add(serializers.serialize(object.nickname, - specifiedType: const FullType(String))); - } - if (object.phoneNumber != null) { - result - ..add(r'phone_number') - ..add(serializers.serialize(object.phoneNumber, - specifiedType: const FullType(String))); - } - if (object.phoneNumberVerified != null) { - result - ..add(r'phone_number_verified') - ..add(serializers.serialize(object.phoneNumberVerified, - specifiedType: const FullType(bool))); - } - if (object.picture != null) { - result - ..add(r'picture') - ..add(serializers.serialize(object.picture, - specifiedType: const FullType(String))); - } - if (object.preferredUsername != null) { - result - ..add(r'preferred_username') - ..add(serializers.serialize(object.preferredUsername, - specifiedType: const FullType(String))); - } - if (object.profile != null) { - result - ..add(r'profile') - ..add(serializers.serialize(object.profile, - specifiedType: const FullType(String))); - } - if (object.sub != null) { - result - ..add(r'sub') - ..add(serializers.serialize(object.sub, - specifiedType: const FullType(String))); - } - if (object.updatedAt != null) { - result - ..add(r'updated_at') - ..add(serializers.serialize(object.updatedAt, - specifiedType: const FullType(int))); - } - if (object.website != null) { - result - ..add(r'website') - ..add(serializers.serialize(object.website, - specifiedType: const FullType(String))); - } - if (object.zoneinfo != null) { - result - ..add(r'zoneinfo') - ..add(serializers.serialize(object.zoneinfo, - specifiedType: const FullType(String))); - } - return result; - } - - @override - UserinfoResponse deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = UserinfoResponseBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'birthdate': - result.birthdate = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'email': - result.email = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'email_verified': - result.emailVerified = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'family_name': - result.familyName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'gender': - result.gender = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'given_name': - result.givenName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'locale': - result.locale = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'middle_name': - result.middleName = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'nickname': - result.nickname = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'phone_number': - result.phoneNumber = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'phone_number_verified': - result.phoneNumberVerified = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'picture': - result.picture = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'preferred_username': - result.preferredUsername = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'profile': - result.profile = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'sub': - result.sub = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'updated_at': - result.updatedAt = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'website': - result.website = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'zoneinfo': - result.zoneinfo = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/version.dart b/clients/hydra/dart/lib/model/version.dart deleted file mode 100644 index aaeebd03549..00000000000 --- a/clients/hydra/dart/lib/model/version.dart +++ /dev/null @@ -1,70 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'version.g.dart'; - -abstract class Version implements Built { - - /// Version is the service's version. - @nullable - @BuiltValueField(wireName: r'version') - String get version; - - Version._(); - - static void _initializeBuilder(VersionBuilder b) => b; - - factory Version([void updates(VersionBuilder b)]) = _$Version; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$VersionSerializer(); -} - -class _$VersionSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Version, _$Version]; - @override - final String wireName = r'Version'; - - @override - Iterable serialize(Serializers serializers, Version object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.version != null) { - result - ..add(r'version') - ..add(serializers.serialize(object.version, - specifiedType: const FullType(String))); - } - return result; - } - - @override - Version deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = VersionBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'version': - result.version = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/volume.dart b/clients/hydra/dart/lib/model/volume.dart deleted file mode 100644 index 2795b2796e0..00000000000 --- a/clients/hydra/dart/lib/model/volume.dart +++ /dev/null @@ -1,174 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:ory_hydra_client/model/volume_usage_data.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'volume.g.dart'; - -abstract class Volume implements Built { - - /// Date/Time the volume was created. - @nullable - @BuiltValueField(wireName: r'CreatedAt') - String get createdAt; - - /// Name of the volume driver used by the volume. - @BuiltValueField(wireName: r'Driver') - String get driver; - - /// User-defined key/value metadata. - @BuiltValueField(wireName: r'Labels') - BuiltMap get labels; - - /// Mount path of the volume on the host. - @BuiltValueField(wireName: r'Mountpoint') - String get mountpoint; - - /// Name of the volume. - @BuiltValueField(wireName: r'Name') - String get name; - - /// The driver specific options used when creating the volume. - @BuiltValueField(wireName: r'Options') - BuiltMap get options; - - /// The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - @BuiltValueField(wireName: r'Scope') - String get scope; - - /// Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - @nullable - @BuiltValueField(wireName: r'Status') - JsonObject get status; - - @nullable - @BuiltValueField(wireName: r'UsageData') - VolumeUsageData get usageData; - - Volume._(); - - static void _initializeBuilder(VolumeBuilder b) => b; - - factory Volume([void updates(VolumeBuilder b)]) = _$Volume; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$VolumeSerializer(); -} - -class _$VolumeSerializer implements StructuredSerializer { - - @override - final Iterable types = const [Volume, _$Volume]; - @override - final String wireName = r'Volume'; - - @override - Iterable serialize(Serializers serializers, Volume object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - if (object.createdAt != null) { - result - ..add(r'CreatedAt') - ..add(serializers.serialize(object.createdAt, - specifiedType: const FullType(String))); - } - result - ..add(r'Driver') - ..add(serializers.serialize(object.driver, - specifiedType: const FullType(String))); - result - ..add(r'Labels') - ..add(serializers.serialize(object.labels, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]))); - result - ..add(r'Mountpoint') - ..add(serializers.serialize(object.mountpoint, - specifiedType: const FullType(String))); - result - ..add(r'Name') - ..add(serializers.serialize(object.name, - specifiedType: const FullType(String))); - result - ..add(r'Options') - ..add(serializers.serialize(object.options, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]))); - result - ..add(r'Scope') - ..add(serializers.serialize(object.scope, - specifiedType: const FullType(String))); - if (object.status != null) { - result - ..add(r'Status') - ..add(serializers.serialize(object.status, - specifiedType: const FullType(JsonObject))); - } - if (object.usageData != null) { - result - ..add(r'UsageData') - ..add(serializers.serialize(object.usageData, - specifiedType: const FullType(VolumeUsageData))); - } - return result; - } - - @override - Volume deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = VolumeBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'CreatedAt': - result.createdAt = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Driver': - result.driver = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Labels': - result.labels.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)])) as BuiltMap); - break; - case r'Mountpoint': - result.mountpoint = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Name': - result.name = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Options': - result.options.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)])) as BuiltMap); - break; - case r'Scope': - result.scope = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'Status': - result.status = serializers.deserialize(value, - specifiedType: const FullType(JsonObject)) as JsonObject; - break; - case r'UsageData': - result.usageData.replace(serializers.deserialize(value, - specifiedType: const FullType(VolumeUsageData)) as VolumeUsageData); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/volume_usage_data.dart b/clients/hydra/dart/lib/model/volume_usage_data.dart deleted file mode 100644 index ef839b21503..00000000000 --- a/clients/hydra/dart/lib/model/volume_usage_data.dart +++ /dev/null @@ -1,79 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'volume_usage_data.g.dart'; - -abstract class VolumeUsageData implements Built { - - /// The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - @BuiltValueField(wireName: r'RefCount') - int get refCount; - - /// Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - @BuiltValueField(wireName: r'Size') - int get size; - - VolumeUsageData._(); - - static void _initializeBuilder(VolumeUsageDataBuilder b) => b; - - factory VolumeUsageData([void updates(VolumeUsageDataBuilder b)]) = _$VolumeUsageData; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$VolumeUsageDataSerializer(); -} - -class _$VolumeUsageDataSerializer implements StructuredSerializer { - - @override - final Iterable types = const [VolumeUsageData, _$VolumeUsageData]; - @override - final String wireName = r'VolumeUsageData'; - - @override - Iterable serialize(Serializers serializers, VolumeUsageData object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'RefCount') - ..add(serializers.serialize(object.refCount, - specifiedType: const FullType(int))); - result - ..add(r'Size') - ..add(serializers.serialize(object.size, - specifiedType: const FullType(int))); - return result; - } - - @override - VolumeUsageData deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = VolumeUsageDataBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'RefCount': - result.refCount = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - case r'Size': - result.size = serializers.deserialize(value, - specifiedType: const FullType(int)) as int; - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/model/well_known.dart b/clients/hydra/dart/lib/model/well_known.dart deleted file mode 100644 index daf633f0c8f..00000000000 --- a/clients/hydra/dart/lib/model/well_known.dart +++ /dev/null @@ -1,440 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'well_known.g.dart'; - -abstract class WellKnown implements Built { - - /// URL of the OP's OAuth 2.0 Authorization Endpoint. - @BuiltValueField(wireName: r'authorization_endpoint') - String get authorizationEndpoint; - - /// 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 - @nullable - @BuiltValueField(wireName: r'backchannel_logout_session_supported') - bool get backchannelLogoutSessionSupported; - - /// Boolean value specifying whether the OP supports back-channel logout, with true indicating support. - @nullable - @BuiltValueField(wireName: r'backchannel_logout_supported') - bool get backchannelLogoutSupported; - - /// Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. - @nullable - @BuiltValueField(wireName: r'claims_parameter_supported') - bool get claimsParameterSupported; - - /// 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. - @nullable - @BuiltValueField(wireName: r'claims_supported') - BuiltList get claimsSupported; - - /// JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. - @nullable - @BuiltValueField(wireName: r'code_challenge_methods_supported') - BuiltList get codeChallengeMethodsSupported; - - /// URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. - @nullable - @BuiltValueField(wireName: r'end_session_endpoint') - String get endSessionEndpoint; - - /// 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. - @nullable - @BuiltValueField(wireName: r'frontchannel_logout_session_supported') - bool get frontchannelLogoutSessionSupported; - - /// Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. - @nullable - @BuiltValueField(wireName: r'frontchannel_logout_supported') - bool get frontchannelLogoutSupported; - - /// JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. - @nullable - @BuiltValueField(wireName: r'grant_types_supported') - BuiltList get grantTypesSupported; - - /// 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. - @BuiltValueField(wireName: r'id_token_signing_alg_values_supported') - BuiltList get idTokenSigningAlgValuesSupported; - - /// 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. - @BuiltValueField(wireName: r'issuer') - String get issuer; - - /// 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. - @BuiltValueField(wireName: r'jwks_uri') - String get jwksUri; - - /// URL of the OP's Dynamic Client Registration Endpoint. - @nullable - @BuiltValueField(wireName: r'registration_endpoint') - String get registrationEndpoint; - - /// 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). - @nullable - @BuiltValueField(wireName: r'request_object_signing_alg_values_supported') - BuiltList get requestObjectSigningAlgValuesSupported; - - /// Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. - @nullable - @BuiltValueField(wireName: r'request_parameter_supported') - bool get requestParameterSupported; - - /// Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. - @nullable - @BuiltValueField(wireName: r'request_uri_parameter_supported') - bool get requestUriParameterSupported; - - /// Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. - @nullable - @BuiltValueField(wireName: r'require_request_uri_registration') - bool get requireRequestUriRegistration; - - /// JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. - @nullable - @BuiltValueField(wireName: r'response_modes_supported') - BuiltList get responseModesSupported; - - /// 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. - @BuiltValueField(wireName: r'response_types_supported') - BuiltList get responseTypesSupported; - - /// URL of the authorization server's OAuth 2.0 revocation endpoint. - @nullable - @BuiltValueField(wireName: r'revocation_endpoint') - String get revocationEndpoint; - - /// SON 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 - @nullable - @BuiltValueField(wireName: r'scopes_supported') - BuiltList get scopesSupported; - - /// JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. - @BuiltValueField(wireName: r'subject_types_supported') - BuiltList get subjectTypesSupported; - - /// URL of the OP's OAuth 2.0 Token Endpoint - @BuiltValueField(wireName: r'token_endpoint') - String get tokenEndpoint; - - /// 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 - @nullable - @BuiltValueField(wireName: r'token_endpoint_auth_methods_supported') - BuiltList get tokenEndpointAuthMethodsSupported; - - /// URL of the OP's UserInfo Endpoint. - @nullable - @BuiltValueField(wireName: r'userinfo_endpoint') - String get userinfoEndpoint; - - /// 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]. - @nullable - @BuiltValueField(wireName: r'userinfo_signing_alg_values_supported') - BuiltList get userinfoSigningAlgValuesSupported; - - WellKnown._(); - - static void _initializeBuilder(WellKnownBuilder b) => b; - - factory WellKnown([void updates(WellKnownBuilder b)]) = _$WellKnown; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$WellKnownSerializer(); -} - -class _$WellKnownSerializer implements StructuredSerializer { - - @override - final Iterable types = const [WellKnown, _$WellKnown]; - @override - final String wireName = r'WellKnown'; - - @override - Iterable serialize(Serializers serializers, WellKnown object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - result - ..add(r'authorization_endpoint') - ..add(serializers.serialize(object.authorizationEndpoint, - specifiedType: const FullType(String))); - if (object.backchannelLogoutSessionSupported != null) { - result - ..add(r'backchannel_logout_session_supported') - ..add(serializers.serialize(object.backchannelLogoutSessionSupported, - specifiedType: const FullType(bool))); - } - if (object.backchannelLogoutSupported != null) { - result - ..add(r'backchannel_logout_supported') - ..add(serializers.serialize(object.backchannelLogoutSupported, - specifiedType: const FullType(bool))); - } - if (object.claimsParameterSupported != null) { - result - ..add(r'claims_parameter_supported') - ..add(serializers.serialize(object.claimsParameterSupported, - specifiedType: const FullType(bool))); - } - if (object.claimsSupported != null) { - result - ..add(r'claims_supported') - ..add(serializers.serialize(object.claimsSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.codeChallengeMethodsSupported != null) { - result - ..add(r'code_challenge_methods_supported') - ..add(serializers.serialize(object.codeChallengeMethodsSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.endSessionEndpoint != null) { - result - ..add(r'end_session_endpoint') - ..add(serializers.serialize(object.endSessionEndpoint, - specifiedType: const FullType(String))); - } - if (object.frontchannelLogoutSessionSupported != null) { - result - ..add(r'frontchannel_logout_session_supported') - ..add(serializers.serialize(object.frontchannelLogoutSessionSupported, - specifiedType: const FullType(bool))); - } - if (object.frontchannelLogoutSupported != null) { - result - ..add(r'frontchannel_logout_supported') - ..add(serializers.serialize(object.frontchannelLogoutSupported, - specifiedType: const FullType(bool))); - } - if (object.grantTypesSupported != null) { - result - ..add(r'grant_types_supported') - ..add(serializers.serialize(object.grantTypesSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - result - ..add(r'id_token_signing_alg_values_supported') - ..add(serializers.serialize(object.idTokenSigningAlgValuesSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'issuer') - ..add(serializers.serialize(object.issuer, - specifiedType: const FullType(String))); - result - ..add(r'jwks_uri') - ..add(serializers.serialize(object.jwksUri, - specifiedType: const FullType(String))); - if (object.registrationEndpoint != null) { - result - ..add(r'registration_endpoint') - ..add(serializers.serialize(object.registrationEndpoint, - specifiedType: const FullType(String))); - } - if (object.requestObjectSigningAlgValuesSupported != null) { - result - ..add(r'request_object_signing_alg_values_supported') - ..add(serializers.serialize(object.requestObjectSigningAlgValuesSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.requestParameterSupported != null) { - result - ..add(r'request_parameter_supported') - ..add(serializers.serialize(object.requestParameterSupported, - specifiedType: const FullType(bool))); - } - if (object.requestUriParameterSupported != null) { - result - ..add(r'request_uri_parameter_supported') - ..add(serializers.serialize(object.requestUriParameterSupported, - specifiedType: const FullType(bool))); - } - if (object.requireRequestUriRegistration != null) { - result - ..add(r'require_request_uri_registration') - ..add(serializers.serialize(object.requireRequestUriRegistration, - specifiedType: const FullType(bool))); - } - if (object.responseModesSupported != null) { - result - ..add(r'response_modes_supported') - ..add(serializers.serialize(object.responseModesSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - result - ..add(r'response_types_supported') - ..add(serializers.serialize(object.responseTypesSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - if (object.revocationEndpoint != null) { - result - ..add(r'revocation_endpoint') - ..add(serializers.serialize(object.revocationEndpoint, - specifiedType: const FullType(String))); - } - if (object.scopesSupported != null) { - result - ..add(r'scopes_supported') - ..add(serializers.serialize(object.scopesSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - result - ..add(r'subject_types_supported') - ..add(serializers.serialize(object.subjectTypesSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - result - ..add(r'token_endpoint') - ..add(serializers.serialize(object.tokenEndpoint, - specifiedType: const FullType(String))); - if (object.tokenEndpointAuthMethodsSupported != null) { - result - ..add(r'token_endpoint_auth_methods_supported') - ..add(serializers.serialize(object.tokenEndpointAuthMethodsSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - if (object.userinfoEndpoint != null) { - result - ..add(r'userinfo_endpoint') - ..add(serializers.serialize(object.userinfoEndpoint, - specifiedType: const FullType(String))); - } - if (object.userinfoSigningAlgValuesSupported != null) { - result - ..add(r'userinfo_signing_alg_values_supported') - ..add(serializers.serialize(object.userinfoSigningAlgValuesSupported, - specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - return result; - } - - @override - WellKnown deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = WellKnownBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current as String; - iterator.moveNext(); - final dynamic value = iterator.current; - switch (key) { - case r'authorization_endpoint': - result.authorizationEndpoint = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'backchannel_logout_session_supported': - result.backchannelLogoutSessionSupported = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'backchannel_logout_supported': - result.backchannelLogoutSupported = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'claims_parameter_supported': - result.claimsParameterSupported = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'claims_supported': - result.claimsSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'code_challenge_methods_supported': - result.codeChallengeMethodsSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'end_session_endpoint': - result.endSessionEndpoint = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'frontchannel_logout_session_supported': - result.frontchannelLogoutSessionSupported = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'frontchannel_logout_supported': - result.frontchannelLogoutSupported = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'grant_types_supported': - result.grantTypesSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'id_token_signing_alg_values_supported': - result.idTokenSigningAlgValuesSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'issuer': - result.issuer = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'jwks_uri': - result.jwksUri = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'registration_endpoint': - result.registrationEndpoint = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'request_object_signing_alg_values_supported': - result.requestObjectSigningAlgValuesSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'request_parameter_supported': - result.requestParameterSupported = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'request_uri_parameter_supported': - result.requestUriParameterSupported = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'require_request_uri_registration': - result.requireRequestUriRegistration = serializers.deserialize(value, - specifiedType: const FullType(bool)) as bool; - break; - case r'response_modes_supported': - result.responseModesSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'response_types_supported': - result.responseTypesSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'revocation_endpoint': - result.revocationEndpoint = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'scopes_supported': - result.scopesSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'subject_types_supported': - result.subjectTypesSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'token_endpoint': - result.tokenEndpoint = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'token_endpoint_auth_methods_supported': - result.tokenEndpointAuthMethodsSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - case r'userinfo_endpoint': - result.userinfoEndpoint = serializers.deserialize(value, - specifiedType: const FullType(String)) as String; - break; - case r'userinfo_signing_alg_values_supported': - result.userinfoSigningAlgValuesSupported.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)])) as BuiltList); - break; - } - } - return result.build(); - } -} - diff --git a/clients/hydra/dart/lib/ory_hydra_client.dart b/clients/hydra/dart/lib/ory_hydra_client.dart new file mode 100644 index 00000000000..4e3eae55669 --- /dev/null +++ b/clients/hydra/dart/lib/ory_hydra_client.dart @@ -0,0 +1,55 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +export 'package:ory_hydra_client/src/api.dart'; +export 'package:ory_hydra_client/src/auth/api_key_auth.dart'; +export 'package:ory_hydra_client/src/auth/basic_auth.dart'; +export 'package:ory_hydra_client/src/auth/oauth.dart'; +export 'package:ory_hydra_client/src/serializers.dart'; +export 'package:ory_hydra_client/src/model/date.dart'; + +export 'package:ory_hydra_client/src/api/jwk_api.dart'; +export 'package:ory_hydra_client/src/api/metadata_api.dart'; +export 'package:ory_hydra_client/src/api/o_auth2_api.dart'; +export 'package:ory_hydra_client/src/api/oidc_api.dart'; +export 'package:ory_hydra_client/src/api/wellknown_api.dart'; + +export 'package:ory_hydra_client/src/model/accept_o_auth2_consent_request.dart'; +export 'package:ory_hydra_client/src/model/accept_o_auth2_consent_request_session.dart'; +export 'package:ory_hydra_client/src/model/accept_o_auth2_login_request.dart'; +export 'package:ory_hydra_client/src/model/create_json_web_key_set.dart'; +export 'package:ory_hydra_client/src/model/error_o_auth2.dart'; +export 'package:ory_hydra_client/src/model/generic_error.dart'; +export 'package:ory_hydra_client/src/model/get_version200_response.dart'; +export 'package:ory_hydra_client/src/model/health_not_ready_status.dart'; +export 'package:ory_hydra_client/src/model/health_status.dart'; +export 'package:ory_hydra_client/src/model/introspected_o_auth2_token.dart'; +export 'package:ory_hydra_client/src/model/is_ready200_response.dart'; +export 'package:ory_hydra_client/src/model/is_ready503_response.dart'; +export 'package:ory_hydra_client/src/model/json_patch.dart'; +export 'package:ory_hydra_client/src/model/json_web_key.dart'; +export 'package:ory_hydra_client/src/model/json_web_key_set.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_client.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_client_token_lifespans.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_consent_request.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_consent_request_open_id_connect_context.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_consent_session.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_consent_session_expires_at.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_login_request.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_logout_request.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_redirect_to.dart'; +export 'package:ory_hydra_client/src/model/o_auth2_token_exchange.dart'; +export 'package:ory_hydra_client/src/model/oidc_configuration.dart'; +export 'package:ory_hydra_client/src/model/oidc_user_info.dart'; +export 'package:ory_hydra_client/src/model/pagination.dart'; +export 'package:ory_hydra_client/src/model/pagination_headers.dart'; +export 'package:ory_hydra_client/src/model/reject_o_auth2_request.dart'; +export 'package:ory_hydra_client/src/model/token_pagination.dart'; +export 'package:ory_hydra_client/src/model/token_pagination_headers.dart'; +export 'package:ory_hydra_client/src/model/token_pagination_request_parameters.dart'; +export 'package:ory_hydra_client/src/model/token_pagination_response_headers.dart'; +export 'package:ory_hydra_client/src/model/trust_o_auth2_jwt_grant_issuer.dart'; +export 'package:ory_hydra_client/src/model/trusted_o_auth2_jwt_grant_issuer.dart'; +export 'package:ory_hydra_client/src/model/trusted_o_auth2_jwt_grant_json_web_key.dart'; +export 'package:ory_hydra_client/src/model/version.dart'; diff --git a/clients/hydra/dart/lib/serializers.dart b/clients/hydra/dart/lib/serializers.dart deleted file mode 100644 index 444426bf1ce..00000000000 --- a/clients/hydra/dart/lib/serializers.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -library serializers; - -import 'package:built_value/iso_8601_date_time_serializer.dart'; -import 'package:built_value/serializer.dart'; -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:built_value/standard_json_plugin.dart'; - -import 'package:ory_hydra_client/model/accept_consent_request.dart'; -import 'package:ory_hydra_client/model/accept_login_request.dart'; -import 'package:ory_hydra_client/model/completed_request.dart'; -import 'package:ory_hydra_client/model/consent_request.dart'; -import 'package:ory_hydra_client/model/consent_request_session.dart'; -import 'package:ory_hydra_client/model/container_wait_ok_body_error.dart'; -import 'package:ory_hydra_client/model/flush_inactive_o_auth2_tokens_request.dart'; -import 'package:ory_hydra_client/model/generic_error.dart'; -import 'package:ory_hydra_client/model/health_not_ready_status.dart'; -import 'package:ory_hydra_client/model/health_status.dart'; -import 'package:ory_hydra_client/model/json_web_key.dart'; -import 'package:ory_hydra_client/model/json_web_key_set.dart'; -import 'package:ory_hydra_client/model/json_error.dart'; -import 'package:ory_hydra_client/model/json_web_key_set_generator_request.dart'; -import 'package:ory_hydra_client/model/login_request.dart'; -import 'package:ory_hydra_client/model/logout_request.dart'; -import 'package:ory_hydra_client/model/o_auth2_client.dart'; -import 'package:ory_hydra_client/model/o_auth2_token_introspection.dart'; -import 'package:ory_hydra_client/model/oauth2_token_response.dart'; -import 'package:ory_hydra_client/model/open_id_connect_context.dart'; -import 'package:ory_hydra_client/model/patch_document.dart'; -import 'package:ory_hydra_client/model/plugin_config.dart'; -import 'package:ory_hydra_client/model/plugin_config_args.dart'; -import 'package:ory_hydra_client/model/plugin_config_interface.dart'; -import 'package:ory_hydra_client/model/plugin_config_linux.dart'; -import 'package:ory_hydra_client/model/plugin_config_network.dart'; -import 'package:ory_hydra_client/model/plugin_config_rootfs.dart'; -import 'package:ory_hydra_client/model/plugin_config_user.dart'; -import 'package:ory_hydra_client/model/plugin_device.dart'; -import 'package:ory_hydra_client/model/plugin_env.dart'; -import 'package:ory_hydra_client/model/plugin_interface_type.dart'; -import 'package:ory_hydra_client/model/plugin_mount.dart'; -import 'package:ory_hydra_client/model/plugin_settings.dart'; -import 'package:ory_hydra_client/model/previous_consent_session.dart'; -import 'package:ory_hydra_client/model/reject_request.dart'; -import 'package:ory_hydra_client/model/request_was_handled_response.dart'; -import 'package:ory_hydra_client/model/trust_jwt_grant_issuer_body.dart'; -import 'package:ory_hydra_client/model/trusted_json_web_key.dart'; -import 'package:ory_hydra_client/model/trusted_jwt_grant_issuer.dart'; -import 'package:ory_hydra_client/model/userinfo_response.dart'; -import 'package:ory_hydra_client/model/version.dart'; -import 'package:ory_hydra_client/model/volume.dart'; -import 'package:ory_hydra_client/model/volume_usage_data.dart'; -import 'package:ory_hydra_client/model/well_known.dart'; - -part 'serializers.g.dart'; - -@SerializersFor(const [ - AcceptConsentRequest, - AcceptLoginRequest, - CompletedRequest, - ConsentRequest, - ConsentRequestSession, - ContainerWaitOKBodyError, - FlushInactiveOAuth2TokensRequest, - GenericError, - HealthNotReadyStatus, - HealthStatus, - JSONWebKey, - JSONWebKeySet, - JsonError, - JsonWebKeySetGeneratorRequest, - LoginRequest, - LogoutRequest, - OAuth2Client, - OAuth2TokenIntrospection, - Oauth2TokenResponse, - OpenIDConnectContext, - PatchDocument, - PluginConfig, - PluginConfigArgs, - PluginConfigInterface, - PluginConfigLinux, - PluginConfigNetwork, - PluginConfigRootfs, - PluginConfigUser, - PluginDevice, - PluginEnv, - PluginInterfaceType, - PluginMount, - PluginSettings, - PreviousConsentSession, - RejectRequest, - RequestWasHandledResponse, - TrustJwtGrantIssuerBody, - TrustedJsonWebKey, - TrustedJwtGrantIssuer, - UserinfoResponse, - Version, - Volume, - VolumeUsageData, - WellKnown, -]) -Serializers serializers = (_$serializers.toBuilder() - ..addBuilderFactory( - const FullType(BuiltList, [FullType(OAuth2Client)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(TrustedJwtGrantIssuer)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(PreviousConsentSession)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(PatchDocument)]), - () => ListBuilder(), - ) - ..add(Iso8601DateTimeSerializer())) - .build(); - -Serializers standardSerializers = - (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/clients/hydra/dart/lib/src/api.dart b/clients/hydra/dart/lib/src/api.dart new file mode 100644 index 00000000000..ae74279f66c --- /dev/null +++ b/clients/hydra/dart/lib/src/api.dart @@ -0,0 +1,101 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; +import 'package:built_value/serializer.dart'; +import 'package:ory_hydra_client/src/serializers.dart'; +import 'package:ory_hydra_client/src/auth/api_key_auth.dart'; +import 'package:ory_hydra_client/src/auth/basic_auth.dart'; +import 'package:ory_hydra_client/src/auth/bearer_auth.dart'; +import 'package:ory_hydra_client/src/auth/oauth.dart'; +import 'package:ory_hydra_client/src/api/jwk_api.dart'; +import 'package:ory_hydra_client/src/api/metadata_api.dart'; +import 'package:ory_hydra_client/src/api/o_auth2_api.dart'; +import 'package:ory_hydra_client/src/api/oidc_api.dart'; +import 'package:ory_hydra_client/src/api/wellknown_api.dart'; + +class OryHydraClient { + static const String basePath = r'http://localhost'; + + final Dio dio; + final Serializers serializers; + + OryHydraClient({ + Dio? dio, + Serializers? serializers, + String? basePathOverride, + List? interceptors, + }) : this.serializers = serializers ?? standardSerializers, + this.dio = dio ?? + Dio(BaseOptions( + baseUrl: basePathOverride ?? basePath, + connectTimeout: 5000, + receiveTimeout: 3000, + )) { + if (interceptors == null) { + this.dio.interceptors.addAll([ + OAuthInterceptor(), + BasicAuthInterceptor(), + BearerAuthInterceptor(), + ApiKeyAuthInterceptor(), + ]); + } else { + this.dio.interceptors.addAll(interceptors); + } + } + + void setOAuthToken(String name, String token) { + if (this.dio.interceptors.any((i) => i is OAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is OAuthInterceptor) as OAuthInterceptor).tokens[name] = token; + } + } + + void setBearerAuth(String name, String token) { + if (this.dio.interceptors.any((i) => i is BearerAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor) as BearerAuthInterceptor).tokens[name] = token; + } + } + + void setBasicAuth(String name, String username, String password) { + if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor) as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password); + } + } + + void setApiKey(String name, String apiKey) { + if (this.dio.interceptors.any((i) => i is ApiKeyAuthInterceptor)) { + (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor) as ApiKeyAuthInterceptor).apiKeys[name] = apiKey; + } + } + + /// Get JwkApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + JwkApi getJwkApi() { + return JwkApi(dio, serializers); + } + + /// Get MetadataApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + MetadataApi getMetadataApi() { + return MetadataApi(dio, serializers); + } + + /// Get OAuth2Api instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + OAuth2Api getOAuth2Api() { + return OAuth2Api(dio, serializers); + } + + /// Get OidcApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + OidcApi getOidcApi() { + return OidcApi(dio, serializers); + } + + /// Get WellknownApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + WellknownApi getWellknownApi() { + return WellknownApi(dio, serializers); + } +} diff --git a/clients/hydra/dart/lib/src/api/jwk_api.dart b/clients/hydra/dart/lib/src/api/jwk_api.dart new file mode 100644 index 00000000000..c21a7bf1fcc --- /dev/null +++ b/clients/hydra/dart/lib/src/api/jwk_api.dart @@ -0,0 +1,556 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.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'; +import 'package:ory_hydra_client/src/model/json_web_key_set.dart'; + +class JwkApi { + + final Dio _dio; + + final Serializers _serializers; + + const JwkApi(this._dio, this._serializers); + + /// 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. + /// + /// Parameters: + /// * [set_] - The JSON Web Key Set ID + /// * [createJsonWebKeySet] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> createJsonWebKeySet({ + required String set_, + required CreateJsonWebKeySet createJsonWebKeySet, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(CreateJsonWebKeySet); + _bodyData = _serializers.serialize(createJsonWebKeySet, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + JsonWebKeySet _responseData; + + try { + const _responseType = FullType(JsonWebKeySet); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as JsonWebKeySet; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [set_] - The JSON Web Key Set + /// * [kid] - The JSON Web Key ID (kid) + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> deleteJsonWebKey({ + required String set_, + required String kid, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/keys/{set}/{kid}'.replaceAll('{' r'set' '}', set_.toString()).replaceAll('{' r'kid' '}', kid.toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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. + /// + /// Parameters: + /// * [set_] - The JSON Web Key Set + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> deleteJsonWebKeySet({ + required String set_, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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). + /// + /// Parameters: + /// * [set_] - JSON Web Key Set ID + /// * [kid] - JSON Web Key ID + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getJsonWebKey({ + required String set_, + required String kid, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/keys/{set}/{kid}'.replaceAll('{' r'set' '}', set_.toString()).replaceAll('{' r'kid' '}', kid.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + JsonWebKeySet _responseData; + + try { + const _responseType = FullType(JsonWebKeySet); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as JsonWebKeySet; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [set_] - JSON Web Key Set ID + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getJsonWebKeySet({ + required String set_, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + JsonWebKeySet _responseData; + + try { + const _responseType = FullType(JsonWebKeySet); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as JsonWebKeySet; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [set_] - The JSON Web Key Set ID + /// * [kid] - JSON Web Key ID + /// * [jsonWebKey] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> setJsonWebKey({ + required String set_, + required String kid, + JsonWebKey? jsonWebKey, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/keys/{set}/{kid}'.replaceAll('{' r'set' '}', set_.toString()).replaceAll('{' r'kid' '}', kid.toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(JsonWebKey); + _bodyData = jsonWebKey == null ? null : _serializers.serialize(jsonWebKey, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + JsonWebKey _responseData; + + try { + const _responseType = FullType(JsonWebKey); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as JsonWebKey; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [set_] - The JSON Web Key Set ID + /// * [jsonWebKeySet] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> setJsonWebKeySet({ + required String set_, + JsonWebKeySet? jsonWebKeySet, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/keys/{set}'.replaceAll('{' r'set' '}', set_.toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(JsonWebKeySet); + _bodyData = jsonWebKeySet == null ? null : _serializers.serialize(jsonWebKeySet, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + JsonWebKeySet _responseData; + + try { + const _responseType = FullType(JsonWebKeySet); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as JsonWebKeySet; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/clients/hydra/dart/lib/src/api/metadata_api.dart b/clients/hydra/dart/lib/src/api/metadata_api.dart new file mode 100644 index 00000000000..66dd516b257 --- /dev/null +++ b/clients/hydra/dart/lib/src/api/metadata_api.dart @@ -0,0 +1,240 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:ory_hydra_client/src/model/generic_error.dart'; +import 'package:ory_hydra_client/src/model/get_version200_response.dart'; +import 'package:ory_hydra_client/src/model/health_status.dart'; +import 'package:ory_hydra_client/src/model/is_ready200_response.dart'; +import 'package:ory_hydra_client/src/model/is_ready503_response.dart'; + +class MetadataApi { + + final Dio _dio; + + final Serializers _serializers; + + const MetadataApi(this._dio, this._serializers); + + /// 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. + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getVersion({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/version'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + GetVersion200Response _responseData; + + try { + const _responseType = FullType(GetVersion200Response); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as GetVersion200Response; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> isAlive({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/health/alive'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + HealthStatus _responseData; + + try { + const _responseType = FullType(HealthStatus); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as HealthStatus; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> isReady({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/health/ready'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + IsReady200Response _responseData; + + try { + const _responseType = FullType(IsReady200Response); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as IsReady200Response; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/clients/hydra/dart/lib/src/api/o_auth2_api.dart b/clients/hydra/dart/lib/src/api/o_auth2_api.dart new file mode 100644 index 00000000000..de53c4f22ff --- /dev/null +++ b/clients/hydra/dart/lib/src/api/o_auth2_api.dart @@ -0,0 +1,2303 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:ory_hydra_client/src/api_util.dart'; +import 'package:ory_hydra_client/src/model/accept_o_auth2_consent_request.dart'; +import 'package:ory_hydra_client/src/model/accept_o_auth2_login_request.dart'; +import 'package:ory_hydra_client/src/model/error_o_auth2.dart'; +import 'package:ory_hydra_client/src/model/generic_error.dart'; +import 'package:ory_hydra_client/src/model/introspected_o_auth2_token.dart'; +import 'package:ory_hydra_client/src/model/json_patch.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_client.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_client_token_lifespans.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_consent_request.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_consent_session.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_login_request.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_logout_request.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_redirect_to.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_token_exchange.dart'; +import 'package:ory_hydra_client/src/model/reject_o_auth2_request.dart'; +import 'package:ory_hydra_client/src/model/trust_o_auth2_jwt_grant_issuer.dart'; +import 'package:ory_hydra_client/src/model/trusted_o_auth2_jwt_grant_issuer.dart'; + +class OAuth2Api { + + final Dio _dio; + + final Serializers _serializers; + + const OAuth2Api(this._dio, this._serializers); + + /// 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. + /// + /// Parameters: + /// * [consentChallenge] - OAuth 2.0 Consent Request Challenge + /// * [acceptOAuth2ConsentRequest] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> acceptOAuth2ConsentRequest({ + required String consentChallenge, + AcceptOAuth2ConsentRequest? acceptOAuth2ConsentRequest, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/requests/consent/accept'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'consent_challenge': encodeQueryParameter(_serializers, consentChallenge, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(AcceptOAuth2ConsentRequest); + _bodyData = acceptOAuth2ConsentRequest == null ? null : _serializers.serialize(acceptOAuth2ConsentRequest, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2RedirectTo _responseData; + + try { + const _responseType = FullType(OAuth2RedirectTo); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2RedirectTo; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [loginChallenge] - OAuth 2.0 Login Request Challenge + /// * [acceptOAuth2LoginRequest] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> acceptOAuth2LoginRequest({ + required String loginChallenge, + AcceptOAuth2LoginRequest? acceptOAuth2LoginRequest, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/requests/login/accept'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'login_challenge': encodeQueryParameter(_serializers, loginChallenge, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(AcceptOAuth2LoginRequest); + _bodyData = acceptOAuth2LoginRequest == null ? null : _serializers.serialize(acceptOAuth2LoginRequest, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2RedirectTo _responseData; + + try { + const _responseType = FullType(OAuth2RedirectTo); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2RedirectTo; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [logoutChallenge] - OAuth 2.0 Logout Request Challenge + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> acceptOAuth2LogoutRequest({ + required String logoutChallenge, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/requests/logout/accept'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'logout_challenge': encodeQueryParameter(_serializers, logoutChallenge, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2RedirectTo _responseData; + + try { + const _responseType = FullType(OAuth2RedirectTo); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2RedirectTo; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [oAuth2Client] - OAuth 2.0 Client Request Body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> createOAuth2Client({ + required OAuth2Client oAuth2Client, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/clients'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OAuth2Client); + _bodyData = _serializers.serialize(oAuth2Client, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2Client _responseData; + + try { + const _responseType = FullType(OAuth2Client); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2Client; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [id] - The id of the OAuth 2.0 Client. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> deleteOAuth2Client({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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. + /// + /// Parameters: + /// * [clientId] - OAuth 2.0 Client ID + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> deleteOAuth2Token({ + required String clientId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/tokens'; + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'client_id': encodeQueryParameter(_serializers, clientId, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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. + /// + /// Parameters: + /// * [id] - The id of the desired grant + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> deleteTrustedOAuth2JwtGrantIssuer({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/trust/grants/jwt-bearer/issuers/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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. + /// + /// Parameters: + /// * [id] - The id of the OAuth 2.0 Client. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getOAuth2Client({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2Client _responseData; + + try { + const _responseType = FullType(OAuth2Client); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2Client; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [consentChallenge] - OAuth 2.0 Consent Request Challenge + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getOAuth2ConsentRequest({ + required String consentChallenge, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/requests/consent'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'consent_challenge': encodeQueryParameter(_serializers, consentChallenge, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2ConsentRequest _responseData; + + try { + const _responseType = FullType(OAuth2ConsentRequest); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2ConsentRequest; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [loginChallenge] - OAuth 2.0 Login Request Challenge + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getOAuth2LoginRequest({ + required String loginChallenge, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/requests/login'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'login_challenge': encodeQueryParameter(_serializers, loginChallenge, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2LoginRequest _responseData; + + try { + const _responseType = FullType(OAuth2LoginRequest); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2LoginRequest; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Get OAuth 2.0 Session Logout Request + /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Parameters: + /// * [logoutChallenge] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getOAuth2LogoutRequest({ + required String logoutChallenge, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/requests/logout'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'logout_challenge': encodeQueryParameter(_serializers, logoutChallenge, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2LogoutRequest _responseData; + + try { + const _responseType = FullType(OAuth2LogoutRequest); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2LogoutRequest; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [id] - The id of the desired grant + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getTrustedOAuth2JwtGrantIssuer({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/trust/grants/jwt-bearer/issuers/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + TrustedOAuth2JwtGrantIssuer _responseData; + + try { + const _responseType = FullType(TrustedOAuth2JwtGrantIssuer); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as TrustedOAuth2JwtGrantIssuer; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [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. + /// * [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. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> introspectOAuth2Token({ + required String token, + String? scope, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/introspect'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = { + if (scope != null) r'scope': encodeQueryParameter(_serializers, scope, const FullType(String)), + r'token': encodeQueryParameter(_serializers, token, const FullType(String)), + }; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + IntrospectedOAuth2Token _responseData; + + try { + const _responseType = FullType(IntrospectedOAuth2Token); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as IntrospectedOAuth2Token; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [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). + /// * [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). + /// * [clientName] - The name of the clients to filter by. + /// * [owner] - The owner of the clients to filter by. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future>> listOAuth2Clients({ + int? pageSize = 250, + String? pageToken = '1', + String? clientName, + String? owner, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/clients'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (pageSize != null) r'page_size': encodeQueryParameter(_serializers, pageSize, const FullType(int)), + if (pageToken != null) r'page_token': encodeQueryParameter(_serializers, pageToken, const FullType(String)), + if (clientName != null) r'client_name': encodeQueryParameter(_serializers, clientName, const FullType(String)), + if (owner != null) r'owner': encodeQueryParameter(_serializers, owner, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList _responseData; + + try { + const _responseType = FullType(BuiltList, [FullType(OAuth2Client)]); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [subject] - The subject to list the consent sessions for. + /// * [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). + /// * [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). + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future>> listOAuth2ConsentSessions({ + required String subject, + int? pageSize = 250, + String? pageToken = '1', + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/sessions/consent'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (pageSize != null) r'page_size': encodeQueryParameter(_serializers, pageSize, const FullType(int)), + if (pageToken != null) r'page_token': encodeQueryParameter(_serializers, pageToken, const FullType(String)), + r'subject': encodeQueryParameter(_serializers, subject, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList _responseData; + + try { + const _responseType = FullType(BuiltList, [FullType(OAuth2ConsentSession)]); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers + /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Parameters: + /// * [maxItems] + /// * [defaultItems] + /// * [issuer] - If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future>> listTrustedOAuth2JwtGrantIssuers({ + int? maxItems, + int? defaultItems, + String? issuer, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/trust/grants/jwt-bearer/issuers'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (maxItems != null) r'MaxItems': encodeQueryParameter(_serializers, maxItems, const FullType(int)), + if (defaultItems != null) r'DefaultItems': encodeQueryParameter(_serializers, defaultItems, const FullType(int)), + if (issuer != null) r'issuer': encodeQueryParameter(_serializers, issuer, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList _responseData; + + try { + const _responseType = FullType(BuiltList, [FullType(TrustedOAuth2JwtGrantIssuer)]); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> oAuth2Authorize({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth2/auth'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ErrorOAuth2 _responseData; + + try { + const _responseType = FullType(ErrorOAuth2); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as ErrorOAuth2; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [grantType] + /// * [clientId] + /// * [code] + /// * [redirectUri] + /// * [refreshToken] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> oauth2TokenExchange({ + required String grantType, + String? clientId, + String? code, + String? redirectUri, + String? refreshToken, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth2/token'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'basic', + 'name': 'basic', + },{ + 'type': 'oauth2', + 'name': 'oauth2', + }, + ], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = { + if (clientId != null) r'client_id': encodeQueryParameter(_serializers, clientId, const FullType(String)), + if (code != null) r'code': encodeQueryParameter(_serializers, code, const FullType(String)), + r'grant_type': encodeQueryParameter(_serializers, grantType, const FullType(String)), + if (redirectUri != null) r'redirect_uri': encodeQueryParameter(_serializers, redirectUri, const FullType(String)), + if (refreshToken != null) r'refresh_token': encodeQueryParameter(_serializers, refreshToken, const FullType(String)), + }; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2TokenExchange _responseData; + + try { + const _responseType = FullType(OAuth2TokenExchange); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2TokenExchange; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [id] - The id of the OAuth 2.0 Client. + /// * [jsonPatch] - OAuth 2.0 Client JSON Patch Body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> patchOAuth2Client({ + required String id, + required BuiltList jsonPatch, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(BuiltList, [FullType(JsonPatch)]); + _bodyData = _serializers.serialize(jsonPatch, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2Client _responseData; + + try { + const _responseType = FullType(OAuth2Client); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2Client; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [consentChallenge] - OAuth 2.0 Consent Request Challenge + /// * [rejectOAuth2Request] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> rejectOAuth2ConsentRequest({ + required String consentChallenge, + RejectOAuth2Request? rejectOAuth2Request, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/requests/consent/reject'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'consent_challenge': encodeQueryParameter(_serializers, consentChallenge, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(RejectOAuth2Request); + _bodyData = rejectOAuth2Request == null ? null : _serializers.serialize(rejectOAuth2Request, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2RedirectTo _responseData; + + try { + const _responseType = FullType(OAuth2RedirectTo); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2RedirectTo; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [loginChallenge] - OAuth 2.0 Login Request Challenge + /// * [rejectOAuth2Request] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> rejectOAuth2LoginRequest({ + required String loginChallenge, + RejectOAuth2Request? rejectOAuth2Request, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/requests/login/reject'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'login_challenge': encodeQueryParameter(_serializers, loginChallenge, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(RejectOAuth2Request); + _bodyData = rejectOAuth2Request == null ? null : _serializers.serialize(rejectOAuth2Request, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2RedirectTo _responseData; + + try { + const _responseType = FullType(OAuth2RedirectTo); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2RedirectTo; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [logoutChallenge] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> rejectOAuth2LogoutRequest({ + required String logoutChallenge, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/requests/logout/reject'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'logout_challenge': encodeQueryParameter(_serializers, logoutChallenge, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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. + /// + /// Parameters: + /// * [subject] - OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + /// * [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. + /// * [all] - Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> revokeOAuth2ConsentSessions({ + required String subject, + String? client, + bool? all, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/sessions/consent'; + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'subject': encodeQueryParameter(_serializers, subject, const FullType(String)), + if (client != null) r'client': encodeQueryParameter(_serializers, client, const FullType(String)), + if (all != null) r'all': encodeQueryParameter(_serializers, all, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Revokes All OAuth 2.0 Login Sessions of a Subject + /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + /// + /// Parameters: + /// * [subject] - OAuth 2.0 Subject The subject to revoke authentication sessions for. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> revokeOAuth2LoginSessions({ + required String subject, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/oauth2/auth/sessions/login'; + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'subject': encodeQueryParameter(_serializers, subject, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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. + /// + /// Parameters: + /// * [token] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> revokeOAuth2Token({ + required String token, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth2/revoke'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'basic', + 'name': 'basic', + },{ + 'type': 'oauth2', + 'name': 'oauth2', + }, + ], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = { + r'token': encodeQueryParameter(_serializers, token, const FullType(String)), + }; + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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. + /// + /// Parameters: + /// * [id] - OAuth 2.0 Client ID + /// * [oAuth2Client] - OAuth 2.0 Client Request Body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> setOAuth2Client({ + required String id, + required OAuth2Client oAuth2Client, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/clients/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OAuth2Client); + _bodyData = _serializers.serialize(oAuth2Client, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2Client _responseData; + + try { + const _responseType = FullType(OAuth2Client); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2Client; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Set OAuth2 Client Token Lifespans + /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Parameters: + /// * [id] - OAuth 2.0 Client ID + /// * [oAuth2ClientTokenLifespans] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> setOAuth2ClientLifespans({ + required String id, + OAuth2ClientTokenLifespans? oAuth2ClientTokenLifespans, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/clients/{id}/lifespans'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OAuth2ClientTokenLifespans); + _bodyData = oAuth2ClientTokenLifespans == null ? null : _serializers.serialize(oAuth2ClientTokenLifespans, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2Client _responseData; + + try { + const _responseType = FullType(OAuth2Client); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2Client; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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). + /// + /// Parameters: + /// * [trustOAuth2JwtGrantIssuer] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> trustOAuth2JwtGrantIssuer({ + TrustOAuth2JwtGrantIssuer? trustOAuth2JwtGrantIssuer, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/admin/trust/grants/jwt-bearer/issuers'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(TrustOAuth2JwtGrantIssuer); + _bodyData = trustOAuth2JwtGrantIssuer == null ? null : _serializers.serialize(trustOAuth2JwtGrantIssuer, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + TrustedOAuth2JwtGrantIssuer _responseData; + + try { + const _responseType = FullType(TrustedOAuth2JwtGrantIssuer); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as TrustedOAuth2JwtGrantIssuer; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/clients/hydra/dart/lib/src/api/oidc_api.dart b/clients/hydra/dart/lib/src/api/oidc_api.dart new file mode 100644 index 00000000000..c00a1c891e2 --- /dev/null +++ b/clients/hydra/dart/lib/src/api/oidc_api.dart @@ -0,0 +1,545 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:ory_hydra_client/src/model/error_o_auth2.dart'; +import 'package:ory_hydra_client/src/model/generic_error.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_client.dart'; +import 'package:ory_hydra_client/src/model/oidc_configuration.dart'; +import 'package:ory_hydra_client/src/model/oidc_user_info.dart'; + +class OidcApi { + + final Dio _dio; + + final Serializers _serializers; + + const OidcApi(this._dio, this._serializers); + + /// 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. + /// + /// Parameters: + /// * [oAuth2Client] - Dynamic Client Registration Request Body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> createOidcDynamicClient({ + required OAuth2Client oAuth2Client, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth2/register'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OAuth2Client); + _bodyData = _serializers.serialize(oAuth2Client, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2Client _responseData; + + try { + const _responseType = FullType(OAuth2Client); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2Client; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [id] - The id of the OAuth 2.0 Client. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> deleteOidcDynamicClient({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth2/register/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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/ + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> discoverOidcConfiguration({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/.well-known/openid-configuration'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OidcConfiguration _responseData; + + try { + const _responseType = FullType(OidcConfiguration); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OidcConfiguration; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [id] - The id of the OAuth 2.0 Client. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getOidcDynamicClient({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth2/register/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2Client _responseData; + + try { + const _responseType = FullType(OAuth2Client); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2Client; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> getOidcUserInfo({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/userinfo'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'oauth2', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OidcUserInfo _responseData; + + try { + const _responseType = FullType(OidcUserInfo); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OidcUserInfo; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// 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. + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioError] if API call or serialization fails + Future> revokeOidcSession({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth2/sessions/logout'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// 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. + /// + /// Parameters: + /// * [id] - OAuth 2.0 Client ID + /// * [oAuth2Client] - OAuth 2.0 Client Request Body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> setOidcDynamicClient({ + required String id, + required OAuth2Client oAuth2Client, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth2/register/{id}'.replaceAll('{' r'id' '}', id.toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OAuth2Client); + _bodyData = _serializers.serialize(oAuth2Client, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioError( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuth2Client _responseData; + + try { + const _responseType = FullType(OAuth2Client); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as OAuth2Client; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/clients/hydra/dart/lib/src/api/wellknown_api.dart b/clients/hydra/dart/lib/src/api/wellknown_api.dart new file mode 100644 index 00000000000..6e2356f74c4 --- /dev/null +++ b/clients/hydra/dart/lib/src/api/wellknown_api.dart @@ -0,0 +1,93 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:ory_hydra_client/src/model/error_o_auth2.dart'; +import 'package:ory_hydra_client/src/model/json_web_key_set.dart'; + +class WellknownApi { + + final Dio _dio; + + final Serializers _serializers; + + const WellknownApi(this._dio, this._serializers); + + /// 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. + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [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 + Future> discoverJsonWebKeys({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/.well-known/jwks.json'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + JsonWebKeySet _responseData; + + try { + const _responseType = FullType(JsonWebKeySet); + _responseData = _serializers.deserialize( + _response.data!, + specifiedType: _responseType, + ) as JsonWebKeySet; + + } catch (error, stackTrace) { + throw DioError( + requestOptions: _response.requestOptions, + response: _response, + type: DioErrorType.other, + error: error, + )..stackTrace = stackTrace; + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/clients/hydra/dart/lib/src/api_util.dart b/clients/hydra/dart/lib/src/api_util.dart new file mode 100644 index 00000000000..ed3bb12f25b --- /dev/null +++ b/clients/hydra/dart/lib/src/api_util.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +/// Format the given form parameter object into something that Dio can handle. +/// Returns primitive or String. +/// Returns List/Map if the value is BuildList/BuiltMap. +dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) { + if (value == null) { + return ''; + } + if (value is String || value is num || value is bool) { + return value; + } + final serialized = serializers.serialize( + value as Object, + specifiedType: type, + ); + if (serialized is String) { + return serialized; + } + if (value is BuiltList || value is BuiltSet || value is BuiltMap) { + return serialized; + } + return json.encode(serialized); +} + +dynamic encodeQueryParameter( + Serializers serializers, + dynamic value, + FullType type, +) { + if (value == null) { + return ''; + } + if (value is String || value is num || value is bool) { + return value; + } + if (value is Uint8List) { + // Currently not sure how to serialize this + return value; + } + final serialized = serializers.serialize( + value as Object, + specifiedType: type, + ); + if (serialized == null) { + return ''; + } + if (serialized is String) { + return serialized; + } + return serialized; +} + +ListParam encodeCollectionQueryParameter( + Serializers serializers, + dynamic value, + FullType type, { + ListFormat format = ListFormat.multi, +}) { + final serialized = serializers.serialize( + value as Object, + specifiedType: type, + ); + if (value is BuiltList || value is BuiltSet) { + return ListParam(List.of((serialized as Iterable).cast()), format); + } + throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); +} diff --git a/clients/hydra/dart/lib/src/auth/api_key_auth.dart b/clients/hydra/dart/lib/src/auth/api_key_auth.dart new file mode 100644 index 00000000000..4c9c0edb74e --- /dev/null +++ b/clients/hydra/dart/lib/src/auth/api_key_auth.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + + +import 'package:dio/dio.dart'; +import 'package:ory_hydra_client/src/auth/auth.dart'; + +class ApiKeyAuthInterceptor extends AuthInterceptor { + final Map apiKeys = {}; + + @override + void onRequest(RequestOptions options, RequestInterceptorHandler handler) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'apiKey'); + for (final info in authInfo) { + final authName = info['name'] as String; + final authKeyName = info['keyName'] as String; + final authWhere = info['where'] as String; + final apiKey = apiKeys[authName]; + if (apiKey != null) { + if (authWhere == 'query') { + options.queryParameters[authKeyName] = apiKey; + } else { + options.headers[authKeyName] = apiKey; + } + } + } + super.onRequest(options, handler); + } +} diff --git a/clients/hydra/dart/lib/src/auth/auth.dart b/clients/hydra/dart/lib/src/auth/auth.dart new file mode 100644 index 00000000000..f7ae9bf3f11 --- /dev/null +++ b/clients/hydra/dart/lib/src/auth/auth.dart @@ -0,0 +1,18 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; + +abstract class AuthInterceptor extends Interceptor { + /// Get auth information on given route for the given type. + /// Can return an empty list if type is not present on auth data or + /// if route doesn't need authentication. + List> getAuthInfo(RequestOptions route, bool Function(Map secure) handles) { + if (route.extra.containsKey('secure')) { + final auth = route.extra['secure'] as List>; + return auth.where((secure) => handles(secure)).toList(); + } + return []; + } +} diff --git a/clients/hydra/dart/lib/src/auth/basic_auth.dart b/clients/hydra/dart/lib/src/auth/basic_auth.dart new file mode 100644 index 00000000000..aaffd0403c3 --- /dev/null +++ b/clients/hydra/dart/lib/src/auth/basic_auth.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:convert'; + +import 'package:dio/dio.dart'; +import 'package:ory_hydra_client/src/auth/auth.dart'; + +class BasicAuthInfo { + final String username; + final String password; + + const BasicAuthInfo(this.username, this.password); +} + +class BasicAuthInterceptor extends AuthInterceptor { + final Map authInfo = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme'] == 'basic') || secure['type'] == 'basic'); + for (final info in metadataAuthInfo) { + final authName = info['name'] as String; + final basicAuthInfo = authInfo[authName]; + if (basicAuthInfo != null) { + final basicAuth = 'Basic ${base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'))}'; + options.headers['Authorization'] = basicAuth; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/clients/hydra/dart/lib/src/auth/bearer_auth.dart b/clients/hydra/dart/lib/src/auth/bearer_auth.dart new file mode 100644 index 00000000000..5940210cf8b --- /dev/null +++ b/clients/hydra/dart/lib/src/auth/bearer_auth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; +import 'package:ory_hydra_client/src/auth/auth.dart'; + +class BearerAuthInterceptor extends AuthInterceptor { + final Map tokens = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme'] == 'bearer'); + for (final info in authInfo) { + final token = tokens[info['name']]; + if (token != null) { + options.headers['Authorization'] = 'Bearer ${token}'; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/clients/hydra/dart/lib/src/auth/oauth.dart b/clients/hydra/dart/lib/src/auth/oauth.dart new file mode 100644 index 00000000000..60767418f81 --- /dev/null +++ b/clients/hydra/dart/lib/src/auth/oauth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; +import 'package:ory_hydra_client/src/auth/auth.dart'; + +class OAuthInterceptor extends AuthInterceptor { + final Map tokens = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'oauth' || secure['type'] == 'oauth2'); + for (final info in authInfo) { + final token = tokens[info['name']]; + if (token != null) { + options.headers['Authorization'] = 'Bearer ${token}'; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/clients/hydra/dart/lib/src/date_serializer.dart b/clients/hydra/dart/lib/src/date_serializer.dart new file mode 100644 index 00000000000..d6f65b1e592 --- /dev/null +++ b/clients/hydra/dart/lib/src/date_serializer.dart @@ -0,0 +1,31 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; +import 'package:ory_hydra_client/src/model/date.dart'; + +class DateSerializer implements PrimitiveSerializer { + + const DateSerializer(); + + @override + Iterable get types => BuiltList.of([Date]); + + @override + String get wireName => 'Date'; + + @override + Date deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) { + final parsed = DateTime.parse(serialized as String); + return Date(parsed.year, parsed.month, parsed.day); + } + + @override + Object serialize(Serializers serializers, Date date, + {FullType specifiedType = FullType.unspecified}) { + return date.toString(); + } +} diff --git a/clients/hydra/dart/lib/src/model/accept_o_auth2_consent_request.dart b/clients/hydra/dart/lib/src/model/accept_o_auth2_consent_request.dart new file mode 100644 index 00000000000..3aaa7491e1d --- /dev/null +++ b/clients/hydra/dart/lib/src/model/accept_o_auth2_consent_request.dart @@ -0,0 +1,202 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:ory_hydra_client/src/model/accept_o_auth2_consent_request_session.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'accept_o_auth2_consent_request.g.dart'; + +/// AcceptOAuth2ConsentRequest +/// +/// Properties: +/// * [grantAccessTokenAudience] +/// * [grantScope] +/// * [handledAt] +/// * [remember] - 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. +/// * [rememberFor] - RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. +/// * [session] +@BuiltValue() +abstract class AcceptOAuth2ConsentRequest implements Built { + @BuiltValueField(wireName: r'grant_access_token_audience') + BuiltList? get grantAccessTokenAudience; + + @BuiltValueField(wireName: r'grant_scope') + BuiltList? get grantScope; + + @BuiltValueField(wireName: r'handled_at') + DateTime? get handledAt; + + /// 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. + @BuiltValueField(wireName: r'remember') + bool? get remember; + + /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + @BuiltValueField(wireName: r'remember_for') + int? get rememberFor; + + @BuiltValueField(wireName: r'session') + AcceptOAuth2ConsentRequestSession? get session; + + AcceptOAuth2ConsentRequest._(); + + factory AcceptOAuth2ConsentRequest([void updates(AcceptOAuth2ConsentRequestBuilder b)]) = _$AcceptOAuth2ConsentRequest; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AcceptOAuth2ConsentRequestBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AcceptOAuth2ConsentRequestSerializer(); +} + +class _$AcceptOAuth2ConsentRequestSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AcceptOAuth2ConsentRequest, _$AcceptOAuth2ConsentRequest]; + + @override + final String wireName = r'AcceptOAuth2ConsentRequest'; + + Iterable _serializeProperties( + Serializers serializers, + AcceptOAuth2ConsentRequest object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.grantAccessTokenAudience != null) { + yield r'grant_access_token_audience'; + yield serializers.serialize( + object.grantAccessTokenAudience, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.grantScope != null) { + yield r'grant_scope'; + yield serializers.serialize( + object.grantScope, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.handledAt != null) { + yield r'handled_at'; + yield serializers.serialize( + object.handledAt, + specifiedType: const FullType(DateTime), + ); + } + if (object.remember != null) { + yield r'remember'; + yield serializers.serialize( + object.remember, + specifiedType: const FullType(bool), + ); + } + if (object.rememberFor != null) { + yield r'remember_for'; + yield serializers.serialize( + object.rememberFor, + specifiedType: const FullType(int), + ); + } + if (object.session != null) { + yield r'session'; + yield serializers.serialize( + object.session, + specifiedType: const FullType(AcceptOAuth2ConsentRequestSession), + ); + } + } + + @override + Object serialize( + Serializers serializers, + AcceptOAuth2ConsentRequest object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AcceptOAuth2ConsentRequestBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'grant_access_token_audience': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.grantAccessTokenAudience.replace(valueDes); + break; + case r'grant_scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.grantScope.replace(valueDes); + break; + case r'handled_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.handledAt = valueDes; + break; + case r'remember': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.remember = valueDes; + break; + case r'remember_for': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.rememberFor = valueDes; + break; + case r'session': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AcceptOAuth2ConsentRequestSession), + ) as AcceptOAuth2ConsentRequestSession; + result.session.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AcceptOAuth2ConsentRequest deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AcceptOAuth2ConsentRequestBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/accept_o_auth2_consent_request_session.dart b/clients/hydra/dart/lib/src/model/accept_o_auth2_consent_request_session.dart new file mode 100644 index 00000000000..df4141712d4 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/accept_o_auth2_consent_request_session.dart @@ -0,0 +1,131 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'accept_o_auth2_consent_request_session.g.dart'; + +/// AcceptOAuth2ConsentRequestSession +/// +/// Properties: +/// * [accessToken] - 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! +/// * [idToken] - 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! +@BuiltValue() +abstract class AcceptOAuth2ConsentRequestSession implements Built { + /// 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! + @BuiltValueField(wireName: r'access_token') + JsonObject? get accessToken; + + /// 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! + @BuiltValueField(wireName: r'id_token') + JsonObject? get idToken; + + AcceptOAuth2ConsentRequestSession._(); + + factory AcceptOAuth2ConsentRequestSession([void updates(AcceptOAuth2ConsentRequestSessionBuilder b)]) = _$AcceptOAuth2ConsentRequestSession; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AcceptOAuth2ConsentRequestSessionBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AcceptOAuth2ConsentRequestSessionSerializer(); +} + +class _$AcceptOAuth2ConsentRequestSessionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AcceptOAuth2ConsentRequestSession, _$AcceptOAuth2ConsentRequestSession]; + + @override + final String wireName = r'AcceptOAuth2ConsentRequestSession'; + + Iterable _serializeProperties( + Serializers serializers, + AcceptOAuth2ConsentRequestSession object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.accessToken != null) { + yield r'access_token'; + yield serializers.serialize( + object.accessToken, + specifiedType: const FullType.nullable(JsonObject), + ); + } + if (object.idToken != null) { + yield r'id_token'; + yield serializers.serialize( + object.idToken, + specifiedType: const FullType.nullable(JsonObject), + ); + } + } + + @override + Object serialize( + Serializers serializers, + AcceptOAuth2ConsentRequestSession object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AcceptOAuth2ConsentRequestSessionBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'access_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(JsonObject), + ) as JsonObject?; + if (valueDes == null) continue; + result.accessToken = valueDes; + break; + case r'id_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(JsonObject), + ) as JsonObject?; + if (valueDes == null) continue; + result.idToken = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AcceptOAuth2ConsentRequestSession deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AcceptOAuth2ConsentRequestSessionBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/accept_o_auth2_login_request.dart b/clients/hydra/dart/lib/src/model/accept_o_auth2_login_request.dart new file mode 100644 index 00000000000..609553e2b6c --- /dev/null +++ b/clients/hydra/dart/lib/src/model/accept_o_auth2_login_request.dart @@ -0,0 +1,222 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'accept_o_auth2_login_request.g.dart'; + +/// AcceptOAuth2LoginRequest +/// +/// Properties: +/// * [acr] - 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] +/// * [context] +/// * [forceSubjectIdentifier] - 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. +/// * [remember] - 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. +/// * [rememberFor] - 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] - Subject is the user ID of the end-user that authenticated. +@BuiltValue() +abstract class AcceptOAuth2LoginRequest implements Built { + /// 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. + @BuiltValueField(wireName: r'acr') + String? get acr; + + @BuiltValueField(wireName: r'amr') + BuiltList? get amr; + + @BuiltValueField(wireName: r'context') + JsonObject? get context; + + /// 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. + @BuiltValueField(wireName: r'force_subject_identifier') + String? get forceSubjectIdentifier; + + /// 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. + @BuiltValueField(wireName: r'remember') + bool? get remember; + + /// 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). + @BuiltValueField(wireName: r'remember_for') + int? get rememberFor; + + /// Subject is the user ID of the end-user that authenticated. + @BuiltValueField(wireName: r'subject') + String get subject; + + AcceptOAuth2LoginRequest._(); + + factory AcceptOAuth2LoginRequest([void updates(AcceptOAuth2LoginRequestBuilder b)]) = _$AcceptOAuth2LoginRequest; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AcceptOAuth2LoginRequestBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AcceptOAuth2LoginRequestSerializer(); +} + +class _$AcceptOAuth2LoginRequestSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AcceptOAuth2LoginRequest, _$AcceptOAuth2LoginRequest]; + + @override + final String wireName = r'AcceptOAuth2LoginRequest'; + + Iterable _serializeProperties( + Serializers serializers, + AcceptOAuth2LoginRequest object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.acr != null) { + yield r'acr'; + yield serializers.serialize( + object.acr, + specifiedType: const FullType(String), + ); + } + if (object.amr != null) { + yield r'amr'; + yield serializers.serialize( + object.amr, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.context != null) { + yield r'context'; + yield serializers.serialize( + object.context, + specifiedType: const FullType.nullable(JsonObject), + ); + } + if (object.forceSubjectIdentifier != null) { + yield r'force_subject_identifier'; + yield serializers.serialize( + object.forceSubjectIdentifier, + specifiedType: const FullType(String), + ); + } + if (object.remember != null) { + yield r'remember'; + yield serializers.serialize( + object.remember, + specifiedType: const FullType(bool), + ); + } + if (object.rememberFor != null) { + yield r'remember_for'; + yield serializers.serialize( + object.rememberFor, + specifiedType: const FullType(int), + ); + } + yield r'subject'; + yield serializers.serialize( + object.subject, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + AcceptOAuth2LoginRequest object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AcceptOAuth2LoginRequestBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'acr': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.acr = valueDes; + break; + case r'amr': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.amr.replace(valueDes); + break; + case r'context': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(JsonObject), + ) as JsonObject?; + if (valueDes == null) continue; + result.context = valueDes; + break; + case r'force_subject_identifier': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.forceSubjectIdentifier = valueDes; + break; + case r'remember': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.remember = valueDes; + break; + case r'remember_for': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.rememberFor = valueDes; + break; + case r'subject': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.subject = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AcceptOAuth2LoginRequest deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AcceptOAuth2LoginRequestBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/create_json_web_key_set.dart b/clients/hydra/dart/lib/src/model/create_json_web_key_set.dart new file mode 100644 index 00000000000..1b96e746a7f --- /dev/null +++ b/clients/hydra/dart/lib/src/model/create_json_web_key_set.dart @@ -0,0 +1,141 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'create_json_web_key_set.g.dart'; + +/// Create JSON Web Key Set Request Body +/// +/// Properties: +/// * [alg] - JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. +/// * [kid] - JSON Web Key ID The Key ID of the key to be created. +/// * [use] - 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\". +@BuiltValue() +abstract class CreateJsonWebKeySet implements Built { + /// JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. + @BuiltValueField(wireName: r'alg') + String get alg; + + /// JSON Web Key ID The Key ID of the key to be created. + @BuiltValueField(wireName: r'kid') + String get kid; + + /// 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\". + @BuiltValueField(wireName: r'use') + String get use; + + CreateJsonWebKeySet._(); + + factory CreateJsonWebKeySet([void updates(CreateJsonWebKeySetBuilder b)]) = _$CreateJsonWebKeySet; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CreateJsonWebKeySetBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CreateJsonWebKeySetSerializer(); +} + +class _$CreateJsonWebKeySetSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CreateJsonWebKeySet, _$CreateJsonWebKeySet]; + + @override + final String wireName = r'CreateJsonWebKeySet'; + + Iterable _serializeProperties( + Serializers serializers, + CreateJsonWebKeySet object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'alg'; + yield serializers.serialize( + object.alg, + specifiedType: const FullType(String), + ); + yield r'kid'; + yield serializers.serialize( + object.kid, + specifiedType: const FullType(String), + ); + yield r'use'; + yield serializers.serialize( + object.use, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + CreateJsonWebKeySet object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CreateJsonWebKeySetBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'alg': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.alg = valueDes; + break; + case r'kid': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.kid = valueDes; + break; + case r'use': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.use = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CreateJsonWebKeySet deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CreateJsonWebKeySetBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/date.dart b/clients/hydra/dart/lib/src/model/date.dart new file mode 100644 index 00000000000..b21c7f544be --- /dev/null +++ b/clients/hydra/dart/lib/src/model/date.dart @@ -0,0 +1,70 @@ +/// A gregorian calendar date generated by +/// OpenAPI generator to differentiate +/// between [DateTime] and [Date] formats. +class Date implements Comparable { + final int year; + + /// January is 1. + final int month; + + /// First day is 1. + final int day; + + Date(this.year, this.month, this.day); + + /// The current date + static Date now({bool utc = false}) { + var now = DateTime.now(); + if (utc) { + now = now.toUtc(); + } + return now.toDate(); + } + + /// Convert to a [DateTime]. + DateTime toDateTime({bool utc = false}) { + if (utc) { + return DateTime.utc(year, month, day); + } else { + return DateTime(year, month, day); + } + } + + @override + int compareTo(Date other) { + int d = year.compareTo(other.year); + if (d != 0) { + return d; + } + d = month.compareTo(other.month); + if (d != 0) { + return d; + } + return day.compareTo(other.day); + } + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Date && + runtimeType == other.runtimeType && + year == other.year && + month == other.month && + day == other.day; + + @override + int get hashCode => year.hashCode ^ month.hashCode ^ day.hashCode; + + @override + String toString() { + final yyyy = year.toString(); + final mm = month.toString().padLeft(2, '0'); + final dd = day.toString().padLeft(2, '0'); + + return '$yyyy-$mm-$dd'; + } +} + +extension DateTimeToDate on DateTime { + Date toDate() => Date(year, month, day); +} diff --git a/clients/hydra/dart/lib/src/model/error_o_auth2.dart b/clients/hydra/dart/lib/src/model/error_o_auth2.dart new file mode 100644 index 00000000000..116ba2defa3 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/error_o_auth2.dart @@ -0,0 +1,185 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'error_o_auth2.g.dart'; + +/// Error +/// +/// Properties: +/// * [error] - Error +/// * [errorDebug] - Error Debug Information Only available in dev mode. +/// * [errorDescription] - Error Description +/// * [errorHint] - Error Hint Helps the user identify the error cause. +/// * [statusCode] - HTTP Status Code +@BuiltValue() +abstract class ErrorOAuth2 implements Built { + /// Error + @BuiltValueField(wireName: r'error') + String? get error; + + /// Error Debug Information Only available in dev mode. + @BuiltValueField(wireName: r'error_debug') + String? get errorDebug; + + /// Error Description + @BuiltValueField(wireName: r'error_description') + String? get errorDescription; + + /// Error Hint Helps the user identify the error cause. + @BuiltValueField(wireName: r'error_hint') + String? get errorHint; + + /// HTTP Status Code + @BuiltValueField(wireName: r'status_code') + int? get statusCode; + + ErrorOAuth2._(); + + factory ErrorOAuth2([void updates(ErrorOAuth2Builder b)]) = _$ErrorOAuth2; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ErrorOAuth2Builder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ErrorOAuth2Serializer(); +} + +class _$ErrorOAuth2Serializer implements PrimitiveSerializer { + @override + final Iterable types = const [ErrorOAuth2, _$ErrorOAuth2]; + + @override + final String wireName = r'ErrorOAuth2'; + + Iterable _serializeProperties( + Serializers serializers, + ErrorOAuth2 object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.error != null) { + yield r'error'; + yield serializers.serialize( + object.error, + specifiedType: const FullType(String), + ); + } + if (object.errorDebug != null) { + yield r'error_debug'; + yield serializers.serialize( + object.errorDebug, + specifiedType: const FullType(String), + ); + } + if (object.errorDescription != null) { + yield r'error_description'; + yield serializers.serialize( + object.errorDescription, + specifiedType: const FullType(String), + ); + } + if (object.errorHint != null) { + yield r'error_hint'; + yield serializers.serialize( + object.errorHint, + specifiedType: const FullType(String), + ); + } + if (object.statusCode != null) { + yield r'status_code'; + yield serializers.serialize( + object.statusCode, + specifiedType: const FullType(int), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ErrorOAuth2 object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ErrorOAuth2Builder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'error': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.error = valueDes; + break; + case r'error_debug': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.errorDebug = valueDes; + break; + case r'error_description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.errorDescription = valueDes; + break; + case r'error_hint': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.errorHint = valueDes; + break; + case r'status_code': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.statusCode = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ErrorOAuth2 deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ErrorOAuth2Builder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/generic_error.dart b/clients/hydra/dart/lib/src/model/generic_error.dart new file mode 100644 index 00000000000..ba7b622013d --- /dev/null +++ b/clients/hydra/dart/lib/src/model/generic_error.dart @@ -0,0 +1,242 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'generic_error.g.dart'; + +/// GenericError +/// +/// Properties: +/// * [code] - The status code +/// * [debug] - Debug information This field is often not exposed to protect against leaking sensitive information. +/// * [details] - Further error details +/// * [id] - The error ID Useful when trying to identify various errors in application logic. +/// * [message] - Error message The error's message. +/// * [reason] - A human-readable reason for the error +/// * [request] - The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. +/// * [status] - The status description +@BuiltValue() +abstract class GenericError implements Built { + /// The status code + @BuiltValueField(wireName: r'code') + int? get code; + + /// Debug information This field is often not exposed to protect against leaking sensitive information. + @BuiltValueField(wireName: r'debug') + String? get debug; + + /// Further error details + @BuiltValueField(wireName: r'details') + JsonObject? get details; + + /// The error ID Useful when trying to identify various errors in application logic. + @BuiltValueField(wireName: r'id') + String? get id; + + /// Error message The error's message. + @BuiltValueField(wireName: r'message') + String get message; + + /// A human-readable reason for the error + @BuiltValueField(wireName: r'reason') + String? get reason; + + /// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. + @BuiltValueField(wireName: r'request') + String? get request; + + /// The status description + @BuiltValueField(wireName: r'status') + String? get status; + + GenericError._(); + + factory GenericError([void updates(GenericErrorBuilder b)]) = _$GenericError; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(GenericErrorBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$GenericErrorSerializer(); +} + +class _$GenericErrorSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [GenericError, _$GenericError]; + + @override + final String wireName = r'GenericError'; + + Iterable _serializeProperties( + Serializers serializers, + GenericError object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.code != null) { + yield r'code'; + yield serializers.serialize( + object.code, + specifiedType: const FullType(int), + ); + } + if (object.debug != null) { + yield r'debug'; + yield serializers.serialize( + object.debug, + specifiedType: const FullType(String), + ); + } + if (object.details != null) { + yield r'details'; + yield serializers.serialize( + object.details, + specifiedType: const FullType.nullable(JsonObject), + ); + } + if (object.id != null) { + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + } + yield r'message'; + yield serializers.serialize( + object.message, + specifiedType: const FullType(String), + ); + if (object.reason != null) { + yield r'reason'; + yield serializers.serialize( + object.reason, + specifiedType: const FullType(String), + ); + } + if (object.request != null) { + yield r'request'; + yield serializers.serialize( + object.request, + specifiedType: const FullType(String), + ); + } + if (object.status != null) { + yield r'status'; + yield serializers.serialize( + object.status, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + GenericError object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required GenericErrorBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'code': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.code = valueDes; + break; + case r'debug': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.debug = valueDes; + break; + case r'details': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(JsonObject), + ) as JsonObject?; + if (valueDes == null) continue; + result.details = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'message': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.message = valueDes; + break; + case r'reason': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.reason = valueDes; + break; + case r'request': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.request = valueDes; + break; + case r'status': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.status = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + GenericError deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GenericErrorBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/get_version200_response.dart b/clients/hydra/dart/lib/src/model/get_version200_response.dart new file mode 100644 index 00000000000..eb066b5edbe --- /dev/null +++ b/clients/hydra/dart/lib/src/model/get_version200_response.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'get_version200_response.g.dart'; + +/// GetVersion200Response +/// +/// Properties: +/// * [version] - The version of Ory Hydra. +@BuiltValue() +abstract class GetVersion200Response implements Built { + /// The version of Ory Hydra. + @BuiltValueField(wireName: r'version') + String? get version; + + GetVersion200Response._(); + + factory GetVersion200Response([void updates(GetVersion200ResponseBuilder b)]) = _$GetVersion200Response; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(GetVersion200ResponseBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$GetVersion200ResponseSerializer(); +} + +class _$GetVersion200ResponseSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [GetVersion200Response, _$GetVersion200Response]; + + @override + final String wireName = r'GetVersion200Response'; + + Iterable _serializeProperties( + Serializers serializers, + GetVersion200Response object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.version != null) { + yield r'version'; + yield serializers.serialize( + object.version, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + GetVersion200Response object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required GetVersion200ResponseBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'version': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.version = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + GetVersion200Response deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = GetVersion200ResponseBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/health_not_ready_status.dart b/clients/hydra/dart/lib/src/model/health_not_ready_status.dart new file mode 100644 index 00000000000..f450e6d378c --- /dev/null +++ b/clients/hydra/dart/lib/src/model/health_not_ready_status.dart @@ -0,0 +1,110 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'health_not_ready_status.g.dart'; + +/// HealthNotReadyStatus +/// +/// Properties: +/// * [errors] - Errors contains a list of errors that caused the not ready status. +@BuiltValue() +abstract class HealthNotReadyStatus implements Built { + /// Errors contains a list of errors that caused the not ready status. + @BuiltValueField(wireName: r'errors') + BuiltMap? get errors; + + HealthNotReadyStatus._(); + + factory HealthNotReadyStatus([void updates(HealthNotReadyStatusBuilder b)]) = _$HealthNotReadyStatus; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(HealthNotReadyStatusBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$HealthNotReadyStatusSerializer(); +} + +class _$HealthNotReadyStatusSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [HealthNotReadyStatus, _$HealthNotReadyStatus]; + + @override + final String wireName = r'HealthNotReadyStatus'; + + Iterable _serializeProperties( + Serializers serializers, + HealthNotReadyStatus object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.errors != null) { + yield r'errors'; + yield serializers.serialize( + object.errors, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]), + ); + } + } + + @override + Object serialize( + Serializers serializers, + HealthNotReadyStatus object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required HealthNotReadyStatusBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'errors': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]), + ) as BuiltMap; + result.errors.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + HealthNotReadyStatus deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = HealthNotReadyStatusBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/health_status.dart b/clients/hydra/dart/lib/src/model/health_status.dart new file mode 100644 index 00000000000..1420ae2f4d1 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/health_status.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'health_status.g.dart'; + +/// HealthStatus +/// +/// Properties: +/// * [status] - Status always contains \"ok\". +@BuiltValue() +abstract class HealthStatus implements Built { + /// Status always contains \"ok\". + @BuiltValueField(wireName: r'status') + String? get status; + + HealthStatus._(); + + factory HealthStatus([void updates(HealthStatusBuilder b)]) = _$HealthStatus; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(HealthStatusBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$HealthStatusSerializer(); +} + +class _$HealthStatusSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [HealthStatus, _$HealthStatus]; + + @override + final String wireName = r'HealthStatus'; + + Iterable _serializeProperties( + Serializers serializers, + HealthStatus object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.status != null) { + yield r'status'; + yield serializers.serialize( + object.status, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + HealthStatus object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required HealthStatusBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'status': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.status = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + HealthStatus deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = HealthStatusBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/introspected_o_auth2_token.dart b/clients/hydra/dart/lib/src/model/introspected_o_auth2_token.dart new file mode 100644 index 00000000000..7ba44f810f8 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/introspected_o_auth2_token.dart @@ -0,0 +1,356 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'introspected_o_auth2_token.g.dart'; + +/// Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) +/// +/// Properties: +/// * [active] - 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] - Audience contains a list of the token's intended audiences. +/// * [clientId] - ID is aclient identifier for the OAuth 2.0 client that requested this token. +/// * [exp] - Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. +/// * [ext] - Extra is arbitrary data set by the session. +/// * [iat] - 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] - IssuerURL is a string representing the issuer of this token +/// * [nbf] - 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. +/// * [obfuscatedSubject] - 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] - Scope is a JSON string containing a space-separated list of scopes associated with this token. +/// * [sub] - Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. +/// * [tokenType] - TokenType is the introspected token's type, typically `Bearer`. +/// * [tokenUse] - TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. +/// * [username] - Username is a human-readable identifier for the resource owner who authorized this token. +@BuiltValue() +abstract class IntrospectedOAuth2Token implements Built { + /// 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). + @BuiltValueField(wireName: r'active') + bool get active; + + /// Audience contains a list of the token's intended audiences. + @BuiltValueField(wireName: r'aud') + BuiltList? get aud; + + /// ID is aclient identifier for the OAuth 2.0 client that requested this token. + @BuiltValueField(wireName: r'client_id') + String? get clientId; + + /// Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. + @BuiltValueField(wireName: r'exp') + int? get exp; + + /// Extra is arbitrary data set by the session. + @BuiltValueField(wireName: r'ext') + BuiltMap? get ext; + + /// Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued. + @BuiltValueField(wireName: r'iat') + int? get iat; + + /// IssuerURL is a string representing the issuer of this token + @BuiltValueField(wireName: r'iss') + String? get iss; + + /// 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. + @BuiltValueField(wireName: r'nbf') + int? get nbf; + + /// 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. + @BuiltValueField(wireName: r'obfuscated_subject') + String? get obfuscatedSubject; + + /// Scope is a JSON string containing a space-separated list of scopes associated with this token. + @BuiltValueField(wireName: r'scope') + String? get scope; + + /// Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. + @BuiltValueField(wireName: r'sub') + String? get sub; + + /// TokenType is the introspected token's type, typically `Bearer`. + @BuiltValueField(wireName: r'token_type') + String? get tokenType; + + /// TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. + @BuiltValueField(wireName: r'token_use') + String? get tokenUse; + + /// Username is a human-readable identifier for the resource owner who authorized this token. + @BuiltValueField(wireName: r'username') + String? get username; + + IntrospectedOAuth2Token._(); + + factory IntrospectedOAuth2Token([void updates(IntrospectedOAuth2TokenBuilder b)]) = _$IntrospectedOAuth2Token; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(IntrospectedOAuth2TokenBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$IntrospectedOAuth2TokenSerializer(); +} + +class _$IntrospectedOAuth2TokenSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [IntrospectedOAuth2Token, _$IntrospectedOAuth2Token]; + + @override + final String wireName = r'IntrospectedOAuth2Token'; + + Iterable _serializeProperties( + Serializers serializers, + IntrospectedOAuth2Token object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'active'; + yield serializers.serialize( + object.active, + specifiedType: const FullType(bool), + ); + if (object.aud != null) { + yield r'aud'; + yield serializers.serialize( + object.aud, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.clientId != null) { + yield r'client_id'; + yield serializers.serialize( + object.clientId, + specifiedType: const FullType(String), + ); + } + if (object.exp != null) { + yield r'exp'; + yield serializers.serialize( + object.exp, + specifiedType: const FullType(int), + ); + } + if (object.ext != null) { + yield r'ext'; + yield serializers.serialize( + object.ext, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ); + } + if (object.iat != null) { + yield r'iat'; + yield serializers.serialize( + object.iat, + specifiedType: const FullType(int), + ); + } + if (object.iss != null) { + yield r'iss'; + yield serializers.serialize( + object.iss, + specifiedType: const FullType(String), + ); + } + if (object.nbf != null) { + yield r'nbf'; + yield serializers.serialize( + object.nbf, + specifiedType: const FullType(int), + ); + } + if (object.obfuscatedSubject != null) { + yield r'obfuscated_subject'; + yield serializers.serialize( + object.obfuscatedSubject, + specifiedType: const FullType(String), + ); + } + if (object.scope != null) { + yield r'scope'; + yield serializers.serialize( + object.scope, + specifiedType: const FullType(String), + ); + } + if (object.sub != null) { + yield r'sub'; + yield serializers.serialize( + object.sub, + specifiedType: const FullType(String), + ); + } + if (object.tokenType != null) { + yield r'token_type'; + yield serializers.serialize( + object.tokenType, + specifiedType: const FullType(String), + ); + } + if (object.tokenUse != null) { + yield r'token_use'; + yield serializers.serialize( + object.tokenUse, + specifiedType: const FullType(String), + ); + } + if (object.username != null) { + yield r'username'; + yield serializers.serialize( + object.username, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + IntrospectedOAuth2Token object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required IntrospectedOAuth2TokenBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'active': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.active = valueDes; + break; + case r'aud': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.aud.replace(valueDes); + break; + case r'client_id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.clientId = valueDes; + break; + case r'exp': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.exp = valueDes; + break; + case r'ext': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ) as BuiltMap; + result.ext.replace(valueDes); + break; + case r'iat': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.iat = valueDes; + break; + case r'iss': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.iss = valueDes; + break; + case r'nbf': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.nbf = valueDes; + break; + case r'obfuscated_subject': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.obfuscatedSubject = valueDes; + break; + case r'scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.scope = valueDes; + break; + case r'sub': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.sub = valueDes; + break; + case r'token_type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.tokenType = valueDes; + break; + case r'token_use': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.tokenUse = valueDes; + break; + case r'username': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.username = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + IntrospectedOAuth2Token deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = IntrospectedOAuth2TokenBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/is_ready200_response.dart b/clients/hydra/dart/lib/src/model/is_ready200_response.dart new file mode 100644 index 00000000000..fd0d04a6956 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/is_ready200_response.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'is_ready200_response.g.dart'; + +/// IsReady200Response +/// +/// Properties: +/// * [status] - Always \"ok\". +@BuiltValue() +abstract class IsReady200Response implements Built { + /// Always \"ok\". + @BuiltValueField(wireName: r'status') + String? get status; + + IsReady200Response._(); + + factory IsReady200Response([void updates(IsReady200ResponseBuilder b)]) = _$IsReady200Response; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(IsReady200ResponseBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$IsReady200ResponseSerializer(); +} + +class _$IsReady200ResponseSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [IsReady200Response, _$IsReady200Response]; + + @override + final String wireName = r'IsReady200Response'; + + Iterable _serializeProperties( + Serializers serializers, + IsReady200Response object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.status != null) { + yield r'status'; + yield serializers.serialize( + object.status, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + IsReady200Response object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required IsReady200ResponseBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'status': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.status = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + IsReady200Response deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = IsReady200ResponseBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/is_ready503_response.dart b/clients/hydra/dart/lib/src/model/is_ready503_response.dart new file mode 100644 index 00000000000..bb8d6cbd196 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/is_ready503_response.dart @@ -0,0 +1,110 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'is_ready503_response.g.dart'; + +/// IsReady503Response +/// +/// Properties: +/// * [errors] - Errors contains a list of errors that caused the not ready status. +@BuiltValue() +abstract class IsReady503Response implements Built { + /// Errors contains a list of errors that caused the not ready status. + @BuiltValueField(wireName: r'errors') + BuiltMap? get errors; + + IsReady503Response._(); + + factory IsReady503Response([void updates(IsReady503ResponseBuilder b)]) = _$IsReady503Response; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(IsReady503ResponseBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$IsReady503ResponseSerializer(); +} + +class _$IsReady503ResponseSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [IsReady503Response, _$IsReady503Response]; + + @override + final String wireName = r'IsReady503Response'; + + Iterable _serializeProperties( + Serializers serializers, + IsReady503Response object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.errors != null) { + yield r'errors'; + yield serializers.serialize( + object.errors, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]), + ); + } + } + + @override + Object serialize( + Serializers serializers, + IsReady503Response object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required IsReady503ResponseBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'errors': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]), + ) as BuiltMap; + result.errors.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + IsReady503Response deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = IsReady503ResponseBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/json_patch.dart b/clients/hydra/dart/lib/src/model/json_patch.dart new file mode 100644 index 00000000000..ad22454840f --- /dev/null +++ b/clients/hydra/dart/lib/src/model/json_patch.dart @@ -0,0 +1,164 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'json_patch.g.dart'; + +/// A JSONPatch document as defined by RFC 6902 +/// +/// Properties: +/// * [from] - 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). +/// * [op] - The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". +/// * [path] - 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] - The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). +@BuiltValue() +abstract class JsonPatch implements Built { + /// 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). + @BuiltValueField(wireName: r'from') + String? get from; + + /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". + @BuiltValueField(wireName: r'op') + String get op; + + /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + @BuiltValueField(wireName: r'path') + String get path; + + /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + @BuiltValueField(wireName: r'value') + JsonObject? get value; + + JsonPatch._(); + + factory JsonPatch([void updates(JsonPatchBuilder b)]) = _$JsonPatch; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(JsonPatchBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$JsonPatchSerializer(); +} + +class _$JsonPatchSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [JsonPatch, _$JsonPatch]; + + @override + final String wireName = r'JsonPatch'; + + Iterable _serializeProperties( + Serializers serializers, + JsonPatch object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.from != null) { + yield r'from'; + yield serializers.serialize( + object.from, + specifiedType: const FullType(String), + ); + } + yield r'op'; + yield serializers.serialize( + object.op, + specifiedType: const FullType(String), + ); + yield r'path'; + yield serializers.serialize( + object.path, + specifiedType: const FullType(String), + ); + if (object.value != null) { + yield r'value'; + yield serializers.serialize( + object.value, + specifiedType: const FullType.nullable(JsonObject), + ); + } + } + + @override + Object serialize( + Serializers serializers, + JsonPatch object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required JsonPatchBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'from': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.from = valueDes; + break; + case r'op': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.op = valueDes; + break; + case r'path': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.path = valueDes; + break; + case r'value': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(JsonObject), + ) as JsonObject?; + if (valueDes == null) continue; + result.value = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + JsonPatch deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = JsonPatchBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/json_web_key.dart b/clients/hydra/dart/lib/src/model/json_web_key.dart new file mode 100644 index 00000000000..bfb991a3d4e --- /dev/null +++ b/clients/hydra/dart/lib/src/model/json_web_key.dart @@ -0,0 +1,394 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'json_web_key.g.dart'; + +/// JsonWebKey +/// +/// Properties: +/// * [alg] - 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] +/// * [d] +/// * [dp] +/// * [dq] +/// * [e] +/// * [k] +/// * [kid] - 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] - 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] +/// * [p] +/// * [q] +/// * [qi] +/// * [use] - 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] +/// * [x5c] - 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] +@BuiltValue() +abstract class JsonWebKey implements Built { + /// 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. + @BuiltValueField(wireName: r'alg') + String get alg; + + @BuiltValueField(wireName: r'crv') + String? get crv; + + @BuiltValueField(wireName: r'd') + String? get d; + + @BuiltValueField(wireName: r'dp') + String? get dp; + + @BuiltValueField(wireName: r'dq') + String? get dq; + + @BuiltValueField(wireName: r'e') + String? get e; + + @BuiltValueField(wireName: r'k') + String? get k; + + /// 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. + @BuiltValueField(wireName: r'kid') + String get kid; + + /// 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. + @BuiltValueField(wireName: r'kty') + String get kty; + + @BuiltValueField(wireName: r'n') + String? get n; + + @BuiltValueField(wireName: r'p') + String? get p; + + @BuiltValueField(wireName: r'q') + String? get q; + + @BuiltValueField(wireName: r'qi') + String? get qi; + + /// 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). + @BuiltValueField(wireName: r'use') + String get use; + + @BuiltValueField(wireName: r'x') + String? get x; + + /// 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. + @BuiltValueField(wireName: r'x5c') + BuiltList? get x5c; + + @BuiltValueField(wireName: r'y') + String? get y; + + JsonWebKey._(); + + factory JsonWebKey([void updates(JsonWebKeyBuilder b)]) = _$JsonWebKey; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(JsonWebKeyBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$JsonWebKeySerializer(); +} + +class _$JsonWebKeySerializer implements PrimitiveSerializer { + @override + final Iterable types = const [JsonWebKey, _$JsonWebKey]; + + @override + final String wireName = r'JsonWebKey'; + + Iterable _serializeProperties( + Serializers serializers, + JsonWebKey object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'alg'; + yield serializers.serialize( + object.alg, + specifiedType: const FullType(String), + ); + if (object.crv != null) { + yield r'crv'; + yield serializers.serialize( + object.crv, + specifiedType: const FullType(String), + ); + } + if (object.d != null) { + yield r'd'; + yield serializers.serialize( + object.d, + specifiedType: const FullType(String), + ); + } + if (object.dp != null) { + yield r'dp'; + yield serializers.serialize( + object.dp, + specifiedType: const FullType(String), + ); + } + if (object.dq != null) { + yield r'dq'; + yield serializers.serialize( + object.dq, + specifiedType: const FullType(String), + ); + } + if (object.e != null) { + yield r'e'; + yield serializers.serialize( + object.e, + specifiedType: const FullType(String), + ); + } + if (object.k != null) { + yield r'k'; + yield serializers.serialize( + object.k, + specifiedType: const FullType(String), + ); + } + yield r'kid'; + yield serializers.serialize( + object.kid, + specifiedType: const FullType(String), + ); + yield r'kty'; + yield serializers.serialize( + object.kty, + specifiedType: const FullType(String), + ); + if (object.n != null) { + yield r'n'; + yield serializers.serialize( + object.n, + specifiedType: const FullType(String), + ); + } + if (object.p != null) { + yield r'p'; + yield serializers.serialize( + object.p, + specifiedType: const FullType(String), + ); + } + if (object.q != null) { + yield r'q'; + yield serializers.serialize( + object.q, + specifiedType: const FullType(String), + ); + } + if (object.qi != null) { + yield r'qi'; + yield serializers.serialize( + object.qi, + specifiedType: const FullType(String), + ); + } + yield r'use'; + yield serializers.serialize( + object.use, + specifiedType: const FullType(String), + ); + if (object.x != null) { + yield r'x'; + yield serializers.serialize( + object.x, + specifiedType: const FullType(String), + ); + } + if (object.x5c != null) { + yield r'x5c'; + yield serializers.serialize( + object.x5c, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.y != null) { + yield r'y'; + yield serializers.serialize( + object.y, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + JsonWebKey object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required JsonWebKeyBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'alg': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.alg = valueDes; + break; + case r'crv': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.crv = valueDes; + break; + case r'd': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.d = valueDes; + break; + case r'dp': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.dp = valueDes; + break; + case r'dq': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.dq = valueDes; + break; + case r'e': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.e = valueDes; + break; + case r'k': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.k = valueDes; + break; + case r'kid': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.kid = valueDes; + break; + case r'kty': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.kty = valueDes; + break; + case r'n': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.n = valueDes; + break; + case r'p': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.p = valueDes; + break; + case r'q': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.q = valueDes; + break; + case r'qi': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.qi = valueDes; + break; + case r'use': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.use = valueDes; + break; + case r'x': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.x = valueDes; + break; + case r'x5c': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.x5c.replace(valueDes); + break; + case r'y': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.y = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + JsonWebKey deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = JsonWebKeyBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/json_web_key_set.dart b/clients/hydra/dart/lib/src/model/json_web_key_set.dart new file mode 100644 index 00000000000..234c63fb4b3 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/json_web_key_set.dart @@ -0,0 +1,111 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:ory_hydra_client/src/model/json_web_key.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'json_web_key_set.g.dart'; + +/// JSON Web Key Set +/// +/// Properties: +/// * [keys] - 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. +@BuiltValue() +abstract class JsonWebKeySet implements Built { + /// 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. + @BuiltValueField(wireName: r'keys') + BuiltList? get keys; + + JsonWebKeySet._(); + + factory JsonWebKeySet([void updates(JsonWebKeySetBuilder b)]) = _$JsonWebKeySet; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(JsonWebKeySetBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$JsonWebKeySetSerializer(); +} + +class _$JsonWebKeySetSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [JsonWebKeySet, _$JsonWebKeySet]; + + @override + final String wireName = r'JsonWebKeySet'; + + Iterable _serializeProperties( + Serializers serializers, + JsonWebKeySet object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.keys != null) { + yield r'keys'; + yield serializers.serialize( + object.keys, + specifiedType: const FullType(BuiltList, [FullType(JsonWebKey)]), + ); + } + } + + @override + Object serialize( + Serializers serializers, + JsonWebKeySet object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required JsonWebKeySetBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'keys': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(JsonWebKey)]), + ) as BuiltList; + result.keys.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + JsonWebKeySet deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = JsonWebKeySetBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_client.dart b/clients/hydra/dart/lib/src/model/o_auth2_client.dart new file mode 100644 index 00000000000..5cc67d50db5 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_client.dart @@ -0,0 +1,940 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_client.g.dart'; + +/// 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: +/// * [allowedCorsOrigins] +/// * [audience] +/// * [authorizationCodeGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [authorizationCodeGrantIdTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [authorizationCodeGrantRefreshTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [backchannelLogoutSessionRequired] - 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. +/// * [backchannelLogoutUri] - 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. +/// * [clientCredentialsGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [clientId] - OAuth 2.0 Client ID The ID is autogenerated and immutable. +/// * [clientName] - OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. +/// * [clientSecret] - 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. +/// * [clientSecretExpiresAt] - OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. +/// * [clientUri] - 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] +/// * [createdAt] - OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. +/// * [frontchannelLogoutSessionRequired] - 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. +/// * [frontchannelLogoutUri] - 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. +/// * [grantTypes] +/// * [implicitGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [implicitGrantIdTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [jwks] - 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. +/// * [jwksUri] - 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. +/// * [jwtBearerGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [logoUri] - OAuth 2.0 Client Logo URI A URL string referencing the client's logo. +/// * [metadata] +/// * [owner] - OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. +/// * [policyUri] - 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. +/// * [postLogoutRedirectUris] +/// * [redirectUris] +/// * [refreshTokenGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [refreshTokenGrantIdTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [refreshTokenGrantRefreshTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [registrationAccessToken] - 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. +/// * [registrationClientUri] - OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. +/// * [requestObjectSigningAlg] - 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. +/// * [requestUris] +/// * [responseTypes] +/// * [scope] - 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. +/// * [sectorIdentifierUri] - 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. +/// * [subjectType] - 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`. +/// * [tokenEndpointAuthMethod] - OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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. +/// * [tokenEndpointAuthSigningAlg] - OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. +/// * [tosUri] - 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. +/// * [updatedAt] - OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. +/// * [userinfoSignedResponseAlg] - 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. +@BuiltValue() +abstract class OAuth2Client implements Built { + @BuiltValueField(wireName: r'allowed_cors_origins') + BuiltList? get allowedCorsOrigins; + + @BuiltValueField(wireName: r'audience') + BuiltList? get audience; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'authorization_code_grant_access_token_lifespan') + String? get authorizationCodeGrantAccessTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'authorization_code_grant_id_token_lifespan') + String? get authorizationCodeGrantIdTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'authorization_code_grant_refresh_token_lifespan') + String? get authorizationCodeGrantRefreshTokenLifespan; + + /// 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. + @BuiltValueField(wireName: r'backchannel_logout_session_required') + bool? get backchannelLogoutSessionRequired; + + /// 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. + @BuiltValueField(wireName: r'backchannel_logout_uri') + String? get backchannelLogoutUri; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'client_credentials_grant_access_token_lifespan') + String? get clientCredentialsGrantAccessTokenLifespan; + + /// OAuth 2.0 Client ID The ID is autogenerated and immutable. + @BuiltValueField(wireName: r'client_id') + String? get clientId; + + /// OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. + @BuiltValueField(wireName: r'client_name') + String? get clientName; + + /// 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. + @BuiltValueField(wireName: r'client_secret') + String? get clientSecret; + + /// OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. + @BuiltValueField(wireName: r'client_secret_expires_at') + int? get clientSecretExpiresAt; + + /// 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. + @BuiltValueField(wireName: r'client_uri') + String? get clientUri; + + @BuiltValueField(wireName: r'contacts') + BuiltList? get contacts; + + /// OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. + @BuiltValueField(wireName: r'created_at') + DateTime? get createdAt; + + /// 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. + @BuiltValueField(wireName: r'frontchannel_logout_session_required') + bool? get frontchannelLogoutSessionRequired; + + /// 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. + @BuiltValueField(wireName: r'frontchannel_logout_uri') + String? get frontchannelLogoutUri; + + @BuiltValueField(wireName: r'grant_types') + BuiltList? get grantTypes; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'implicit_grant_access_token_lifespan') + String? get implicitGrantAccessTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'implicit_grant_id_token_lifespan') + String? get implicitGrantIdTokenLifespan; + + /// 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. + @BuiltValueField(wireName: r'jwks') + JsonObject? get jwks; + + /// 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. + @BuiltValueField(wireName: r'jwks_uri') + String? get jwksUri; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'jwt_bearer_grant_access_token_lifespan') + String? get jwtBearerGrantAccessTokenLifespan; + + /// OAuth 2.0 Client Logo URI A URL string referencing the client's logo. + @BuiltValueField(wireName: r'logo_uri') + String? get logoUri; + + @BuiltValueField(wireName: r'metadata') + JsonObject? get metadata; + + /// OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. + @BuiltValueField(wireName: r'owner') + String? get owner; + + /// 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. + @BuiltValueField(wireName: r'policy_uri') + String? get policyUri; + + @BuiltValueField(wireName: r'post_logout_redirect_uris') + BuiltList? get postLogoutRedirectUris; + + @BuiltValueField(wireName: r'redirect_uris') + BuiltList? get redirectUris; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'refresh_token_grant_access_token_lifespan') + String? get refreshTokenGrantAccessTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'refresh_token_grant_id_token_lifespan') + String? get refreshTokenGrantIdTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'refresh_token_grant_refresh_token_lifespan') + String? get refreshTokenGrantRefreshTokenLifespan; + + /// 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. + @BuiltValueField(wireName: r'registration_access_token') + String? get registrationAccessToken; + + /// OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + @BuiltValueField(wireName: r'registration_client_uri') + String? get registrationClientUri; + + /// 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. + @BuiltValueField(wireName: r'request_object_signing_alg') + String? get requestObjectSigningAlg; + + @BuiltValueField(wireName: r'request_uris') + BuiltList? get requestUris; + + @BuiltValueField(wireName: r'response_types') + BuiltList? get responseTypes; + + /// 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. + @BuiltValueField(wireName: r'scope') + String? get scope; + + /// 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. + @BuiltValueField(wireName: r'sector_identifier_uri') + String? get sectorIdentifierUri; + + /// 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`. + @BuiltValueField(wireName: r'subject_type') + String? get subjectType; + + /// OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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. + @BuiltValueField(wireName: r'token_endpoint_auth_method') + String? get tokenEndpointAuthMethod; + + /// OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. + @BuiltValueField(wireName: r'token_endpoint_auth_signing_alg') + String? get tokenEndpointAuthSigningAlg; + + /// 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. + @BuiltValueField(wireName: r'tos_uri') + String? get tosUri; + + /// OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. + @BuiltValueField(wireName: r'updated_at') + DateTime? get updatedAt; + + /// 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. + @BuiltValueField(wireName: r'userinfo_signed_response_alg') + String? get userinfoSignedResponseAlg; + + OAuth2Client._(); + + factory OAuth2Client([void updates(OAuth2ClientBuilder b)]) = _$OAuth2Client; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2ClientBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2ClientSerializer(); +} + +class _$OAuth2ClientSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2Client, _$OAuth2Client]; + + @override + final String wireName = r'OAuth2Client'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2Client object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.allowedCorsOrigins != null) { + yield r'allowed_cors_origins'; + yield serializers.serialize( + object.allowedCorsOrigins, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.audience != null) { + yield r'audience'; + yield serializers.serialize( + object.audience, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.authorizationCodeGrantAccessTokenLifespan != null) { + yield r'authorization_code_grant_access_token_lifespan'; + yield serializers.serialize( + object.authorizationCodeGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.authorizationCodeGrantIdTokenLifespan != null) { + yield r'authorization_code_grant_id_token_lifespan'; + yield serializers.serialize( + object.authorizationCodeGrantIdTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.authorizationCodeGrantRefreshTokenLifespan != null) { + yield r'authorization_code_grant_refresh_token_lifespan'; + yield serializers.serialize( + object.authorizationCodeGrantRefreshTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.backchannelLogoutSessionRequired != null) { + yield r'backchannel_logout_session_required'; + yield serializers.serialize( + object.backchannelLogoutSessionRequired, + specifiedType: const FullType(bool), + ); + } + if (object.backchannelLogoutUri != null) { + yield r'backchannel_logout_uri'; + yield serializers.serialize( + object.backchannelLogoutUri, + specifiedType: const FullType(String), + ); + } + if (object.clientCredentialsGrantAccessTokenLifespan != null) { + yield r'client_credentials_grant_access_token_lifespan'; + yield serializers.serialize( + object.clientCredentialsGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.clientId != null) { + yield r'client_id'; + yield serializers.serialize( + object.clientId, + specifiedType: const FullType(String), + ); + } + if (object.clientName != null) { + yield r'client_name'; + yield serializers.serialize( + object.clientName, + specifiedType: const FullType(String), + ); + } + if (object.clientSecret != null) { + yield r'client_secret'; + yield serializers.serialize( + object.clientSecret, + specifiedType: const FullType(String), + ); + } + if (object.clientSecretExpiresAt != null) { + yield r'client_secret_expires_at'; + yield serializers.serialize( + object.clientSecretExpiresAt, + specifiedType: const FullType(int), + ); + } + if (object.clientUri != null) { + yield r'client_uri'; + yield serializers.serialize( + object.clientUri, + specifiedType: const FullType(String), + ); + } + if (object.contacts != null) { + yield r'contacts'; + yield serializers.serialize( + object.contacts, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.createdAt != null) { + yield r'created_at'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + } + if (object.frontchannelLogoutSessionRequired != null) { + yield r'frontchannel_logout_session_required'; + yield serializers.serialize( + object.frontchannelLogoutSessionRequired, + specifiedType: const FullType(bool), + ); + } + if (object.frontchannelLogoutUri != null) { + yield r'frontchannel_logout_uri'; + yield serializers.serialize( + object.frontchannelLogoutUri, + specifiedType: const FullType(String), + ); + } + if (object.grantTypes != null) { + yield r'grant_types'; + yield serializers.serialize( + object.grantTypes, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.implicitGrantAccessTokenLifespan != null) { + yield r'implicit_grant_access_token_lifespan'; + yield serializers.serialize( + object.implicitGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.implicitGrantIdTokenLifespan != null) { + yield r'implicit_grant_id_token_lifespan'; + yield serializers.serialize( + object.implicitGrantIdTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.jwks != null) { + yield r'jwks'; + yield serializers.serialize( + object.jwks, + specifiedType: const FullType.nullable(JsonObject), + ); + } + if (object.jwksUri != null) { + yield r'jwks_uri'; + yield serializers.serialize( + object.jwksUri, + specifiedType: const FullType(String), + ); + } + if (object.jwtBearerGrantAccessTokenLifespan != null) { + yield r'jwt_bearer_grant_access_token_lifespan'; + yield serializers.serialize( + object.jwtBearerGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.logoUri != null) { + yield r'logo_uri'; + yield serializers.serialize( + object.logoUri, + specifiedType: const FullType(String), + ); + } + if (object.metadata != null) { + yield r'metadata'; + yield serializers.serialize( + object.metadata, + specifiedType: const FullType.nullable(JsonObject), + ); + } + if (object.owner != null) { + yield r'owner'; + yield serializers.serialize( + object.owner, + specifiedType: const FullType(String), + ); + } + if (object.policyUri != null) { + yield r'policy_uri'; + yield serializers.serialize( + object.policyUri, + specifiedType: const FullType(String), + ); + } + if (object.postLogoutRedirectUris != null) { + yield r'post_logout_redirect_uris'; + yield serializers.serialize( + object.postLogoutRedirectUris, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.redirectUris != null) { + yield r'redirect_uris'; + yield serializers.serialize( + object.redirectUris, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.refreshTokenGrantAccessTokenLifespan != null) { + yield r'refresh_token_grant_access_token_lifespan'; + yield serializers.serialize( + object.refreshTokenGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.refreshTokenGrantIdTokenLifespan != null) { + yield r'refresh_token_grant_id_token_lifespan'; + yield serializers.serialize( + object.refreshTokenGrantIdTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.refreshTokenGrantRefreshTokenLifespan != null) { + yield r'refresh_token_grant_refresh_token_lifespan'; + yield serializers.serialize( + object.refreshTokenGrantRefreshTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.registrationAccessToken != null) { + yield r'registration_access_token'; + yield serializers.serialize( + object.registrationAccessToken, + specifiedType: const FullType(String), + ); + } + if (object.registrationClientUri != null) { + yield r'registration_client_uri'; + yield serializers.serialize( + object.registrationClientUri, + specifiedType: const FullType(String), + ); + } + if (object.requestObjectSigningAlg != null) { + yield r'request_object_signing_alg'; + yield serializers.serialize( + object.requestObjectSigningAlg, + specifiedType: const FullType(String), + ); + } + if (object.requestUris != null) { + yield r'request_uris'; + yield serializers.serialize( + object.requestUris, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.responseTypes != null) { + yield r'response_types'; + yield serializers.serialize( + object.responseTypes, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.scope != null) { + yield r'scope'; + yield serializers.serialize( + object.scope, + specifiedType: const FullType(String), + ); + } + if (object.sectorIdentifierUri != null) { + yield r'sector_identifier_uri'; + yield serializers.serialize( + object.sectorIdentifierUri, + specifiedType: const FullType(String), + ); + } + if (object.subjectType != null) { + yield r'subject_type'; + yield serializers.serialize( + object.subjectType, + specifiedType: const FullType(String), + ); + } + if (object.tokenEndpointAuthMethod != null) { + yield r'token_endpoint_auth_method'; + yield serializers.serialize( + object.tokenEndpointAuthMethod, + specifiedType: const FullType(String), + ); + } + if (object.tokenEndpointAuthSigningAlg != null) { + yield r'token_endpoint_auth_signing_alg'; + yield serializers.serialize( + object.tokenEndpointAuthSigningAlg, + specifiedType: const FullType(String), + ); + } + if (object.tosUri != null) { + yield r'tos_uri'; + yield serializers.serialize( + object.tosUri, + specifiedType: const FullType(String), + ); + } + if (object.updatedAt != null) { + yield r'updated_at'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(DateTime), + ); + } + if (object.userinfoSignedResponseAlg != null) { + yield r'userinfo_signed_response_alg'; + yield serializers.serialize( + object.userinfoSignedResponseAlg, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OAuth2Client object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2ClientBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'allowed_cors_origins': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.allowedCorsOrigins.replace(valueDes); + break; + case r'audience': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.audience.replace(valueDes); + break; + case r'authorization_code_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.authorizationCodeGrantAccessTokenLifespan = valueDes; + break; + case r'authorization_code_grant_id_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.authorizationCodeGrantIdTokenLifespan = valueDes; + break; + case r'authorization_code_grant_refresh_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.authorizationCodeGrantRefreshTokenLifespan = valueDes; + break; + case r'backchannel_logout_session_required': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.backchannelLogoutSessionRequired = valueDes; + break; + case r'backchannel_logout_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.backchannelLogoutUri = valueDes; + break; + case r'client_credentials_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.clientCredentialsGrantAccessTokenLifespan = valueDes; + break; + case r'client_id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.clientId = valueDes; + break; + case r'client_name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.clientName = valueDes; + break; + case r'client_secret': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.clientSecret = valueDes; + break; + case r'client_secret_expires_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.clientSecretExpiresAt = valueDes; + break; + case r'client_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.clientUri = valueDes; + break; + case r'contacts': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.contacts.replace(valueDes); + break; + case r'created_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'frontchannel_logout_session_required': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.frontchannelLogoutSessionRequired = valueDes; + break; + case r'frontchannel_logout_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.frontchannelLogoutUri = valueDes; + break; + case r'grant_types': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.grantTypes.replace(valueDes); + break; + case r'implicit_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.implicitGrantAccessTokenLifespan = valueDes; + break; + case r'implicit_grant_id_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.implicitGrantIdTokenLifespan = valueDes; + break; + case r'jwks': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(JsonObject), + ) as JsonObject?; + if (valueDes == null) continue; + result.jwks = valueDes; + break; + case r'jwks_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.jwksUri = valueDes; + break; + case r'jwt_bearer_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.jwtBearerGrantAccessTokenLifespan = valueDes; + break; + case r'logo_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.logoUri = valueDes; + break; + case r'metadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(JsonObject), + ) as JsonObject?; + if (valueDes == null) continue; + result.metadata = valueDes; + break; + case r'owner': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.owner = valueDes; + break; + case r'policy_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.policyUri = valueDes; + break; + case r'post_logout_redirect_uris': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.postLogoutRedirectUris.replace(valueDes); + break; + case r'redirect_uris': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.redirectUris.replace(valueDes); + break; + case r'refresh_token_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.refreshTokenGrantAccessTokenLifespan = valueDes; + break; + case r'refresh_token_grant_id_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.refreshTokenGrantIdTokenLifespan = valueDes; + break; + case r'refresh_token_grant_refresh_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.refreshTokenGrantRefreshTokenLifespan = valueDes; + break; + case r'registration_access_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.registrationAccessToken = valueDes; + break; + case r'registration_client_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.registrationClientUri = valueDes; + break; + case r'request_object_signing_alg': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.requestObjectSigningAlg = valueDes; + break; + case r'request_uris': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.requestUris.replace(valueDes); + break; + case r'response_types': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.responseTypes.replace(valueDes); + break; + case r'scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.scope = valueDes; + break; + case r'sector_identifier_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.sectorIdentifierUri = valueDes; + break; + case r'subject_type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.subjectType = valueDes; + break; + case r'token_endpoint_auth_method': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.tokenEndpointAuthMethod = valueDes; + break; + case r'token_endpoint_auth_signing_alg': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.tokenEndpointAuthSigningAlg = valueDes; + break; + case r'tos_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.tosUri = valueDes; + break; + case r'updated_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAt = valueDes; + break; + case r'userinfo_signed_response_alg': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userinfoSignedResponseAlg = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2Client deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2ClientBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_client_token_lifespans.dart b/clients/hydra/dart/lib/src/model/o_auth2_client_token_lifespans.dart new file mode 100644 index 00000000000..47aa9b72d83 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_client_token_lifespans.dart @@ -0,0 +1,280 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_client_token_lifespans.g.dart'; + +/// Lifespans of different token types issued for this OAuth 2.0 Client. +/// +/// Properties: +/// * [authorizationCodeGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [authorizationCodeGrantIdTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [authorizationCodeGrantRefreshTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [clientCredentialsGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [implicitGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [implicitGrantIdTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [jwtBearerGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [refreshTokenGrantAccessTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [refreshTokenGrantIdTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +/// * [refreshTokenGrantRefreshTokenLifespan] - Specify a time duration in milliseconds, seconds, minutes, hours. +@BuiltValue() +abstract class OAuth2ClientTokenLifespans implements Built { + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'authorization_code_grant_access_token_lifespan') + String? get authorizationCodeGrantAccessTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'authorization_code_grant_id_token_lifespan') + String? get authorizationCodeGrantIdTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'authorization_code_grant_refresh_token_lifespan') + String? get authorizationCodeGrantRefreshTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'client_credentials_grant_access_token_lifespan') + String? get clientCredentialsGrantAccessTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'implicit_grant_access_token_lifespan') + String? get implicitGrantAccessTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'implicit_grant_id_token_lifespan') + String? get implicitGrantIdTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'jwt_bearer_grant_access_token_lifespan') + String? get jwtBearerGrantAccessTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'refresh_token_grant_access_token_lifespan') + String? get refreshTokenGrantAccessTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'refresh_token_grant_id_token_lifespan') + String? get refreshTokenGrantIdTokenLifespan; + + /// Specify a time duration in milliseconds, seconds, minutes, hours. + @BuiltValueField(wireName: r'refresh_token_grant_refresh_token_lifespan') + String? get refreshTokenGrantRefreshTokenLifespan; + + OAuth2ClientTokenLifespans._(); + + factory OAuth2ClientTokenLifespans([void updates(OAuth2ClientTokenLifespansBuilder b)]) = _$OAuth2ClientTokenLifespans; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2ClientTokenLifespansBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2ClientTokenLifespansSerializer(); +} + +class _$OAuth2ClientTokenLifespansSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2ClientTokenLifespans, _$OAuth2ClientTokenLifespans]; + + @override + final String wireName = r'OAuth2ClientTokenLifespans'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2ClientTokenLifespans object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.authorizationCodeGrantAccessTokenLifespan != null) { + yield r'authorization_code_grant_access_token_lifespan'; + yield serializers.serialize( + object.authorizationCodeGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.authorizationCodeGrantIdTokenLifespan != null) { + yield r'authorization_code_grant_id_token_lifespan'; + yield serializers.serialize( + object.authorizationCodeGrantIdTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.authorizationCodeGrantRefreshTokenLifespan != null) { + yield r'authorization_code_grant_refresh_token_lifespan'; + yield serializers.serialize( + object.authorizationCodeGrantRefreshTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.clientCredentialsGrantAccessTokenLifespan != null) { + yield r'client_credentials_grant_access_token_lifespan'; + yield serializers.serialize( + object.clientCredentialsGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.implicitGrantAccessTokenLifespan != null) { + yield r'implicit_grant_access_token_lifespan'; + yield serializers.serialize( + object.implicitGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.implicitGrantIdTokenLifespan != null) { + yield r'implicit_grant_id_token_lifespan'; + yield serializers.serialize( + object.implicitGrantIdTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.jwtBearerGrantAccessTokenLifespan != null) { + yield r'jwt_bearer_grant_access_token_lifespan'; + yield serializers.serialize( + object.jwtBearerGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.refreshTokenGrantAccessTokenLifespan != null) { + yield r'refresh_token_grant_access_token_lifespan'; + yield serializers.serialize( + object.refreshTokenGrantAccessTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.refreshTokenGrantIdTokenLifespan != null) { + yield r'refresh_token_grant_id_token_lifespan'; + yield serializers.serialize( + object.refreshTokenGrantIdTokenLifespan, + specifiedType: const FullType(String), + ); + } + if (object.refreshTokenGrantRefreshTokenLifespan != null) { + yield r'refresh_token_grant_refresh_token_lifespan'; + yield serializers.serialize( + object.refreshTokenGrantRefreshTokenLifespan, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OAuth2ClientTokenLifespans object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2ClientTokenLifespansBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'authorization_code_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.authorizationCodeGrantAccessTokenLifespan = valueDes; + break; + case r'authorization_code_grant_id_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.authorizationCodeGrantIdTokenLifespan = valueDes; + break; + case r'authorization_code_grant_refresh_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.authorizationCodeGrantRefreshTokenLifespan = valueDes; + break; + case r'client_credentials_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.clientCredentialsGrantAccessTokenLifespan = valueDes; + break; + case r'implicit_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.implicitGrantAccessTokenLifespan = valueDes; + break; + case r'implicit_grant_id_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.implicitGrantIdTokenLifespan = valueDes; + break; + case r'jwt_bearer_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.jwtBearerGrantAccessTokenLifespan = valueDes; + break; + case r'refresh_token_grant_access_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.refreshTokenGrantAccessTokenLifespan = valueDes; + break; + case r'refresh_token_grant_id_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.refreshTokenGrantIdTokenLifespan = valueDes; + break; + case r'refresh_token_grant_refresh_token_lifespan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.refreshTokenGrantRefreshTokenLifespan = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2ClientTokenLifespans deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2ClientTokenLifespansBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_consent_request.dart b/clients/hydra/dart/lib/src/model/o_auth2_consent_request.dart new file mode 100644 index 00000000000..6dd38d6770d --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_consent_request.dart @@ -0,0 +1,334 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:ory_hydra_client/src/model/o_auth2_consent_request_open_id_connect_context.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_client.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_consent_request.g.dart'; + +/// OAuth2ConsentRequest +/// +/// Properties: +/// * [acr] - 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] +/// * [challenge] - ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. +/// * [client] +/// * [context] +/// * [loginChallenge] - 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] - 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. +/// * [oidcContext] +/// * [requestUrl] - 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] +/// * [requestedScope] +/// * [skip] - 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] - 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. +@BuiltValue() +abstract class OAuth2ConsentRequest implements Built { + /// 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. + @BuiltValueField(wireName: r'acr') + String? get acr; + + @BuiltValueField(wireName: r'amr') + BuiltList? get amr; + + /// ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. + @BuiltValueField(wireName: r'challenge') + String get challenge; + + @BuiltValueField(wireName: r'client') + OAuth2Client? get client; + + @BuiltValueField(wireName: r'context') + JsonObject? get 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. + @BuiltValueField(wireName: r'login_challenge') + String? get loginChallenge; + + /// 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. + @BuiltValueField(wireName: r'login_session_id') + String? get loginSessionId; + + @BuiltValueField(wireName: r'oidc_context') + OAuth2ConsentRequestOpenIDConnectContext? get 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. + @BuiltValueField(wireName: r'request_url') + String? get requestUrl; + + @BuiltValueField(wireName: r'requested_access_token_audience') + BuiltList? get requestedAccessTokenAudience; + + @BuiltValueField(wireName: r'requested_scope') + BuiltList? get 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. + @BuiltValueField(wireName: r'skip') + bool? get skip; + + /// 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. + @BuiltValueField(wireName: r'subject') + String? get subject; + + OAuth2ConsentRequest._(); + + factory OAuth2ConsentRequest([void updates(OAuth2ConsentRequestBuilder b)]) = _$OAuth2ConsentRequest; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2ConsentRequestBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2ConsentRequestSerializer(); +} + +class _$OAuth2ConsentRequestSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2ConsentRequest, _$OAuth2ConsentRequest]; + + @override + final String wireName = r'OAuth2ConsentRequest'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2ConsentRequest object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.acr != null) { + yield r'acr'; + yield serializers.serialize( + object.acr, + specifiedType: const FullType(String), + ); + } + if (object.amr != null) { + yield r'amr'; + yield serializers.serialize( + object.amr, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + yield r'challenge'; + yield serializers.serialize( + object.challenge, + specifiedType: const FullType(String), + ); + if (object.client != null) { + yield r'client'; + yield serializers.serialize( + object.client, + specifiedType: const FullType(OAuth2Client), + ); + } + if (object.context != null) { + yield r'context'; + yield serializers.serialize( + object.context, + specifiedType: const FullType.nullable(JsonObject), + ); + } + if (object.loginChallenge != null) { + yield r'login_challenge'; + yield serializers.serialize( + object.loginChallenge, + specifiedType: const FullType(String), + ); + } + if (object.loginSessionId != null) { + yield r'login_session_id'; + yield serializers.serialize( + object.loginSessionId, + specifiedType: const FullType(String), + ); + } + if (object.oidcContext != null) { + yield r'oidc_context'; + yield serializers.serialize( + object.oidcContext, + specifiedType: const FullType(OAuth2ConsentRequestOpenIDConnectContext), + ); + } + if (object.requestUrl != null) { + yield r'request_url'; + yield serializers.serialize( + object.requestUrl, + specifiedType: const FullType(String), + ); + } + if (object.requestedAccessTokenAudience != null) { + yield r'requested_access_token_audience'; + yield serializers.serialize( + object.requestedAccessTokenAudience, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.requestedScope != null) { + yield r'requested_scope'; + yield serializers.serialize( + object.requestedScope, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.skip != null) { + yield r'skip'; + yield serializers.serialize( + object.skip, + specifiedType: const FullType(bool), + ); + } + if (object.subject != null) { + yield r'subject'; + yield serializers.serialize( + object.subject, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OAuth2ConsentRequest object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2ConsentRequestBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'acr': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.acr = valueDes; + break; + case r'amr': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.amr.replace(valueDes); + break; + case r'challenge': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.challenge = valueDes; + break; + case r'client': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OAuth2Client), + ) as OAuth2Client; + result.client.replace(valueDes); + break; + case r'context': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(JsonObject), + ) as JsonObject?; + if (valueDes == null) continue; + result.context = valueDes; + break; + case r'login_challenge': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.loginChallenge = valueDes; + break; + case r'login_session_id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.loginSessionId = valueDes; + break; + case r'oidc_context': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OAuth2ConsentRequestOpenIDConnectContext), + ) as OAuth2ConsentRequestOpenIDConnectContext; + result.oidcContext.replace(valueDes); + break; + case r'request_url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.requestUrl = valueDes; + break; + case r'requested_access_token_audience': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.requestedAccessTokenAudience.replace(valueDes); + break; + case r'requested_scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.requestedScope.replace(valueDes); + break; + case r'skip': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.skip = valueDes; + break; + case r'subject': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.subject = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2ConsentRequest deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2ConsentRequestBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_consent_request_open_id_connect_context.dart b/clients/hydra/dart/lib/src/model/o_auth2_consent_request_open_id_connect_context.dart new file mode 100644 index 00000000000..d89260e509c --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_consent_request_open_id_connect_context.dart @@ -0,0 +1,187 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_consent_request_open_id_connect_context.g.dart'; + +/// OAuth2ConsentRequestOpenIDConnectContext +/// +/// Properties: +/// * [acrValues] - 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] - 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. +/// * [idTokenHintClaims] - 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. +/// * [loginHint] - 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. +/// * [uiLocales] - 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. +@BuiltValue() +abstract class OAuth2ConsentRequestOpenIDConnectContext implements Built { + /// 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. + @BuiltValueField(wireName: r'acr_values') + BuiltList? get acrValues; + + /// 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. + @BuiltValueField(wireName: r'display') + String? get display; + + /// 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. + @BuiltValueField(wireName: r'id_token_hint_claims') + BuiltMap? get idTokenHintClaims; + + /// 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. + @BuiltValueField(wireName: r'login_hint') + String? get loginHint; + + /// 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. + @BuiltValueField(wireName: r'ui_locales') + BuiltList? get uiLocales; + + OAuth2ConsentRequestOpenIDConnectContext._(); + + factory OAuth2ConsentRequestOpenIDConnectContext([void updates(OAuth2ConsentRequestOpenIDConnectContextBuilder b)]) = _$OAuth2ConsentRequestOpenIDConnectContext; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2ConsentRequestOpenIDConnectContextBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2ConsentRequestOpenIDConnectContextSerializer(); +} + +class _$OAuth2ConsentRequestOpenIDConnectContextSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2ConsentRequestOpenIDConnectContext, _$OAuth2ConsentRequestOpenIDConnectContext]; + + @override + final String wireName = r'OAuth2ConsentRequestOpenIDConnectContext'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2ConsentRequestOpenIDConnectContext object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.acrValues != null) { + yield r'acr_values'; + yield serializers.serialize( + object.acrValues, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.display != null) { + yield r'display'; + yield serializers.serialize( + object.display, + specifiedType: const FullType(String), + ); + } + if (object.idTokenHintClaims != null) { + yield r'id_token_hint_claims'; + yield serializers.serialize( + object.idTokenHintClaims, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ); + } + if (object.loginHint != null) { + yield r'login_hint'; + yield serializers.serialize( + object.loginHint, + specifiedType: const FullType(String), + ); + } + if (object.uiLocales != null) { + yield r'ui_locales'; + yield serializers.serialize( + object.uiLocales, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OAuth2ConsentRequestOpenIDConnectContext object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2ConsentRequestOpenIDConnectContextBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'acr_values': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.acrValues.replace(valueDes); + break; + case r'display': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.display = valueDes; + break; + case r'id_token_hint_claims': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ) as BuiltMap; + result.idTokenHintClaims.replace(valueDes); + break; + case r'login_hint': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.loginHint = valueDes; + break; + case r'ui_locales': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.uiLocales.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2ConsentRequestOpenIDConnectContext deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2ConsentRequestOpenIDConnectContextBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_consent_session.dart b/clients/hydra/dart/lib/src/model/o_auth2_consent_session.dart new file mode 100644 index 00000000000..9f46362f5a2 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_consent_session.dart @@ -0,0 +1,240 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:ory_hydra_client/src/model/o_auth2_consent_session_expires_at.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:ory_hydra_client/src/model/accept_o_auth2_consent_request_session.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_consent_request.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_consent_session.g.dart'; + +/// A completed OAuth 2.0 Consent Session. +/// +/// Properties: +/// * [consentRequest] +/// * [expiresAt] +/// * [grantAccessTokenAudience] +/// * [grantScope] +/// * [handledAt] +/// * [remember] - 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. +/// * [rememberFor] - 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] +@BuiltValue() +abstract class OAuth2ConsentSession implements Built { + @BuiltValueField(wireName: r'consent_request') + OAuth2ConsentRequest? get consentRequest; + + @BuiltValueField(wireName: r'expires_at') + OAuth2ConsentSessionExpiresAt? get expiresAt; + + @BuiltValueField(wireName: r'grant_access_token_audience') + BuiltList? get grantAccessTokenAudience; + + @BuiltValueField(wireName: r'grant_scope') + BuiltList? get grantScope; + + @BuiltValueField(wireName: r'handled_at') + DateTime? get handledAt; + + /// 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. + @BuiltValueField(wireName: r'remember') + bool? get remember; + + /// 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. + @BuiltValueField(wireName: r'remember_for') + int? get rememberFor; + + @BuiltValueField(wireName: r'session') + AcceptOAuth2ConsentRequestSession? get session; + + OAuth2ConsentSession._(); + + factory OAuth2ConsentSession([void updates(OAuth2ConsentSessionBuilder b)]) = _$OAuth2ConsentSession; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2ConsentSessionBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2ConsentSessionSerializer(); +} + +class _$OAuth2ConsentSessionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2ConsentSession, _$OAuth2ConsentSession]; + + @override + final String wireName = r'OAuth2ConsentSession'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2ConsentSession object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.consentRequest != null) { + yield r'consent_request'; + yield serializers.serialize( + object.consentRequest, + specifiedType: const FullType(OAuth2ConsentRequest), + ); + } + if (object.expiresAt != null) { + yield r'expires_at'; + yield serializers.serialize( + object.expiresAt, + specifiedType: const FullType(OAuth2ConsentSessionExpiresAt), + ); + } + if (object.grantAccessTokenAudience != null) { + yield r'grant_access_token_audience'; + yield serializers.serialize( + object.grantAccessTokenAudience, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.grantScope != null) { + yield r'grant_scope'; + yield serializers.serialize( + object.grantScope, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.handledAt != null) { + yield r'handled_at'; + yield serializers.serialize( + object.handledAt, + specifiedType: const FullType(DateTime), + ); + } + if (object.remember != null) { + yield r'remember'; + yield serializers.serialize( + object.remember, + specifiedType: const FullType(bool), + ); + } + if (object.rememberFor != null) { + yield r'remember_for'; + yield serializers.serialize( + object.rememberFor, + specifiedType: const FullType(int), + ); + } + if (object.session != null) { + yield r'session'; + yield serializers.serialize( + object.session, + specifiedType: const FullType(AcceptOAuth2ConsentRequestSession), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OAuth2ConsentSession object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2ConsentSessionBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'consent_request': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OAuth2ConsentRequest), + ) as OAuth2ConsentRequest; + result.consentRequest.replace(valueDes); + break; + case r'expires_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OAuth2ConsentSessionExpiresAt), + ) as OAuth2ConsentSessionExpiresAt; + result.expiresAt.replace(valueDes); + break; + case r'grant_access_token_audience': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.grantAccessTokenAudience.replace(valueDes); + break; + case r'grant_scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.grantScope.replace(valueDes); + break; + case r'handled_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.handledAt = valueDes; + break; + case r'remember': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.remember = valueDes; + break; + case r'remember_for': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.rememberFor = valueDes; + break; + case r'session': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AcceptOAuth2ConsentRequestSession), + ) as AcceptOAuth2ConsentRequestSession; + result.session.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2ConsentSession deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2ConsentSessionBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_consent_session_expires_at.dart b/clients/hydra/dart/lib/src/model/o_auth2_consent_session_expires_at.dart new file mode 100644 index 00000000000..2c745af5313 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_consent_session_expires_at.dart @@ -0,0 +1,180 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_consent_session_expires_at.g.dart'; + +/// OAuth2ConsentSessionExpiresAt +/// +/// Properties: +/// * [accessToken] +/// * [authorizeCode] +/// * [idToken] +/// * [parContext] +/// * [refreshToken] +@BuiltValue() +abstract class OAuth2ConsentSessionExpiresAt implements Built { + @BuiltValueField(wireName: r'access_token') + DateTime? get accessToken; + + @BuiltValueField(wireName: r'authorize_code') + DateTime? get authorizeCode; + + @BuiltValueField(wireName: r'id_token') + DateTime? get idToken; + + @BuiltValueField(wireName: r'par_context') + DateTime? get parContext; + + @BuiltValueField(wireName: r'refresh_token') + DateTime? get refreshToken; + + OAuth2ConsentSessionExpiresAt._(); + + factory OAuth2ConsentSessionExpiresAt([void updates(OAuth2ConsentSessionExpiresAtBuilder b)]) = _$OAuth2ConsentSessionExpiresAt; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2ConsentSessionExpiresAtBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2ConsentSessionExpiresAtSerializer(); +} + +class _$OAuth2ConsentSessionExpiresAtSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2ConsentSessionExpiresAt, _$OAuth2ConsentSessionExpiresAt]; + + @override + final String wireName = r'OAuth2ConsentSessionExpiresAt'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2ConsentSessionExpiresAt object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.accessToken != null) { + yield r'access_token'; + yield serializers.serialize( + object.accessToken, + specifiedType: const FullType(DateTime), + ); + } + if (object.authorizeCode != null) { + yield r'authorize_code'; + yield serializers.serialize( + object.authorizeCode, + specifiedType: const FullType(DateTime), + ); + } + if (object.idToken != null) { + yield r'id_token'; + yield serializers.serialize( + object.idToken, + specifiedType: const FullType(DateTime), + ); + } + if (object.parContext != null) { + yield r'par_context'; + yield serializers.serialize( + object.parContext, + specifiedType: const FullType(DateTime), + ); + } + if (object.refreshToken != null) { + yield r'refresh_token'; + yield serializers.serialize( + object.refreshToken, + specifiedType: const FullType(DateTime), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OAuth2ConsentSessionExpiresAt object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2ConsentSessionExpiresAtBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'access_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.accessToken = valueDes; + break; + case r'authorize_code': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.authorizeCode = valueDes; + break; + case r'id_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.idToken = valueDes; + break; + case r'par_context': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.parContext = valueDes; + break; + case r'refresh_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.refreshToken = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2ConsentSessionExpiresAt deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2ConsentSessionExpiresAtBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_login_request.dart b/clients/hydra/dart/lib/src/model/o_auth2_login_request.dart new file mode 100644 index 00000000000..b36e1ad039d --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_login_request.dart @@ -0,0 +1,246 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:ory_hydra_client/src/model/o_auth2_consent_request_open_id_connect_context.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_client.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_login_request.g.dart'; + +/// OAuth2LoginRequest +/// +/// Properties: +/// * [challenge] - ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. +/// * [client] +/// * [oidcContext] +/// * [requestUrl] - 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] +/// * [requestedScope] +/// * [sessionId] - 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] - 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] - 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. +@BuiltValue() +abstract class OAuth2LoginRequest implements Built { + /// ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. + @BuiltValueField(wireName: r'challenge') + String get challenge; + + @BuiltValueField(wireName: r'client') + OAuth2Client get client; + + @BuiltValueField(wireName: r'oidc_context') + OAuth2ConsentRequestOpenIDConnectContext? get 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. + @BuiltValueField(wireName: r'request_url') + String get requestUrl; + + @BuiltValueField(wireName: r'requested_access_token_audience') + BuiltList get requestedAccessTokenAudience; + + @BuiltValueField(wireName: r'requested_scope') + BuiltList get requestedScope; + + /// 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. + @BuiltValueField(wireName: r'session_id') + String? get sessionId; + + /// 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. + @BuiltValueField(wireName: r'skip') + bool get skip; + + /// 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. + @BuiltValueField(wireName: r'subject') + String get subject; + + OAuth2LoginRequest._(); + + factory OAuth2LoginRequest([void updates(OAuth2LoginRequestBuilder b)]) = _$OAuth2LoginRequest; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2LoginRequestBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2LoginRequestSerializer(); +} + +class _$OAuth2LoginRequestSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2LoginRequest, _$OAuth2LoginRequest]; + + @override + final String wireName = r'OAuth2LoginRequest'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2LoginRequest object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'challenge'; + yield serializers.serialize( + object.challenge, + specifiedType: const FullType(String), + ); + yield r'client'; + yield serializers.serialize( + object.client, + specifiedType: const FullType(OAuth2Client), + ); + if (object.oidcContext != null) { + yield r'oidc_context'; + yield serializers.serialize( + object.oidcContext, + specifiedType: const FullType(OAuth2ConsentRequestOpenIDConnectContext), + ); + } + yield r'request_url'; + yield serializers.serialize( + object.requestUrl, + specifiedType: const FullType(String), + ); + yield r'requested_access_token_audience'; + yield serializers.serialize( + object.requestedAccessTokenAudience, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'requested_scope'; + yield serializers.serialize( + object.requestedScope, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + if (object.sessionId != null) { + yield r'session_id'; + yield serializers.serialize( + object.sessionId, + specifiedType: const FullType(String), + ); + } + yield r'skip'; + yield serializers.serialize( + object.skip, + specifiedType: const FullType(bool), + ); + yield r'subject'; + yield serializers.serialize( + object.subject, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + OAuth2LoginRequest object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2LoginRequestBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'challenge': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.challenge = valueDes; + break; + case r'client': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OAuth2Client), + ) as OAuth2Client; + result.client.replace(valueDes); + break; + case r'oidc_context': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OAuth2ConsentRequestOpenIDConnectContext), + ) as OAuth2ConsentRequestOpenIDConnectContext; + result.oidcContext.replace(valueDes); + break; + case r'request_url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.requestUrl = valueDes; + break; + case r'requested_access_token_audience': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.requestedAccessTokenAudience.replace(valueDes); + break; + case r'requested_scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.requestedScope.replace(valueDes); + break; + case r'session_id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.sessionId = valueDes; + break; + case r'skip': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.skip = valueDes; + break; + case r'subject': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.subject = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2LoginRequest deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2LoginRequestBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_logout_request.dart b/clients/hydra/dart/lib/src/model/o_auth2_logout_request.dart new file mode 100644 index 00000000000..2f73f466bca --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_logout_request.dart @@ -0,0 +1,204 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:ory_hydra_client/src/model/o_auth2_client.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_logout_request.g.dart'; + +/// OAuth2LogoutRequest +/// +/// Properties: +/// * [challenge] - Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. +/// * [client] +/// * [requestUrl] - RequestURL is the original Logout URL requested. +/// * [rpInitiated] - RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. +/// * [sid] - SessionID is the login session ID that was requested to log out. +/// * [subject] - Subject is the user for whom the logout was request. +@BuiltValue() +abstract class OAuth2LogoutRequest implements Built { + /// Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. + @BuiltValueField(wireName: r'challenge') + String? get challenge; + + @BuiltValueField(wireName: r'client') + OAuth2Client? get client; + + /// RequestURL is the original Logout URL requested. + @BuiltValueField(wireName: r'request_url') + String? get requestUrl; + + /// RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client. + @BuiltValueField(wireName: r'rp_initiated') + bool? get rpInitiated; + + /// SessionID is the login session ID that was requested to log out. + @BuiltValueField(wireName: r'sid') + String? get sid; + + /// Subject is the user for whom the logout was request. + @BuiltValueField(wireName: r'subject') + String? get subject; + + OAuth2LogoutRequest._(); + + factory OAuth2LogoutRequest([void updates(OAuth2LogoutRequestBuilder b)]) = _$OAuth2LogoutRequest; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2LogoutRequestBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2LogoutRequestSerializer(); +} + +class _$OAuth2LogoutRequestSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2LogoutRequest, _$OAuth2LogoutRequest]; + + @override + final String wireName = r'OAuth2LogoutRequest'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2LogoutRequest object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.challenge != null) { + yield r'challenge'; + yield serializers.serialize( + object.challenge, + specifiedType: const FullType(String), + ); + } + if (object.client != null) { + yield r'client'; + yield serializers.serialize( + object.client, + specifiedType: const FullType(OAuth2Client), + ); + } + if (object.requestUrl != null) { + yield r'request_url'; + yield serializers.serialize( + object.requestUrl, + specifiedType: const FullType(String), + ); + } + if (object.rpInitiated != null) { + yield r'rp_initiated'; + yield serializers.serialize( + object.rpInitiated, + specifiedType: const FullType(bool), + ); + } + if (object.sid != null) { + yield r'sid'; + yield serializers.serialize( + object.sid, + specifiedType: const FullType(String), + ); + } + if (object.subject != null) { + yield r'subject'; + yield serializers.serialize( + object.subject, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OAuth2LogoutRequest object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2LogoutRequestBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'challenge': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.challenge = valueDes; + break; + case r'client': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OAuth2Client), + ) as OAuth2Client; + result.client.replace(valueDes); + break; + case r'request_url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.requestUrl = valueDes; + break; + case r'rp_initiated': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.rpInitiated = valueDes; + break; + case r'sid': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.sid = valueDes; + break; + case r'subject': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.subject = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2LogoutRequest deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2LogoutRequestBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_redirect_to.dart b/clients/hydra/dart/lib/src/model/o_auth2_redirect_to.dart new file mode 100644 index 00000000000..cff4fbf87c1 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_redirect_to.dart @@ -0,0 +1,107 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_redirect_to.g.dart'; + +/// Contains a redirect URL used to complete a login, consent, or logout request. +/// +/// Properties: +/// * [redirectTo] - RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. +@BuiltValue() +abstract class OAuth2RedirectTo implements Built { + /// RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. + @BuiltValueField(wireName: r'redirect_to') + String get redirectTo; + + OAuth2RedirectTo._(); + + factory OAuth2RedirectTo([void updates(OAuth2RedirectToBuilder b)]) = _$OAuth2RedirectTo; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2RedirectToBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2RedirectToSerializer(); +} + +class _$OAuth2RedirectToSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2RedirectTo, _$OAuth2RedirectTo]; + + @override + final String wireName = r'OAuth2RedirectTo'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2RedirectTo object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'redirect_to'; + yield serializers.serialize( + object.redirectTo, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + OAuth2RedirectTo object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2RedirectToBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'redirect_to': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.redirectTo = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2RedirectTo deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2RedirectToBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/o_auth2_token_exchange.dart b/clients/hydra/dart/lib/src/model/o_auth2_token_exchange.dart new file mode 100644 index 00000000000..42f379c9c86 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/o_auth2_token_exchange.dart @@ -0,0 +1,204 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth2_token_exchange.g.dart'; + +/// OAuth2 Token Exchange Result +/// +/// Properties: +/// * [accessToken] - The access token issued by the authorization server. +/// * [expiresIn] - 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. +/// * [idToken] - To retrieve a refresh token request the id_token scope. +/// * [refreshToken] - 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] - The scope of the access token +/// * [tokenType] - The type of the token issued +@BuiltValue() +abstract class OAuth2TokenExchange implements Built { + /// The access token issued by the authorization server. + @BuiltValueField(wireName: r'access_token') + String? get accessToken; + + /// 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. + @BuiltValueField(wireName: r'expires_in') + int? get expiresIn; + + /// To retrieve a refresh token request the id_token scope. + @BuiltValueField(wireName: r'id_token') + int? get idToken; + + /// The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. + @BuiltValueField(wireName: r'refresh_token') + String? get refreshToken; + + /// The scope of the access token + @BuiltValueField(wireName: r'scope') + int? get scope; + + /// The type of the token issued + @BuiltValueField(wireName: r'token_type') + String? get tokenType; + + OAuth2TokenExchange._(); + + factory OAuth2TokenExchange([void updates(OAuth2TokenExchangeBuilder b)]) = _$OAuth2TokenExchange; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuth2TokenExchangeBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuth2TokenExchangeSerializer(); +} + +class _$OAuth2TokenExchangeSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuth2TokenExchange, _$OAuth2TokenExchange]; + + @override + final String wireName = r'OAuth2TokenExchange'; + + Iterable _serializeProperties( + Serializers serializers, + OAuth2TokenExchange object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.accessToken != null) { + yield r'access_token'; + yield serializers.serialize( + object.accessToken, + specifiedType: const FullType(String), + ); + } + if (object.expiresIn != null) { + yield r'expires_in'; + yield serializers.serialize( + object.expiresIn, + specifiedType: const FullType(int), + ); + } + if (object.idToken != null) { + yield r'id_token'; + yield serializers.serialize( + object.idToken, + specifiedType: const FullType(int), + ); + } + if (object.refreshToken != null) { + yield r'refresh_token'; + yield serializers.serialize( + object.refreshToken, + specifiedType: const FullType(String), + ); + } + if (object.scope != null) { + yield r'scope'; + yield serializers.serialize( + object.scope, + specifiedType: const FullType(int), + ); + } + if (object.tokenType != null) { + yield r'token_type'; + yield serializers.serialize( + object.tokenType, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OAuth2TokenExchange object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuth2TokenExchangeBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'access_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.accessToken = valueDes; + break; + case r'expires_in': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.expiresIn = valueDes; + break; + case r'id_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.idToken = valueDes; + break; + case r'refresh_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.refreshToken = valueDes; + break; + case r'scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.scope = valueDes; + break; + case r'token_type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.tokenType = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuth2TokenExchange deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuth2TokenExchangeBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/oidc_configuration.dart b/clients/hydra/dart/lib/src/model/oidc_configuration.dart new file mode 100644 index 00000000000..4f5a1e04f66 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/oidc_configuration.dart @@ -0,0 +1,624 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'oidc_configuration.g.dart'; + +/// Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. +/// +/// Properties: +/// * [authorizationEndpoint] - OAuth 2.0 Authorization Endpoint URL +/// * [backchannelLogoutSessionSupported] - 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 +/// * [backchannelLogoutSupported] - OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. +/// * [claimsParameterSupported] - OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. +/// * [claimsSupported] - 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. +/// * [codeChallengeMethodsSupported] - 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. +/// * [endSessionEndpoint] - 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. +/// * [frontchannelLogoutSessionSupported] - 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. +/// * [frontchannelLogoutSupported] - OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. +/// * [grantTypesSupported] - OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. +/// * [idTokenSignedResponseAlg] - OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. +/// * [idTokenSigningAlgValuesSupported] - 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] - 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. +/// * [jwksUri] - 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. +/// * [registrationEndpoint] - OpenID Connect Dynamic Client Registration Endpoint URL +/// * [requestObjectSigningAlgValuesSupported] - 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). +/// * [requestParameterSupported] - OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. +/// * [requestUriParameterSupported] - OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. +/// * [requireRequestUriRegistration] - 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. +/// * [responseModesSupported] - OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. +/// * [responseTypesSupported] - 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. +/// * [revocationEndpoint] - OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. +/// * [scopesSupported] - 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 +/// * [subjectTypesSupported] - 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. +/// * [tokenEndpoint] - OAuth 2.0 Token Endpoint URL +/// * [tokenEndpointAuthMethodsSupported] - 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 +/// * [userinfoEndpoint] - OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. +/// * [userinfoSignedResponseAlg] - OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. +/// * [userinfoSigningAlgValuesSupported] - 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]. +@BuiltValue() +abstract class OidcConfiguration implements Built { + /// OAuth 2.0 Authorization Endpoint URL + @BuiltValueField(wireName: r'authorization_endpoint') + String get authorizationEndpoint; + + /// 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 + @BuiltValueField(wireName: r'backchannel_logout_session_supported') + bool? get backchannelLogoutSessionSupported; + + /// OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + @BuiltValueField(wireName: r'backchannel_logout_supported') + bool? get backchannelLogoutSupported; + + /// OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + @BuiltValueField(wireName: r'claims_parameter_supported') + bool? get claimsParameterSupported; + + /// 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. + @BuiltValueField(wireName: r'claims_supported') + BuiltList? get claimsSupported; + + /// 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. + @BuiltValueField(wireName: r'code_challenge_methods_supported') + BuiltList? get codeChallengeMethodsSupported; + + /// 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. + @BuiltValueField(wireName: r'end_session_endpoint') + String? get endSessionEndpoint; + + /// 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. + @BuiltValueField(wireName: r'frontchannel_logout_session_supported') + bool? get frontchannelLogoutSessionSupported; + + /// OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + @BuiltValueField(wireName: r'frontchannel_logout_supported') + bool? get frontchannelLogoutSupported; + + /// OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + @BuiltValueField(wireName: r'grant_types_supported') + BuiltList? get grantTypesSupported; + + /// OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. + @BuiltValueField(wireName: r'id_token_signed_response_alg') + BuiltList get idTokenSignedResponseAlg; + + /// 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. + @BuiltValueField(wireName: r'id_token_signing_alg_values_supported') + BuiltList get idTokenSigningAlgValuesSupported; + + /// 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. + @BuiltValueField(wireName: r'issuer') + String get issuer; + + /// 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. + @BuiltValueField(wireName: r'jwks_uri') + String get jwksUri; + + /// OpenID Connect Dynamic Client Registration Endpoint URL + @BuiltValueField(wireName: r'registration_endpoint') + String? get registrationEndpoint; + + /// 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). + @BuiltValueField(wireName: r'request_object_signing_alg_values_supported') + BuiltList? get requestObjectSigningAlgValuesSupported; + + /// OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + @BuiltValueField(wireName: r'request_parameter_supported') + bool? get requestParameterSupported; + + /// OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + @BuiltValueField(wireName: r'request_uri_parameter_supported') + bool? get requestUriParameterSupported; + + /// 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. + @BuiltValueField(wireName: r'require_request_uri_registration') + bool? get requireRequestUriRegistration; + + /// OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + @BuiltValueField(wireName: r'response_modes_supported') + BuiltList? get responseModesSupported; + + /// 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. + @BuiltValueField(wireName: r'response_types_supported') + BuiltList get responseTypesSupported; + + /// OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. + @BuiltValueField(wireName: r'revocation_endpoint') + String? get revocationEndpoint; + + /// 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 + @BuiltValueField(wireName: r'scopes_supported') + BuiltList? get scopesSupported; + + /// 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. + @BuiltValueField(wireName: r'subject_types_supported') + BuiltList get subjectTypesSupported; + + /// OAuth 2.0 Token Endpoint URL + @BuiltValueField(wireName: r'token_endpoint') + String get tokenEndpoint; + + /// 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 + @BuiltValueField(wireName: r'token_endpoint_auth_methods_supported') + BuiltList? get tokenEndpointAuthMethodsSupported; + + /// OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. + @BuiltValueField(wireName: r'userinfo_endpoint') + String? get userinfoEndpoint; + + /// OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. + @BuiltValueField(wireName: r'userinfo_signed_response_alg') + BuiltList get userinfoSignedResponseAlg; + + /// 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]. + @BuiltValueField(wireName: r'userinfo_signing_alg_values_supported') + BuiltList? get userinfoSigningAlgValuesSupported; + + OidcConfiguration._(); + + factory OidcConfiguration([void updates(OidcConfigurationBuilder b)]) = _$OidcConfiguration; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OidcConfigurationBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OidcConfigurationSerializer(); +} + +class _$OidcConfigurationSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OidcConfiguration, _$OidcConfiguration]; + + @override + final String wireName = r'OidcConfiguration'; + + Iterable _serializeProperties( + Serializers serializers, + OidcConfiguration object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'authorization_endpoint'; + yield serializers.serialize( + object.authorizationEndpoint, + specifiedType: const FullType(String), + ); + if (object.backchannelLogoutSessionSupported != null) { + yield r'backchannel_logout_session_supported'; + yield serializers.serialize( + object.backchannelLogoutSessionSupported, + specifiedType: const FullType(bool), + ); + } + if (object.backchannelLogoutSupported != null) { + yield r'backchannel_logout_supported'; + yield serializers.serialize( + object.backchannelLogoutSupported, + specifiedType: const FullType(bool), + ); + } + if (object.claimsParameterSupported != null) { + yield r'claims_parameter_supported'; + yield serializers.serialize( + object.claimsParameterSupported, + specifiedType: const FullType(bool), + ); + } + if (object.claimsSupported != null) { + yield r'claims_supported'; + yield serializers.serialize( + object.claimsSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.codeChallengeMethodsSupported != null) { + yield r'code_challenge_methods_supported'; + yield serializers.serialize( + object.codeChallengeMethodsSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.endSessionEndpoint != null) { + yield r'end_session_endpoint'; + yield serializers.serialize( + object.endSessionEndpoint, + specifiedType: const FullType(String), + ); + } + if (object.frontchannelLogoutSessionSupported != null) { + yield r'frontchannel_logout_session_supported'; + yield serializers.serialize( + object.frontchannelLogoutSessionSupported, + specifiedType: const FullType(bool), + ); + } + if (object.frontchannelLogoutSupported != null) { + yield r'frontchannel_logout_supported'; + yield serializers.serialize( + object.frontchannelLogoutSupported, + specifiedType: const FullType(bool), + ); + } + if (object.grantTypesSupported != null) { + yield r'grant_types_supported'; + yield serializers.serialize( + object.grantTypesSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + yield r'id_token_signed_response_alg'; + yield serializers.serialize( + object.idTokenSignedResponseAlg, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'id_token_signing_alg_values_supported'; + yield serializers.serialize( + object.idTokenSigningAlgValuesSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'issuer'; + yield serializers.serialize( + object.issuer, + specifiedType: const FullType(String), + ); + yield r'jwks_uri'; + yield serializers.serialize( + object.jwksUri, + specifiedType: const FullType(String), + ); + if (object.registrationEndpoint != null) { + yield r'registration_endpoint'; + yield serializers.serialize( + object.registrationEndpoint, + specifiedType: const FullType(String), + ); + } + if (object.requestObjectSigningAlgValuesSupported != null) { + yield r'request_object_signing_alg_values_supported'; + yield serializers.serialize( + object.requestObjectSigningAlgValuesSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.requestParameterSupported != null) { + yield r'request_parameter_supported'; + yield serializers.serialize( + object.requestParameterSupported, + specifiedType: const FullType(bool), + ); + } + if (object.requestUriParameterSupported != null) { + yield r'request_uri_parameter_supported'; + yield serializers.serialize( + object.requestUriParameterSupported, + specifiedType: const FullType(bool), + ); + } + if (object.requireRequestUriRegistration != null) { + yield r'require_request_uri_registration'; + yield serializers.serialize( + object.requireRequestUriRegistration, + specifiedType: const FullType(bool), + ); + } + if (object.responseModesSupported != null) { + yield r'response_modes_supported'; + yield serializers.serialize( + object.responseModesSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + yield r'response_types_supported'; + yield serializers.serialize( + object.responseTypesSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + if (object.revocationEndpoint != null) { + yield r'revocation_endpoint'; + yield serializers.serialize( + object.revocationEndpoint, + specifiedType: const FullType(String), + ); + } + if (object.scopesSupported != null) { + yield r'scopes_supported'; + yield serializers.serialize( + object.scopesSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + yield r'subject_types_supported'; + yield serializers.serialize( + object.subjectTypesSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'token_endpoint'; + yield serializers.serialize( + object.tokenEndpoint, + specifiedType: const FullType(String), + ); + if (object.tokenEndpointAuthMethodsSupported != null) { + yield r'token_endpoint_auth_methods_supported'; + yield serializers.serialize( + object.tokenEndpointAuthMethodsSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.userinfoEndpoint != null) { + yield r'userinfo_endpoint'; + yield serializers.serialize( + object.userinfoEndpoint, + specifiedType: const FullType(String), + ); + } + yield r'userinfo_signed_response_alg'; + yield serializers.serialize( + object.userinfoSignedResponseAlg, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + if (object.userinfoSigningAlgValuesSupported != null) { + yield r'userinfo_signing_alg_values_supported'; + yield serializers.serialize( + object.userinfoSigningAlgValuesSupported, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OidcConfiguration object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OidcConfigurationBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'authorization_endpoint': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.authorizationEndpoint = valueDes; + break; + case r'backchannel_logout_session_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.backchannelLogoutSessionSupported = valueDes; + break; + case r'backchannel_logout_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.backchannelLogoutSupported = valueDes; + break; + case r'claims_parameter_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.claimsParameterSupported = valueDes; + break; + case r'claims_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.claimsSupported.replace(valueDes); + break; + case r'code_challenge_methods_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.codeChallengeMethodsSupported.replace(valueDes); + break; + case r'end_session_endpoint': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.endSessionEndpoint = valueDes; + break; + case r'frontchannel_logout_session_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.frontchannelLogoutSessionSupported = valueDes; + break; + case r'frontchannel_logout_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.frontchannelLogoutSupported = valueDes; + break; + case r'grant_types_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.grantTypesSupported.replace(valueDes); + break; + case r'id_token_signed_response_alg': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.idTokenSignedResponseAlg.replace(valueDes); + break; + case r'id_token_signing_alg_values_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.idTokenSigningAlgValuesSupported.replace(valueDes); + break; + case r'issuer': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.issuer = valueDes; + break; + case r'jwks_uri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.jwksUri = valueDes; + break; + case r'registration_endpoint': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.registrationEndpoint = valueDes; + break; + case r'request_object_signing_alg_values_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.requestObjectSigningAlgValuesSupported.replace(valueDes); + break; + case r'request_parameter_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.requestParameterSupported = valueDes; + break; + case r'request_uri_parameter_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.requestUriParameterSupported = valueDes; + break; + case r'require_request_uri_registration': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.requireRequestUriRegistration = valueDes; + break; + case r'response_modes_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.responseModesSupported.replace(valueDes); + break; + case r'response_types_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.responseTypesSupported.replace(valueDes); + break; + case r'revocation_endpoint': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.revocationEndpoint = valueDes; + break; + case r'scopes_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.scopesSupported.replace(valueDes); + break; + case r'subject_types_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.subjectTypesSupported.replace(valueDes); + break; + case r'token_endpoint': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.tokenEndpoint = valueDes; + break; + case r'token_endpoint_auth_methods_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.tokenEndpointAuthMethodsSupported.replace(valueDes); + break; + case r'userinfo_endpoint': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userinfoEndpoint = valueDes; + break; + case r'userinfo_signed_response_alg': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.userinfoSignedResponseAlg.replace(valueDes); + break; + case r'userinfo_signing_alg_values_supported': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.userinfoSigningAlgValuesSupported.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OidcConfiguration deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OidcConfigurationBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/oidc_user_info.dart b/clients/hydra/dart/lib/src/model/oidc_user_info.dart new file mode 100644 index 00000000000..d3e4d8875fa --- /dev/null +++ b/clients/hydra/dart/lib/src/model/oidc_user_info.dart @@ -0,0 +1,451 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'oidc_user_info.g.dart'; + +/// OpenID Connect Userinfo +/// +/// Properties: +/// * [birthdate] - 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] - 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. +/// * [emailVerified] - 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. +/// * [familyName] - 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] - 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. +/// * [givenName] - 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] - 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. +/// * [middleName] - 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] - 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] - 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. +/// * [phoneNumber] - 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. +/// * [phoneNumberVerified] - 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] - 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. +/// * [preferredUsername] - 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] - URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. +/// * [sub] - Subject - Identifier for the End-User at the IssuerURL. +/// * [updatedAt] - 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] - 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] - String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. +@BuiltValue() +abstract class OidcUserInfo implements Built { + /// 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. + @BuiltValueField(wireName: r'birthdate') + String? get birthdate; + + /// 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. + @BuiltValueField(wireName: r'email') + String? get email; + + /// 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. + @BuiltValueField(wireName: r'email_verified') + bool? get emailVerified; + + /// 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. + @BuiltValueField(wireName: r'family_name') + String? get familyName; + + /// 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. + @BuiltValueField(wireName: r'gender') + String? get gender; + + /// 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. + @BuiltValueField(wireName: r'given_name') + String? get givenName; + + /// 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. + @BuiltValueField(wireName: r'locale') + String? get locale; + + /// 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. + @BuiltValueField(wireName: r'middle_name') + String? get middleName; + + /// 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. + @BuiltValueField(wireName: r'name') + String? get name; + + /// 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. + @BuiltValueField(wireName: r'nickname') + String? get nickname; + + /// 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. + @BuiltValueField(wireName: r'phone_number') + String? get phoneNumber; + + /// 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. + @BuiltValueField(wireName: r'phone_number_verified') + bool? get phoneNumberVerified; + + /// 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. + @BuiltValueField(wireName: r'picture') + String? get picture; + + /// 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. + @BuiltValueField(wireName: r'preferred_username') + String? get preferredUsername; + + /// URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. + @BuiltValueField(wireName: r'profile') + String? get profile; + + /// Subject - Identifier for the End-User at the IssuerURL. + @BuiltValueField(wireName: r'sub') + String? get sub; + + /// 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. + @BuiltValueField(wireName: r'updated_at') + int? get updatedAt; + + /// 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. + @BuiltValueField(wireName: r'website') + String? get website; + + /// String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. + @BuiltValueField(wireName: r'zoneinfo') + String? get zoneinfo; + + OidcUserInfo._(); + + factory OidcUserInfo([void updates(OidcUserInfoBuilder b)]) = _$OidcUserInfo; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OidcUserInfoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OidcUserInfoSerializer(); +} + +class _$OidcUserInfoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OidcUserInfo, _$OidcUserInfo]; + + @override + final String wireName = r'OidcUserInfo'; + + Iterable _serializeProperties( + Serializers serializers, + OidcUserInfo object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.birthdate != null) { + yield r'birthdate'; + yield serializers.serialize( + object.birthdate, + specifiedType: const FullType(String), + ); + } + if (object.email != null) { + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + } + if (object.emailVerified != null) { + yield r'email_verified'; + yield serializers.serialize( + object.emailVerified, + specifiedType: const FullType(bool), + ); + } + if (object.familyName != null) { + yield r'family_name'; + yield serializers.serialize( + object.familyName, + specifiedType: const FullType(String), + ); + } + if (object.gender != null) { + yield r'gender'; + yield serializers.serialize( + object.gender, + specifiedType: const FullType(String), + ); + } + if (object.givenName != null) { + yield r'given_name'; + yield serializers.serialize( + object.givenName, + specifiedType: const FullType(String), + ); + } + if (object.locale != null) { + yield r'locale'; + yield serializers.serialize( + object.locale, + specifiedType: const FullType(String), + ); + } + if (object.middleName != null) { + yield r'middle_name'; + yield serializers.serialize( + object.middleName, + specifiedType: const FullType(String), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + if (object.nickname != null) { + yield r'nickname'; + yield serializers.serialize( + object.nickname, + specifiedType: const FullType(String), + ); + } + if (object.phoneNumber != null) { + yield r'phone_number'; + yield serializers.serialize( + object.phoneNumber, + specifiedType: const FullType(String), + ); + } + if (object.phoneNumberVerified != null) { + yield r'phone_number_verified'; + yield serializers.serialize( + object.phoneNumberVerified, + specifiedType: const FullType(bool), + ); + } + if (object.picture != null) { + yield r'picture'; + yield serializers.serialize( + object.picture, + specifiedType: const FullType(String), + ); + } + if (object.preferredUsername != null) { + yield r'preferred_username'; + yield serializers.serialize( + object.preferredUsername, + specifiedType: const FullType(String), + ); + } + if (object.profile != null) { + yield r'profile'; + yield serializers.serialize( + object.profile, + specifiedType: const FullType(String), + ); + } + if (object.sub != null) { + yield r'sub'; + yield serializers.serialize( + object.sub, + specifiedType: const FullType(String), + ); + } + if (object.updatedAt != null) { + yield r'updated_at'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(int), + ); + } + if (object.website != null) { + yield r'website'; + yield serializers.serialize( + object.website, + specifiedType: const FullType(String), + ); + } + if (object.zoneinfo != null) { + yield r'zoneinfo'; + yield serializers.serialize( + object.zoneinfo, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OidcUserInfo object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OidcUserInfoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'birthdate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.birthdate = valueDes; + break; + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'email_verified': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.emailVerified = valueDes; + break; + case r'family_name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.familyName = valueDes; + break; + case r'gender': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.gender = valueDes; + break; + case r'given_name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.givenName = valueDes; + break; + case r'locale': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.locale = valueDes; + break; + case r'middle_name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.middleName = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'nickname': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.nickname = valueDes; + break; + case r'phone_number': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.phoneNumber = valueDes; + break; + case r'phone_number_verified': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.phoneNumberVerified = valueDes; + break; + case r'picture': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.picture = valueDes; + break; + case r'preferred_username': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.preferredUsername = valueDes; + break; + case r'profile': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.profile = valueDes; + break; + case r'sub': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.sub = valueDes; + break; + case r'updated_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.updatedAt = valueDes; + break; + case r'website': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.website = valueDes; + break; + case r'zoneinfo': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.zoneinfo = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OidcUserInfo deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OidcUserInfoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/pagination.dart b/clients/hydra/dart/lib/src/model/pagination.dart new file mode 100644 index 00000000000..f7d36ee6a8f --- /dev/null +++ b/clients/hydra/dart/lib/src/model/pagination.dart @@ -0,0 +1,130 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'pagination.g.dart'; + +/// Pagination +/// +/// Properties: +/// * [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). +/// * [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). +@BuiltValue() +abstract class Pagination implements Built { + /// 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). + @BuiltValueField(wireName: r'page_size') + int? get pageSize; + + /// 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). + @BuiltValueField(wireName: r'page_token') + String? get pageToken; + + Pagination._(); + + factory Pagination([void updates(PaginationBuilder b)]) = _$Pagination; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PaginationBuilder b) => b + ..pageSize = 250 + ..pageToken = '1'; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PaginationSerializer(); +} + +class _$PaginationSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [Pagination, _$Pagination]; + + @override + final String wireName = r'Pagination'; + + Iterable _serializeProperties( + Serializers serializers, + Pagination object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.pageSize != null) { + yield r'page_size'; + yield serializers.serialize( + object.pageSize, + specifiedType: const FullType(int), + ); + } + if (object.pageToken != null) { + yield r'page_token'; + yield serializers.serialize( + object.pageToken, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + Pagination object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PaginationBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'page_size': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.pageSize = valueDes; + break; + case r'page_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.pageToken = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + Pagination deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PaginationBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/pagination_headers.dart b/clients/hydra/dart/lib/src/model/pagination_headers.dart new file mode 100644 index 00000000000..ab8d51e8bea --- /dev/null +++ b/clients/hydra/dart/lib/src/model/pagination_headers.dart @@ -0,0 +1,128 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'pagination_headers.g.dart'; + +/// PaginationHeaders +/// +/// Properties: +/// * [link] - 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 +/// * [xTotalCount] - The total number of clients. in: header +@BuiltValue() +abstract class PaginationHeaders implements Built { + /// 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 + @BuiltValueField(wireName: r'link') + String? get link; + + /// The total number of clients. in: header + @BuiltValueField(wireName: r'x-total-count') + String? get xTotalCount; + + PaginationHeaders._(); + + factory PaginationHeaders([void updates(PaginationHeadersBuilder b)]) = _$PaginationHeaders; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PaginationHeadersBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PaginationHeadersSerializer(); +} + +class _$PaginationHeadersSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PaginationHeaders, _$PaginationHeaders]; + + @override + final String wireName = r'PaginationHeaders'; + + Iterable _serializeProperties( + Serializers serializers, + PaginationHeaders object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.link != null) { + yield r'link'; + yield serializers.serialize( + object.link, + specifiedType: const FullType(String), + ); + } + if (object.xTotalCount != null) { + yield r'x-total-count'; + yield serializers.serialize( + object.xTotalCount, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + PaginationHeaders object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PaginationHeadersBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'link': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.link = valueDes; + break; + case r'x-total-count': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.xTotalCount = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PaginationHeaders deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PaginationHeadersBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/reject_o_auth2_request.dart b/clients/hydra/dart/lib/src/model/reject_o_auth2_request.dart new file mode 100644 index 00000000000..7a84a1356f0 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/reject_o_auth2_request.dart @@ -0,0 +1,185 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'reject_o_auth2_request.g.dart'; + +/// RejectOAuth2Request +/// +/// Properties: +/// * [error] - The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. +/// * [errorDebug] - Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs. +/// * [errorDescription] - Description of the error in a human readable format. +/// * [errorHint] - Hint to help resolve the error. +/// * [statusCode] - Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 +@BuiltValue() +abstract class RejectOAuth2Request implements Built { + /// The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. + @BuiltValueField(wireName: r'error') + String? get error; + + /// Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs. + @BuiltValueField(wireName: r'error_debug') + String? get errorDebug; + + /// Description of the error in a human readable format. + @BuiltValueField(wireName: r'error_description') + String? get errorDescription; + + /// Hint to help resolve the error. + @BuiltValueField(wireName: r'error_hint') + String? get errorHint; + + /// Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 + @BuiltValueField(wireName: r'status_code') + int? get statusCode; + + RejectOAuth2Request._(); + + factory RejectOAuth2Request([void updates(RejectOAuth2RequestBuilder b)]) = _$RejectOAuth2Request; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(RejectOAuth2RequestBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$RejectOAuth2RequestSerializer(); +} + +class _$RejectOAuth2RequestSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [RejectOAuth2Request, _$RejectOAuth2Request]; + + @override + final String wireName = r'RejectOAuth2Request'; + + Iterable _serializeProperties( + Serializers serializers, + RejectOAuth2Request object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.error != null) { + yield r'error'; + yield serializers.serialize( + object.error, + specifiedType: const FullType(String), + ); + } + if (object.errorDebug != null) { + yield r'error_debug'; + yield serializers.serialize( + object.errorDebug, + specifiedType: const FullType(String), + ); + } + if (object.errorDescription != null) { + yield r'error_description'; + yield serializers.serialize( + object.errorDescription, + specifiedType: const FullType(String), + ); + } + if (object.errorHint != null) { + yield r'error_hint'; + yield serializers.serialize( + object.errorHint, + specifiedType: const FullType(String), + ); + } + if (object.statusCode != null) { + yield r'status_code'; + yield serializers.serialize( + object.statusCode, + specifiedType: const FullType(int), + ); + } + } + + @override + Object serialize( + Serializers serializers, + RejectOAuth2Request object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required RejectOAuth2RequestBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'error': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.error = valueDes; + break; + case r'error_debug': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.errorDebug = valueDes; + break; + case r'error_description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.errorDescription = valueDes; + break; + case r'error_hint': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.errorHint = valueDes; + break; + case r'status_code': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.statusCode = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + RejectOAuth2Request deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = RejectOAuth2RequestBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/token_pagination.dart b/clients/hydra/dart/lib/src/model/token_pagination.dart new file mode 100644 index 00000000000..0d755437511 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/token_pagination.dart @@ -0,0 +1,130 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'token_pagination.g.dart'; + +/// TokenPagination +/// +/// Properties: +/// * [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). +/// * [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). +@BuiltValue() +abstract class TokenPagination implements Built { + /// 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). + @BuiltValueField(wireName: r'page_size') + int? get pageSize; + + /// 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). + @BuiltValueField(wireName: r'page_token') + String? get pageToken; + + TokenPagination._(); + + factory TokenPagination([void updates(TokenPaginationBuilder b)]) = _$TokenPagination; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TokenPaginationBuilder b) => b + ..pageSize = 250 + ..pageToken = '1'; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TokenPaginationSerializer(); +} + +class _$TokenPaginationSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [TokenPagination, _$TokenPagination]; + + @override + final String wireName = r'TokenPagination'; + + Iterable _serializeProperties( + Serializers serializers, + TokenPagination object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.pageSize != null) { + yield r'page_size'; + yield serializers.serialize( + object.pageSize, + specifiedType: const FullType(int), + ); + } + if (object.pageToken != null) { + yield r'page_token'; + yield serializers.serialize( + object.pageToken, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + TokenPagination object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required TokenPaginationBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'page_size': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.pageSize = valueDes; + break; + case r'page_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.pageToken = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + TokenPagination deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = TokenPaginationBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/token_pagination_headers.dart b/clients/hydra/dart/lib/src/model/token_pagination_headers.dart new file mode 100644 index 00000000000..3a6645c7bf7 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/token_pagination_headers.dart @@ -0,0 +1,128 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'token_pagination_headers.g.dart'; + +/// TokenPaginationHeaders +/// +/// Properties: +/// * [link] - 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 +/// * [xTotalCount] - The total number of clients. in: header +@BuiltValue() +abstract class TokenPaginationHeaders implements Built { + /// 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 + @BuiltValueField(wireName: r'link') + String? get link; + + /// The total number of clients. in: header + @BuiltValueField(wireName: r'x-total-count') + String? get xTotalCount; + + TokenPaginationHeaders._(); + + factory TokenPaginationHeaders([void updates(TokenPaginationHeadersBuilder b)]) = _$TokenPaginationHeaders; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TokenPaginationHeadersBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TokenPaginationHeadersSerializer(); +} + +class _$TokenPaginationHeadersSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [TokenPaginationHeaders, _$TokenPaginationHeaders]; + + @override + final String wireName = r'TokenPaginationHeaders'; + + Iterable _serializeProperties( + Serializers serializers, + TokenPaginationHeaders object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.link != null) { + yield r'link'; + yield serializers.serialize( + object.link, + specifiedType: const FullType(String), + ); + } + if (object.xTotalCount != null) { + yield r'x-total-count'; + yield serializers.serialize( + object.xTotalCount, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + TokenPaginationHeaders object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required TokenPaginationHeadersBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'link': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.link = valueDes; + break; + case r'x-total-count': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.xTotalCount = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + TokenPaginationHeaders deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = TokenPaginationHeadersBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/token_pagination_request_parameters.dart b/clients/hydra/dart/lib/src/model/token_pagination_request_parameters.dart new file mode 100644 index 00000000000..983074fc200 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/token_pagination_request_parameters.dart @@ -0,0 +1,130 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'token_pagination_request_parameters.g.dart'; + +/// 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: +/// * [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). +/// * [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). +@BuiltValue() +abstract class TokenPaginationRequestParameters implements Built { + /// 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). + @BuiltValueField(wireName: r'page_size') + int? get pageSize; + + /// 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). + @BuiltValueField(wireName: r'page_token') + String? get pageToken; + + TokenPaginationRequestParameters._(); + + factory TokenPaginationRequestParameters([void updates(TokenPaginationRequestParametersBuilder b)]) = _$TokenPaginationRequestParameters; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TokenPaginationRequestParametersBuilder b) => b + ..pageSize = 250 + ..pageToken = '1'; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TokenPaginationRequestParametersSerializer(); +} + +class _$TokenPaginationRequestParametersSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [TokenPaginationRequestParameters, _$TokenPaginationRequestParameters]; + + @override + final String wireName = r'TokenPaginationRequestParameters'; + + Iterable _serializeProperties( + Serializers serializers, + TokenPaginationRequestParameters object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.pageSize != null) { + yield r'page_size'; + yield serializers.serialize( + object.pageSize, + specifiedType: const FullType(int), + ); + } + if (object.pageToken != null) { + yield r'page_token'; + yield serializers.serialize( + object.pageToken, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + TokenPaginationRequestParameters object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required TokenPaginationRequestParametersBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'page_size': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.pageSize = valueDes; + break; + case r'page_token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.pageToken = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + TokenPaginationRequestParameters deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = TokenPaginationRequestParametersBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/token_pagination_response_headers.dart b/clients/hydra/dart/lib/src/model/token_pagination_response_headers.dart new file mode 100644 index 00000000000..bce55a3d19c --- /dev/null +++ b/clients/hydra/dart/lib/src/model/token_pagination_response_headers.dart @@ -0,0 +1,128 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'token_pagination_response_headers.g.dart'; + +/// 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] - 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\" +/// * [xTotalCount] - The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. +@BuiltValue() +abstract class TokenPaginationResponseHeaders implements Built { + /// 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\" + @BuiltValueField(wireName: r'link') + String? get link; + + /// The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + @BuiltValueField(wireName: r'x-total-count') + int? get xTotalCount; + + TokenPaginationResponseHeaders._(); + + factory TokenPaginationResponseHeaders([void updates(TokenPaginationResponseHeadersBuilder b)]) = _$TokenPaginationResponseHeaders; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TokenPaginationResponseHeadersBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TokenPaginationResponseHeadersSerializer(); +} + +class _$TokenPaginationResponseHeadersSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [TokenPaginationResponseHeaders, _$TokenPaginationResponseHeaders]; + + @override + final String wireName = r'TokenPaginationResponseHeaders'; + + Iterable _serializeProperties( + Serializers serializers, + TokenPaginationResponseHeaders object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.link != null) { + yield r'link'; + yield serializers.serialize( + object.link, + specifiedType: const FullType(String), + ); + } + if (object.xTotalCount != null) { + yield r'x-total-count'; + yield serializers.serialize( + object.xTotalCount, + specifiedType: const FullType(int), + ); + } + } + + @override + Object serialize( + Serializers serializers, + TokenPaginationResponseHeaders object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required TokenPaginationResponseHeadersBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'link': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.link = valueDes; + break; + case r'x-total-count': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.xTotalCount = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + TokenPaginationResponseHeaders deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = TokenPaginationResponseHeadersBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/trust_o_auth2_jwt_grant_issuer.dart b/clients/hydra/dart/lib/src/model/trust_o_auth2_jwt_grant_issuer.dart new file mode 100644 index 00000000000..8c5abb2f1d6 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/trust_o_auth2_jwt_grant_issuer.dart @@ -0,0 +1,197 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:ory_hydra_client/src/model/json_web_key.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'trust_o_auth2_jwt_grant_issuer.g.dart'; + +/// Trust OAuth2 JWT Bearer Grant Type Issuer Request Body +/// +/// Properties: +/// * [allowAnySubject] - The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. +/// * [expiresAt] - The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". +/// * [issuer] - The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). +/// * [jwk] +/// * [scope] - The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) +/// * [subject] - The \"subject\" identifies the principal that is the subject of the JWT. +@BuiltValue() +abstract class TrustOAuth2JwtGrantIssuer implements Built { + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + @BuiltValueField(wireName: r'allow_any_subject') + bool? get allowAnySubject; + + /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + @BuiltValueField(wireName: r'expires_at') + DateTime get expiresAt; + + /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + @BuiltValueField(wireName: r'issuer') + String get issuer; + + @BuiltValueField(wireName: r'jwk') + JsonWebKey get jwk; + + /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + @BuiltValueField(wireName: r'scope') + BuiltList get scope; + + /// The \"subject\" identifies the principal that is the subject of the JWT. + @BuiltValueField(wireName: r'subject') + String? get subject; + + TrustOAuth2JwtGrantIssuer._(); + + factory TrustOAuth2JwtGrantIssuer([void updates(TrustOAuth2JwtGrantIssuerBuilder b)]) = _$TrustOAuth2JwtGrantIssuer; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TrustOAuth2JwtGrantIssuerBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TrustOAuth2JwtGrantIssuerSerializer(); +} + +class _$TrustOAuth2JwtGrantIssuerSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [TrustOAuth2JwtGrantIssuer, _$TrustOAuth2JwtGrantIssuer]; + + @override + final String wireName = r'TrustOAuth2JwtGrantIssuer'; + + Iterable _serializeProperties( + Serializers serializers, + TrustOAuth2JwtGrantIssuer object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.allowAnySubject != null) { + yield r'allow_any_subject'; + yield serializers.serialize( + object.allowAnySubject, + specifiedType: const FullType(bool), + ); + } + yield r'expires_at'; + yield serializers.serialize( + object.expiresAt, + specifiedType: const FullType(DateTime), + ); + yield r'issuer'; + yield serializers.serialize( + object.issuer, + specifiedType: const FullType(String), + ); + yield r'jwk'; + yield serializers.serialize( + object.jwk, + specifiedType: const FullType(JsonWebKey), + ); + yield r'scope'; + yield serializers.serialize( + object.scope, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + if (object.subject != null) { + yield r'subject'; + yield serializers.serialize( + object.subject, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + TrustOAuth2JwtGrantIssuer object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required TrustOAuth2JwtGrantIssuerBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'allow_any_subject': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.allowAnySubject = valueDes; + break; + case r'expires_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.expiresAt = valueDes; + break; + case r'issuer': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.issuer = valueDes; + break; + case r'jwk': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JsonWebKey), + ) as JsonWebKey; + result.jwk.replace(valueDes); + break; + case r'scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.scope.replace(valueDes); + break; + case r'subject': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.subject = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + TrustOAuth2JwtGrantIssuer deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = TrustOAuth2JwtGrantIssuerBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/trusted_o_auth2_jwt_grant_issuer.dart b/clients/hydra/dart/lib/src/model/trusted_o_auth2_jwt_grant_issuer.dart new file mode 100644 index 00000000000..f0d15167df4 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/trusted_o_auth2_jwt_grant_issuer.dart @@ -0,0 +1,242 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:ory_hydra_client/src/model/trusted_o_auth2_jwt_grant_json_web_key.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'trusted_o_auth2_jwt_grant_issuer.g.dart'; + +/// OAuth2 JWT Bearer Grant Type Issuer Trust Relationship +/// +/// Properties: +/// * [allowAnySubject] - The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. +/// * [createdAt] - The \"created_at\" indicates, when grant was created. +/// * [expiresAt] - The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". +/// * [id] +/// * [issuer] - The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). +/// * [publicKey] +/// * [scope] - The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) +/// * [subject] - The \"subject\" identifies the principal that is the subject of the JWT. +@BuiltValue() +abstract class TrustedOAuth2JwtGrantIssuer implements Built { + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + @BuiltValueField(wireName: r'allow_any_subject') + bool? get allowAnySubject; + + /// The \"created_at\" indicates, when grant was created. + @BuiltValueField(wireName: r'created_at') + DateTime? get createdAt; + + /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + @BuiltValueField(wireName: r'expires_at') + DateTime? get expiresAt; + + @BuiltValueField(wireName: r'id') + String? get id; + + /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + @BuiltValueField(wireName: r'issuer') + String? get issuer; + + @BuiltValueField(wireName: r'public_key') + TrustedOAuth2JwtGrantJsonWebKey? get publicKey; + + /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + @BuiltValueField(wireName: r'scope') + BuiltList? get scope; + + /// The \"subject\" identifies the principal that is the subject of the JWT. + @BuiltValueField(wireName: r'subject') + String? get subject; + + TrustedOAuth2JwtGrantIssuer._(); + + factory TrustedOAuth2JwtGrantIssuer([void updates(TrustedOAuth2JwtGrantIssuerBuilder b)]) = _$TrustedOAuth2JwtGrantIssuer; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TrustedOAuth2JwtGrantIssuerBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TrustedOAuth2JwtGrantIssuerSerializer(); +} + +class _$TrustedOAuth2JwtGrantIssuerSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [TrustedOAuth2JwtGrantIssuer, _$TrustedOAuth2JwtGrantIssuer]; + + @override + final String wireName = r'TrustedOAuth2JwtGrantIssuer'; + + Iterable _serializeProperties( + Serializers serializers, + TrustedOAuth2JwtGrantIssuer object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.allowAnySubject != null) { + yield r'allow_any_subject'; + yield serializers.serialize( + object.allowAnySubject, + specifiedType: const FullType(bool), + ); + } + if (object.createdAt != null) { + yield r'created_at'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + } + if (object.expiresAt != null) { + yield r'expires_at'; + yield serializers.serialize( + object.expiresAt, + specifiedType: const FullType(DateTime), + ); + } + if (object.id != null) { + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + } + if (object.issuer != null) { + yield r'issuer'; + yield serializers.serialize( + object.issuer, + specifiedType: const FullType(String), + ); + } + if (object.publicKey != null) { + yield r'public_key'; + yield serializers.serialize( + object.publicKey, + specifiedType: const FullType(TrustedOAuth2JwtGrantJsonWebKey), + ); + } + if (object.scope != null) { + yield r'scope'; + yield serializers.serialize( + object.scope, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.subject != null) { + yield r'subject'; + yield serializers.serialize( + object.subject, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + TrustedOAuth2JwtGrantIssuer object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required TrustedOAuth2JwtGrantIssuerBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'allow_any_subject': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.allowAnySubject = valueDes; + break; + case r'created_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'expires_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.expiresAt = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'issuer': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.issuer = valueDes; + break; + case r'public_key': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(TrustedOAuth2JwtGrantJsonWebKey), + ) as TrustedOAuth2JwtGrantJsonWebKey; + result.publicKey.replace(valueDes); + break; + case r'scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.scope.replace(valueDes); + break; + case r'subject': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.subject = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + TrustedOAuth2JwtGrantIssuer deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = TrustedOAuth2JwtGrantIssuerBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/trusted_o_auth2_jwt_grant_json_web_key.dart b/clients/hydra/dart/lib/src/model/trusted_o_auth2_jwt_grant_json_web_key.dart new file mode 100644 index 00000000000..807048bca64 --- /dev/null +++ b/clients/hydra/dart/lib/src/model/trusted_o_auth2_jwt_grant_json_web_key.dart @@ -0,0 +1,128 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'trusted_o_auth2_jwt_grant_json_web_key.g.dart'; + +/// OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key +/// +/// Properties: +/// * [kid] - The \"key_id\" is key unique identifier (same as kid header in jws/jwt). +/// * [set_] - The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. +@BuiltValue() +abstract class TrustedOAuth2JwtGrantJsonWebKey implements Built { + /// The \"key_id\" is key unique identifier (same as kid header in jws/jwt). + @BuiltValueField(wireName: r'kid') + String? get kid; + + /// The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. + @BuiltValueField(wireName: r'set') + String? get set_; + + TrustedOAuth2JwtGrantJsonWebKey._(); + + factory TrustedOAuth2JwtGrantJsonWebKey([void updates(TrustedOAuth2JwtGrantJsonWebKeyBuilder b)]) = _$TrustedOAuth2JwtGrantJsonWebKey; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TrustedOAuth2JwtGrantJsonWebKeyBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TrustedOAuth2JwtGrantJsonWebKeySerializer(); +} + +class _$TrustedOAuth2JwtGrantJsonWebKeySerializer implements PrimitiveSerializer { + @override + final Iterable types = const [TrustedOAuth2JwtGrantJsonWebKey, _$TrustedOAuth2JwtGrantJsonWebKey]; + + @override + final String wireName = r'TrustedOAuth2JwtGrantJsonWebKey'; + + Iterable _serializeProperties( + Serializers serializers, + TrustedOAuth2JwtGrantJsonWebKey object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.kid != null) { + yield r'kid'; + yield serializers.serialize( + object.kid, + specifiedType: const FullType(String), + ); + } + if (object.set_ != null) { + yield r'set'; + yield serializers.serialize( + object.set_, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + TrustedOAuth2JwtGrantJsonWebKey object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required TrustedOAuth2JwtGrantJsonWebKeyBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'kid': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.kid = valueDes; + break; + case r'set': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.set_ = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + TrustedOAuth2JwtGrantJsonWebKey deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = TrustedOAuth2JwtGrantJsonWebKeyBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/model/version.dart b/clients/hydra/dart/lib/src/model/version.dart new file mode 100644 index 00000000000..8e7df66dfae --- /dev/null +++ b/clients/hydra/dart/lib/src/model/version.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'version.g.dart'; + +/// Version +/// +/// Properties: +/// * [version] - Version is the service's version. +@BuiltValue() +abstract class Version implements Built { + /// Version is the service's version. + @BuiltValueField(wireName: r'version') + String? get version; + + Version._(); + + factory Version([void updates(VersionBuilder b)]) = _$Version; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(VersionBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$VersionSerializer(); +} + +class _$VersionSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [Version, _$Version]; + + @override + final String wireName = r'Version'; + + Iterable _serializeProperties( + Serializers serializers, + Version object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.version != null) { + yield r'version'; + yield serializers.serialize( + object.version, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + Version object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required VersionBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'version': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.version = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + Version deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = VersionBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/clients/hydra/dart/lib/src/serializers.dart b/clients/hydra/dart/lib/src/serializers.dart new file mode 100644 index 00000000000..079a4b5bbd9 --- /dev/null +++ b/clients/hydra/dart/lib/src/serializers.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_import + +import 'package:one_of_serializer/any_of_serializer.dart'; +import 'package:one_of_serializer/one_of_serializer.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/serializer.dart'; +import 'package:built_value/standard_json_plugin.dart'; +import 'package:built_value/iso_8601_date_time_serializer.dart'; +import 'package:ory_hydra_client/src/date_serializer.dart'; +import 'package:ory_hydra_client/src/model/date.dart'; + +import 'package:ory_hydra_client/src/model/accept_o_auth2_consent_request.dart'; +import 'package:ory_hydra_client/src/model/accept_o_auth2_consent_request_session.dart'; +import 'package:ory_hydra_client/src/model/accept_o_auth2_login_request.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/generic_error.dart'; +import 'package:ory_hydra_client/src/model/get_version200_response.dart'; +import 'package:ory_hydra_client/src/model/health_not_ready_status.dart'; +import 'package:ory_hydra_client/src/model/health_status.dart'; +import 'package:ory_hydra_client/src/model/introspected_o_auth2_token.dart'; +import 'package:ory_hydra_client/src/model/is_ready200_response.dart'; +import 'package:ory_hydra_client/src/model/is_ready503_response.dart'; +import 'package:ory_hydra_client/src/model/json_patch.dart'; +import 'package:ory_hydra_client/src/model/json_web_key.dart'; +import 'package:ory_hydra_client/src/model/json_web_key_set.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_client.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_client_token_lifespans.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_consent_request.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_consent_request_open_id_connect_context.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_consent_session.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_consent_session_expires_at.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_login_request.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_logout_request.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_redirect_to.dart'; +import 'package:ory_hydra_client/src/model/o_auth2_token_exchange.dart'; +import 'package:ory_hydra_client/src/model/oidc_configuration.dart'; +import 'package:ory_hydra_client/src/model/oidc_user_info.dart'; +import 'package:ory_hydra_client/src/model/pagination.dart'; +import 'package:ory_hydra_client/src/model/pagination_headers.dart'; +import 'package:ory_hydra_client/src/model/reject_o_auth2_request.dart'; +import 'package:ory_hydra_client/src/model/token_pagination.dart'; +import 'package:ory_hydra_client/src/model/token_pagination_headers.dart'; +import 'package:ory_hydra_client/src/model/token_pagination_request_parameters.dart'; +import 'package:ory_hydra_client/src/model/token_pagination_response_headers.dart'; +import 'package:ory_hydra_client/src/model/trust_o_auth2_jwt_grant_issuer.dart'; +import 'package:ory_hydra_client/src/model/trusted_o_auth2_jwt_grant_issuer.dart'; +import 'package:ory_hydra_client/src/model/trusted_o_auth2_jwt_grant_json_web_key.dart'; +import 'package:ory_hydra_client/src/model/version.dart'; + +part 'serializers.g.dart'; + +@SerializersFor([ + AcceptOAuth2ConsentRequest, + AcceptOAuth2ConsentRequestSession, + AcceptOAuth2LoginRequest, + CreateJsonWebKeySet, + ErrorOAuth2, + GenericError, + GetVersion200Response, + HealthNotReadyStatus, + HealthStatus, + IntrospectedOAuth2Token, + IsReady200Response, + IsReady503Response, + JsonPatch, + JsonWebKey, + JsonWebKeySet, + OAuth2Client, + OAuth2ClientTokenLifespans, + OAuth2ConsentRequest, + OAuth2ConsentRequestOpenIDConnectContext, + OAuth2ConsentSession, + OAuth2ConsentSessionExpiresAt, + OAuth2LoginRequest, + OAuth2LogoutRequest, + OAuth2RedirectTo, + OAuth2TokenExchange, + OidcConfiguration, + OidcUserInfo, + Pagination, + PaginationHeaders, + RejectOAuth2Request, + TokenPagination, + TokenPaginationHeaders, + TokenPaginationRequestParameters, + TokenPaginationResponseHeaders, + TrustOAuth2JwtGrantIssuer, + TrustedOAuth2JwtGrantIssuer, + TrustedOAuth2JwtGrantJsonWebKey, + Version, +]) +Serializers serializers = (_$serializers.toBuilder() + ..addBuilderFactory( + const FullType(BuiltList, [FullType(TrustedOAuth2JwtGrantIssuer)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(OAuth2ConsentSession)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(OAuth2Client)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(JsonPatch)]), + () => ListBuilder(), + ) + ..add(const OneOfSerializer()) + ..add(const AnyOfSerializer()) + ..add(const DateSerializer()) + ..add(Iso8601DateTimeSerializer())) + .build(); + +Serializers standardSerializers = + (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/clients/hydra/dart/pubspec.yaml b/clients/hydra/dart/pubspec.yaml index 22fd727d65e..d0b1f56380b 100644 --- a/clients/hydra/dart/pubspec.yaml +++ b/clients/hydra/dart/pubspec.yaml @@ -1,17 +1,19 @@ name: ory_hydra_client -version: 1.11.0 +version: 2.0.1 description: OpenAPI API client homepage: https://www.ory.sh environment: - sdk: '>=2.7.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' dependencies: - dio: '^3.0.9' - built_value: '>=7.1.0 <8.0.0' - built_collection: '>=4.3.2 <5.0.0' + dio: '>=4.0.1 <5.0.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' + built_collection: '>=5.1.1 <6.0.0' dev_dependencies: - built_value_generator: '>=7.1.0 <8.0.0' + built_value_generator: '>=8.4.0 <9.0.0' build_runner: any - test: '>=1.3.0 <1.16.0' + test: ^1.16.0 diff --git a/clients/hydra/dart/test/consent_request_session_test.dart b/clients/hydra/dart/test/accept_o_auth2_consent_request_session_test.dart similarity index 76% rename from clients/hydra/dart/test/consent_request_session_test.dart rename to clients/hydra/dart/test/accept_o_auth2_consent_request_session_test.dart index 2bc52584f6e..945a29d968f 100644 --- a/clients/hydra/dart/test/consent_request_session_test.dart +++ b/clients/hydra/dart/test/accept_o_auth2_consent_request_session_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/consent_request_session.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for ConsentRequestSession +// tests for AcceptOAuth2ConsentRequestSession void main() { - final instance = ConsentRequestSessionBuilder(); + final instance = AcceptOAuth2ConsentRequestSessionBuilder(); // TODO add properties to the builder and call build() - group(ConsentRequestSession, () { + group(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! // JsonObject accessToken test('to test the property `accessToken`', () async { @@ -26,7 +19,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/accept_consent_request_test.dart b/clients/hydra/dart/test/accept_o_auth2_consent_request_test.dart similarity index 77% rename from clients/hydra/dart/test/accept_consent_request_test.dart rename to clients/hydra/dart/test/accept_o_auth2_consent_request_test.dart index aa1e3548f0e..a287ebe8c14 100644 --- a/clients/hydra/dart/test/accept_consent_request_test.dart +++ b/clients/hydra/dart/test/accept_o_auth2_consent_request_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/accept_consent_request.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for AcceptConsentRequest +// tests for AcceptOAuth2ConsentRequest void main() { - final instance = AcceptConsentRequestBuilder(); + final instance = AcceptOAuth2ConsentRequestBuilder(); // TODO add properties to the builder and call build() - group(AcceptConsentRequest, () { + group(AcceptOAuth2ConsentRequest, () { // BuiltList grantAccessTokenAudience test('to test the property `grantAccessTokenAudience`', () async { // TODO @@ -41,12 +34,10 @@ void main() { // TODO }); - // ConsentRequestSession session + // AcceptOAuth2ConsentRequestSession session test('to test the property `session`', () async { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/accept_login_request_test.dart b/clients/hydra/dart/test/accept_o_auth2_login_request_test.dart similarity index 91% rename from clients/hydra/dart/test/accept_login_request_test.dart rename to clients/hydra/dart/test/accept_o_auth2_login_request_test.dart index 32d5763fb1a..ccbc9db2830 100644 --- a/clients/hydra/dart/test/accept_login_request_test.dart +++ b/clients/hydra/dart/test/accept_o_auth2_login_request_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/accept_login_request.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for AcceptLoginRequest +// tests for AcceptOAuth2LoginRequest void main() { - final instance = AcceptLoginRequestBuilder(); + final instance = AcceptOAuth2LoginRequestBuilder(); // TODO add properties to the builder and call build() - group(AcceptLoginRequest, () { + group(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. // String acr test('to test the property `acr`', () async { @@ -54,7 +47,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/admin_api_test.dart b/clients/hydra/dart/test/admin_api_test.dart deleted file mode 100644 index ad022060e9f..00000000000 --- a/clients/hydra/dart/test/admin_api_test.dart +++ /dev/null @@ -1,325 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/api.dart'; -import 'package:ory_hydra_client/api/admin_api.dart'; -import 'package:test/test.dart'; - - -/// tests for AdminApi -void main() { - final instance = OryHydraClient().getAdminApi(); - - group(AdminApi, () { - // Accept a Consent Request - // - // When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - // - //Future acceptConsentRequest(String consentChallenge, { AcceptConsentRequest body }) async - test('test acceptConsentRequest', () async { - // TODO - }); - - // Accept a Login Request - // - // When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - // - //Future acceptLoginRequest(String loginChallenge, { AcceptLoginRequest body }) async - test('test acceptLoginRequest', () async { - // TODO - }); - - // Accept a Logout Request - // - // When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - // - //Future acceptLogoutRequest(String logoutChallenge) async - test('test acceptLogoutRequest', () async { - // TODO - }); - - // Generate a New 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. - // - //Future createJsonWebKeySet(String set_, { JsonWebKeySetGeneratorRequest body }) async - test('test createJsonWebKeySet', () async { - // TODO - }); - - // Create an OAuth 2.0 Client - // - // Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - // - //Future createOAuth2Client(OAuth2Client body) async - test('test createOAuth2Client', () async { - // TODO - }); - - // Delete a 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. - // - //Future deleteJsonWebKey(String kid, String set_) async - test('test deleteJsonWebKey', () async { - // TODO - }); - - // Delete a 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. - // - //Future deleteJsonWebKeySet(String set_) async - test('test deleteJsonWebKeySet', () async { - // TODO - }); - - // Deletes an 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. - // - //Future deleteOAuth2Client(String id) async - test('test deleteOAuth2Client', () async { - // TODO - }); - - // Delete OAuth2 Access Tokens from a Client - // - // This endpoint deletes OAuth2 access tokens issued for a client from the database - // - //Future deleteOAuth2Token(String clientId) async - test('test deleteOAuth2Token', () async { - // TODO - }); - - // Delete a 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. - // - //Future deleteTrustedJwtGrantIssuer(String id) async - test('test deleteTrustedJwtGrantIssuer', () async { - // TODO - }); - - // Flush Expired OAuth2 Access Tokens - // - // This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - // - //Future flushInactiveOAuth2Tokens({ FlushInactiveOAuth2TokensRequest body }) async - test('test flushInactiveOAuth2Tokens', () async { - // TODO - }); - - // Get Consent Request Information - // - // When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - // - //Future getConsentRequest(String consentChallenge) async - test('test getConsentRequest', () async { - // TODO - }); - - // Fetch a JSON Web Key - // - // This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - // - //Future getJsonWebKey(String kid, String set_) async - test('test getJsonWebKey', () async { - // TODO - }); - - // 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. - // - //Future getJsonWebKeySet(String set_) async - test('test getJsonWebKeySet', () async { - // TODO - }); - - // Get a Login Request - // - // When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - // - //Future getLoginRequest(String loginChallenge) async - test('test getLoginRequest', () async { - // TODO - }); - - // Get a Logout Request - // - // Use this endpoint to fetch a logout request. - // - //Future getLogoutRequest(String logoutChallenge) async - test('test getLogoutRequest', () async { - // TODO - }); - - // 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. - // - //Future getOAuth2Client(String id) async - test('test getOAuth2Client', () async { - // TODO - }); - - // Get a 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. - // - //Future getTrustedJwtGrantIssuer(String id) async - test('test getTrustedJwtGrantIssuer', () async { - // TODO - }); - - // Get Service Version - // - // This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - // - //Future getVersion() async - test('test getVersion', () async { - // TODO - }); - - // Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - // - //Future introspectOAuth2Token(String token, { String scope }) async - test('test introspectOAuth2Token', () async { - // TODO - }); - - // Check Alive Status - // - // This endpoint returns a 200 status code when the HTTP server is up running. 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. - // - //Future isInstanceAlive() async - test('test isInstanceAlive', () async { - // TODO - }); - - // 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - // - //Future> listOAuth2Clients({ int limit, int offset, String clientName, String owner }) async - test('test listOAuth2Clients', () async { - // TODO - }); - - // Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - // - //Future> listSubjectConsentSessions(String subject) async - test('test listSubjectConsentSessions', () async { - // TODO - }); - - // List Trusted OAuth2 JWT Bearer Grant Type Issuers - // - // Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - // - //Future> listTrustedJwtGrantIssuers({ String issuer, int limit, int offset }) async - test('test listTrustedJwtGrantIssuers', () async { - // TODO - }); - - // Patch an OAuth 2.0 Client - // - // Patch an existing OAuth 2.0 Client. 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. - // - //Future patchOAuth2Client(String id, BuiltList body) async - test('test patchOAuth2Client', () async { - // TODO - }); - - // Reject a Consent Request - // - // When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - // - //Future rejectConsentRequest(String consentChallenge, { RejectRequest body }) async - test('test rejectConsentRequest', () async { - // TODO - }); - - // Reject a Login Request - // - // When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - // - //Future rejectLoginRequest(String loginChallenge, { RejectRequest body }) async - test('test rejectLoginRequest', () async { - // TODO - }); - - // Reject a Logout Request - // - // When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - // - //Future rejectLogoutRequest(String logoutChallenge, { RejectRequest body }) async - test('test rejectLogoutRequest', () async { - // TODO - }); - - // Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - // - // This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - // - //Future revokeAuthenticationSession(String subject) async - test('test revokeAuthenticationSession', () async { - // TODO - }); - - // Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - // - // This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - // - //Future revokeConsentSessions(String subject, { String client, bool all }) async - test('test revokeConsentSessions', () async { - // TODO - }); - - // Trust an 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). - // - //Future trustJwtGrantIssuer({ TrustJwtGrantIssuerBody body }) async - test('test trustJwtGrantIssuer', () async { - // TODO - }); - - // Update a 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. - // - //Future updateJsonWebKey(String kid, String set_, { JSONWebKey body }) async - test('test updateJsonWebKey', () async { - // TODO - }); - - // 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. - // - //Future updateJsonWebKeySet(String set_, { JSONWebKeySet body }) async - test('test updateJsonWebKeySet', () async { - // TODO - }); - - // Update an OAuth 2.0 Client - // - // Update an existing OAuth 2.0 Client. 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. - // - //Future updateOAuth2Client(String id, OAuth2Client body) async - test('test updateOAuth2Client', () async { - // TODO - }); - - }); -} diff --git a/clients/hydra/dart/test/completed_request_test.dart b/clients/hydra/dart/test/completed_request_test.dart deleted file mode 100644 index 1a7c8b87da3..00000000000 --- a/clients/hydra/dart/test/completed_request_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/completed_request.dart'; -import 'package:test/test.dart'; - -// tests for CompletedRequest -void main() { - final instance = CompletedRequestBuilder(); - // TODO add properties to the builder and call build() - - group(CompletedRequest, () { - // RedirectURL is the URL which you should redirect the user to once the authentication process is completed. - // String redirectTo - test('to test the property `redirectTo`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/container_wait_ok_body_error_test.dart b/clients/hydra/dart/test/container_wait_ok_body_error_test.dart deleted file mode 100644 index 2a9574f1a3d..00000000000 --- a/clients/hydra/dart/test/container_wait_ok_body_error_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/container_wait_ok_body_error.dart'; -import 'package:test/test.dart'; - -// tests for ContainerWaitOKBodyError -void main() { - final instance = ContainerWaitOKBodyErrorBuilder(); - // TODO add properties to the builder and call build() - - group(ContainerWaitOKBodyError, () { - // Details of an error - // String message - test('to test the property `message`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/create_json_web_key_set_test.dart b/clients/hydra/dart/test/create_json_web_key_set_test.dart new file mode 100644 index 00000000000..9e4eb2e4434 --- /dev/null +++ b/clients/hydra/dart/test/create_json_web_key_set_test.dart @@ -0,0 +1,29 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for CreateJsonWebKeySet +void main() { + final instance = CreateJsonWebKeySetBuilder(); + // TODO add properties to the builder and call build() + + group(CreateJsonWebKeySet, () { + // JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. + // String alg + test('to test the property `alg`', () async { + // TODO + }); + + // JSON Web Key ID The Key ID of the key to be created. + // String kid + test('to test the property `kid`', () async { + // TODO + }); + + // 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\". + // String use + test('to test the property `use`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/json_error_test.dart b/clients/hydra/dart/test/error_o_auth2_test.dart similarity index 51% rename from clients/hydra/dart/test/json_error_test.dart rename to clients/hydra/dart/test/error_o_auth2_test.dart index ac4c778066b..936703dd3a1 100644 --- a/clients/hydra/dart/test/json_error_test.dart +++ b/clients/hydra/dart/test/error_o_auth2_test.dart @@ -1,44 +1,41 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/json_error.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for JsonError +// tests for ErrorOAuth2 void main() { - final instance = JsonErrorBuilder(); + final instance = ErrorOAuth2Builder(); // TODO add properties to the builder and call build() - group(JsonError, () { - // Name is the error name. + group(ErrorOAuth2, () { + // Error // String error test('to test the property `error`', () async { // TODO }); - // Debug contains debug information. This is usually not available and has to be enabled. + // Error Debug Information Only available in dev mode. // String errorDebug test('to test the property `errorDebug`', () async { // TODO }); - // Description contains further information on the nature of the error. + // Error Description // String errorDescription test('to test the property `errorDescription`', () async { // TODO }); - // Code represents the error status code (404, 403, 401, ...). + // Error Hint Helps the user identify the error cause. + // String errorHint + test('to test the property `errorHint`', () async { + // TODO + }); + + // HTTP Status Code // int statusCode test('to test the property `statusCode`', () async { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/flush_inactive_o_auth2_tokens_request_test.dart b/clients/hydra/dart/test/flush_inactive_o_auth2_tokens_request_test.dart deleted file mode 100644 index 306c2452734..00000000000 --- a/clients/hydra/dart/test/flush_inactive_o_auth2_tokens_request_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/flush_inactive_o_auth2_tokens_request.dart'; -import 'package:test/test.dart'; - -// tests for FlushInactiveOAuth2TokensRequest -void main() { - final instance = FlushInactiveOAuth2TokensRequestBuilder(); - // TODO add properties to the builder and call build() - - group(FlushInactiveOAuth2TokensRequest, () { - // NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. - // DateTime notAfter - test('to test the property `notAfter`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/generic_error_test.dart b/clients/hydra/dart/test/generic_error_test.dart index 407b0520a02..bb7f6e849e4 100644 --- a/clients/hydra/dart/test/generic_error_test.dart +++ b/clients/hydra/dart/test/generic_error_test.dart @@ -1,12 +1,5 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/generic_error.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; // tests for GenericError void main() { @@ -62,7 +55,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/get_version200_response_test.dart b/clients/hydra/dart/test/get_version200_response_test.dart new file mode 100644 index 00000000000..ffd90274004 --- /dev/null +++ b/clients/hydra/dart/test/get_version200_response_test.dart @@ -0,0 +1,17 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for GetVersion200Response +void main() { + final instance = GetVersion200ResponseBuilder(); + // TODO add properties to the builder and call build() + + group(GetVersion200Response, () { + // The version of Ory Hydra. + // String version + test('to test the property `version`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/health_not_ready_status_test.dart b/clients/hydra/dart/test/health_not_ready_status_test.dart index 42964590754..f54291ad9d7 100644 --- a/clients/hydra/dart/test/health_not_ready_status_test.dart +++ b/clients/hydra/dart/test/health_not_ready_status_test.dart @@ -1,12 +1,5 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/health_not_ready_status.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; // tests for HealthNotReadyStatus void main() { @@ -20,7 +13,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/health_status_test.dart b/clients/hydra/dart/test/health_status_test.dart index 3f2b77d8373..87abbd27c73 100644 --- a/clients/hydra/dart/test/health_status_test.dart +++ b/clients/hydra/dart/test/health_status_test.dart @@ -1,12 +1,5 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/health_status.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; // tests for HealthStatus void main() { @@ -20,7 +13,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/o_auth2_token_introspection_test.dart b/clients/hydra/dart/test/introspected_o_auth2_token_test.dart similarity index 91% rename from clients/hydra/dart/test/o_auth2_token_introspection_test.dart rename to clients/hydra/dart/test/introspected_o_auth2_token_test.dart index 8e90a1affe8..a97f1d6e284 100644 --- a/clients/hydra/dart/test/o_auth2_token_introspection_test.dart +++ b/clients/hydra/dart/test/introspected_o_auth2_token_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/o_auth2_token_introspection.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for OAuth2TokenIntrospection +// tests for IntrospectedOAuth2Token void main() { - final instance = OAuth2TokenIntrospectionBuilder(); + final instance = IntrospectedOAuth2TokenBuilder(); // TODO add properties to the builder and call build() - group(OAuth2TokenIntrospection, () { + group(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). // bool active test('to test the property `active`', () async { @@ -39,7 +32,7 @@ void main() { }); // Extra is arbitrary data set by the session. - // JsonObject ext + // BuiltMap ext test('to test the property `ext`', () async { // TODO }); @@ -98,7 +91,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/is_ready200_response_test.dart b/clients/hydra/dart/test/is_ready200_response_test.dart new file mode 100644 index 00000000000..865efa11010 --- /dev/null +++ b/clients/hydra/dart/test/is_ready200_response_test.dart @@ -0,0 +1,17 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for IsReady200Response +void main() { + final instance = IsReady200ResponseBuilder(); + // TODO add properties to the builder and call build() + + group(IsReady200Response, () { + // Always \"ok\". + // String status + test('to test the property `status`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/is_ready503_response_test.dart b/clients/hydra/dart/test/is_ready503_response_test.dart new file mode 100644 index 00000000000..3d0d9080d8f --- /dev/null +++ b/clients/hydra/dart/test/is_ready503_response_test.dart @@ -0,0 +1,17 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for IsReady503Response +void main() { + final instance = IsReady503ResponseBuilder(); + // TODO add properties to the builder and call build() + + group(IsReady503Response, () { + // Errors contains a list of errors that caused the not ready status. + // BuiltMap errors + test('to test the property `errors`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/json_patch_test.dart b/clients/hydra/dart/test/json_patch_test.dart new file mode 100644 index 00000000000..52b60e8ec98 --- /dev/null +++ b/clients/hydra/dart/test/json_patch_test.dart @@ -0,0 +1,35 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for JsonPatch +void main() { + final instance = JsonPatchBuilder(); + // TODO add properties to the builder and call build() + + group(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). + // String from + test('to test the property `from`', () async { + // TODO + }); + + // The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". + // String op + test('to test the property `op`', () async { + // TODO + }); + + // The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + // String path + test('to test the property `path`', () async { + // TODO + }); + + // The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + // JsonObject value + test('to test the property `value`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/json_web_key_set_generator_request_test.dart b/clients/hydra/dart/test/json_web_key_set_generator_request_test.dart deleted file mode 100644 index 704522aef50..00000000000 --- a/clients/hydra/dart/test/json_web_key_set_generator_request_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/json_web_key_set_generator_request.dart'; -import 'package:test/test.dart'; - -// tests for JsonWebKeySetGeneratorRequest -void main() { - final instance = JsonWebKeySetGeneratorRequestBuilder(); - // TODO add properties to the builder and call build() - - group(JsonWebKeySetGeneratorRequest, () { - // The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" - // String alg - test('to test the property `alg`', () async { - // TODO - }); - - // The kid of the key to be created - // String kid - test('to test the property `kid`', () async { - // TODO - }); - - // 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\". - // String use - test('to test the property `use`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/json_web_key_set_test.dart b/clients/hydra/dart/test/json_web_key_set_test.dart index 35cfda8a94d..a9e5545c683 100644 --- a/clients/hydra/dart/test/json_web_key_set_test.dart +++ b/clients/hydra/dart/test/json_web_key_set_test.dart @@ -1,26 +1,17 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/json_web_key_set.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for JSONWebKeySet +// tests for JsonWebKeySet void main() { - final instance = JSONWebKeySetBuilder(); + final instance = JsonWebKeySetBuilder(); // TODO add properties to the builder and call build() - group(JSONWebKeySet, () { - // The value of the \"keys\" parameter is an array of 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. - // BuiltList keys + group(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. + // BuiltList keys test('to test the property `keys`', () async { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/json_web_key_test.dart b/clients/hydra/dart/test/json_web_key_test.dart index 94ab6b16c70..109b6f7dde5 100644 --- a/clients/hydra/dart/test/json_web_key_test.dart +++ b/clients/hydra/dart/test/json_web_key_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/json_web_key.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for JSONWebKey +// tests for JsonWebKey void main() { - final instance = JSONWebKeyBuilder(); + final instance = JsonWebKeyBuilder(); // TODO add properties to the builder and call build() - group(JSONWebKey, () { + group(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. // String alg test('to test the property `alg`', () async { @@ -104,7 +97,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/jwk_api_test.dart b/clients/hydra/dart/test/jwk_api_test.dart new file mode 100644 index 00000000000..4c86c3d2847 --- /dev/null +++ b/clients/hydra/dart/test/jwk_api_test.dart @@ -0,0 +1,74 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + + +/// tests for JwkApi +void main() { + final instance = OryHydraClient().getJwkApi(); + + group(JwkApi, () { + // 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. + // + //Future createJsonWebKeySet(String set_, CreateJsonWebKeySet createJsonWebKeySet) async + test('test createJsonWebKeySet', () async { + // TODO + }); + + // 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. + // + //Future deleteJsonWebKey(String set_, String kid) async + test('test deleteJsonWebKey', () async { + // TODO + }); + + // 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. + // + //Future deleteJsonWebKeySet(String set_) async + test('test deleteJsonWebKeySet', () async { + // TODO + }); + + // 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). + // + //Future getJsonWebKey(String set_, String kid) async + test('test getJsonWebKey', () async { + // TODO + }); + + // 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. + // + //Future getJsonWebKeySet(String set_) async + test('test getJsonWebKeySet', () async { + // TODO + }); + + // 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. + // + //Future setJsonWebKey(String set_, String kid, { JsonWebKey jsonWebKey }) async + test('test setJsonWebKey', () async { + // TODO + }); + + // 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. + // + //Future setJsonWebKeySet(String set_, { JsonWebKeySet jsonWebKeySet }) async + test('test setJsonWebKeySet', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/metadata_api_test.dart b/clients/hydra/dart/test/metadata_api_test.dart index 4e16516808c..2fdf7b5d5c6 100644 --- a/clients/hydra/dart/test/metadata_api_test.dart +++ b/clients/hydra/dart/test/metadata_api_test.dart @@ -1,13 +1,5 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/api.dart'; -import 'package:ory_hydra_client/api/metadata_api.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; /// tests for MetadataApi @@ -15,12 +7,30 @@ void main() { final instance = OryHydraClient().getMetadataApi(); group(MetadataApi, () { - // Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + // 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. + // + //Future getVersion() async + test('test getVersion', () async { + // TODO + }); + + // 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. + // + //Future isAlive() async + test('test isAlive', () async { + // TODO + }); + + // Check HTTP Server and Database Status // - // ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + // 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. // - //Future prometheus() async - test('test prometheus', () async { + //Future isReady() async + test('test isReady', () async { // TODO }); diff --git a/clients/hydra/dart/test/o_auth2_api_test.dart b/clients/hydra/dart/test/o_auth2_api_test.dart new file mode 100644 index 00000000000..1b78094f45c --- /dev/null +++ b/clients/hydra/dart/test/o_auth2_api_test.dart @@ -0,0 +1,263 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + + +/// tests for OAuth2Api +void main() { + final instance = OryHydraClient().getOAuth2Api(); + + group(OAuth2Api, () { + // 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. + // + //Future acceptOAuth2ConsentRequest(String consentChallenge, { AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest }) async + test('test acceptOAuth2ConsentRequest', () async { + // TODO + }); + + // 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. + // + //Future acceptOAuth2LoginRequest(String loginChallenge, { AcceptOAuth2LoginRequest acceptOAuth2LoginRequest }) async + test('test acceptOAuth2LoginRequest', () async { + // TODO + }); + + // 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. + // + //Future acceptOAuth2LogoutRequest(String logoutChallenge) async + test('test acceptOAuth2LogoutRequest', () async { + // TODO + }); + + // 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. + // + //Future createOAuth2Client(OAuth2Client oAuth2Client) async + test('test createOAuth2Client', () async { + // TODO + }); + + // 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. + // + //Future deleteOAuth2Client(String id) async + test('test deleteOAuth2Client', () async { + // TODO + }); + + // 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. + // + //Future deleteOAuth2Token(String clientId) async + test('test deleteOAuth2Token', () async { + // TODO + }); + + // 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. + // + //Future deleteTrustedOAuth2JwtGrantIssuer(String id) async + test('test deleteTrustedOAuth2JwtGrantIssuer', () async { + // TODO + }); + + // 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. + // + //Future getOAuth2Client(String id) async + test('test getOAuth2Client', () async { + // TODO + }); + + // 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. + // + //Future getOAuth2ConsentRequest(String consentChallenge) async + test('test getOAuth2ConsentRequest', () async { + // TODO + }); + + // 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. + // + //Future getOAuth2LoginRequest(String loginChallenge) async + test('test getOAuth2LoginRequest', () async { + // TODO + }); + + // Get OAuth 2.0 Session Logout Request + // + // Use this endpoint to fetch an Ory OAuth 2.0 logout request. + // + //Future getOAuth2LogoutRequest(String logoutChallenge) async + test('test getOAuth2LogoutRequest', () async { + // TODO + }); + + // 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. + // + //Future getTrustedOAuth2JwtGrantIssuer(String id) async + test('test getTrustedOAuth2JwtGrantIssuer', () async { + // TODO + }); + + // 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. + // + //Future introspectOAuth2Token(String token, { String scope }) async + test('test introspectOAuth2Token', () async { + // TODO + }); + + // 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. + // + //Future> listOAuth2Clients({ int pageSize, String pageToken, String clientName, String owner }) async + test('test listOAuth2Clients', () async { + // TODO + }); + + // 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. + // + //Future> listOAuth2ConsentSessions(String subject, { int pageSize, String pageToken }) async + test('test listOAuth2ConsentSessions', () async { + // TODO + }); + + // List Trusted OAuth2 JWT Bearer Grant Type Issuers + // + // Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + // + //Future> listTrustedOAuth2JwtGrantIssuers({ int maxItems, int defaultItems, String issuer }) async + test('test listTrustedOAuth2JwtGrantIssuers', () async { + // TODO + }); + + // 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. + // + //Future oAuth2Authorize() async + test('test oAuth2Authorize', () async { + // TODO + }); + + // 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. + // + //Future oauth2TokenExchange(String grantType, { String clientId, String code, String redirectUri, String refreshToken }) async + test('test oauth2TokenExchange', () async { + // TODO + }); + + // 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. + // + //Future patchOAuth2Client(String id, BuiltList jsonPatch) async + test('test patchOAuth2Client', () async { + // TODO + }); + + // 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. + // + //Future rejectOAuth2ConsentRequest(String consentChallenge, { RejectOAuth2Request rejectOAuth2Request }) async + test('test rejectOAuth2ConsentRequest', () async { + // TODO + }); + + // 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. + // + //Future rejectOAuth2LoginRequest(String loginChallenge, { RejectOAuth2Request rejectOAuth2Request }) async + test('test rejectOAuth2LoginRequest', () async { + // TODO + }); + + // 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. + // + //Future rejectOAuth2LogoutRequest(String logoutChallenge) async + test('test rejectOAuth2LogoutRequest', () async { + // TODO + }); + + // 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. + // + //Future revokeOAuth2ConsentSessions(String subject, { String client, bool all }) async + test('test revokeOAuth2ConsentSessions', () async { + // TODO + }); + + // Revokes All OAuth 2.0 Login Sessions of a Subject + // + // This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + // + //Future revokeOAuth2LoginSessions(String subject) async + test('test revokeOAuth2LoginSessions', () async { + // TODO + }); + + // 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. + // + //Future revokeOAuth2Token(String token) async + test('test revokeOAuth2Token', () async { + // TODO + }); + + // 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. + // + //Future setOAuth2Client(String id, OAuth2Client oAuth2Client) async + test('test setOAuth2Client', () async { + // TODO + }); + + // Set OAuth2 Client Token Lifespans + // + // Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + // + //Future setOAuth2ClientLifespans(String id, { OAuth2ClientTokenLifespans oAuth2ClientTokenLifespans }) async + test('test setOAuth2ClientLifespans', () async { + // TODO + }); + + // 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). + // + //Future trustOAuth2JwtGrantIssuer({ TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer }) async + test('test trustOAuth2JwtGrantIssuer', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/o_auth2_client_test.dart b/clients/hydra/dart/test/o_auth2_client_test.dart index aa3d4629cca..6b4fc64d1cc 100644 --- a/clients/hydra/dart/test/o_auth2_client_test.dart +++ b/clients/hydra/dart/test/o_auth2_client_test.dart @@ -1,12 +1,5 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/o_auth2_client.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; // tests for OAuth2Client void main() { @@ -24,43 +17,67 @@ void main() { // TODO }); - // 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. + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String authorizationCodeGrantAccessTokenLifespan + test('to test the property `authorizationCodeGrantAccessTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String authorizationCodeGrantIdTokenLifespan + test('to test the property `authorizationCodeGrantIdTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String authorizationCodeGrantRefreshTokenLifespan + test('to test the property `authorizationCodeGrantRefreshTokenLifespan`', () async { + // TODO + }); + + // 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. // bool backchannelLogoutSessionRequired test('to test the property `backchannelLogoutSessionRequired`', () async { // TODO }); - // RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + // 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. // String backchannelLogoutUri test('to test the property `backchannelLogoutUri`', () async { // TODO }); - // ID is the id for this client. + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String clientCredentialsGrantAccessTokenLifespan + test('to test the property `clientCredentialsGrantAccessTokenLifespan`', () async { + // TODO + }); + + // OAuth 2.0 Client ID The ID is autogenerated and immutable. // String clientId test('to test the property `clientId`', () async { // TODO }); - // Name is the human-readable string name of the client to be presented to the end-user during authorization. + // OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. // String clientName test('to test the property `clientName`', () async { // TODO }); - // Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. + // 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. // String clientSecret test('to test the property `clientSecret`', () async { // TODO }); - // SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. + // OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. // int clientSecretExpiresAt test('to test the property `clientSecretExpiresAt`', () async { // TODO }); - // ClientURI is an 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. + // 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. // String clientUri test('to test the property `clientUri`', () async { // TODO @@ -71,19 +88,19 @@ void main() { // TODO }); - // CreatedAt returns the timestamp of the client's creation. + // OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. // DateTime createdAt test('to test the property `createdAt`', () async { // TODO }); - // 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. + // 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. // bool frontchannelLogoutSessionRequired test('to test the property `frontchannelLogoutSessionRequired`', () async { // TODO }); - // 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. + // 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. // String frontchannelLogoutUri test('to test the property `frontchannelLogoutUri`', () async { // TODO @@ -94,18 +111,37 @@ void main() { // TODO }); + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String implicitGrantAccessTokenLifespan + test('to test the property `implicitGrantAccessTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String implicitGrantIdTokenLifespan + test('to test the property `implicitGrantIdTokenLifespan`', () async { + // TODO + }); + + // 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. // JsonObject jwks test('to test the property `jwks`', () async { // TODO }); - // 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. + // 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. // String jwksUri test('to test the property `jwksUri`', () async { // TODO }); - // LogoURI is an URL string that references a logo for the client. + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String jwtBearerGrantAccessTokenLifespan + test('to test the property `jwtBearerGrantAccessTokenLifespan`', () async { + // TODO + }); + + // OAuth 2.0 Client Logo URI A URL string referencing the client's logo. // String logoUri test('to test the property `logoUri`', () async { // TODO @@ -116,13 +152,13 @@ void main() { // TODO }); - // Owner is a string identifying the owner of the OAuth 2.0 Client. + // OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. // String owner test('to test the property `owner`', () async { // TODO }); - // 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. + // 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. // String policyUri test('to test the property `policyUri`', () async { // TODO @@ -138,19 +174,37 @@ void main() { // TODO }); - // RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String refreshTokenGrantAccessTokenLifespan + test('to test the property `refreshTokenGrantAccessTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String refreshTokenGrantIdTokenLifespan + test('to test the property `refreshTokenGrantIdTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String refreshTokenGrantRefreshTokenLifespan + test('to test the property `refreshTokenGrantRefreshTokenLifespan`', () async { + // TODO + }); + + // 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. // String registrationAccessToken test('to test the property `registrationAccessToken`', () async { // TODO }); - // RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + // OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. // String registrationClientUri test('to test the property `registrationClientUri`', () async { // TODO }); - // 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. + // 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. // String requestObjectSigningAlg test('to test the property `requestObjectSigningAlg`', () async { // TODO @@ -166,55 +220,53 @@ void main() { // TODO }); - // 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. // String scope test('to test the property `scope`', () async { // TODO }); - // 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. + // 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. // String sectorIdentifierUri test('to test the property `sectorIdentifierUri`', () async { // TODO }); - // SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + // 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`. // String subjectType test('to test the property `subjectType`', () async { // TODO }); - // Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. + // OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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. // String tokenEndpointAuthMethod test('to test the property `tokenEndpointAuthMethod`', () async { // TODO }); - // Requested Client Authentication signing algorithm for the Token Endpoint. + // OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. // String tokenEndpointAuthSigningAlg test('to test the property `tokenEndpointAuthSigningAlg`', () async { // TODO }); - // TermsOfServiceURI is a URL string that points 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 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. // String tosUri test('to test the property `tosUri`', () async { // TODO }); - // UpdatedAt returns the timestamp of the last update. + // OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. // DateTime updatedAt test('to test the property `updatedAt`', () async { // TODO }); - // 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. + // 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. // String userinfoSignedResponseAlg test('to test the property `userinfoSignedResponseAlg`', () async { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/o_auth2_client_token_lifespans_test.dart b/clients/hydra/dart/test/o_auth2_client_token_lifespans_test.dart new file mode 100644 index 00000000000..466b7e34cca --- /dev/null +++ b/clients/hydra/dart/test/o_auth2_client_token_lifespans_test.dart @@ -0,0 +1,71 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for OAuth2ClientTokenLifespans +void main() { + final instance = OAuth2ClientTokenLifespansBuilder(); + // TODO add properties to the builder and call build() + + group(OAuth2ClientTokenLifespans, () { + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String authorizationCodeGrantAccessTokenLifespan + test('to test the property `authorizationCodeGrantAccessTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String authorizationCodeGrantIdTokenLifespan + test('to test the property `authorizationCodeGrantIdTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String authorizationCodeGrantRefreshTokenLifespan + test('to test the property `authorizationCodeGrantRefreshTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String clientCredentialsGrantAccessTokenLifespan + test('to test the property `clientCredentialsGrantAccessTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String implicitGrantAccessTokenLifespan + test('to test the property `implicitGrantAccessTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String implicitGrantIdTokenLifespan + test('to test the property `implicitGrantIdTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String jwtBearerGrantAccessTokenLifespan + test('to test the property `jwtBearerGrantAccessTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String refreshTokenGrantAccessTokenLifespan + test('to test the property `refreshTokenGrantAccessTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String refreshTokenGrantIdTokenLifespan + test('to test the property `refreshTokenGrantIdTokenLifespan`', () async { + // TODO + }); + + // Specify a time duration in milliseconds, seconds, minutes, hours. + // String refreshTokenGrantRefreshTokenLifespan + test('to test the property `refreshTokenGrantRefreshTokenLifespan`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/open_id_connect_context_test.dart b/clients/hydra/dart/test/o_auth2_consent_request_open_id_connect_context_test.dart similarity index 91% rename from clients/hydra/dart/test/open_id_connect_context_test.dart rename to clients/hydra/dart/test/o_auth2_consent_request_open_id_connect_context_test.dart index a5e56f54125..c3c1c537b7c 100644 --- a/clients/hydra/dart/test/open_id_connect_context_test.dart +++ b/clients/hydra/dart/test/o_auth2_consent_request_open_id_connect_context_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/open_id_connect_context.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for OpenIDConnectContext +// tests for OAuth2ConsentRequestOpenIDConnectContext void main() { - final instance = OpenIDConnectContextBuilder(); + final instance = OAuth2ConsentRequestOpenIDConnectContextBuilder(); // TODO add properties to the builder and call build() - group(OpenIDConnectContext, () { + group(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. // BuiltList acrValues test('to test the property `acrValues`', () async { @@ -27,7 +20,7 @@ void main() { }); // 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. - // JsonObject idTokenHintClaims + // BuiltMap idTokenHintClaims test('to test the property `idTokenHintClaims`', () async { // TODO }); @@ -44,7 +37,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/consent_request_test.dart b/clients/hydra/dart/test/o_auth2_consent_request_test.dart similarity index 91% rename from clients/hydra/dart/test/consent_request_test.dart rename to clients/hydra/dart/test/o_auth2_consent_request_test.dart index 8682e7cf677..2d494247d7a 100644 --- a/clients/hydra/dart/test/consent_request_test.dart +++ b/clients/hydra/dart/test/o_auth2_consent_request_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/consent_request.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for ConsentRequest +// tests for OAuth2ConsentRequest void main() { - final instance = ConsentRequestBuilder(); + final instance = OAuth2ConsentRequestBuilder(); // TODO add properties to the builder and call build() - group(ConsentRequest, () { + group(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. // String acr test('to test the property `acr`', () async { @@ -53,7 +46,7 @@ void main() { // TODO }); - // OpenIDConnectContext oidcContext + // OAuth2ConsentRequestOpenIDConnectContext oidcContext test('to test the property `oidcContext`', () async { // TODO }); @@ -86,7 +79,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/o_auth2_consent_session_expires_at_test.dart b/clients/hydra/dart/test/o_auth2_consent_session_expires_at_test.dart new file mode 100644 index 00000000000..1f589fb6469 --- /dev/null +++ b/clients/hydra/dart/test/o_auth2_consent_session_expires_at_test.dart @@ -0,0 +1,36 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for OAuth2ConsentSessionExpiresAt +void main() { + final instance = OAuth2ConsentSessionExpiresAtBuilder(); + // TODO add properties to the builder and call build() + + group(OAuth2ConsentSessionExpiresAt, () { + // DateTime accessToken + test('to test the property `accessToken`', () async { + // TODO + }); + + // DateTime authorizeCode + test('to test the property `authorizeCode`', () async { + // TODO + }); + + // DateTime idToken + test('to test the property `idToken`', () async { + // TODO + }); + + // DateTime parContext + test('to test the property `parContext`', () async { + // TODO + }); + + // DateTime refreshToken + test('to test the property `refreshToken`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/previous_consent_session_test.dart b/clients/hydra/dart/test/o_auth2_consent_session_test.dart similarity index 52% rename from clients/hydra/dart/test/previous_consent_session_test.dart rename to clients/hydra/dart/test/o_auth2_consent_session_test.dart index 0e488133574..d8de7d46508 100644 --- a/clients/hydra/dart/test/previous_consent_session_test.dart +++ b/clients/hydra/dart/test/o_auth2_consent_session_test.dart @@ -1,24 +1,22 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/previous_consent_session.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for PreviousConsentSession +// tests for OAuth2ConsentSession void main() { - final instance = PreviousConsentSessionBuilder(); + final instance = OAuth2ConsentSessionBuilder(); // TODO add properties to the builder and call build() - group(PreviousConsentSession, () { - // ConsentRequest consentRequest + group(OAuth2ConsentSession, () { + // OAuth2ConsentRequest consentRequest test('to test the property `consentRequest`', () async { // TODO }); + // OAuth2ConsentSessionExpiresAt expiresAt + test('to test the property `expiresAt`', () async { + // TODO + }); + // BuiltList grantAccessTokenAudience test('to test the property `grantAccessTokenAudience`', () async { // TODO @@ -34,24 +32,22 @@ void main() { // TODO }); - // 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 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. // bool remember test('to test the property `remember`', () async { // TODO }); - // RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + // 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. // int rememberFor test('to test the property `rememberFor`', () async { // TODO }); - // ConsentRequestSession session + // AcceptOAuth2ConsentRequestSession session test('to test the property `session`', () async { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/login_request_test.dart b/clients/hydra/dart/test/o_auth2_login_request_test.dart similarity index 89% rename from clients/hydra/dart/test/login_request_test.dart rename to clients/hydra/dart/test/o_auth2_login_request_test.dart index 8859517e2b7..6869af64657 100644 --- a/clients/hydra/dart/test/login_request_test.dart +++ b/clients/hydra/dart/test/o_auth2_login_request_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/login_request.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for LoginRequest +// tests for OAuth2LoginRequest void main() { - final instance = LoginRequestBuilder(); + final instance = OAuth2LoginRequestBuilder(); // TODO add properties to the builder and call build() - group(LoginRequest, () { + group(OAuth2LoginRequest, () { // ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. // String challenge test('to test the property `challenge`', () async { @@ -25,7 +18,7 @@ void main() { // TODO }); - // OpenIDConnectContext oidcContext + // OAuth2ConsentRequestOpenIDConnectContext oidcContext test('to test the property `oidcContext`', () async { // TODO }); @@ -64,7 +57,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/logout_request_test.dart b/clients/hydra/dart/test/o_auth2_logout_request_test.dart similarity index 82% rename from clients/hydra/dart/test/logout_request_test.dart rename to clients/hydra/dart/test/o_auth2_logout_request_test.dart index be07fe2c14c..71958288f22 100644 --- a/clients/hydra/dart/test/logout_request_test.dart +++ b/clients/hydra/dart/test/o_auth2_logout_request_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/logout_request.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for LogoutRequest +// tests for OAuth2LogoutRequest void main() { - final instance = LogoutRequestBuilder(); + final instance = OAuth2LogoutRequestBuilder(); // TODO add properties to the builder and call build() - group(LogoutRequest, () { + group(OAuth2LogoutRequest, () { // Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. // String challenge test('to test the property `challenge`', () async { @@ -49,7 +42,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/o_auth2_redirect_to_test.dart b/clients/hydra/dart/test/o_auth2_redirect_to_test.dart new file mode 100644 index 00000000000..0c586bbbd13 --- /dev/null +++ b/clients/hydra/dart/test/o_auth2_redirect_to_test.dart @@ -0,0 +1,17 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for OAuth2RedirectTo +void main() { + final instance = OAuth2RedirectToBuilder(); + // TODO add properties to the builder and call build() + + group(OAuth2RedirectTo, () { + // RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. + // String redirectTo + test('to test the property `redirectTo`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/o_auth2_token_exchange_test.dart b/clients/hydra/dart/test/o_auth2_token_exchange_test.dart new file mode 100644 index 00000000000..ea0c6b5d3e4 --- /dev/null +++ b/clients/hydra/dart/test/o_auth2_token_exchange_test.dart @@ -0,0 +1,47 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for OAuth2TokenExchange +void main() { + final instance = OAuth2TokenExchangeBuilder(); + // TODO add properties to the builder and call build() + + group(OAuth2TokenExchange, () { + // The access token issued by the authorization server. + // String accessToken + test('to test the property `accessToken`', () async { + // TODO + }); + + // 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. + // int expiresIn + test('to test the property `expiresIn`', () async { + // TODO + }); + + // To retrieve a refresh token request the id_token scope. + // int idToken + test('to test the property `idToken`', () async { + // TODO + }); + + // The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. + // String refreshToken + test('to test the property `refreshToken`', () async { + // TODO + }); + + // The scope of the access token + // int scope + test('to test the property `scope`', () async { + // TODO + }); + + // The type of the token issued + // String tokenType + test('to test the property `tokenType`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/oauth2_token_response_test.dart b/clients/hydra/dart/test/oauth2_token_response_test.dart deleted file mode 100644 index fd384c06184..00000000000 --- a/clients/hydra/dart/test/oauth2_token_response_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/oauth2_token_response.dart'; -import 'package:test/test.dart'; - -// tests for Oauth2TokenResponse -void main() { - final instance = Oauth2TokenResponseBuilder(); - // TODO add properties to the builder and call build() - - group(Oauth2TokenResponse, () { - // String accessToken - test('to test the property `accessToken`', () async { - // TODO - }); - - // int expiresIn - test('to test the property `expiresIn`', () async { - // TODO - }); - - // String idToken - test('to test the property `idToken`', () async { - // TODO - }); - - // String refreshToken - test('to test the property `refreshToken`', () async { - // TODO - }); - - // String scope - test('to test the property `scope`', () async { - // TODO - }); - - // String tokenType - test('to test the property `tokenType`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/oidc_api_test.dart b/clients/hydra/dart/test/oidc_api_test.dart new file mode 100644 index 00000000000..37ad9394bcb --- /dev/null +++ b/clients/hydra/dart/test/oidc_api_test.dart @@ -0,0 +1,74 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + + +/// tests for OidcApi +void main() { + final instance = OryHydraClient().getOidcApi(); + + group(OidcApi, () { + // 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. + // + //Future createOidcDynamicClient(OAuth2Client oAuth2Client) async + test('test createOidcDynamicClient', () async { + // TODO + }); + + // 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. + // + //Future deleteOidcDynamicClient(String id) async + test('test deleteOidcDynamicClient', () async { + // TODO + }); + + // 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/ + // + //Future discoverOidcConfiguration() async + test('test discoverOidcConfiguration', () async { + // TODO + }); + + // 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. + // + //Future getOidcDynamicClient(String id) async + test('test getOidcDynamicClient', () async { + // TODO + }); + + // 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. + // + //Future getOidcUserInfo() async + test('test getOidcUserInfo', () async { + // TODO + }); + + // 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. + // + //Future revokeOidcSession() async + test('test revokeOidcSession', () async { + // TODO + }); + + // 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. + // + //Future setOidcDynamicClient(String id, OAuth2Client oAuth2Client) async + test('test setOidcDynamicClient', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/oidc_configuration_test.dart b/clients/hydra/dart/test/oidc_configuration_test.dart new file mode 100644 index 00000000000..eaabf1ccf46 --- /dev/null +++ b/clients/hydra/dart/test/oidc_configuration_test.dart @@ -0,0 +1,185 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for OidcConfiguration +void main() { + final instance = OidcConfigurationBuilder(); + // TODO add properties to the builder and call build() + + group(OidcConfiguration, () { + // OAuth 2.0 Authorization Endpoint URL + // String authorizationEndpoint + test('to test the property `authorizationEndpoint`', () async { + // TODO + }); + + // 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 + // bool backchannelLogoutSessionSupported + test('to test the property `backchannelLogoutSessionSupported`', () async { + // TODO + }); + + // OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + // bool backchannelLogoutSupported + test('to test the property `backchannelLogoutSupported`', () async { + // TODO + }); + + // OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + // bool claimsParameterSupported + test('to test the property `claimsParameterSupported`', () async { + // TODO + }); + + // 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. + // BuiltList claimsSupported + test('to test the property `claimsSupported`', () async { + // TODO + }); + + // 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. + // BuiltList codeChallengeMethodsSupported + test('to test the property `codeChallengeMethodsSupported`', () async { + // TODO + }); + + // 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. + // String endSessionEndpoint + test('to test the property `endSessionEndpoint`', () async { + // TODO + }); + + // 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. + // bool frontchannelLogoutSessionSupported + test('to test the property `frontchannelLogoutSessionSupported`', () async { + // TODO + }); + + // OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + // bool frontchannelLogoutSupported + test('to test the property `frontchannelLogoutSupported`', () async { + // TODO + }); + + // OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + // BuiltList grantTypesSupported + test('to test the property `grantTypesSupported`', () async { + // TODO + }); + + // OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. + // BuiltList idTokenSignedResponseAlg + test('to test the property `idTokenSignedResponseAlg`', () async { + // TODO + }); + + // 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. + // BuiltList idTokenSigningAlgValuesSupported + test('to test the property `idTokenSigningAlgValuesSupported`', () async { + // TODO + }); + + // 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. + // String issuer + test('to test the property `issuer`', () async { + // TODO + }); + + // 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. + // String jwksUri + test('to test the property `jwksUri`', () async { + // TODO + }); + + // OpenID Connect Dynamic Client Registration Endpoint URL + // String registrationEndpoint + test('to test the property `registrationEndpoint`', () async { + // TODO + }); + + // 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). + // BuiltList requestObjectSigningAlgValuesSupported + test('to test the property `requestObjectSigningAlgValuesSupported`', () async { + // TODO + }); + + // OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + // bool requestParameterSupported + test('to test the property `requestParameterSupported`', () async { + // TODO + }); + + // OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + // bool requestUriParameterSupported + test('to test the property `requestUriParameterSupported`', () async { + // TODO + }); + + // 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. + // bool requireRequestUriRegistration + test('to test the property `requireRequestUriRegistration`', () async { + // TODO + }); + + // OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + // BuiltList responseModesSupported + test('to test the property `responseModesSupported`', () async { + // TODO + }); + + // 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. + // BuiltList responseTypesSupported + test('to test the property `responseTypesSupported`', () async { + // TODO + }); + + // OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. + // String revocationEndpoint + test('to test the property `revocationEndpoint`', () async { + // TODO + }); + + // 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 + // BuiltList scopesSupported + test('to test the property `scopesSupported`', () async { + // TODO + }); + + // 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. + // BuiltList subjectTypesSupported + test('to test the property `subjectTypesSupported`', () async { + // TODO + }); + + // OAuth 2.0 Token Endpoint URL + // String tokenEndpoint + test('to test the property `tokenEndpoint`', () async { + // TODO + }); + + // 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 + // BuiltList tokenEndpointAuthMethodsSupported + test('to test the property `tokenEndpointAuthMethodsSupported`', () async { + // TODO + }); + + // OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. + // String userinfoEndpoint + test('to test the property `userinfoEndpoint`', () async { + // TODO + }); + + // OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. + // BuiltList userinfoSignedResponseAlg + test('to test the property `userinfoSignedResponseAlg`', () async { + // TODO + }); + + // 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]. + // BuiltList userinfoSigningAlgValuesSupported + test('to test the property `userinfoSigningAlgValuesSupported`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/userinfo_response_test.dart b/clients/hydra/dart/test/oidc_user_info_test.dart similarity index 96% rename from clients/hydra/dart/test/userinfo_response_test.dart rename to clients/hydra/dart/test/oidc_user_info_test.dart index c256afef608..3d01f3726e7 100644 --- a/clients/hydra/dart/test/userinfo_response_test.dart +++ b/clients/hydra/dart/test/oidc_user_info_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/userinfo_response.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for UserinfoResponse +// tests for OidcUserInfo void main() { - final instance = UserinfoResponseBuilder(); + final instance = OidcUserInfoBuilder(); // TODO add properties to the builder and call build() - group(UserinfoResponse, () { + group(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. // String birthdate test('to test the property `birthdate`', () async { @@ -128,7 +121,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/pagination_headers_test.dart b/clients/hydra/dart/test/pagination_headers_test.dart new file mode 100644 index 00000000000..0b7f42869c4 --- /dev/null +++ b/clients/hydra/dart/test/pagination_headers_test.dart @@ -0,0 +1,23 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for PaginationHeaders +void main() { + final instance = PaginationHeadersBuilder(); + // TODO add properties to the builder and call build() + + group(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 + // String link + test('to test the property `link`', () async { + // TODO + }); + + // The total number of clients. in: header + // String xTotalCount + test('to test the property `xTotalCount`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/pagination_test.dart b/clients/hydra/dart/test/pagination_test.dart new file mode 100644 index 00000000000..7e3679d024d --- /dev/null +++ b/clients/hydra/dart/test/pagination_test.dart @@ -0,0 +1,23 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for Pagination +void main() { + final instance = PaginationBuilder(); + // TODO add properties to the builder and call build() + + group(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). + // int pageSize (default value: 250) + test('to test the property `pageSize`', () async { + // TODO + }); + + // 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). + // String pageToken (default value: '1') + test('to test the property `pageToken`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/patch_document_test.dart b/clients/hydra/dart/test/patch_document_test.dart deleted file mode 100644 index 1f5e596ae2e..00000000000 --- a/clients/hydra/dart/test/patch_document_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/patch_document.dart'; -import 'package:test/test.dart'; - -// tests for PatchDocument -void main() { - final instance = PatchDocumentBuilder(); - // TODO add properties to the builder and call build() - - group(PatchDocument, () { - // A JSON-pointer - // String from - test('to test the property `from`', () async { - // TODO - }); - - // The operation to be performed - // String op - test('to test the property `op`', () async { - // TODO - }); - - // A JSON-pointer - // String path - test('to test the property `path`', () async { - // TODO - }); - - // The value to be used within the operations - // JsonObject value - test('to test the property `value`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_config_args_test.dart b/clients/hydra/dart/test/plugin_config_args_test.dart deleted file mode 100644 index e2877e88b2d..00000000000 --- a/clients/hydra/dart/test/plugin_config_args_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_config_args.dart'; -import 'package:test/test.dart'; - -// tests for PluginConfigArgs -void main() { - final instance = PluginConfigArgsBuilder(); - // TODO add properties to the builder and call build() - - group(PluginConfigArgs, () { - // description - // String description - test('to test the property `description`', () async { - // TODO - }); - - // name - // String name - test('to test the property `name`', () async { - // TODO - }); - - // settable - // BuiltList settable - test('to test the property `settable`', () async { - // TODO - }); - - // value - // BuiltList value - test('to test the property `value`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_config_interface_test.dart b/clients/hydra/dart/test/plugin_config_interface_test.dart deleted file mode 100644 index 4d5f71cd1fa..00000000000 --- a/clients/hydra/dart/test/plugin_config_interface_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_config_interface.dart'; -import 'package:test/test.dart'; - -// tests for PluginConfigInterface -void main() { - final instance = PluginConfigInterfaceBuilder(); - // TODO add properties to the builder and call build() - - group(PluginConfigInterface, () { - // Protocol to use for clients connecting to the plugin. - // String protocolScheme - test('to test the property `protocolScheme`', () async { - // TODO - }); - - // socket - // String socket - test('to test the property `socket`', () async { - // TODO - }); - - // types - // BuiltList types - test('to test the property `types`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_config_linux_test.dart b/clients/hydra/dart/test/plugin_config_linux_test.dart deleted file mode 100644 index 3b9b6767a7c..00000000000 --- a/clients/hydra/dart/test/plugin_config_linux_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_config_linux.dart'; -import 'package:test/test.dart'; - -// tests for PluginConfigLinux -void main() { - final instance = PluginConfigLinuxBuilder(); - // TODO add properties to the builder and call build() - - group(PluginConfigLinux, () { - // allow all devices - // bool allowAllDevices - test('to test the property `allowAllDevices`', () async { - // TODO - }); - - // capabilities - // BuiltList capabilities - test('to test the property `capabilities`', () async { - // TODO - }); - - // devices - // BuiltList devices - test('to test the property `devices`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_config_network_test.dart b/clients/hydra/dart/test/plugin_config_network_test.dart deleted file mode 100644 index 1cca32e2955..00000000000 --- a/clients/hydra/dart/test/plugin_config_network_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_config_network.dart'; -import 'package:test/test.dart'; - -// tests for PluginConfigNetwork -void main() { - final instance = PluginConfigNetworkBuilder(); - // TODO add properties to the builder and call build() - - group(PluginConfigNetwork, () { - // type - // String type - test('to test the property `type`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_config_rootfs_test.dart b/clients/hydra/dart/test/plugin_config_rootfs_test.dart deleted file mode 100644 index 0dc6bde6f7f..00000000000 --- a/clients/hydra/dart/test/plugin_config_rootfs_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_config_rootfs.dart'; -import 'package:test/test.dart'; - -// tests for PluginConfigRootfs -void main() { - final instance = PluginConfigRootfsBuilder(); - // TODO add properties to the builder and call build() - - group(PluginConfigRootfs, () { - // diff ids - // BuiltList diffIds - test('to test the property `diffIds`', () async { - // TODO - }); - - // type - // String type - test('to test the property `type`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_config_test.dart b/clients/hydra/dart/test/plugin_config_test.dart deleted file mode 100644 index 74f016d2796..00000000000 --- a/clients/hydra/dart/test/plugin_config_test.dart +++ /dev/null @@ -1,110 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_config.dart'; -import 'package:test/test.dart'; - -// tests for PluginConfig -void main() { - final instance = PluginConfigBuilder(); - // TODO add properties to the builder and call build() - - group(PluginConfig, () { - // PluginConfigArgs args - test('to test the property `args`', () async { - // TODO - }); - - // description - // String description - test('to test the property `description`', () async { - // TODO - }); - - // Docker Version used to create the plugin - // String dockerVersion - test('to test the property `dockerVersion`', () async { - // TODO - }); - - // documentation - // String documentation - test('to test the property `documentation`', () async { - // TODO - }); - - // entrypoint - // BuiltList entrypoint - test('to test the property `entrypoint`', () async { - // TODO - }); - - // env - // BuiltList env - test('to test the property `env`', () async { - // TODO - }); - - // PluginConfigInterface interface_ - test('to test the property `interface_`', () async { - // TODO - }); - - // ipc host - // bool ipcHost - test('to test the property `ipcHost`', () async { - // TODO - }); - - // PluginConfigLinux linux - test('to test the property `linux`', () async { - // TODO - }); - - // mounts - // BuiltList mounts - test('to test the property `mounts`', () async { - // TODO - }); - - // PluginConfigNetwork network - test('to test the property `network`', () async { - // TODO - }); - - // pid host - // bool pidHost - test('to test the property `pidHost`', () async { - // TODO - }); - - // propagated mount - // String propagatedMount - test('to test the property `propagatedMount`', () async { - // TODO - }); - - // PluginConfigUser user - test('to test the property `user`', () async { - // TODO - }); - - // work dir - // String workDir - test('to test the property `workDir`', () async { - // TODO - }); - - // PluginConfigRootfs rootfs - test('to test the property `rootfs`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_config_user_test.dart b/clients/hydra/dart/test/plugin_config_user_test.dart deleted file mode 100644 index 903d9632d57..00000000000 --- a/clients/hydra/dart/test/plugin_config_user_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_config_user.dart'; -import 'package:test/test.dart'; - -// tests for PluginConfigUser -void main() { - final instance = PluginConfigUserBuilder(); - // TODO add properties to the builder and call build() - - group(PluginConfigUser, () { - // g ID - // int GID - test('to test the property `GID`', () async { - // TODO - }); - - // UID - // int UID - test('to test the property `UID`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_device_test.dart b/clients/hydra/dart/test/plugin_device_test.dart deleted file mode 100644 index 524821c8803..00000000000 --- a/clients/hydra/dart/test/plugin_device_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_device.dart'; -import 'package:test/test.dart'; - -// tests for PluginDevice -void main() { - final instance = PluginDeviceBuilder(); - // TODO add properties to the builder and call build() - - group(PluginDevice, () { - // description - // String description - test('to test the property `description`', () async { - // TODO - }); - - // name - // String name - test('to test the property `name`', () async { - // TODO - }); - - // path - // String path - test('to test the property `path`', () async { - // TODO - }); - - // settable - // BuiltList settable - test('to test the property `settable`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_env_test.dart b/clients/hydra/dart/test/plugin_env_test.dart deleted file mode 100644 index 16f93f20632..00000000000 --- a/clients/hydra/dart/test/plugin_env_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_env.dart'; -import 'package:test/test.dart'; - -// tests for PluginEnv -void main() { - final instance = PluginEnvBuilder(); - // TODO add properties to the builder and call build() - - group(PluginEnv, () { - // description - // String description - test('to test the property `description`', () async { - // TODO - }); - - // name - // String name - test('to test the property `name`', () async { - // TODO - }); - - // settable - // BuiltList settable - test('to test the property `settable`', () async { - // TODO - }); - - // value - // String value - test('to test the property `value`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_interface_type_test.dart b/clients/hydra/dart/test/plugin_interface_type_test.dart deleted file mode 100644 index f16fbb16223..00000000000 --- a/clients/hydra/dart/test/plugin_interface_type_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_interface_type.dart'; -import 'package:test/test.dart'; - -// tests for PluginInterfaceType -void main() { - final instance = PluginInterfaceTypeBuilder(); - // TODO add properties to the builder and call build() - - group(PluginInterfaceType, () { - // capability - // String capability - test('to test the property `capability`', () async { - // TODO - }); - - // prefix - // String prefix - test('to test the property `prefix`', () async { - // TODO - }); - - // version - // String version - test('to test the property `version`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_mount_test.dart b/clients/hydra/dart/test/plugin_mount_test.dart deleted file mode 100644 index 629e4715bf4..00000000000 --- a/clients/hydra/dart/test/plugin_mount_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_mount.dart'; -import 'package:test/test.dart'; - -// tests for PluginMount -void main() { - final instance = PluginMountBuilder(); - // TODO add properties to the builder and call build() - - group(PluginMount, () { - // description - // String description - test('to test the property `description`', () async { - // TODO - }); - - // destination - // String destination - test('to test the property `destination`', () async { - // TODO - }); - - // name - // String name - test('to test the property `name`', () async { - // TODO - }); - - // options - // BuiltList options - test('to test the property `options`', () async { - // TODO - }); - - // settable - // BuiltList settable - test('to test the property `settable`', () async { - // TODO - }); - - // source - // String source_ - test('to test the property `source_`', () async { - // TODO - }); - - // type - // String type - test('to test the property `type`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/plugin_settings_test.dart b/clients/hydra/dart/test/plugin_settings_test.dart deleted file mode 100644 index 126d5a48795..00000000000 --- a/clients/hydra/dart/test/plugin_settings_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/plugin_settings.dart'; -import 'package:test/test.dart'; - -// tests for PluginSettings -void main() { - final instance = PluginSettingsBuilder(); - // TODO add properties to the builder and call build() - - group(PluginSettings, () { - // args - // BuiltList args - test('to test the property `args`', () async { - // TODO - }); - - // devices - // BuiltList devices - test('to test the property `devices`', () async { - // TODO - }); - - // env - // BuiltList env - test('to test the property `env`', () async { - // TODO - }); - - // mounts - // BuiltList mounts - test('to test the property `mounts`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/public_api_test.dart b/clients/hydra/dart/test/public_api_test.dart deleted file mode 100644 index 12e8f625a5c..00000000000 --- a/clients/hydra/dart/test/public_api_test.dart +++ /dev/null @@ -1,127 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/api.dart'; -import 'package:ory_hydra_client/api/public_api.dart'; -import 'package:test/test.dart'; - - -/// tests for PublicApi -void main() { - final instance = OryHydraClient().getPublicApi(); - - group(PublicApi, () { - // OpenID Connect Front-Backchannel Enabled Logout - // - // This endpoint initiates and completes user logout at Ory Hydra 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 - // - //Future disconnectUser() async - test('test disconnectUser', () async { - // TODO - }); - - // OpenID Connect Discovery - // - // The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - // - //Future discoverOpenIDConfiguration() async - test('test discoverOpenIDConfiguration', () async { - // TODO - }); - - // Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - // - // 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. - // - //Future dynamicClientRegistrationCreateOAuth2Client(OAuth2Client body) async - test('test dynamicClientRegistrationCreateOAuth2Client', () async { - // TODO - }); - - // Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - // - //Future dynamicClientRegistrationDeleteOAuth2Client(String id) async - test('test dynamicClientRegistrationDeleteOAuth2Client', () async { - // TODO - }); - - // Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - // - // 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. 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. - // - //Future dynamicClientRegistrationGetOAuth2Client(String id) async - test('test dynamicClientRegistrationGetOAuth2Client', () async { - // TODO - }); - - // Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - // - // This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - // - //Future dynamicClientRegistrationUpdateOAuth2Client(String id, OAuth2Client body) async - test('test dynamicClientRegistrationUpdateOAuth2Client', () async { - // TODO - }); - - // Check Readiness Status - // - // This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - // - //Future isInstanceReady() async - test('test isInstanceReady', () async { - // TODO - }); - - // The OAuth 2.0 Token Endpoint - // - // The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - // - //Future oauth2Token(String grantType, { String code, String refreshToken, String redirectUri, String clientId }) async - test('test oauth2Token', () async { - // TODO - }); - - // The OAuth 2.0 Authorize Endpoint - // - // This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - // - //Future oauthAuth() async - test('test oauthAuth', () async { - // TODO - }); - - // Revoke OAuth2 Tokens - // - // 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. - // - //Future revokeOAuth2Token(String token) async - test('test revokeOAuth2Token', () async { - // TODO - }); - - // OpenID Connect Userinfo - // - // This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - // - //Future userinfo() async - test('test userinfo', () async { - // TODO - }); - - // JSON Web Keys Discovery - // - // This endpoint returns JSON Web Keys to be used as public keys for 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. - // - //Future wellKnown() async - test('test wellKnown', () async { - // TODO - }); - - }); -} diff --git a/clients/hydra/dart/test/reject_request_test.dart b/clients/hydra/dart/test/reject_o_auth2_request_test.dart similarity index 81% rename from clients/hydra/dart/test/reject_request_test.dart rename to clients/hydra/dart/test/reject_o_auth2_request_test.dart index d779f1e7ba6..7f119eb10ba 100644 --- a/clients/hydra/dart/test/reject_request_test.dart +++ b/clients/hydra/dart/test/reject_o_auth2_request_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/reject_request.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for RejectRequest +// tests for RejectOAuth2Request void main() { - final instance = RejectRequestBuilder(); + final instance = RejectOAuth2RequestBuilder(); // TODO add properties to the builder and call build() - group(RejectRequest, () { + group(RejectOAuth2Request, () { // The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. // String error test('to test the property `error`', () async { @@ -44,7 +37,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/request_was_handled_response_test.dart b/clients/hydra/dart/test/request_was_handled_response_test.dart deleted file mode 100644 index 2ca9384ae7b..00000000000 --- a/clients/hydra/dart/test/request_was_handled_response_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/request_was_handled_response.dart'; -import 'package:test/test.dart'; - -// tests for RequestWasHandledResponse -void main() { - final instance = RequestWasHandledResponseBuilder(); - // TODO add properties to the builder and call build() - - group(RequestWasHandledResponse, () { - // Original request URL to which you should redirect the user if request was already handled. - // String redirectTo - test('to test the property `redirectTo`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/token_pagination_headers_test.dart b/clients/hydra/dart/test/token_pagination_headers_test.dart new file mode 100644 index 00000000000..7ad2784b34c --- /dev/null +++ b/clients/hydra/dart/test/token_pagination_headers_test.dart @@ -0,0 +1,23 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for TokenPaginationHeaders +void main() { + final instance = TokenPaginationHeadersBuilder(); + // TODO add properties to the builder and call build() + + group(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 + // String link + test('to test the property `link`', () async { + // TODO + }); + + // The total number of clients. in: header + // String xTotalCount + test('to test the property `xTotalCount`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/token_pagination_request_parameters_test.dart b/clients/hydra/dart/test/token_pagination_request_parameters_test.dart new file mode 100644 index 00000000000..07f483100a0 --- /dev/null +++ b/clients/hydra/dart/test/token_pagination_request_parameters_test.dart @@ -0,0 +1,23 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for TokenPaginationRequestParameters +void main() { + final instance = TokenPaginationRequestParametersBuilder(); + // TODO add properties to the builder and call build() + + group(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). + // int pageSize (default value: 250) + test('to test the property `pageSize`', () async { + // TODO + }); + + // 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). + // String pageToken (default value: '1') + test('to test the property `pageToken`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/token_pagination_response_headers_test.dart b/clients/hydra/dart/test/token_pagination_response_headers_test.dart new file mode 100644 index 00000000000..a2d2a138e56 --- /dev/null +++ b/clients/hydra/dart/test/token_pagination_response_headers_test.dart @@ -0,0 +1,23 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for TokenPaginationResponseHeaders +void main() { + final instance = TokenPaginationResponseHeadersBuilder(); + // TODO add properties to the builder and call build() + + group(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\" + // String link + test('to test the property `link`', () async { + // TODO + }); + + // The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + // int xTotalCount + test('to test the property `xTotalCount`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/token_pagination_test.dart b/clients/hydra/dart/test/token_pagination_test.dart new file mode 100644 index 00000000000..a8b9584b505 --- /dev/null +++ b/clients/hydra/dart/test/token_pagination_test.dart @@ -0,0 +1,23 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + +// tests for TokenPagination +void main() { + final instance = TokenPaginationBuilder(); + // TODO add properties to the builder and call build() + + group(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). + // int pageSize (default value: 250) + test('to test the property `pageSize`', () async { + // TODO + }); + + // 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). + // String pageToken (default value: '1') + test('to test the property `pageToken`', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dart/test/trust_jwt_grant_issuer_body_test.dart b/clients/hydra/dart/test/trust_o_auth2_jwt_grant_issuer_test.dart similarity index 69% rename from clients/hydra/dart/test/trust_jwt_grant_issuer_body_test.dart rename to clients/hydra/dart/test/trust_o_auth2_jwt_grant_issuer_test.dart index c6b3381b07d..25ac43dce05 100644 --- a/clients/hydra/dart/test/trust_jwt_grant_issuer_body_test.dart +++ b/clients/hydra/dart/test/trust_o_auth2_jwt_grant_issuer_test.dart @@ -1,19 +1,18 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/trust_jwt_grant_issuer_body.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for TrustJwtGrantIssuerBody +// tests for TrustOAuth2JwtGrantIssuer void main() { - final instance = TrustJwtGrantIssuerBodyBuilder(); + final instance = TrustOAuth2JwtGrantIssuerBuilder(); // TODO add properties to the builder and call build() - group(TrustJwtGrantIssuerBody, () { + group(TrustOAuth2JwtGrantIssuer, () { + // The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + // bool allowAnySubject + test('to test the property `allowAnySubject`', () async { + // TODO + }); + // The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". // DateTime expiresAt test('to test the property `expiresAt`', () async { @@ -26,7 +25,7 @@ void main() { // TODO }); - // JSONWebKey jwk + // JsonWebKey jwk test('to test the property `jwk`', () async { // TODO }); @@ -43,7 +42,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/trusted_jwt_grant_issuer_test.dart b/clients/hydra/dart/test/trusted_o_auth2_jwt_grant_issuer_test.dart similarity index 72% rename from clients/hydra/dart/test/trusted_jwt_grant_issuer_test.dart rename to clients/hydra/dart/test/trusted_o_auth2_jwt_grant_issuer_test.dart index c34353c3564..b445d0677a6 100644 --- a/clients/hydra/dart/test/trusted_jwt_grant_issuer_test.dart +++ b/clients/hydra/dart/test/trusted_o_auth2_jwt_grant_issuer_test.dart @@ -1,19 +1,18 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/trusted_jwt_grant_issuer.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for TrustedJwtGrantIssuer +// tests for TrustedOAuth2JwtGrantIssuer void main() { - final instance = TrustedJwtGrantIssuerBuilder(); + final instance = TrustedOAuth2JwtGrantIssuerBuilder(); // TODO add properties to the builder and call build() - group(TrustedJwtGrantIssuer, () { + group(TrustedOAuth2JwtGrantIssuer, () { + // The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + // bool allowAnySubject + test('to test the property `allowAnySubject`', () async { + // TODO + }); + // The \"created_at\" indicates, when grant was created. // DateTime createdAt test('to test the property `createdAt`', () async { @@ -37,7 +36,7 @@ void main() { // TODO }); - // TrustedJsonWebKey publicKey + // TrustedOAuth2JwtGrantJsonWebKey publicKey test('to test the property `publicKey`', () async { // TODO }); @@ -54,7 +53,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/trusted_json_web_key_test.dart b/clients/hydra/dart/test/trusted_o_auth2_jwt_grant_json_web_key_test.dart similarity index 63% rename from clients/hydra/dart/test/trusted_json_web_key_test.dart rename to clients/hydra/dart/test/trusted_o_auth2_jwt_grant_json_web_key_test.dart index f042721441b..e83117085d4 100644 --- a/clients/hydra/dart/test/trusted_json_web_key_test.dart +++ b/clients/hydra/dart/test/trusted_o_auth2_jwt_grant_json_web_key_test.dart @@ -1,19 +1,12 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/trusted_json_web_key.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; -// tests for TrustedJsonWebKey +// tests for TrustedOAuth2JwtGrantJsonWebKey void main() { - final instance = TrustedJsonWebKeyBuilder(); + final instance = TrustedOAuth2JwtGrantJsonWebKeyBuilder(); // TODO add properties to the builder and call build() - group(TrustedJsonWebKey, () { + group(TrustedOAuth2JwtGrantJsonWebKey, () { // The \"key_id\" is key unique identifier (same as kid header in jws/jwt). // String kid test('to test the property `kid`', () async { @@ -26,7 +19,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/version_test.dart b/clients/hydra/dart/test/version_test.dart index 2a020ec1851..a4c01c2afc2 100644 --- a/clients/hydra/dart/test/version_test.dart +++ b/clients/hydra/dart/test/version_test.dart @@ -1,12 +1,5 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/version.dart'; import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; // tests for Version void main() { @@ -20,7 +13,5 @@ void main() { // TODO }); - }); - } diff --git a/clients/hydra/dart/test/volume_test.dart b/clients/hydra/dart/test/volume_test.dart deleted file mode 100644 index e9e9a377f59..00000000000 --- a/clients/hydra/dart/test/volume_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/volume.dart'; -import 'package:test/test.dart'; - -// tests for Volume -void main() { - final instance = VolumeBuilder(); - // TODO add properties to the builder and call build() - - group(Volume, () { - // Date/Time the volume was created. - // String createdAt - test('to test the property `createdAt`', () async { - // TODO - }); - - // Name of the volume driver used by the volume. - // String driver - test('to test the property `driver`', () async { - // TODO - }); - - // User-defined key/value metadata. - // BuiltMap labels - test('to test the property `labels`', () async { - // TODO - }); - - // Mount path of the volume on the host. - // String mountpoint - test('to test the property `mountpoint`', () async { - // TODO - }); - - // Name of the volume. - // String name - test('to test the property `name`', () async { - // TODO - }); - - // The driver specific options used when creating the volume. - // BuiltMap options - test('to test the property `options`', () async { - // TODO - }); - - // The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - // String scope - test('to test the property `scope`', () async { - // TODO - }); - - // Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - // JsonObject status - test('to test the property `status`', () async { - // TODO - }); - - // VolumeUsageData usageData - test('to test the property `usageData`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/volume_usage_data_test.dart b/clients/hydra/dart/test/volume_usage_data_test.dart deleted file mode 100644 index 92801e58ce4..00000000000 --- a/clients/hydra/dart/test/volume_usage_data_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/volume_usage_data.dart'; -import 'package:test/test.dart'; - -// tests for VolumeUsageData -void main() { - final instance = VolumeUsageDataBuilder(); - // TODO add properties to the builder and call build() - - group(VolumeUsageData, () { - // The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - // int refCount - test('to test the property `refCount`', () async { - // TODO - }); - - // Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - // int size - test('to test the property `size`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/well_known_test.dart b/clients/hydra/dart/test/well_known_test.dart deleted file mode 100644 index 57c480874d0..00000000000 --- a/clients/hydra/dart/test/well_known_test.dart +++ /dev/null @@ -1,182 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.7 - -// ignore_for_file: unused_import - -import 'package:ory_hydra_client/model/well_known.dart'; -import 'package:test/test.dart'; - -// tests for WellKnown -void main() { - final instance = WellKnownBuilder(); - // TODO add properties to the builder and call build() - - group(WellKnown, () { - // URL of the OP's OAuth 2.0 Authorization Endpoint. - // String authorizationEndpoint - test('to test the property `authorizationEndpoint`', () async { - // TODO - }); - - // 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 - // bool backchannelLogoutSessionSupported - test('to test the property `backchannelLogoutSessionSupported`', () async { - // TODO - }); - - // Boolean value specifying whether the OP supports back-channel logout, with true indicating support. - // bool backchannelLogoutSupported - test('to test the property `backchannelLogoutSupported`', () async { - // TODO - }); - - // Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. - // bool claimsParameterSupported - test('to test the property `claimsParameterSupported`', () async { - // TODO - }); - - // 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. - // BuiltList claimsSupported - test('to test the property `claimsSupported`', () async { - // TODO - }); - - // JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. - // BuiltList codeChallengeMethodsSupported - test('to test the property `codeChallengeMethodsSupported`', () async { - // TODO - }); - - // URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. - // String endSessionEndpoint - test('to test the property `endSessionEndpoint`', () async { - // TODO - }); - - // 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. - // bool frontchannelLogoutSessionSupported - test('to test the property `frontchannelLogoutSessionSupported`', () async { - // TODO - }); - - // Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. - // bool frontchannelLogoutSupported - test('to test the property `frontchannelLogoutSupported`', () async { - // TODO - }); - - // JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. - // BuiltList grantTypesSupported - test('to test the property `grantTypesSupported`', () async { - // TODO - }); - - // 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. - // BuiltList idTokenSigningAlgValuesSupported - test('to test the property `idTokenSigningAlgValuesSupported`', () async { - // TODO - }); - - // 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. - // String issuer - test('to test the property `issuer`', () async { - // TODO - }); - - // 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. - // String jwksUri - test('to test the property `jwksUri`', () async { - // TODO - }); - - // URL of the OP's Dynamic Client Registration Endpoint. - // String registrationEndpoint - test('to test the property `registrationEndpoint`', () async { - // TODO - }); - - // 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). - // BuiltList requestObjectSigningAlgValuesSupported - test('to test the property `requestObjectSigningAlgValuesSupported`', () async { - // TODO - }); - - // Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. - // bool requestParameterSupported - test('to test the property `requestParameterSupported`', () async { - // TODO - }); - - // Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. - // bool requestUriParameterSupported - test('to test the property `requestUriParameterSupported`', () async { - // TODO - }); - - // Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. - // bool requireRequestUriRegistration - test('to test the property `requireRequestUriRegistration`', () async { - // TODO - }); - - // JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. - // BuiltList responseModesSupported - test('to test the property `responseModesSupported`', () async { - // TODO - }); - - // 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. - // BuiltList responseTypesSupported - test('to test the property `responseTypesSupported`', () async { - // TODO - }); - - // URL of the authorization server's OAuth 2.0 revocation endpoint. - // String revocationEndpoint - test('to test the property `revocationEndpoint`', () async { - // TODO - }); - - // SON 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 - // BuiltList scopesSupported - test('to test the property `scopesSupported`', () async { - // TODO - }); - - // JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. - // BuiltList subjectTypesSupported - test('to test the property `subjectTypesSupported`', () async { - // TODO - }); - - // URL of the OP's OAuth 2.0 Token Endpoint - // String tokenEndpoint - test('to test the property `tokenEndpoint`', () async { - // TODO - }); - - // 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 - // BuiltList tokenEndpointAuthMethodsSupported - test('to test the property `tokenEndpointAuthMethodsSupported`', () async { - // TODO - }); - - // URL of the OP's UserInfo Endpoint. - // String userinfoEndpoint - test('to test the property `userinfoEndpoint`', () async { - // TODO - }); - - // 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]. - // BuiltList userinfoSigningAlgValuesSupported - test('to test the property `userinfoSigningAlgValuesSupported`', () async { - // TODO - }); - - - }); - -} diff --git a/clients/hydra/dart/test/wellknown_api_test.dart b/clients/hydra/dart/test/wellknown_api_test.dart new file mode 100644 index 00000000000..6c3933dff06 --- /dev/null +++ b/clients/hydra/dart/test/wellknown_api_test.dart @@ -0,0 +1,20 @@ +import 'package:test/test.dart'; +import 'package:ory_hydra_client/ory_hydra_client.dart'; + + +/// tests for WellknownApi +void main() { + final instance = OryHydraClient().getWellknownApi(); + + group(WellknownApi, () { + // 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. + // + //Future discoverJsonWebKeys() async + test('test discoverJsonWebKeys', () async { + // TODO + }); + + }); +} diff --git a/clients/hydra/dotnet/.openapi-generator/FILES b/clients/hydra/dotnet/.openapi-generator/FILES index c4f178ccb11..a9badca499c 100644 --- a/clients/hydra/dotnet/.openapi-generator/FILES +++ b/clients/hydra/dotnet/.openapi-generator/FILES @@ -3,105 +3,99 @@ Ory.Hydra.Client.sln README.md appveyor.yml -docs/AdminApi.md -docs/HydraAcceptConsentRequest.md -docs/HydraAcceptLoginRequest.md -docs/HydraCompletedRequest.md -docs/HydraConsentRequest.md -docs/HydraConsentRequestSession.md -docs/HydraContainerWaitOKBodyError.md -docs/HydraFlushInactiveOAuth2TokensRequest.md +docs/HydraAcceptOAuth2ConsentRequest.md +docs/HydraAcceptOAuth2ConsentRequestSession.md +docs/HydraAcceptOAuth2LoginRequest.md +docs/HydraCreateJsonWebKeySet.md +docs/HydraErrorOAuth2.md docs/HydraGenericError.md docs/HydraHealthNotReadyStatus.md docs/HydraHealthStatus.md -docs/HydraJSONWebKey.md -docs/HydraJSONWebKeySet.md -docs/HydraJsonError.md -docs/HydraJsonWebKeySetGeneratorRequest.md -docs/HydraLoginRequest.md -docs/HydraLogoutRequest.md +docs/HydraInlineResponse200.md +docs/HydraInlineResponse2001.md +docs/HydraInlineResponse503.md +docs/HydraIntrospectedOAuth2Token.md +docs/HydraJsonPatch.md +docs/HydraJsonWebKey.md +docs/HydraJsonWebKeySet.md docs/HydraOAuth2Client.md -docs/HydraOAuth2TokenIntrospection.md -docs/HydraOauth2TokenResponse.md -docs/HydraOpenIDConnectContext.md -docs/HydraPatchDocument.md -docs/HydraPluginConfig.md -docs/HydraPluginConfigArgs.md -docs/HydraPluginConfigInterface.md -docs/HydraPluginConfigLinux.md -docs/HydraPluginConfigNetwork.md -docs/HydraPluginConfigRootfs.md -docs/HydraPluginConfigUser.md -docs/HydraPluginDevice.md -docs/HydraPluginEnv.md -docs/HydraPluginInterfaceType.md -docs/HydraPluginMount.md -docs/HydraPluginSettings.md -docs/HydraPreviousConsentSession.md -docs/HydraRejectRequest.md -docs/HydraRequestWasHandledResponse.md -docs/HydraTrustJwtGrantIssuerBody.md -docs/HydraTrustedJsonWebKey.md -docs/HydraTrustedJwtGrantIssuer.md -docs/HydraUserinfoResponse.md +docs/HydraOAuth2ClientTokenLifespans.md +docs/HydraOAuth2ConsentRequest.md +docs/HydraOAuth2ConsentRequestOpenIDConnectContext.md +docs/HydraOAuth2ConsentSession.md +docs/HydraOAuth2ConsentSessionExpiresAt.md +docs/HydraOAuth2LoginRequest.md +docs/HydraOAuth2LogoutRequest.md +docs/HydraOAuth2RedirectTo.md +docs/HydraOAuth2TokenExchange.md +docs/HydraOidcConfiguration.md +docs/HydraOidcUserInfo.md +docs/HydraPagination.md +docs/HydraPaginationHeaders.md +docs/HydraRejectOAuth2Request.md +docs/HydraTokenPagination.md +docs/HydraTokenPaginationHeaders.md +docs/HydraTokenPaginationRequestParameters.md +docs/HydraTokenPaginationResponseHeaders.md +docs/HydraTrustOAuth2JwtGrantIssuer.md +docs/HydraTrustedOAuth2JwtGrantIssuer.md +docs/HydraTrustedOAuth2JwtGrantJsonWebKey.md docs/HydraVersion.md -docs/HydraVolume.md -docs/HydraVolumeUsageData.md -docs/HydraWellKnown.md +docs/JwkApi.md docs/MetadataApi.md -docs/PublicApi.md +docs/OAuth2Api.md +docs/OidcApi.md +docs/WellknownApi.md git_push.sh -src/Ory.Hydra.Client.Test/Api/AdminApiTests.cs +src/Ory.Hydra.Client.Test/Api/JwkApiTests.cs src/Ory.Hydra.Client.Test/Api/MetadataApiTests.cs -src/Ory.Hydra.Client.Test/Api/PublicApiTests.cs -src/Ory.Hydra.Client.Test/Model/HydraAcceptConsentRequestTests.cs -src/Ory.Hydra.Client.Test/Model/HydraAcceptLoginRequestTests.cs -src/Ory.Hydra.Client.Test/Model/HydraCompletedRequestTests.cs -src/Ory.Hydra.Client.Test/Model/HydraConsentRequestSessionTests.cs -src/Ory.Hydra.Client.Test/Model/HydraConsentRequestTests.cs -src/Ory.Hydra.Client.Test/Model/HydraContainerWaitOKBodyErrorTests.cs -src/Ory.Hydra.Client.Test/Model/HydraFlushInactiveOAuth2TokensRequestTests.cs +src/Ory.Hydra.Client.Test/Api/OAuth2ApiTests.cs +src/Ory.Hydra.Client.Test/Api/OidcApiTests.cs +src/Ory.Hydra.Client.Test/Api/WellknownApiTests.cs +src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestSessionTests.cs +src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestTests.cs +src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2LoginRequestTests.cs +src/Ory.Hydra.Client.Test/Model/HydraCreateJsonWebKeySetTests.cs +src/Ory.Hydra.Client.Test/Model/HydraErrorOAuth2Tests.cs src/Ory.Hydra.Client.Test/Model/HydraGenericErrorTests.cs src/Ory.Hydra.Client.Test/Model/HydraHealthNotReadyStatusTests.cs src/Ory.Hydra.Client.Test/Model/HydraHealthStatusTests.cs -src/Ory.Hydra.Client.Test/Model/HydraJSONWebKeySetTests.cs -src/Ory.Hydra.Client.Test/Model/HydraJSONWebKeyTests.cs -src/Ory.Hydra.Client.Test/Model/HydraJsonErrorTests.cs -src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetGeneratorRequestTests.cs -src/Ory.Hydra.Client.Test/Model/HydraLoginRequestTests.cs -src/Ory.Hydra.Client.Test/Model/HydraLogoutRequestTests.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/HydraJsonPatchTests.cs +src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetTests.cs +src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeyTests.cs src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTests.cs -src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenIntrospectionTests.cs -src/Ory.Hydra.Client.Test/Model/HydraOauth2TokenResponseTests.cs -src/Ory.Hydra.Client.Test/Model/HydraOpenIDConnectContextTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPatchDocumentTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginConfigArgsTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginConfigInterfaceTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginConfigLinuxTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginConfigNetworkTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginConfigRootfsTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginConfigTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginConfigUserTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginDeviceTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginEnvTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginInterfaceTypeTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginMountTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPluginSettingsTests.cs -src/Ory.Hydra.Client.Test/Model/HydraPreviousConsentSessionTests.cs -src/Ory.Hydra.Client.Test/Model/HydraRejectRequestTests.cs -src/Ory.Hydra.Client.Test/Model/HydraRequestWasHandledResponseTests.cs -src/Ory.Hydra.Client.Test/Model/HydraTrustJwtGrantIssuerBodyTests.cs -src/Ory.Hydra.Client.Test/Model/HydraTrustedJsonWebKeyTests.cs -src/Ory.Hydra.Client.Test/Model/HydraTrustedJwtGrantIssuerTests.cs -src/Ory.Hydra.Client.Test/Model/HydraUserinfoResponseTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTokenLifespansTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestOpenIDConnectContextTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionExpiresAtTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOAuth2LoginRequestTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOAuth2LogoutRequestTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOAuth2RedirectToTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenExchangeTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOidcConfigurationTests.cs +src/Ory.Hydra.Client.Test/Model/HydraOidcUserInfoTests.cs +src/Ory.Hydra.Client.Test/Model/HydraPaginationHeadersTests.cs +src/Ory.Hydra.Client.Test/Model/HydraPaginationTests.cs +src/Ory.Hydra.Client.Test/Model/HydraRejectOAuth2RequestTests.cs +src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationHeadersTests.cs +src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationRequestParametersTests.cs +src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationResponseHeadersTests.cs +src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationTests.cs +src/Ory.Hydra.Client.Test/Model/HydraTrustOAuth2JwtGrantIssuerTests.cs +src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantIssuerTests.cs +src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantJsonWebKeyTests.cs src/Ory.Hydra.Client.Test/Model/HydraVersionTests.cs -src/Ory.Hydra.Client.Test/Model/HydraVolumeTests.cs -src/Ory.Hydra.Client.Test/Model/HydraVolumeUsageDataTests.cs -src/Ory.Hydra.Client.Test/Model/HydraWellKnownTests.cs src/Ory.Hydra.Client.Test/Ory.Hydra.Client.Test.csproj -src/Ory.Hydra.Client/Api/AdminApi.cs +src/Ory.Hydra.Client/Api/JwkApi.cs src/Ory.Hydra.Client/Api/MetadataApi.cs -src/Ory.Hydra.Client/Api/PublicApi.cs +src/Ory.Hydra.Client/Api/OAuth2Api.cs +src/Ory.Hydra.Client/Api/OidcApi.cs +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 @@ -119,48 +113,42 @@ src/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs src/Ory.Hydra.Client/Client/RequestOptions.cs src/Ory.Hydra.Client/Client/RetryConfiguration.cs src/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs -src/Ory.Hydra.Client/Model/HydraAcceptConsentRequest.cs -src/Ory.Hydra.Client/Model/HydraAcceptLoginRequest.cs -src/Ory.Hydra.Client/Model/HydraCompletedRequest.cs -src/Ory.Hydra.Client/Model/HydraConsentRequest.cs -src/Ory.Hydra.Client/Model/HydraConsentRequestSession.cs -src/Ory.Hydra.Client/Model/HydraContainerWaitOKBodyError.cs -src/Ory.Hydra.Client/Model/HydraFlushInactiveOAuth2TokensRequest.cs +src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs +src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs +src/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs +src/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs +src/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs src/Ory.Hydra.Client/Model/HydraGenericError.cs src/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs src/Ory.Hydra.Client/Model/HydraHealthStatus.cs -src/Ory.Hydra.Client/Model/HydraJSONWebKey.cs -src/Ory.Hydra.Client/Model/HydraJSONWebKeySet.cs -src/Ory.Hydra.Client/Model/HydraJsonError.cs -src/Ory.Hydra.Client/Model/HydraJsonWebKeySetGeneratorRequest.cs -src/Ory.Hydra.Client/Model/HydraLoginRequest.cs -src/Ory.Hydra.Client/Model/HydraLogoutRequest.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/HydraJsonPatch.cs +src/Ory.Hydra.Client/Model/HydraJsonWebKey.cs +src/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs src/Ory.Hydra.Client/Model/HydraOAuth2Client.cs -src/Ory.Hydra.Client/Model/HydraOAuth2TokenIntrospection.cs -src/Ory.Hydra.Client/Model/HydraOauth2TokenResponse.cs -src/Ory.Hydra.Client/Model/HydraOpenIDConnectContext.cs -src/Ory.Hydra.Client/Model/HydraPatchDocument.cs -src/Ory.Hydra.Client/Model/HydraPluginConfig.cs -src/Ory.Hydra.Client/Model/HydraPluginConfigArgs.cs -src/Ory.Hydra.Client/Model/HydraPluginConfigInterface.cs -src/Ory.Hydra.Client/Model/HydraPluginConfigLinux.cs -src/Ory.Hydra.Client/Model/HydraPluginConfigNetwork.cs -src/Ory.Hydra.Client/Model/HydraPluginConfigRootfs.cs -src/Ory.Hydra.Client/Model/HydraPluginConfigUser.cs -src/Ory.Hydra.Client/Model/HydraPluginDevice.cs -src/Ory.Hydra.Client/Model/HydraPluginEnv.cs -src/Ory.Hydra.Client/Model/HydraPluginInterfaceType.cs -src/Ory.Hydra.Client/Model/HydraPluginMount.cs -src/Ory.Hydra.Client/Model/HydraPluginSettings.cs -src/Ory.Hydra.Client/Model/HydraPreviousConsentSession.cs -src/Ory.Hydra.Client/Model/HydraRejectRequest.cs -src/Ory.Hydra.Client/Model/HydraRequestWasHandledResponse.cs -src/Ory.Hydra.Client/Model/HydraTrustJwtGrantIssuerBody.cs -src/Ory.Hydra.Client/Model/HydraTrustedJsonWebKey.cs -src/Ory.Hydra.Client/Model/HydraTrustedJwtGrantIssuer.cs -src/Ory.Hydra.Client/Model/HydraUserinfoResponse.cs +src/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs +src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs +src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs +src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs +src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs +src/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs +src/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs +src/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs +src/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs +src/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs +src/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs +src/Ory.Hydra.Client/Model/HydraPagination.cs +src/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs +src/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs +src/Ory.Hydra.Client/Model/HydraTokenPagination.cs +src/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs +src/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs +src/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs +src/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs +src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs +src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs src/Ory.Hydra.Client/Model/HydraVersion.cs -src/Ory.Hydra.Client/Model/HydraVolume.cs -src/Ory.Hydra.Client/Model/HydraVolumeUsageData.cs -src/Ory.Hydra.Client/Model/HydraWellKnown.cs src/Ory.Hydra.Client/Ory.Hydra.Client.csproj diff --git a/clients/hydra/dotnet/Ory.Hydra.Client.sln b/clients/hydra/dotnet/Ory.Hydra.Client.sln index c673ff56446..4a4e85bdeb8 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", "{54FE3F76-F279-47D3-89A0-19C97D986280}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ory.Hydra.Client", "src\Ory.Hydra.Client\Ory.Hydra.Client.csproj", "{A20391FE-15DF-42D3-8B2D-D7CA4BAE7147}" 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 - {54FE3F76-F279-47D3-89A0-19C97D986280}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {54FE3F76-F279-47D3-89A0-19C97D986280}.Debug|Any CPU.Build.0 = Debug|Any CPU - {54FE3F76-F279-47D3-89A0-19C97D986280}.Release|Any CPU.ActiveCfg = Release|Any CPU - {54FE3F76-F279-47D3-89A0-19C97D986280}.Release|Any CPU.Build.0 = Release|Any CPU + {A20391FE-15DF-42D3-8B2D-D7CA4BAE7147}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A20391FE-15DF-42D3-8B2D-D7CA4BAE7147}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A20391FE-15DF-42D3-8B2D-D7CA4BAE7147}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A20391FE-15DF-42D3-8B2D-D7CA4BAE7147}.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 069074a3712..cc560f3d134 100644 --- a/clients/hydra/dotnet/README.md +++ b/clients/hydra/dotnet/README.md @@ -1,11 +1,12 @@ -# Ory.Hydra.Client - the C# library for the ORY Hydra +# Ory.Hydra.Client - the C# library for the Ory Hydra API + +Documentation for all of Ory Hydra's APIs. -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v1.11.0 -- SDK version: 1.11.0 +- API version: v2.0.1 +- SDK version: 2.0.1 - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit [https://www.ory.sh](https://www.ory.sh) @@ -86,19 +87,19 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var consentChallenge = "consentChallenge_example"; // string | - var body = new HydraAcceptConsentRequest(); // HydraAcceptConsentRequest | (optional) + var apiInstance = new JwkApi(config); + var set = "set_example"; // string | The JSON Web Key Set ID + var hydraCreateJsonWebKeySet = new HydraCreateJsonWebKeySet(); // HydraCreateJsonWebKeySet | try { - // Accept a Consent Request - HydraCompletedRequest result = apiInstance.AcceptConsentRequest(consentChallenge, body); + // Create JSON Web Key + HydraJsonWebKeySet result = apiInstance.CreateJsonWebKeySet(set, hydraCreateJsonWebKeySet); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling AdminApi.AcceptConsentRequest: " + e.Message ); + Debug.Print("Exception when calling JwkApi.CreateJsonWebKeySet: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -115,102 +116,95 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdminApi* | [**AcceptConsentRequest**](docs/AdminApi.md#acceptconsentrequest) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -*AdminApi* | [**AcceptLoginRequest**](docs/AdminApi.md#acceptloginrequest) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -*AdminApi* | [**AcceptLogoutRequest**](docs/AdminApi.md#acceptlogoutrequest) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -*AdminApi* | [**CreateJsonWebKeySet**](docs/AdminApi.md#createjsonwebkeyset) | **POST** /keys/{set} | Generate a New JSON Web Key -*AdminApi* | [**CreateOAuth2Client**](docs/AdminApi.md#createoauth2client) | **POST** /clients | Create an OAuth 2.0 Client -*AdminApi* | [**DeleteJsonWebKey**](docs/AdminApi.md#deletejsonwebkey) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -*AdminApi* | [**DeleteJsonWebKeySet**](docs/AdminApi.md#deletejsonwebkeyset) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -*AdminApi* | [**DeleteOAuth2Client**](docs/AdminApi.md#deleteoauth2client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -*AdminApi* | [**DeleteOAuth2Token**](docs/AdminApi.md#deleteoauth2token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -*AdminApi* | [**DeleteTrustedJwtGrantIssuer**](docs/AdminApi.md#deletetrustedjwtgrantissuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**FlushInactiveOAuth2Tokens**](docs/AdminApi.md#flushinactiveoauth2tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -*AdminApi* | [**GetConsentRequest**](docs/AdminApi.md#getconsentrequest) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -*AdminApi* | [**GetJsonWebKey**](docs/AdminApi.md#getjsonwebkey) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -*AdminApi* | [**GetJsonWebKeySet**](docs/AdminApi.md#getjsonwebkeyset) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -*AdminApi* | [**GetLoginRequest**](docs/AdminApi.md#getloginrequest) | **GET** /oauth2/auth/requests/login | Get a Login Request -*AdminApi* | [**GetLogoutRequest**](docs/AdminApi.md#getlogoutrequest) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -*AdminApi* | [**GetOAuth2Client**](docs/AdminApi.md#getoauth2client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -*AdminApi* | [**GetTrustedJwtGrantIssuer**](docs/AdminApi.md#gettrustedjwtgrantissuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**GetVersion**](docs/AdminApi.md#getversion) | **GET** /version | Get Service Version -*AdminApi* | [**IntrospectOAuth2Token**](docs/AdminApi.md#introspectoauth2token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -*AdminApi* | [**IsInstanceAlive**](docs/AdminApi.md#isinstancealive) | **GET** /health/alive | Check Alive Status -*AdminApi* | [**ListOAuth2Clients**](docs/AdminApi.md#listoauth2clients) | **GET** /clients | List OAuth 2.0 Clients -*AdminApi* | [**ListSubjectConsentSessions**](docs/AdminApi.md#listsubjectconsentsessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -*AdminApi* | [**ListTrustedJwtGrantIssuers**](docs/AdminApi.md#listtrustedjwtgrantissuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -*AdminApi* | [**PatchOAuth2Client**](docs/AdminApi.md#patchoauth2client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -*AdminApi* | [**RejectConsentRequest**](docs/AdminApi.md#rejectconsentrequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -*AdminApi* | [**RejectLoginRequest**](docs/AdminApi.md#rejectloginrequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -*AdminApi* | [**RejectLogoutRequest**](docs/AdminApi.md#rejectlogoutrequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -*AdminApi* | [**RevokeAuthenticationSession**](docs/AdminApi.md#revokeauthenticationsession) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -*AdminApi* | [**RevokeConsentSessions**](docs/AdminApi.md#revokeconsentsessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -*AdminApi* | [**TrustJwtGrantIssuer**](docs/AdminApi.md#trustjwtgrantissuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**UpdateJsonWebKey**](docs/AdminApi.md#updatejsonwebkey) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -*AdminApi* | [**UpdateJsonWebKeySet**](docs/AdminApi.md#updatejsonwebkeyset) | **PUT** /keys/{set} | Update a JSON Web Key Set -*AdminApi* | [**UpdateOAuth2Client**](docs/AdminApi.md#updateoauth2client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client -*MetadataApi* | [**Prometheus**](docs/MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: -*PublicApi* | [**DisconnectUser**](docs/PublicApi.md#disconnectuser) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -*PublicApi* | [**DiscoverOpenIDConfiguration**](docs/PublicApi.md#discoveropenidconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -*PublicApi* | [**DynamicClientRegistrationCreateOAuth2Client**](docs/PublicApi.md#dynamicclientregistrationcreateoauth2client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**DynamicClientRegistrationDeleteOAuth2Client**](docs/PublicApi.md#dynamicclientregistrationdeleteoauth2client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**DynamicClientRegistrationGetOAuth2Client**](docs/PublicApi.md#dynamicclientregistrationgetoauth2client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**DynamicClientRegistrationUpdateOAuth2Client**](docs/PublicApi.md#dynamicclientregistrationupdateoauth2client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**IsInstanceReady**](docs/PublicApi.md#isinstanceready) | **GET** /health/ready | Check Readiness Status -*PublicApi* | [**Oauth2Token**](docs/PublicApi.md#oauth2token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -*PublicApi* | [**OauthAuth**](docs/PublicApi.md#oauthauth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -*PublicApi* | [**RevokeOAuth2Token**](docs/PublicApi.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -*PublicApi* | [**Userinfo**](docs/PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -*PublicApi* | [**WellKnown**](docs/PublicApi.md#wellknown) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery +*JwkApi* | [**CreateJsonWebKeySet**](docs/JwkApi.md#createjsonwebkeyset) | **POST** /admin/keys/{set} | Create JSON Web Key +*JwkApi* | [**DeleteJsonWebKey**](docs/JwkApi.md#deletejsonwebkey) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key +*JwkApi* | [**DeleteJsonWebKeySet**](docs/JwkApi.md#deletejsonwebkeyset) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set +*JwkApi* | [**GetJsonWebKey**](docs/JwkApi.md#getjsonwebkey) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key +*JwkApi* | [**GetJsonWebKeySet**](docs/JwkApi.md#getjsonwebkeyset) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set +*JwkApi* | [**SetJsonWebKey**](docs/JwkApi.md#setjsonwebkey) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key +*JwkApi* | [**SetJsonWebKeySet**](docs/JwkApi.md#setjsonwebkeyset) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set +*MetadataApi* | [**GetVersion**](docs/MetadataApi.md#getversion) | **GET** /version | Return Running Software Version. +*MetadataApi* | [**IsAlive**](docs/MetadataApi.md#isalive) | **GET** /health/alive | Check HTTP Server Status +*MetadataApi* | [**IsReady**](docs/MetadataApi.md#isready) | **GET** /health/ready | Check HTTP Server and Database Status +*OAuth2Api* | [**AcceptOAuth2ConsentRequest**](docs/OAuth2Api.md#acceptoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +*OAuth2Api* | [**AcceptOAuth2LoginRequest**](docs/OAuth2Api.md#acceptoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +*OAuth2Api* | [**AcceptOAuth2LogoutRequest**](docs/OAuth2Api.md#acceptoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +*OAuth2Api* | [**CreateOAuth2Client**](docs/OAuth2Api.md#createoauth2client) | **POST** /admin/clients | Create OAuth 2.0 Client +*OAuth2Api* | [**DeleteOAuth2Client**](docs/OAuth2Api.md#deleteoauth2client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client +*OAuth2Api* | [**DeleteOAuth2Token**](docs/OAuth2Api.md#deleteoauth2token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +*OAuth2Api* | [**DeleteTrustedOAuth2JwtGrantIssuer**](docs/OAuth2Api.md#deletetrustedoauth2jwtgrantissuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**GetOAuth2Client**](docs/OAuth2Api.md#getoauth2client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client +*OAuth2Api* | [**GetOAuth2ConsentRequest**](docs/OAuth2Api.md#getoauth2consentrequest) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +*OAuth2Api* | [**GetOAuth2LoginRequest**](docs/OAuth2Api.md#getoauth2loginrequest) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +*OAuth2Api* | [**GetOAuth2LogoutRequest**](docs/OAuth2Api.md#getoauth2logoutrequest) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +*OAuth2Api* | [**GetTrustedOAuth2JwtGrantIssuer**](docs/OAuth2Api.md#gettrustedoauth2jwtgrantissuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**IntrospectOAuth2Token**](docs/OAuth2Api.md#introspectoauth2token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +*OAuth2Api* | [**ListOAuth2Clients**](docs/OAuth2Api.md#listoauth2clients) | **GET** /admin/clients | List OAuth 2.0 Clients +*OAuth2Api* | [**ListOAuth2ConsentSessions**](docs/OAuth2Api.md#listoauth2consentsessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**ListTrustedOAuth2JwtGrantIssuers**](docs/OAuth2Api.md#listtrustedoauth2jwtgrantissuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +*OAuth2Api* | [**OAuth2Authorize**](docs/OAuth2Api.md#oauth2authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint +*OAuth2Api* | [**Oauth2TokenExchange**](docs/OAuth2Api.md#oauth2tokenexchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint +*OAuth2Api* | [**PatchOAuth2Client**](docs/OAuth2Api.md#patchoauth2client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client +*OAuth2Api* | [**RejectOAuth2ConsentRequest**](docs/OAuth2Api.md#rejectoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +*OAuth2Api* | [**RejectOAuth2LoginRequest**](docs/OAuth2Api.md#rejectoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +*OAuth2Api* | [**RejectOAuth2LogoutRequest**](docs/OAuth2Api.md#rejectoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +*OAuth2Api* | [**RevokeOAuth2ConsentSessions**](docs/OAuth2Api.md#revokeoauth2consentsessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**RevokeOAuth2LoginSessions**](docs/OAuth2Api.md#revokeoauth2loginsessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +*OAuth2Api* | [**RevokeOAuth2Token**](docs/OAuth2Api.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +*OAuth2Api* | [**SetOAuth2Client**](docs/OAuth2Api.md#setoauth2client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client +*OAuth2Api* | [**SetOAuth2ClientLifespans**](docs/OAuth2Api.md#setoauth2clientlifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +*OAuth2Api* | [**TrustOAuth2JwtGrantIssuer**](docs/OAuth2Api.md#trustoauth2jwtgrantissuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer +*OidcApi* | [**CreateOidcDynamicClient**](docs/OidcApi.md#createoidcdynamicclient) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**DeleteOidcDynamicClient**](docs/OidcApi.md#deleteoidcdynamicclient) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +*OidcApi* | [**DiscoverOidcConfiguration**](docs/OidcApi.md#discoveroidcconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery +*OidcApi* | [**GetOidcDynamicClient**](docs/OidcApi.md#getoidcdynamicclient) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**GetOidcUserInfo**](docs/OidcApi.md#getoidcuserinfo) | **GET** /userinfo | OpenID Connect Userinfo +*OidcApi* | [**RevokeOidcSession**](docs/OidcApi.md#revokeoidcsession) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +*OidcApi* | [**SetOidcDynamicClient**](docs/OidcApi.md#setoidcdynamicclient) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration +*WellknownApi* | [**DiscoverJsonWebKeys**](docs/WellknownApi.md#discoverjsonwebkeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys ## Documentation for Models - - [Model.HydraAcceptConsentRequest](docs/HydraAcceptConsentRequest.md) - - [Model.HydraAcceptLoginRequest](docs/HydraAcceptLoginRequest.md) - - [Model.HydraCompletedRequest](docs/HydraCompletedRequest.md) - - [Model.HydraConsentRequest](docs/HydraConsentRequest.md) - - [Model.HydraConsentRequestSession](docs/HydraConsentRequestSession.md) - - [Model.HydraContainerWaitOKBodyError](docs/HydraContainerWaitOKBodyError.md) - - [Model.HydraFlushInactiveOAuth2TokensRequest](docs/HydraFlushInactiveOAuth2TokensRequest.md) + - [Model.HydraAcceptOAuth2ConsentRequest](docs/HydraAcceptOAuth2ConsentRequest.md) + - [Model.HydraAcceptOAuth2ConsentRequestSession](docs/HydraAcceptOAuth2ConsentRequestSession.md) + - [Model.HydraAcceptOAuth2LoginRequest](docs/HydraAcceptOAuth2LoginRequest.md) + - [Model.HydraCreateJsonWebKeySet](docs/HydraCreateJsonWebKeySet.md) + - [Model.HydraErrorOAuth2](docs/HydraErrorOAuth2.md) - [Model.HydraGenericError](docs/HydraGenericError.md) - [Model.HydraHealthNotReadyStatus](docs/HydraHealthNotReadyStatus.md) - [Model.HydraHealthStatus](docs/HydraHealthStatus.md) - - [Model.HydraJSONWebKey](docs/HydraJSONWebKey.md) - - [Model.HydraJSONWebKeySet](docs/HydraJSONWebKeySet.md) - - [Model.HydraJsonError](docs/HydraJsonError.md) - - [Model.HydraJsonWebKeySetGeneratorRequest](docs/HydraJsonWebKeySetGeneratorRequest.md) - - [Model.HydraLoginRequest](docs/HydraLoginRequest.md) - - [Model.HydraLogoutRequest](docs/HydraLogoutRequest.md) + - [Model.HydraInlineResponse200](docs/HydraInlineResponse200.md) + - [Model.HydraInlineResponse2001](docs/HydraInlineResponse2001.md) + - [Model.HydraInlineResponse503](docs/HydraInlineResponse503.md) + - [Model.HydraIntrospectedOAuth2Token](docs/HydraIntrospectedOAuth2Token.md) + - [Model.HydraJsonPatch](docs/HydraJsonPatch.md) + - [Model.HydraJsonWebKey](docs/HydraJsonWebKey.md) + - [Model.HydraJsonWebKeySet](docs/HydraJsonWebKeySet.md) - [Model.HydraOAuth2Client](docs/HydraOAuth2Client.md) - - [Model.HydraOAuth2TokenIntrospection](docs/HydraOAuth2TokenIntrospection.md) - - [Model.HydraOauth2TokenResponse](docs/HydraOauth2TokenResponse.md) - - [Model.HydraOpenIDConnectContext](docs/HydraOpenIDConnectContext.md) - - [Model.HydraPatchDocument](docs/HydraPatchDocument.md) - - [Model.HydraPluginConfig](docs/HydraPluginConfig.md) - - [Model.HydraPluginConfigArgs](docs/HydraPluginConfigArgs.md) - - [Model.HydraPluginConfigInterface](docs/HydraPluginConfigInterface.md) - - [Model.HydraPluginConfigLinux](docs/HydraPluginConfigLinux.md) - - [Model.HydraPluginConfigNetwork](docs/HydraPluginConfigNetwork.md) - - [Model.HydraPluginConfigRootfs](docs/HydraPluginConfigRootfs.md) - - [Model.HydraPluginConfigUser](docs/HydraPluginConfigUser.md) - - [Model.HydraPluginDevice](docs/HydraPluginDevice.md) - - [Model.HydraPluginEnv](docs/HydraPluginEnv.md) - - [Model.HydraPluginInterfaceType](docs/HydraPluginInterfaceType.md) - - [Model.HydraPluginMount](docs/HydraPluginMount.md) - - [Model.HydraPluginSettings](docs/HydraPluginSettings.md) - - [Model.HydraPreviousConsentSession](docs/HydraPreviousConsentSession.md) - - [Model.HydraRejectRequest](docs/HydraRejectRequest.md) - - [Model.HydraRequestWasHandledResponse](docs/HydraRequestWasHandledResponse.md) - - [Model.HydraTrustJwtGrantIssuerBody](docs/HydraTrustJwtGrantIssuerBody.md) - - [Model.HydraTrustedJsonWebKey](docs/HydraTrustedJsonWebKey.md) - - [Model.HydraTrustedJwtGrantIssuer](docs/HydraTrustedJwtGrantIssuer.md) - - [Model.HydraUserinfoResponse](docs/HydraUserinfoResponse.md) + - [Model.HydraOAuth2ClientTokenLifespans](docs/HydraOAuth2ClientTokenLifespans.md) + - [Model.HydraOAuth2ConsentRequest](docs/HydraOAuth2ConsentRequest.md) + - [Model.HydraOAuth2ConsentRequestOpenIDConnectContext](docs/HydraOAuth2ConsentRequestOpenIDConnectContext.md) + - [Model.HydraOAuth2ConsentSession](docs/HydraOAuth2ConsentSession.md) + - [Model.HydraOAuth2ConsentSessionExpiresAt](docs/HydraOAuth2ConsentSessionExpiresAt.md) + - [Model.HydraOAuth2LoginRequest](docs/HydraOAuth2LoginRequest.md) + - [Model.HydraOAuth2LogoutRequest](docs/HydraOAuth2LogoutRequest.md) + - [Model.HydraOAuth2RedirectTo](docs/HydraOAuth2RedirectTo.md) + - [Model.HydraOAuth2TokenExchange](docs/HydraOAuth2TokenExchange.md) + - [Model.HydraOidcConfiguration](docs/HydraOidcConfiguration.md) + - [Model.HydraOidcUserInfo](docs/HydraOidcUserInfo.md) + - [Model.HydraPagination](docs/HydraPagination.md) + - [Model.HydraPaginationHeaders](docs/HydraPaginationHeaders.md) + - [Model.HydraRejectOAuth2Request](docs/HydraRejectOAuth2Request.md) + - [Model.HydraTokenPagination](docs/HydraTokenPagination.md) + - [Model.HydraTokenPaginationHeaders](docs/HydraTokenPaginationHeaders.md) + - [Model.HydraTokenPaginationRequestParameters](docs/HydraTokenPaginationRequestParameters.md) + - [Model.HydraTokenPaginationResponseHeaders](docs/HydraTokenPaginationResponseHeaders.md) + - [Model.HydraTrustOAuth2JwtGrantIssuer](docs/HydraTrustOAuth2JwtGrantIssuer.md) + - [Model.HydraTrustedOAuth2JwtGrantIssuer](docs/HydraTrustedOAuth2JwtGrantIssuer.md) + - [Model.HydraTrustedOAuth2JwtGrantJsonWebKey](docs/HydraTrustedOAuth2JwtGrantJsonWebKey.md) - [Model.HydraVersion](docs/HydraVersion.md) - - [Model.HydraVolume](docs/HydraVolume.md) - - [Model.HydraVolumeUsageData](docs/HydraVolumeUsageData.md) - - [Model.HydraWellKnown](docs/HydraWellKnown.md) @@ -221,6 +215,11 @@ Class | Method | HTTP request | Description - **Type**: HTTP basic authentication + +### bearer + +- **Type**: Bearer Authentication + ### oauth2 diff --git a/clients/hydra/dotnet/docs/AdminApi.md b/clients/hydra/dotnet/docs/AdminApi.md deleted file mode 100644 index 637e1d1c502..00000000000 --- a/clients/hydra/dotnet/docs/AdminApi.md +++ /dev/null @@ -1,2554 +0,0 @@ -# Ory.Hydra.Client.Api.AdminApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AcceptConsentRequest**](AdminApi.md#acceptconsentrequest) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -[**AcceptLoginRequest**](AdminApi.md#acceptloginrequest) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -[**AcceptLogoutRequest**](AdminApi.md#acceptlogoutrequest) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -[**CreateJsonWebKeySet**](AdminApi.md#createjsonwebkeyset) | **POST** /keys/{set} | Generate a New JSON Web Key -[**CreateOAuth2Client**](AdminApi.md#createoauth2client) | **POST** /clients | Create an OAuth 2.0 Client -[**DeleteJsonWebKey**](AdminApi.md#deletejsonwebkey) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -[**DeleteJsonWebKeySet**](AdminApi.md#deletejsonwebkeyset) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -[**DeleteOAuth2Client**](AdminApi.md#deleteoauth2client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -[**DeleteOAuth2Token**](AdminApi.md#deleteoauth2token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -[**DeleteTrustedJwtGrantIssuer**](AdminApi.md#deletetrustedjwtgrantissuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**FlushInactiveOAuth2Tokens**](AdminApi.md#flushinactiveoauth2tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -[**GetConsentRequest**](AdminApi.md#getconsentrequest) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -[**GetJsonWebKey**](AdminApi.md#getjsonwebkey) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -[**GetJsonWebKeySet**](AdminApi.md#getjsonwebkeyset) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -[**GetLoginRequest**](AdminApi.md#getloginrequest) | **GET** /oauth2/auth/requests/login | Get a Login Request -[**GetLogoutRequest**](AdminApi.md#getlogoutrequest) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -[**GetOAuth2Client**](AdminApi.md#getoauth2client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -[**GetTrustedJwtGrantIssuer**](AdminApi.md#gettrustedjwtgrantissuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**GetVersion**](AdminApi.md#getversion) | **GET** /version | Get Service Version -[**IntrospectOAuth2Token**](AdminApi.md#introspectoauth2token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -[**IsInstanceAlive**](AdminApi.md#isinstancealive) | **GET** /health/alive | Check Alive Status -[**ListOAuth2Clients**](AdminApi.md#listoauth2clients) | **GET** /clients | List OAuth 2.0 Clients -[**ListSubjectConsentSessions**](AdminApi.md#listsubjectconsentsessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -[**ListTrustedJwtGrantIssuers**](AdminApi.md#listtrustedjwtgrantissuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -[**PatchOAuth2Client**](AdminApi.md#patchoauth2client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -[**RejectConsentRequest**](AdminApi.md#rejectconsentrequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -[**RejectLoginRequest**](AdminApi.md#rejectloginrequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -[**RejectLogoutRequest**](AdminApi.md#rejectlogoutrequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -[**RevokeAuthenticationSession**](AdminApi.md#revokeauthenticationsession) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -[**RevokeConsentSessions**](AdminApi.md#revokeconsentsessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -[**TrustJwtGrantIssuer**](AdminApi.md#trustjwtgrantissuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -[**UpdateJsonWebKey**](AdminApi.md#updatejsonwebkey) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -[**UpdateJsonWebKeySet**](AdminApi.md#updatejsonwebkeyset) | **PUT** /keys/{set} | Update a JSON Web Key Set -[**UpdateOAuth2Client**](AdminApi.md#updateoauth2client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client - - - -# **AcceptConsentRequest** -> HydraCompletedRequest AcceptConsentRequest (string consentChallenge, HydraAcceptConsentRequest body = null) - -Accept a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class AcceptConsentRequestExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var consentChallenge = "consentChallenge_example"; // string | - var body = new HydraAcceptConsentRequest(); // HydraAcceptConsentRequest | (optional) - - try - { - // Accept a Consent Request - HydraCompletedRequest result = apiInstance.AcceptConsentRequest(consentChallenge, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.AcceptConsentRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| | - **body** | [**HydraAcceptConsentRequest**](HydraAcceptConsentRequest.md)| | [optional] - -### Return type - -[**HydraCompletedRequest**](HydraCompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | completedRequest | - | -| **404** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **AcceptLoginRequest** -> HydraCompletedRequest AcceptLoginRequest (string loginChallenge, HydraAcceptLoginRequest body = null) - -Accept a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class AcceptLoginRequestExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var loginChallenge = "loginChallenge_example"; // string | - var body = new HydraAcceptLoginRequest(); // HydraAcceptLoginRequest | (optional) - - try - { - // Accept a Login Request - HydraCompletedRequest result = apiInstance.AcceptLoginRequest(loginChallenge, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.AcceptLoginRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| | - **body** | [**HydraAcceptLoginRequest**](HydraAcceptLoginRequest.md)| | [optional] - -### Return type - -[**HydraCompletedRequest**](HydraCompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | completedRequest | - | -| **400** | jsonError | - | -| **401** | jsonError | - | -| **404** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **AcceptLogoutRequest** -> HydraCompletedRequest AcceptLogoutRequest (string logoutChallenge) - -Accept a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class AcceptLogoutRequestExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var logoutChallenge = "logoutChallenge_example"; // string | - - try - { - // Accept a Logout Request - HydraCompletedRequest result = apiInstance.AcceptLogoutRequest(logoutChallenge); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.AcceptLogoutRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | - -### Return type - -[**HydraCompletedRequest**](HydraCompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | completedRequest | - | -| **404** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **CreateJsonWebKeySet** -> HydraJSONWebKeySet CreateJsonWebKeySet (string set, HydraJsonWebKeySetGeneratorRequest body = null) - -Generate a New 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class CreateJsonWebKeySetExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var set = "set_example"; // string | The set - var body = new HydraJsonWebKeySetGeneratorRequest(); // HydraJsonWebKeySetGeneratorRequest | (optional) - - try - { - // Generate a New JSON Web Key - HydraJSONWebKeySet result = apiInstance.CreateJsonWebKeySet(set, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.CreateJsonWebKeySet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The set | - **body** | [**HydraJsonWebKeySetGeneratorRequest**](HydraJsonWebKeySetGeneratorRequest.md)| | [optional] - -### Return type - -[**HydraJSONWebKeySet**](HydraJSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | JSONWebKeySet | - | -| **401** | jsonError | - | -| **403** | jsonError | - | -| **500** | jsonError | - | - -[[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 body) - -Create an OAuth 2.0 Client - -Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class CreateOAuth2ClientExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var body = new HydraOAuth2Client(); // HydraOAuth2Client | - - try - { - // Create an OAuth 2.0 Client - HydraOAuth2Client result = apiInstance.CreateOAuth2Client(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.CreateOAuth2Client: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**HydraOAuth2Client**](HydraOAuth2Client.md)| | - -### Return type - -[**HydraOAuth2Client**](HydraOAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | oAuth2Client | - | -| **0** | jsonError | - | - -[[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 kid, string set) - -Delete a 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DeleteJsonWebKeyExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var kid = "kid_example"; // string | The kid of the desired key - var set = "set_example"; // string | The set - - try - { - // Delete a JSON Web Key - apiInstance.DeleteJsonWebKey(kid, set); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.DeleteJsonWebKey: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **string**| The kid of the desired key | - **set** | **string**| The set | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **401** | jsonError | - | -| **403** | jsonError | - | -| **500** | jsonError | - | - -[[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) - -Delete a 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DeleteJsonWebKeySetExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var set = "set_example"; // string | The set - - try - { - // Delete a JSON Web Key Set - apiInstance.DeleteJsonWebKeySet(set); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.DeleteJsonWebKeySet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The set | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **401** | jsonError | - | -| **403** | jsonError | - | -| **500** | jsonError | - | - -[[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) - -Deletes an 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DeleteOAuth2ClientExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var id = "id_example"; // string | The id of the OAuth 2.0 Client. - - try - { - // Deletes an OAuth 2.0 Client - apiInstance.DeleteOAuth2Client(id); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.DeleteOAuth2Client: " + 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. | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **0** | jsonError | - | - -[[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) - -Delete OAuth2 Access Tokens from a Client - -This endpoint deletes OAuth2 access tokens issued for a client from the database - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DeleteOAuth2TokenExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var clientId = "clientId_example"; // string | - - try - { - // Delete OAuth2 Access Tokens from a Client - apiInstance.DeleteOAuth2Token(clientId); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.DeleteOAuth2Token: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **clientId** | **string**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **401** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **DeleteTrustedJwtGrantIssuer** -> void DeleteTrustedJwtGrantIssuer (string id) - -Delete a 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DeleteTrustedJwtGrantIssuerExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var id = "id_example"; // string | The id of the desired grant - - try - { - // Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - apiInstance.DeleteTrustedJwtGrantIssuer(id); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.DeleteTrustedJwtGrantIssuer: " + 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 | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **404** | genericError | - | -| **500** | genericError | - | - -[[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) - - -# **FlushInactiveOAuth2Tokens** -> void FlushInactiveOAuth2Tokens (HydraFlushInactiveOAuth2TokensRequest body = null) - -Flush Expired OAuth2 Access Tokens - -This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class FlushInactiveOAuth2TokensExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var body = new HydraFlushInactiveOAuth2TokensRequest(); // HydraFlushInactiveOAuth2TokensRequest | (optional) - - try - { - // Flush Expired OAuth2 Access Tokens - apiInstance.FlushInactiveOAuth2Tokens(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.FlushInactiveOAuth2Tokens: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**HydraFlushInactiveOAuth2TokensRequest**](HydraFlushInactiveOAuth2TokensRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **401** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **GetConsentRequest** -> HydraConsentRequest GetConsentRequest (string consentChallenge) - -Get Consent Request Information - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class GetConsentRequestExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var consentChallenge = "consentChallenge_example"; // string | - - try - { - // Get Consent Request Information - HydraConsentRequest result = apiInstance.GetConsentRequest(consentChallenge); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.GetConsentRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| | - -### Return type - -[**HydraConsentRequest**](HydraConsentRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | consentRequest | - | -| **404** | jsonError | - | -| **410** | requestWasHandledResponse | - | -| **500** | jsonError | - | - -[[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 kid, string set) - -Fetch a JSON Web Key - -This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class GetJsonWebKeyExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var kid = "kid_example"; // string | The kid of the desired key - var set = "set_example"; // string | The set - - try - { - // Fetch a JSON Web Key - HydraJSONWebKeySet result = apiInstance.GetJsonWebKey(kid, set); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.GetJsonWebKey: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **string**| The kid of the desired key | - **set** | **string**| The set | - -### Return type - -[**HydraJSONWebKeySet**](HydraJSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | JSONWebKeySet | - | -| **404** | jsonError | - | -| **500** | jsonError | - | - -[[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) - -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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class GetJsonWebKeySetExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var set = "set_example"; // string | The set - - try - { - // Retrieve a JSON Web Key Set - HydraJSONWebKeySet result = apiInstance.GetJsonWebKeySet(set); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.GetJsonWebKeySet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The set | - -### Return type - -[**HydraJSONWebKeySet**](HydraJSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | JSONWebKeySet | - | -| **401** | jsonError | - | -| **403** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **GetLoginRequest** -> HydraLoginRequest GetLoginRequest (string loginChallenge) - -Get a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class GetLoginRequestExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var loginChallenge = "loginChallenge_example"; // string | - - try - { - // Get a Login Request - HydraLoginRequest result = apiInstance.GetLoginRequest(loginChallenge); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.GetLoginRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| | - -### Return type - -[**HydraLoginRequest**](HydraLoginRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | loginRequest | - | -| **400** | jsonError | - | -| **404** | jsonError | - | -| **410** | requestWasHandledResponse | - | -| **500** | jsonError | - | - -[[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) - - -# **GetLogoutRequest** -> HydraLogoutRequest GetLogoutRequest (string logoutChallenge) - -Get a Logout Request - -Use this endpoint to fetch a logout request. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class GetLogoutRequestExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var logoutChallenge = "logoutChallenge_example"; // string | - - try - { - // Get a Logout Request - HydraLogoutRequest result = apiInstance.GetLogoutRequest(logoutChallenge); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.GetLogoutRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | - -### Return type - -[**HydraLogoutRequest**](HydraLogoutRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | logoutRequest | - | -| **404** | jsonError | - | -| **410** | requestWasHandledResponse | - | -| **500** | jsonError | - | - -[[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) - -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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class GetOAuth2ClientExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var id = "id_example"; // string | The id of the OAuth 2.0 Client. - - try - { - // Get an OAuth 2.0 Client - HydraOAuth2Client result = apiInstance.GetOAuth2Client(id); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.GetOAuth2Client: " + 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. | - -### Return type - -[**HydraOAuth2Client**](HydraOAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | oAuth2Client | - | -| **0** | jsonError | - | - -[[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) - - -# **GetTrustedJwtGrantIssuer** -> HydraTrustedJwtGrantIssuer GetTrustedJwtGrantIssuer (string id) - -Get a 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class GetTrustedJwtGrantIssuerExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var id = "id_example"; // string | The id of the desired grant - - try - { - // Get a Trusted OAuth2 JWT Bearer Grant Type Issuer - HydraTrustedJwtGrantIssuer result = apiInstance.GetTrustedJwtGrantIssuer(id); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.GetTrustedJwtGrantIssuer: " + 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 | - -### Return type - -[**HydraTrustedJwtGrantIssuer**](HydraTrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | trustedJwtGrantIssuer | - | -| **404** | genericError | - | -| **500** | genericError | - | - -[[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) - - -# **GetVersion** -> HydraVersion GetVersion () - -Get Service Version - -This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class GetVersionExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - - try - { - // Get Service Version - HydraVersion result = apiInstance.GetVersion(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.GetVersion: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HydraVersion**](HydraVersion.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | version | - | - -[[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** -> HydraOAuth2TokenIntrospection IntrospectOAuth2Token (string token, string scope = null) - -Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class IntrospectOAuth2TokenExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(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) - - try - { - // Introspect OAuth2 Tokens - HydraOAuth2TokenIntrospection result = apiInstance.IntrospectOAuth2Token(token, scope); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.IntrospectOAuth2Token: " + 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] - -### Return type - -[**HydraOAuth2TokenIntrospection**](HydraOAuth2TokenIntrospection.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | oAuth2TokenIntrospection | - | -| **401** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **IsInstanceAlive** -> HydraHealthStatus IsInstanceAlive () - -Check Alive Status - -This endpoint returns a 200 status code when the HTTP server is up running. 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class IsInstanceAliveExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - - try - { - // Check Alive Status - HydraHealthStatus result = apiInstance.IsInstanceAlive(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.IsInstanceAlive: " + 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) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | healthStatus | - | -| **500** | jsonError | - | - -[[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? limit = null, long? offset = null, string clientName = null, string owner = null) - -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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class ListOAuth2ClientsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var limit = 789L; // long? | The maximum amount of clients to returned, upper bound is 500 clients. (optional) - var offset = 789L; // long? | The offset from where to start looking. (optional) - 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 - { - // List OAuth 2.0 Clients - List result = apiInstance.ListOAuth2Clients(limit, offset, clientName, owner); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.ListOAuth2Clients: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **long?**| The maximum amount of clients to returned, upper bound is 500 clients. | [optional] - **offset** | **long?**| The offset from where to start looking. | [optional] - **clientName** | **string**| The name of the clients to filter by. | [optional] - **owner** | **string**| The owner of the clients to filter by. | [optional] - -### Return type - -[**List<HydraOAuth2Client>**](HydraOAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | A list of clients. | - | -| **0** | jsonError | - | - -[[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) - - -# **ListSubjectConsentSessions** -> List<HydraPreviousConsentSession> ListSubjectConsentSessions (string subject) - -Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class ListSubjectConsentSessionsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var subject = "subject_example"; // string | - - try - { - // Lists All Consent Sessions of a Subject - List result = apiInstance.ListSubjectConsentSessions(subject); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.ListSubjectConsentSessions: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| | - -### Return type - -[**List<HydraPreviousConsentSession>**](HydraPreviousConsentSession.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | A list of used consent requests. | - | -| **400** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **ListTrustedJwtGrantIssuers** -> List<HydraTrustedJwtGrantIssuer> ListTrustedJwtGrantIssuers (string issuer = null, long? limit = null, long? offset = null) - -List Trusted OAuth2 JWT Bearer Grant Type Issuers - -Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class ListTrustedJwtGrantIssuersExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var issuer = "issuer_example"; // string | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - var limit = 789L; // long? | The maximum amount of policies returned, upper bound is 500 policies (optional) - var offset = 789L; // long? | The offset from where to start looking. (optional) - - try - { - // List Trusted OAuth2 JWT Bearer Grant Type Issuers - List result = apiInstance.ListTrustedJwtGrantIssuers(issuer, limit, offset); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.ListTrustedJwtGrantIssuers: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **issuer** | **string**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] - **limit** | **long?**| The maximum amount of policies returned, upper bound is 500 policies | [optional] - **offset** | **long?**| The offset from where to start looking. | [optional] - -### Return type - -[**List<HydraTrustedJwtGrantIssuer>**](HydraTrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | trustedJwtGrantIssuers | - | -| **500** | genericError | - | - -[[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 body) - -Patch an OAuth 2.0 Client - -Patch an existing OAuth 2.0 Client. 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class PatchOAuth2ClientExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var id = "id_example"; // string | The id of the OAuth 2.0 Client. - var body = new List(); // List | - - try - { - // Patch an OAuth 2.0 Client - HydraOAuth2Client result = apiInstance.PatchOAuth2Client(id, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.PatchOAuth2Client: " + 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. | - **body** | [**List<HydraPatchDocument>**](HydraPatchDocument.md)| | - -### Return type - -[**HydraOAuth2Client**](HydraOAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | oAuth2Client | - | -| **0** | jsonError | - | - -[[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) - - -# **RejectConsentRequest** -> HydraCompletedRequest RejectConsentRequest (string consentChallenge, HydraRejectRequest body = null) - -Reject a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class RejectConsentRequestExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var consentChallenge = "consentChallenge_example"; // string | - var body = new HydraRejectRequest(); // HydraRejectRequest | (optional) - - try - { - // Reject a Consent Request - HydraCompletedRequest result = apiInstance.RejectConsentRequest(consentChallenge, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.RejectConsentRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| | - **body** | [**HydraRejectRequest**](HydraRejectRequest.md)| | [optional] - -### Return type - -[**HydraCompletedRequest**](HydraCompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | completedRequest | - | -| **404** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **RejectLoginRequest** -> HydraCompletedRequest RejectLoginRequest (string loginChallenge, HydraRejectRequest body = null) - -Reject a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class RejectLoginRequestExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var loginChallenge = "loginChallenge_example"; // string | - var body = new HydraRejectRequest(); // HydraRejectRequest | (optional) - - try - { - // Reject a Login Request - HydraCompletedRequest result = apiInstance.RejectLoginRequest(loginChallenge, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.RejectLoginRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| | - **body** | [**HydraRejectRequest**](HydraRejectRequest.md)| | [optional] - -### Return type - -[**HydraCompletedRequest**](HydraCompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | completedRequest | - | -| **400** | jsonError | - | -| **401** | jsonError | - | -| **404** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **RejectLogoutRequest** -> void RejectLogoutRequest (string logoutChallenge, HydraRejectRequest body = null) - -Reject a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class RejectLogoutRequestExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var logoutChallenge = "logoutChallenge_example"; // string | - var body = new HydraRejectRequest(); // HydraRejectRequest | (optional) - - try - { - // Reject a Logout Request - apiInstance.RejectLogoutRequest(logoutChallenge, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.RejectLogoutRequest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | - **body** | [**HydraRejectRequest**](HydraRejectRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **404** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **RevokeAuthenticationSession** -> void RevokeAuthenticationSession (string subject) - -Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - -This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class RevokeAuthenticationSessionExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var subject = "subject_example"; // string | - - try - { - // Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - apiInstance.RevokeAuthenticationSession(subject); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.RevokeAuthenticationSession: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **400** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **RevokeConsentSessions** -> void RevokeConsentSessions (string subject, string _client = null, bool? all = null) - -Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - -This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class RevokeConsentSessionsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var subject = "subject_example"; // string | The subject (Subject) who's consent sessions should be deleted. - var _client = "_client_example"; // string | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - var all = true; // bool? | If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - - try - { - // Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - apiInstance.RevokeConsentSessions(subject, _client, all); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.RevokeConsentSessions: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| The subject (Subject) who's consent sessions should be deleted. | - **_client** | **string**| If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | [optional] - **all** | **bool?**| If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **400** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **TrustJwtGrantIssuer** -> HydraTrustedJwtGrantIssuer TrustJwtGrantIssuer (HydraTrustJwtGrantIssuerBody body = null) - -Trust an 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). - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class TrustJwtGrantIssuerExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var body = new HydraTrustJwtGrantIssuerBody(); // HydraTrustJwtGrantIssuerBody | (optional) - - try - { - // Trust an OAuth2 JWT Bearer Grant Type Issuer - HydraTrustedJwtGrantIssuer result = apiInstance.TrustJwtGrantIssuer(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.TrustJwtGrantIssuer: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**HydraTrustJwtGrantIssuerBody**](HydraTrustJwtGrantIssuerBody.md)| | [optional] - -### Return type - -[**HydraTrustedJwtGrantIssuer**](HydraTrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | trustedJwtGrantIssuer | - | -| **400** | genericError | - | -| **409** | genericError | - | -| **500** | genericError | - | - -[[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) - - -# **UpdateJsonWebKey** -> HydraJSONWebKey UpdateJsonWebKey (string kid, string set, HydraJSONWebKey body = null) - -Update a 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class UpdateJsonWebKeyExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var kid = "kid_example"; // string | The kid of the desired key - var set = "set_example"; // string | The set - var body = new HydraJSONWebKey(); // HydraJSONWebKey | (optional) - - try - { - // Update a JSON Web Key - HydraJSONWebKey result = apiInstance.UpdateJsonWebKey(kid, set, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.UpdateJsonWebKey: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **string**| The kid of the desired key | - **set** | **string**| The set | - **body** | [**HydraJSONWebKey**](HydraJSONWebKey.md)| | [optional] - -### Return type - -[**HydraJSONWebKey**](HydraJSONWebKey.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | JSONWebKey | - | -| **401** | jsonError | - | -| **403** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **UpdateJsonWebKeySet** -> HydraJSONWebKeySet UpdateJsonWebKeySet (string set, HydraJSONWebKeySet body = null) - -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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class UpdateJsonWebKeySetExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var set = "set_example"; // string | The set - var body = new HydraJSONWebKeySet(); // HydraJSONWebKeySet | (optional) - - try - { - // Update a JSON Web Key Set - HydraJSONWebKeySet result = apiInstance.UpdateJsonWebKeySet(set, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.UpdateJsonWebKeySet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The set | - **body** | [**HydraJSONWebKeySet**](HydraJSONWebKeySet.md)| | [optional] - -### Return type - -[**HydraJSONWebKeySet**](HydraJSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | JSONWebKeySet | - | -| **401** | jsonError | - | -| **403** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **UpdateOAuth2Client** -> HydraOAuth2Client UpdateOAuth2Client (string id, HydraOAuth2Client body) - -Update an OAuth 2.0 Client - -Update an existing OAuth 2.0 Client. 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class UpdateOAuth2ClientExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new AdminApi(config); - var id = "id_example"; // string | The id of the OAuth 2.0 Client. - var body = new HydraOAuth2Client(); // HydraOAuth2Client | - - try - { - // Update an OAuth 2.0 Client - HydraOAuth2Client result = apiInstance.UpdateOAuth2Client(id, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AdminApi.UpdateOAuth2Client: " + 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. | - **body** | [**HydraOAuth2Client**](HydraOAuth2Client.md)| | - -### Return type - -[**HydraOAuth2Client**](HydraOAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | oAuth2Client | - | -| **0** | jsonError | - | - -[[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) - diff --git a/clients/hydra/dotnet/docs/HydraAcceptConsentRequest.md b/clients/hydra/dotnet/docs/HydraAcceptOAuth2ConsentRequest.md similarity index 83% rename from clients/hydra/dotnet/docs/HydraAcceptConsentRequest.md rename to clients/hydra/dotnet/docs/HydraAcceptOAuth2ConsentRequest.md index 833d744e245..0531fca48e8 100644 --- a/clients/hydra/dotnet/docs/HydraAcceptConsentRequest.md +++ b/clients/hydra/dotnet/docs/HydraAcceptOAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraAcceptConsentRequest +# Ory.Hydra.Client.Model.HydraAcceptOAuth2ConsentRequest ## Properties @@ -9,7 +9,7 @@ Name | Type | Description | Notes **HandledAt** | **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] **RememberFor** | **long** | 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** | [**HydraConsentRequestSession**](HydraConsentRequestSession.md) | | [optional] +**Session** | [**HydraAcceptOAuth2ConsentRequestSession**](HydraAcceptOAuth2ConsentRequestSession.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/dotnet/docs/HydraConsentRequestSession.md b/clients/hydra/dotnet/docs/HydraAcceptOAuth2ConsentRequestSession.md similarity index 93% rename from clients/hydra/dotnet/docs/HydraConsentRequestSession.md rename to clients/hydra/dotnet/docs/HydraAcceptOAuth2ConsentRequestSession.md index 4e4c979afc6..d06977d9ac0 100644 --- a/clients/hydra/dotnet/docs/HydraConsentRequestSession.md +++ b/clients/hydra/dotnet/docs/HydraAcceptOAuth2ConsentRequestSession.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraConsentRequestSession +# Ory.Hydra.Client.Model.HydraAcceptOAuth2ConsentRequestSession ## Properties diff --git a/clients/hydra/dotnet/docs/HydraAcceptLoginRequest.md b/clients/hydra/dotnet/docs/HydraAcceptOAuth2LoginRequest.md similarity index 97% rename from clients/hydra/dotnet/docs/HydraAcceptLoginRequest.md rename to clients/hydra/dotnet/docs/HydraAcceptOAuth2LoginRequest.md index 69befd77f85..8bd53ff74a0 100644 --- a/clients/hydra/dotnet/docs/HydraAcceptLoginRequest.md +++ b/clients/hydra/dotnet/docs/HydraAcceptOAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraAcceptLoginRequest +# Ory.Hydra.Client.Model.HydraAcceptOAuth2LoginRequest ## Properties diff --git a/clients/hydra/dotnet/docs/HydraContainerWaitOKBodyError.md b/clients/hydra/dotnet/docs/HydraContainerWaitOKBodyError.md deleted file mode 100644 index b438db258e1..00000000000 --- a/clients/hydra/dotnet/docs/HydraContainerWaitOKBodyError.md +++ /dev/null @@ -1,11 +0,0 @@ -# Ory.Hydra.Client.Model.HydraContainerWaitOKBodyError -ContainerWaitOKBodyError container waiting error, if any - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | Details of an error | [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/HydraCreateJsonWebKeySet.md b/clients/hydra/dotnet/docs/HydraCreateJsonWebKeySet.md new file mode 100644 index 00000000000..9af12ef0a4a --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraCreateJsonWebKeySet.md @@ -0,0 +1,13 @@ +# Ory.Hydra.Client.Model.HydraCreateJsonWebKeySet +Create JSON Web Key Set Request Body + +## Properties + +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\". | + +[[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/HydraErrorOAuth2.md b/clients/hydra/dotnet/docs/HydraErrorOAuth2.md new file mode 100644 index 00000000000..7a41f223884 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraErrorOAuth2.md @@ -0,0 +1,15 @@ +# Ory.Hydra.Client.Model.HydraErrorOAuth2 +Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | Error | [optional] +**ErrorDebug** | **string** | Error Debug Information Only available in dev mode. | [optional] +**ErrorDescription** | **string** | Error Description | [optional] +**ErrorHint** | **string** | Error Hint Helps the user identify the error cause. | [optional] +**StatusCode** | **long** | HTTP Status Code | [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/HydraFlushInactiveOAuth2TokensRequest.md b/clients/hydra/dotnet/docs/HydraFlushInactiveOAuth2TokensRequest.md deleted file mode 100644 index 3887f25d35e..00000000000 --- a/clients/hydra/dotnet/docs/HydraFlushInactiveOAuth2TokensRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# Ory.Hydra.Client.Model.HydraFlushInactiveOAuth2TokensRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NotAfter** | **DateTime** | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. | [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/python/docs/PatchRequest.md b/clients/hydra/dotnet/docs/HydraInlineResponse200.md similarity index 71% rename from clients/hydra/python/docs/PatchRequest.md rename to clients/hydra/dotnet/docs/HydraInlineResponse200.md index c4a22472168..12c6a4d78dd 100644 --- a/clients/hydra/python/docs/PatchRequest.md +++ b/clients/hydra/dotnet/docs/HydraInlineResponse200.md @@ -1,12 +1,10 @@ -# PatchRequest - -A JSONPatch request +# Ory.Hydra.Client.Model.HydraInlineResponse200 ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | [**[PatchDocument]**](PatchDocument.md) | A JSONPatch request | +**Status** | **string** | Always \"ok\". | [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/HydraInlineResponse2001.md b/clients/hydra/dotnet/docs/HydraInlineResponse2001.md new file mode 100644 index 00000000000..14e84d510e4 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraInlineResponse2001.md @@ -0,0 +1,10 @@ +# Ory.Hydra.Client.Model.HydraInlineResponse2001 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_Version** | **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/HydraPluginConfigNetwork.md b/clients/hydra/dotnet/docs/HydraInlineResponse503.md similarity index 60% rename from clients/hydra/dotnet/docs/HydraPluginConfigNetwork.md rename to clients/hydra/dotnet/docs/HydraInlineResponse503.md index 00cf487ae30..ffd2182c17c 100644 --- a/clients/hydra/dotnet/docs/HydraPluginConfigNetwork.md +++ b/clients/hydra/dotnet/docs/HydraInlineResponse503.md @@ -1,11 +1,10 @@ -# Ory.Hydra.Client.Model.HydraPluginConfigNetwork -PluginConfigNetwork plugin config network +# Ory.Hydra.Client.Model.HydraInlineResponse503 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | **string** | type | +**Errors** | **Dictionary<string, string>** | 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/dotnet/docs/HydraOAuth2TokenIntrospection.md b/clients/hydra/dotnet/docs/HydraIntrospectedOAuth2Token.md similarity index 90% rename from clients/hydra/dotnet/docs/HydraOAuth2TokenIntrospection.md rename to clients/hydra/dotnet/docs/HydraIntrospectedOAuth2Token.md index 667b2918957..3d61751f8ff 100644 --- a/clients/hydra/dotnet/docs/HydraOAuth2TokenIntrospection.md +++ b/clients/hydra/dotnet/docs/HydraIntrospectedOAuth2Token.md @@ -1,5 +1,5 @@ -# Ory.Hydra.Client.Model.HydraOAuth2TokenIntrospection -https://tools.ietf.org/html/rfc7662 +# Ory.Hydra.Client.Model.HydraIntrospectedOAuth2Token +Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) ## Properties @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Aud** | **List<string>** | Audience contains a list of the token's intended audiences. | [optional] **ClientId** | **string** | ID is aclient identifier for the OAuth 2.0 client that requested this token. | [optional] **Exp** | **long** | 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** | **Object** | Extra is arbitrary data set by the session. | [optional] +**Ext** | **Dictionary<string, Object>** | Extra is arbitrary data set by the session. | [optional] **Iat** | **long** | 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** | **string** | IssuerURL is a string representing the issuer of this token | [optional] **Nbf** | **long** | 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/dotnet/docs/HydraJSONWebKeySet.md b/clients/hydra/dotnet/docs/HydraJSONWebKeySet.md deleted file mode 100644 index 9510f9fa76b..00000000000 --- a/clients/hydra/dotnet/docs/HydraJSONWebKeySet.md +++ /dev/null @@ -1,11 +0,0 @@ -# Ory.Hydra.Client.Model.HydraJSONWebKeySet -It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Keys** | [**List<HydraJSONWebKey>**](HydraJSONWebKey.md) | The value of the \"keys\" parameter is an array of 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/dotnet/docs/HydraJsonError.md b/clients/hydra/dotnet/docs/HydraJsonError.md deleted file mode 100644 index 2a307126dce..00000000000 --- a/clients/hydra/dotnet/docs/HydraJsonError.md +++ /dev/null @@ -1,14 +0,0 @@ -# Ory.Hydra.Client.Model.HydraJsonError -Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | **string** | Name is the error name. | [optional] -**ErrorDebug** | **string** | Debug contains debug information. This is usually not available and has to be enabled. | [optional] -**ErrorDescription** | **string** | Description contains further information on the nature of the error. | [optional] -**StatusCode** | **long** | Code represents the error status code (404, 403, 401, ...). | [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/HydraJsonPatch.md b/clients/hydra/dotnet/docs/HydraJsonPatch.md new file mode 100644 index 00000000000..c72bf03c85a --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraJsonPatch.md @@ -0,0 +1,14 @@ +# Ory.Hydra.Client.Model.HydraJsonPatch +A JSONPatch document as defined by RFC 6902 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **string** | 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** | **string** | The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". | +**Path** | **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). | +**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] + +[[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/HydraJSONWebKey.md b/clients/hydra/dotnet/docs/HydraJsonWebKey.md similarity index 94% rename from clients/hydra/dotnet/docs/HydraJSONWebKey.md rename to clients/hydra/dotnet/docs/HydraJsonWebKey.md index 1ccf7657d4c..5ede01aeb31 100644 --- a/clients/hydra/dotnet/docs/HydraJSONWebKey.md +++ b/clients/hydra/dotnet/docs/HydraJsonWebKey.md @@ -1,5 +1,4 @@ -# Ory.Hydra.Client.Model.HydraJSONWebKey -It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. +# Ory.Hydra.Client.Model.HydraJsonWebKey ## Properties diff --git a/clients/hydra/dotnet/docs/HydraJsonWebKeySet.md b/clients/hydra/dotnet/docs/HydraJsonWebKeySet.md new file mode 100644 index 00000000000..0a1ba05f177 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraJsonWebKeySet.md @@ -0,0 +1,11 @@ +# Ory.Hydra.Client.Model.HydraJsonWebKeySet +JSON Web Key Set + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Keys** | [**List<HydraJsonWebKey>**](HydraJsonWebKey.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/dotnet/docs/HydraJsonWebKeySetGeneratorRequest.md b/clients/hydra/dotnet/docs/HydraJsonWebKeySetGeneratorRequest.md deleted file mode 100644 index 87bb8898d98..00000000000 --- a/clients/hydra/dotnet/docs/HydraJsonWebKeySetGeneratorRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# Ory.Hydra.Client.Model.HydraJsonWebKeySetGeneratorRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Alg** | **string** | The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" | -**Kid** | **string** | The kid of the key to be created | -**Use** | **string** | 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/dotnet/docs/HydraOAuth2Client.md b/clients/hydra/dotnet/docs/HydraOAuth2Client.md index dc3c2be21af..ad5d2d364ad 100644 --- a/clients/hydra/dotnet/docs/HydraOAuth2Client.md +++ b/clients/hydra/dotnet/docs/HydraOAuth2Client.md @@ -1,4 +1,5 @@ # Ory.Hydra.Client.Model.HydraOAuth2Client +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 @@ -6,39 +7,49 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AllowedCorsOrigins** | **List<string>** | | [optional] **Audience** | **List<string>** | | [optional] -**BackchannelLogoutSessionRequired** | **bool** | 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] -**BackchannelLogoutUri** | **string** | RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. | [optional] -**ClientId** | **string** | ID is the id for this client. | [optional] -**ClientName** | **string** | Name is the human-readable string name of the client to be presented to the end-user during authorization. | [optional] -**ClientSecret** | **string** | Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. | [optional] -**ClientSecretExpiresAt** | **long** | SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. | [optional] -**ClientUri** | **string** | ClientURI is an 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] +**AuthorizationCodeGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**AuthorizationCodeGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**AuthorizationCodeGrantRefreshTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**BackchannelLogoutSessionRequired** | **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] +**BackchannelLogoutUri** | **string** | 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] +**ClientCredentialsGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ClientId** | **string** | OAuth 2.0 Client ID The ID is autogenerated and immutable. | [optional] +**ClientName** | **string** | OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. | [optional] +**ClientSecret** | **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. | [optional] +**ClientSecretExpiresAt** | **long** | OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. | [optional] +**ClientUri** | **string** | 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** | **List<string>** | | [optional] -**CreatedAt** | **DateTime** | CreatedAt returns the timestamp of the client's creation. | [optional] -**FrontchannelLogoutSessionRequired** | **bool** | 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] -**FrontchannelLogoutUri** | **string** | 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] +**CreatedAt** | **DateTime** | OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. | [optional] +**FrontchannelLogoutSessionRequired** | **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] +**FrontchannelLogoutUri** | **string** | 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] **GrantTypes** | **List<string>** | | [optional] -**Jwks** | **Object** | | [optional] -**JwksUri** | **string** | 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] -**LogoUri** | **string** | LogoURI is an URL string that references a logo for the client. | [optional] +**ImplicitGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ImplicitGrantIdTokenLifespan** | **string** | 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] +**JwksUri** | **string** | OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | [optional] +**JwtBearerGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**LogoUri** | **string** | OAuth 2.0 Client Logo URI A URL string referencing the client's logo. | [optional] **Metadata** | **Object** | | [optional] -**Owner** | **string** | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] -**PolicyUri** | **string** | 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] +**Owner** | **string** | OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] +**PolicyUri** | **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. | [optional] **PostLogoutRedirectUris** | **List<string>** | | [optional] **RedirectUris** | **List<string>** | | [optional] -**RegistrationAccessToken** | **string** | RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. | [optional] -**RegistrationClientUri** | **string** | RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] -**RequestObjectSigningAlg** | **string** | 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] +**RefreshTokenGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantRefreshTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RegistrationAccessToken** | **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. | [optional] +**RegistrationClientUri** | **string** | OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] +**RequestObjectSigningAlg** | **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. | [optional] **RequestUris** | **List<string>** | | [optional] **ResponseTypes** | **List<string>** | | [optional] -**Scope** | **string** | 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] -**SectorIdentifierUri** | **string** | 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] -**SubjectType** | **string** | SubjectType requested for responses to this Client. 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] -**TokenEndpointAuthMethod** | **string** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional] -**TokenEndpointAuthSigningAlg** | **string** | Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] -**TosUri** | **string** | TermsOfServiceURI is a URL string that points 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] -**UpdatedAt** | **DateTime** | UpdatedAt returns the timestamp of the last update. | [optional] -**UserinfoSignedResponseAlg** | **string** | 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] +**Scope** | **string** | 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] +**SectorIdentifierUri** | **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. | [optional] +**SubjectType** | **string** | 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] +**TokenEndpointAuthMethod** | **string** | OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] +**TokenEndpointAuthSigningAlg** | **string** | OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] +**TosUri** | **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. | [optional] +**UpdatedAt** | **DateTime** | OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. | [optional] +**UserinfoSignedResponseAlg** | **string** | 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] [[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/HydraOAuth2ClientTokenLifespans.md b/clients/hydra/dotnet/docs/HydraOAuth2ClientTokenLifespans.md new file mode 100644 index 00000000000..2da0df52f67 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraOAuth2ClientTokenLifespans.md @@ -0,0 +1,20 @@ +# Ory.Hydra.Client.Model.HydraOAuth2ClientTokenLifespans +Lifespans of different token types issued for this OAuth 2.0 Client. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthorizationCodeGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**AuthorizationCodeGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**AuthorizationCodeGrantRefreshTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ClientCredentialsGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ImplicitGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ImplicitGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**JwtBearerGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantRefreshTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [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/HydraConsentRequest.md b/clients/hydra/dotnet/docs/HydraOAuth2ConsentRequest.md similarity index 93% rename from clients/hydra/dotnet/docs/HydraConsentRequest.md rename to clients/hydra/dotnet/docs/HydraOAuth2ConsentRequest.md index 140f9573256..db7c6efe61e 100644 --- a/clients/hydra/dotnet/docs/HydraConsentRequest.md +++ b/clients/hydra/dotnet/docs/HydraOAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraConsentRequest +# Ory.Hydra.Client.Model.HydraOAuth2ConsentRequest ## Properties @@ -11,7 +11,7 @@ Name | Type | Description | Notes **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] -**OidcContext** | [**HydraOpenIDConnectContext**](HydraOpenIDConnectContext.md) | | [optional] +**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. | [optional] **RequestedAccessTokenAudience** | **List<string>** | | [optional] **RequestedScope** | **List<string>** | | [optional] diff --git a/clients/hydra/dotnet/docs/HydraOpenIDConnectContext.md b/clients/hydra/dotnet/docs/HydraOAuth2ConsentRequestOpenIDConnectContext.md similarity index 90% rename from clients/hydra/dotnet/docs/HydraOpenIDConnectContext.md rename to clients/hydra/dotnet/docs/HydraOAuth2ConsentRequestOpenIDConnectContext.md index a67c4d65e4b..4b95d4ace0c 100644 --- a/clients/hydra/dotnet/docs/HydraOpenIDConnectContext.md +++ b/clients/hydra/dotnet/docs/HydraOAuth2ConsentRequestOpenIDConnectContext.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraOpenIDConnectContext +# Ory.Hydra.Client.Model.HydraOAuth2ConsentRequestOpenIDConnectContext ## Properties @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AcrValues** | **List<string>** | 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** | **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] -**IdTokenHintClaims** | **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] +**IdTokenHintClaims** | **Dictionary<string, 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] **LoginHint** | **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] **UiLocales** | **List<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. | [optional] diff --git a/clients/hydra/dotnet/docs/HydraOAuth2ConsentSession.md b/clients/hydra/dotnet/docs/HydraOAuth2ConsentSession.md new file mode 100644 index 00000000000..867dd60005c --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraOAuth2ConsentSession.md @@ -0,0 +1,18 @@ +# Ory.Hydra.Client.Model.HydraOAuth2ConsentSession +A completed OAuth 2.0 Consent Session. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ConsentRequest** | [**HydraOAuth2ConsentRequest**](HydraOAuth2ConsentRequest.md) | | [optional] +**ExpiresAt** | [**HydraOAuth2ConsentSessionExpiresAt**](HydraOAuth2ConsentSessionExpiresAt.md) | | [optional] +**GrantAccessTokenAudience** | **List<string>** | | [optional] +**GrantScope** | **List<string>** | | [optional] +**HandledAt** | **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] +**RememberFor** | **long** | 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** | [**HydraAcceptOAuth2ConsentRequestSession**](HydraAcceptOAuth2ConsentRequestSession.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/dotnet/docs/HydraOAuth2ConsentSessionExpiresAt.md b/clients/hydra/dotnet/docs/HydraOAuth2ConsentSessionExpiresAt.md new file mode 100644 index 00000000000..ce9ab2df768 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraOAuth2ConsentSessionExpiresAt.md @@ -0,0 +1,14 @@ +# Ory.Hydra.Client.Model.HydraOAuth2ConsentSessionExpiresAt + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | **DateTime** | | [optional] +**AuthorizeCode** | **DateTime** | | [optional] +**IdToken** | **DateTime** | | [optional] +**ParContext** | **DateTime** | | [optional] +**RefreshToken** | **DateTime** | | [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/HydraLoginRequest.md b/clients/hydra/dotnet/docs/HydraOAuth2LoginRequest.md similarity index 91% rename from clients/hydra/dotnet/docs/HydraLoginRequest.md rename to clients/hydra/dotnet/docs/HydraOAuth2LoginRequest.md index 5b297e3aecc..633f6d6eadd 100644 --- a/clients/hydra/dotnet/docs/HydraLoginRequest.md +++ b/clients/hydra/dotnet/docs/HydraOAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraLoginRequest +# Ory.Hydra.Client.Model.HydraOAuth2LoginRequest ## Properties @@ -6,7 +6,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) | | -**OidcContext** | [**HydraOpenIDConnectContext**](HydraOpenIDConnectContext.md) | | [optional] +**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>** | | **RequestedScope** | **List<string>** | | diff --git a/clients/hydra/dotnet/docs/HydraLogoutRequest.md b/clients/hydra/dotnet/docs/HydraOAuth2LogoutRequest.md similarity index 95% rename from clients/hydra/dotnet/docs/HydraLogoutRequest.md rename to clients/hydra/dotnet/docs/HydraOAuth2LogoutRequest.md index 7e2db7cba5e..6c5bf7acfb5 100644 --- a/clients/hydra/dotnet/docs/HydraLogoutRequest.md +++ b/clients/hydra/dotnet/docs/HydraOAuth2LogoutRequest.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraLogoutRequest +# Ory.Hydra.Client.Model.HydraOAuth2LogoutRequest ## Properties diff --git a/clients/hydra/dotnet/docs/HydraCompletedRequest.md b/clients/hydra/dotnet/docs/HydraOAuth2RedirectTo.md similarity index 61% rename from clients/hydra/dotnet/docs/HydraCompletedRequest.md rename to clients/hydra/dotnet/docs/HydraOAuth2RedirectTo.md index 700eb728be8..55a9a9a32c3 100644 --- a/clients/hydra/dotnet/docs/HydraCompletedRequest.md +++ b/clients/hydra/dotnet/docs/HydraOAuth2RedirectTo.md @@ -1,10 +1,11 @@ -# Ory.Hydra.Client.Model.HydraCompletedRequest +# Ory.Hydra.Client.Model.HydraOAuth2RedirectTo +Contains a redirect URL used to complete a login, consent, or logout request. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**RedirectTo** | **string** | RedirectURL is the URL which you should redirect the user to once the authentication process is completed. | +**RedirectTo** | **string** | RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. | [[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/HydraOAuth2TokenExchange.md b/clients/hydra/dotnet/docs/HydraOAuth2TokenExchange.md new file mode 100644 index 00000000000..aee8c7006e2 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraOAuth2TokenExchange.md @@ -0,0 +1,16 @@ +# Ory.Hydra.Client.Model.HydraOAuth2TokenExchange +OAuth2 Token Exchange Result + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | **string** | The access token issued by the authorization server. | [optional] +**ExpiresIn** | **long** | 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] +**IdToken** | **long** | To retrieve a refresh token request the id_token scope. | [optional] +**RefreshToken** | **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. | [optional] +**Scope** | **long** | The scope of the access token | [optional] +**TokenType** | **string** | The type of the token issued | [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/HydraOauth2TokenResponse.md b/clients/hydra/dotnet/docs/HydraOauth2TokenResponse.md deleted file mode 100644 index 03ae76062f9..00000000000 --- a/clients/hydra/dotnet/docs/HydraOauth2TokenResponse.md +++ /dev/null @@ -1,16 +0,0 @@ -# Ory.Hydra.Client.Model.HydraOauth2TokenResponse -The Access Token Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccessToken** | **string** | | [optional] -**ExpiresIn** | **long** | | [optional] -**IdToken** | **string** | | [optional] -**RefreshToken** | **string** | | [optional] -**Scope** | **string** | | [optional] -**TokenType** | **string** | | [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/HydraOidcConfiguration.md b/clients/hydra/dotnet/docs/HydraOidcConfiguration.md new file mode 100644 index 00000000000..4cd5e7cdcac --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraOidcConfiguration.md @@ -0,0 +1,39 @@ +# Ory.Hydra.Client.Model.HydraOidcConfiguration +Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthorizationEndpoint** | **string** | OAuth 2.0 Authorization Endpoint URL | +**BackchannelLogoutSessionSupported** | **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] +**BackchannelLogoutSupported** | **bool** | OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] +**ClaimsParameterSupported** | **bool** | OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] +**ClaimsSupported** | **List<string>** | 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] +**CodeChallengeMethodsSupported** | **List<string>** | 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] +**EndSessionEndpoint** | **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] +**FrontchannelLogoutSessionSupported** | **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] +**FrontchannelLogoutSupported** | **bool** | OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] +**GrantTypesSupported** | **List<string>** | OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] +**IdTokenSignedResponseAlg** | **List<string>** | OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. | +**IdTokenSigningAlgValuesSupported** | **List<string>** | 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** | **string** | 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. | +**JwksUri** | **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. | +**RegistrationEndpoint** | **string** | OpenID Connect Dynamic Client Registration Endpoint URL | [optional] +**RequestObjectSigningAlgValuesSupported** | **List<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). | [optional] +**RequestParameterSupported** | **bool** | OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] +**RequestUriParameterSupported** | **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] +**RequireRequestUriRegistration** | **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] +**ResponseModesSupported** | **List<string>** | OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] +**ResponseTypesSupported** | **List<string>** | 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. | +**RevocationEndpoint** | **string** | OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] +**ScopesSupported** | **List<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 | [optional] +**SubjectTypesSupported** | **List<string>** | 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. | +**TokenEndpoint** | **string** | OAuth 2.0 Token Endpoint URL | +**TokenEndpointAuthMethodsSupported** | **List<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 | [optional] +**UserinfoEndpoint** | **string** | OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. | [optional] +**UserinfoSignedResponseAlg** | **List<string>** | OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. | +**UserinfoSigningAlgValuesSupported** | **List<string>** | 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] + +[[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/HydraUserinfoResponse.md b/clients/hydra/dotnet/docs/HydraOidcUserInfo.md similarity index 98% rename from clients/hydra/dotnet/docs/HydraUserinfoResponse.md rename to clients/hydra/dotnet/docs/HydraOidcUserInfo.md index ddd10024ba6..a1f5c4c8454 100644 --- a/clients/hydra/dotnet/docs/HydraUserinfoResponse.md +++ b/clients/hydra/dotnet/docs/HydraOidcUserInfo.md @@ -1,5 +1,5 @@ -# Ory.Hydra.Client.Model.HydraUserinfoResponse -The userinfo response +# Ory.Hydra.Client.Model.HydraOidcUserInfo +OpenID Connect Userinfo ## Properties diff --git a/clients/hydra/dotnet/docs/HydraPagination.md b/clients/hydra/dotnet/docs/HydraPagination.md new file mode 100644 index 00000000000..9e3121fe114 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraPagination.md @@ -0,0 +1,11 @@ +# Ory.Hydra.Client.Model.HydraPagination + +## Properties + +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"] + +[[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/HydraPaginationHeaders.md b/clients/hydra/dotnet/docs/HydraPaginationHeaders.md new file mode 100644 index 00000000000..956961853b4 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraPaginationHeaders.md @@ -0,0 +1,11 @@ +# Ory.Hydra.Client.Model.HydraPaginationHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Link** | **string** | 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] +**XTotalCount** | **string** | The total number of clients. in: header | [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/HydraPatchDocument.md b/clients/hydra/dotnet/docs/HydraPatchDocument.md deleted file mode 100644 index 25612c06b08..00000000000 --- a/clients/hydra/dotnet/docs/HydraPatchDocument.md +++ /dev/null @@ -1,14 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPatchDocument -A JSONPatch document as defined by RFC 6902 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | **string** | A JSON-pointer | [optional] -**Op** | **string** | The operation to be performed | -**Path** | **string** | A JSON-pointer | -**Value** | **Object** | The value to be used within the operations | [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/HydraPluginConfig.md b/clients/hydra/dotnet/docs/HydraPluginConfig.md deleted file mode 100644 index eedd0330966..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginConfig.md +++ /dev/null @@ -1,25 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Args** | [**HydraPluginConfigArgs**](HydraPluginConfigArgs.md) | | -**Description** | **string** | description | -**DockerVersion** | **string** | Docker Version used to create the plugin | [optional] -**Documentation** | **string** | documentation | -**Entrypoint** | **List<string>** | entrypoint | -**Env** | [**List<HydraPluginEnv>**](HydraPluginEnv.md) | env | -**Interface** | [**HydraPluginConfigInterface**](HydraPluginConfigInterface.md) | | -**IpcHost** | **bool** | ipc host | -**Linux** | [**HydraPluginConfigLinux**](HydraPluginConfigLinux.md) | | -**Mounts** | [**List<HydraPluginMount>**](HydraPluginMount.md) | mounts | -**Network** | [**HydraPluginConfigNetwork**](HydraPluginConfigNetwork.md) | | -**PidHost** | **bool** | pid host | -**PropagatedMount** | **string** | propagated mount | -**User** | [**HydraPluginConfigUser**](HydraPluginConfigUser.md) | | [optional] -**WorkDir** | **string** | work dir | -**Rootfs** | [**HydraPluginConfigRootfs**](HydraPluginConfigRootfs.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/dotnet/docs/HydraPluginConfigArgs.md b/clients/hydra/dotnet/docs/HydraPluginConfigArgs.md deleted file mode 100644 index b347d7ca233..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginConfigArgs.md +++ /dev/null @@ -1,14 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginConfigArgs -PluginConfigArgs plugin config args - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | description | -**Name** | **string** | name | -**Settable** | **List<string>** | settable | -**Value** | **List<string>** | value | - -[[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/HydraPluginConfigInterface.md b/clients/hydra/dotnet/docs/HydraPluginConfigInterface.md deleted file mode 100644 index 7cda8a6e7a4..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginConfigInterface.md +++ /dev/null @@ -1,13 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginConfigInterface -PluginConfigInterface The interface between Docker and the plugin - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ProtocolScheme** | **string** | Protocol to use for clients connecting to the plugin. | [optional] -**Socket** | **string** | socket | -**Types** | [**List<HydraPluginInterfaceType>**](HydraPluginInterfaceType.md) | types | - -[[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/HydraPluginConfigLinux.md b/clients/hydra/dotnet/docs/HydraPluginConfigLinux.md deleted file mode 100644 index 429d5874efb..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginConfigLinux.md +++ /dev/null @@ -1,13 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginConfigLinux -PluginConfigLinux plugin config linux - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AllowAllDevices** | **bool** | allow all devices | -**Capabilities** | **List<string>** | capabilities | -**Devices** | [**List<HydraPluginDevice>**](HydraPluginDevice.md) | devices | - -[[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/HydraPluginConfigRootfs.md b/clients/hydra/dotnet/docs/HydraPluginConfigRootfs.md deleted file mode 100644 index 8bba8ba84f4..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginConfigRootfs.md +++ /dev/null @@ -1,12 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginConfigRootfs -PluginConfigRootfs plugin config rootfs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DiffIds** | **List<string>** | diff ids | [optional] -**Type** | **string** | type | [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/HydraPluginConfigUser.md b/clients/hydra/dotnet/docs/HydraPluginConfigUser.md deleted file mode 100644 index b8763456e0c..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginConfigUser.md +++ /dev/null @@ -1,12 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginConfigUser -PluginConfigUser plugin config user - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**GID** | **int** | g ID | [optional] -**UID** | **int** | UID | [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/HydraPluginDevice.md b/clients/hydra/dotnet/docs/HydraPluginDevice.md deleted file mode 100644 index 48c5dc9262f..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginDevice.md +++ /dev/null @@ -1,14 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginDevice -PluginDevice plugin device - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | description | -**Name** | **string** | name | -**Path** | **string** | path | -**Settable** | **List<string>** | settable | - -[[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/HydraPluginEnv.md b/clients/hydra/dotnet/docs/HydraPluginEnv.md deleted file mode 100644 index a5ce12561e5..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginEnv.md +++ /dev/null @@ -1,14 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginEnv -PluginEnv plugin env - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | description | -**Name** | **string** | name | -**Settable** | **List<string>** | settable | -**Value** | **string** | value | - -[[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/HydraPluginInterfaceType.md b/clients/hydra/dotnet/docs/HydraPluginInterfaceType.md deleted file mode 100644 index a9f1d95cf89..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginInterfaceType.md +++ /dev/null @@ -1,13 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginInterfaceType -PluginInterfaceType plugin interface type - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Capability** | **string** | capability | -**Prefix** | **string** | prefix | -**_Version** | **string** | version | - -[[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/HydraPluginMount.md b/clients/hydra/dotnet/docs/HydraPluginMount.md deleted file mode 100644 index 65601db4196..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginMount.md +++ /dev/null @@ -1,17 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginMount -PluginMount plugin mount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | description | -**Destination** | **string** | destination | -**Name** | **string** | name | -**Options** | **List<string>** | options | -**Settable** | **List<string>** | settable | -**Source** | **string** | source | -**Type** | **string** | type | - -[[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/HydraPluginSettings.md b/clients/hydra/dotnet/docs/HydraPluginSettings.md deleted file mode 100644 index 6a7314969b8..00000000000 --- a/clients/hydra/dotnet/docs/HydraPluginSettings.md +++ /dev/null @@ -1,13 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPluginSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Args** | **List<string>** | args | -**Devices** | [**List<HydraPluginDevice>**](HydraPluginDevice.md) | devices | -**Env** | **List<string>** | env | -**Mounts** | [**List<HydraPluginMount>**](HydraPluginMount.md) | mounts | - -[[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/HydraPreviousConsentSession.md b/clients/hydra/dotnet/docs/HydraPreviousConsentSession.md deleted file mode 100644 index 03ab1fa195d..00000000000 --- a/clients/hydra/dotnet/docs/HydraPreviousConsentSession.md +++ /dev/null @@ -1,17 +0,0 @@ -# Ory.Hydra.Client.Model.HydraPreviousConsentSession -The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ConsentRequest** | [**HydraConsentRequest**](HydraConsentRequest.md) | | [optional] -**GrantAccessTokenAudience** | **List<string>** | | [optional] -**GrantScope** | **List<string>** | | [optional] -**HandledAt** | **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] -**RememberFor** | **long** | 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** | [**HydraConsentRequestSession**](HydraConsentRequestSession.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/dotnet/docs/HydraRejectRequest.md b/clients/hydra/dotnet/docs/HydraRejectOAuth2Request.md similarity index 94% rename from clients/hydra/dotnet/docs/HydraRejectRequest.md rename to clients/hydra/dotnet/docs/HydraRejectOAuth2Request.md index a30964015b2..bc8ede30397 100644 --- a/clients/hydra/dotnet/docs/HydraRejectRequest.md +++ b/clients/hydra/dotnet/docs/HydraRejectOAuth2Request.md @@ -1,4 +1,4 @@ -# Ory.Hydra.Client.Model.HydraRejectRequest +# Ory.Hydra.Client.Model.HydraRejectOAuth2Request ## Properties diff --git a/clients/hydra/dotnet/docs/HydraRequestWasHandledResponse.md b/clients/hydra/dotnet/docs/HydraRequestWasHandledResponse.md deleted file mode 100644 index 6aa2a019749..00000000000 --- a/clients/hydra/dotnet/docs/HydraRequestWasHandledResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# Ory.Hydra.Client.Model.HydraRequestWasHandledResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RedirectTo** | **string** | Original request URL to which you should redirect the user if request was already handled. | - -[[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/HydraTokenPagination.md b/clients/hydra/dotnet/docs/HydraTokenPagination.md new file mode 100644 index 00000000000..c49dac59a2b --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraTokenPagination.md @@ -0,0 +1,11 @@ +# Ory.Hydra.Client.Model.HydraTokenPagination + +## Properties + +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"] + +[[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/HydraTokenPaginationHeaders.md b/clients/hydra/dotnet/docs/HydraTokenPaginationHeaders.md new file mode 100644 index 00000000000..02cf522d227 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraTokenPaginationHeaders.md @@ -0,0 +1,11 @@ +# Ory.Hydra.Client.Model.HydraTokenPaginationHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Link** | **string** | 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] +**XTotalCount** | **string** | The total number of clients. in: header | [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/HydraTokenPaginationRequestParameters.md b/clients/hydra/dotnet/docs/HydraTokenPaginationRequestParameters.md new file mode 100644 index 00000000000..0e4a5a19b99 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraTokenPaginationRequestParameters.md @@ -0,0 +1,12 @@ +# Ory.Hydra.Client.Model.HydraTokenPaginationRequestParameters +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 +------------ | ------------- | ------------- | ------------- +**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"] + +[[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/HydraTokenPaginationResponseHeaders.md b/clients/hydra/dotnet/docs/HydraTokenPaginationResponseHeaders.md new file mode 100644 index 00000000000..dddaadadad6 --- /dev/null +++ b/clients/hydra/dotnet/docs/HydraTokenPaginationResponseHeaders.md @@ -0,0 +1,12 @@ +# Ory.Hydra.Client.Model.HydraTokenPaginationResponseHeaders +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** | **string** | 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=20>; rel=\"last\" | [optional] +**XTotalCount** | **long** | The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. | [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/HydraTrustJwtGrantIssuerBody.md b/clients/hydra/dotnet/docs/HydraTrustOAuth2JwtGrantIssuer.md similarity index 67% rename from clients/hydra/dotnet/docs/HydraTrustJwtGrantIssuerBody.md rename to clients/hydra/dotnet/docs/HydraTrustOAuth2JwtGrantIssuer.md index 94df9f9a3e5..360cf85b1b4 100644 --- a/clients/hydra/dotnet/docs/HydraTrustJwtGrantIssuerBody.md +++ b/clients/hydra/dotnet/docs/HydraTrustOAuth2JwtGrantIssuer.md @@ -1,14 +1,16 @@ -# Ory.Hydra.Client.Model.HydraTrustJwtGrantIssuerBody +# Ory.Hydra.Client.Model.HydraTrustOAuth2JwtGrantIssuer +Trust OAuth2 JWT Bearer Grant Type Issuer Request Body ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**AllowAnySubject** | **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] **ExpiresAt** | **DateTime** | 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** | [**HydraJSONWebKey**](HydraJSONWebKey.md) | | +**Jwk** | [**HydraJsonWebKey**](HydraJsonWebKey.md) | | **Scope** | **List<string>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | -**Subject** | **string** | The \"subject\" identifies the principal that is the subject of the JWT. | +**Subject** | **string** | The \"subject\" identifies the principal that is the subject of the JWT. | [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/HydraTrustedJwtGrantIssuer.md b/clients/hydra/dotnet/docs/HydraTrustedOAuth2JwtGrantIssuer.md similarity index 72% rename from clients/hydra/dotnet/docs/HydraTrustedJwtGrantIssuer.md rename to clients/hydra/dotnet/docs/HydraTrustedOAuth2JwtGrantIssuer.md index 650b5f87f89..3993540f367 100644 --- a/clients/hydra/dotnet/docs/HydraTrustedJwtGrantIssuer.md +++ b/clients/hydra/dotnet/docs/HydraTrustedOAuth2JwtGrantIssuer.md @@ -1,14 +1,16 @@ -# Ory.Hydra.Client.Model.HydraTrustedJwtGrantIssuer +# Ory.Hydra.Client.Model.HydraTrustedOAuth2JwtGrantIssuer +OAuth2 JWT Bearer Grant Type Issuer Trust Relationship ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**AllowAnySubject** | **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] **CreatedAt** | **DateTime** | The \"created_at\" indicates, when grant was created. | [optional] **ExpiresAt** | **DateTime** | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | [optional] **Id** | **string** | | [optional] **Issuer** | **string** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] -**PublicKey** | [**HydraTrustedJsonWebKey**](HydraTrustedJsonWebKey.md) | | [optional] +**PublicKey** | [**HydraTrustedOAuth2JwtGrantJsonWebKey**](HydraTrustedOAuth2JwtGrantJsonWebKey.md) | | [optional] **Scope** | **List<string>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] **Subject** | **string** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] diff --git a/clients/hydra/dotnet/docs/HydraTrustedJsonWebKey.md b/clients/hydra/dotnet/docs/HydraTrustedOAuth2JwtGrantJsonWebKey.md similarity index 82% rename from clients/hydra/dotnet/docs/HydraTrustedJsonWebKey.md rename to clients/hydra/dotnet/docs/HydraTrustedOAuth2JwtGrantJsonWebKey.md index fd0c51d982e..888a01e0b1e 100644 --- a/clients/hydra/dotnet/docs/HydraTrustedJsonWebKey.md +++ b/clients/hydra/dotnet/docs/HydraTrustedOAuth2JwtGrantJsonWebKey.md @@ -1,4 +1,5 @@ -# Ory.Hydra.Client.Model.HydraTrustedJsonWebKey +# Ory.Hydra.Client.Model.HydraTrustedOAuth2JwtGrantJsonWebKey +OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key ## Properties diff --git a/clients/hydra/dotnet/docs/HydraVolume.md b/clients/hydra/dotnet/docs/HydraVolume.md deleted file mode 100644 index b0e47f5ee9c..00000000000 --- a/clients/hydra/dotnet/docs/HydraVolume.md +++ /dev/null @@ -1,19 +0,0 @@ -# Ory.Hydra.Client.Model.HydraVolume -Volume volume - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **string** | Date/Time the volume was created. | [optional] -**Driver** | **string** | Name of the volume driver used by the volume. | -**Labels** | **Dictionary<string, string>** | User-defined key/value metadata. | -**Mountpoint** | **string** | Mount path of the volume on the host. | -**Name** | **string** | Name of the volume. | -**Options** | **Dictionary<string, string>** | The driver specific options used when creating the volume. | -**Scope** | **string** | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | -**Status** | **Object** | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. | [optional] -**UsageData** | [**HydraVolumeUsageData**](HydraVolumeUsageData.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/dotnet/docs/HydraVolumeUsageData.md b/clients/hydra/dotnet/docs/HydraVolumeUsageData.md deleted file mode 100644 index 53f22d0cc74..00000000000 --- a/clients/hydra/dotnet/docs/HydraVolumeUsageData.md +++ /dev/null @@ -1,12 +0,0 @@ -# Ory.Hydra.Client.Model.HydraVolumeUsageData -VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RefCount** | **long** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | -**Size** | **long** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | - -[[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/HydraWellKnown.md b/clients/hydra/dotnet/docs/HydraWellKnown.md deleted file mode 100644 index 5d14715f474..00000000000 --- a/clients/hydra/dotnet/docs/HydraWellKnown.md +++ /dev/null @@ -1,37 +0,0 @@ -# Ory.Hydra.Client.Model.HydraWellKnown -It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuthorizationEndpoint** | **string** | URL of the OP's OAuth 2.0 Authorization Endpoint. | -**BackchannelLogoutSessionSupported** | **bool** | 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] -**BackchannelLogoutSupported** | **bool** | Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] -**ClaimsParameterSupported** | **bool** | Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] -**ClaimsSupported** | **List<string>** | 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] -**CodeChallengeMethodsSupported** | **List<string>** | JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] -**EndSessionEndpoint** | **string** | 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] -**FrontchannelLogoutSessionSupported** | **bool** | 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] -**FrontchannelLogoutSupported** | **bool** | Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] -**GrantTypesSupported** | **List<string>** | JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] -**IdTokenSigningAlgValuesSupported** | **List<string>** | 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** | **string** | 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. | -**JwksUri** | **string** | 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. | -**RegistrationEndpoint** | **string** | URL of the OP's Dynamic Client Registration Endpoint. | [optional] -**RequestObjectSigningAlgValuesSupported** | **List<string>** | 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] -**RequestParameterSupported** | **bool** | Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] -**RequestUriParameterSupported** | **bool** | Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] -**RequireRequestUriRegistration** | **bool** | Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. | [optional] -**ResponseModesSupported** | **List<string>** | JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] -**ResponseTypesSupported** | **List<string>** | 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. | -**RevocationEndpoint** | **string** | URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] -**ScopesSupported** | **List<string>** | SON 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] -**SubjectTypesSupported** | **List<string>** | JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | -**TokenEndpoint** | **string** | URL of the OP's OAuth 2.0 Token Endpoint | -**TokenEndpointAuthMethodsSupported** | **List<string>** | 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] -**UserinfoEndpoint** | **string** | URL of the OP's UserInfo Endpoint. | [optional] -**UserinfoSigningAlgValuesSupported** | **List<string>** | 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] - -[[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 new file mode 100644 index 00000000000..a072d577202 --- /dev/null +++ b/clients/hydra/dotnet/docs/JwkApi.md @@ -0,0 +1,529 @@ +# Ory.Hydra.Client.Api.JwkApi + +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 + + + +# **CreateJsonWebKeySet** +> HydraJsonWebKeySet CreateJsonWebKeySet (string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class CreateJsonWebKeySetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new JwkApi(config); + var set = "set_example"; // string | The JSON Web Key Set ID + var hydraCreateJsonWebKeySet = new HydraCreateJsonWebKeySet(); // HydraCreateJsonWebKeySet | + + try + { + // Create JSON Web Key + HydraJsonWebKeySet result = apiInstance.CreateJsonWebKeySet(set, hydraCreateJsonWebKeySet); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JwkApi.CreateJsonWebKeySet: " + 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)| | + +### Return type + +[**HydraJsonWebKeySet**](HydraJsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class DeleteJsonWebKeyExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new JwkApi(config); + var set = "set_example"; // string | The JSON Web Key Set + var kid = "kid_example"; // string | The JSON Web Key ID (kid) + + try + { + // Delete JSON Web Key + apiInstance.DeleteJsonWebKey(set, kid); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JwkApi.DeleteJsonWebKey: " + 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) | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class DeleteJsonWebKeySetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new JwkApi(config); + var set = "set_example"; // string | The JSON Web Key Set + + try + { + // Delete JSON Web Key Set + apiInstance.DeleteJsonWebKeySet(set); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JwkApi.DeleteJsonWebKeySet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set** | **string**| The JSON Web Key Set | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | errorOAuth2 | - | + +[[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) + +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). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class GetJsonWebKeyExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new JwkApi(config); + var set = "set_example"; // string | JSON Web Key Set ID + var kid = "kid_example"; // string | JSON Web Key ID + + try + { + // Get JSON Web Key + HydraJsonWebKeySet result = apiInstance.GetJsonWebKey(set, kid); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JwkApi.GetJsonWebKey: " + 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 | + +### Return type + +[**HydraJsonWebKeySet**](HydraJsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class GetJsonWebKeySetExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new JwkApi(config); + var set = "set_example"; // string | JSON Web Key Set ID + + try + { + // Retrieve a JSON Web Key Set + HydraJsonWebKeySet result = apiInstance.GetJsonWebKeySet(set); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JwkApi.GetJsonWebKeySet: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set** | **string**| JSON Web Key Set ID | + +### Return type + +[**HydraJsonWebKeySet**](HydraJsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class SetJsonWebKeyExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + 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) + + try + { + // Set JSON Web Key + HydraJsonWebKey result = apiInstance.SetJsonWebKey(set, kid, hydraJsonWebKey); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JwkApi.SetJsonWebKey: " + 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] + +### Return type + +[**HydraJsonWebKey**](HydraJsonWebKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKey | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class SetJsonWebKeySetExample + { + public static void Main() + { + Configuration config = new Configuration(); + 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) + + try + { + // Update a JSON Web Key Set + HydraJsonWebKeySet result = apiInstance.SetJsonWebKeySet(set, hydraJsonWebKeySet); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling JwkApi.SetJsonWebKeySet: " + 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] + +### Return type + +[**HydraJsonWebKeySet**](HydraJsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + +[[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) + diff --git a/clients/hydra/dotnet/docs/MetadataApi.md b/clients/hydra/dotnet/docs/MetadataApi.md index f6ec2e64c6d..61d3704fdd5 100644 --- a/clients/hydra/dotnet/docs/MetadataApi.md +++ b/clients/hydra/dotnet/docs/MetadataApi.md @@ -4,16 +4,18 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**Prometheus**](MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +[**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 - -# **Prometheus** -> void Prometheus () + +# **GetVersion** +> HydraInlineResponse2001 GetVersion () -Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +Return Running Software Version. -``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` +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. ### Example ```csharp @@ -25,7 +27,7 @@ using Ory.Hydra.Client.Model; namespace Example { - public class PrometheusExample + public class GetVersionExample { public static void Main() { @@ -35,12 +37,13 @@ namespace Example try { - // Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - apiInstance.Prometheus(); + // Return Running Software Version. + HydraInlineResponse2001 result = apiInstance.GetVersion(); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling MetadataApi.Prometheus: " + e.Message ); + Debug.Print("Exception when calling MetadataApi.GetVersion: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -54,7 +57,7 @@ This endpoint does not need any parameter. ### Return type -void (empty response body) +[**HydraInlineResponse2001**](HydraInlineResponse2001.md) ### Authorization @@ -63,13 +66,149 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **200** | Returns the Ory Hydra version. | - | + +[[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 () + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class IsAliveExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new MetadataApi(config); + + try + { + // Check HTTP Server Status + HydraHealthStatus result = apiInstance.IsAlive(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MetadataApi.IsAlive: " + 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) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ory Hydra is ready to accept connections. | - | +| **500** | genericError | - | + +[[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 () + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class IsReadyExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new MetadataApi(config); + + try + { + // Check HTTP Server and Database Status + HydraInlineResponse200 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(e.StackTrace); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HydraInlineResponse200**](HydraInlineResponse200.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ory Hydra is ready to accept requests. | - | +| **503** | Ory Kratos is not yet ready to accept requests. | - | [[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) diff --git a/clients/hydra/dotnet/docs/OAuth2Api.md b/clients/hydra/dotnet/docs/OAuth2Api.md new file mode 100644 index 00000000000..8d4275ed46d --- /dev/null +++ b/clients/hydra/dotnet/docs/OAuth2Api.md @@ -0,0 +1,2102 @@ +# Ory.Hydra.Client.Api.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 All OAuth 2.0 Login Sessions of a Subject +[**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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class AcceptOAuth2ConsentRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + 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) + + try + { + // Accept OAuth 2.0 Consent Request + HydraOAuth2RedirectTo result = apiInstance.AcceptOAuth2ConsentRequest(consentChallenge, hydraAcceptOAuth2ConsentRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2ConsentRequest: " + 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] + +### Return type + +[**HydraOAuth2RedirectTo**](HydraOAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class AcceptOAuth2LoginRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + 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) + + try + { + // Accept OAuth 2.0 Login Request + HydraOAuth2RedirectTo result = apiInstance.AcceptOAuth2LoginRequest(loginChallenge, hydraAcceptOAuth2LoginRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2LoginRequest: " + 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] + +### Return type + +[**HydraOAuth2RedirectTo**](HydraOAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class AcceptOAuth2LogoutRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var logoutChallenge = "logoutChallenge_example"; // string | OAuth 2.0 Logout Request Challenge + + try + { + // Accept OAuth 2.0 Session Logout Request + HydraOAuth2RedirectTo result = apiInstance.AcceptOAuth2LogoutRequest(logoutChallenge); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.AcceptOAuth2LogoutRequest: " + 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 | + +### Return type + +[**HydraOAuth2RedirectTo**](HydraOAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class CreateOAuth2ClientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var hydraOAuth2Client = new HydraOAuth2Client(); // HydraOAuth2Client | OAuth 2.0 Client Request Body + + try + { + // Create OAuth 2.0 Client + HydraOAuth2Client result = apiInstance.CreateOAuth2Client(hydraOAuth2Client); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.CreateOAuth2Client: " + 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 | + +### Return type + +[**HydraOAuth2Client**](HydraOAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | oAuth2Client | - | +| **400** | Bad Request Error Response | - | +| **0** | Default Error Response | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class DeleteOAuth2ClientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var id = "id_example"; // string | The id of the OAuth 2.0 Client. + + try + { + // Delete OAuth 2.0 Client + apiInstance.DeleteOAuth2Client(id); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.DeleteOAuth2Client: " + 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. | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | genericError | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class DeleteOAuth2TokenExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var clientId = "clientId_example"; // string | OAuth 2.0 Client ID + + try + { + // Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + apiInstance.DeleteOAuth2Token(clientId); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.DeleteOAuth2Token: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **clientId** | **string**| OAuth 2.0 Client ID | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class DeleteTrustedOAuth2JwtGrantIssuerExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var id = "id_example"; // string | The id of the desired grant + + try + { + // Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + apiInstance.DeleteTrustedOAuth2JwtGrantIssuer(id); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.DeleteTrustedOAuth2JwtGrantIssuer: " + 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 | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | genericError | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class GetOAuth2ClientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var id = "id_example"; // string | The id of the OAuth 2.0 Client. + + try + { + // Get an OAuth 2.0 Client + HydraOAuth2Client result = apiInstance.GetOAuth2Client(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.GetOAuth2Client: " + 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. | + +### Return type + +[**HydraOAuth2Client**](HydraOAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **0** | Default Error Response | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class GetOAuth2ConsentRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var consentChallenge = "consentChallenge_example"; // string | OAuth 2.0 Consent Request Challenge + + try + { + // Get OAuth 2.0 Consent Request + HydraOAuth2ConsentRequest result = apiInstance.GetOAuth2ConsentRequest(consentChallenge); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.GetOAuth2ConsentRequest: " + 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 | + +### Return type + +[**HydraOAuth2ConsentRequest**](HydraOAuth2ConsentRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2ConsentRequest | - | +| **410** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class GetOAuth2LoginRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var loginChallenge = "loginChallenge_example"; // string | OAuth 2.0 Login Request Challenge + + try + { + // Get OAuth 2.0 Login Request + HydraOAuth2LoginRequest result = apiInstance.GetOAuth2LoginRequest(loginChallenge); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.GetOAuth2LoginRequest: " + 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 | + +### Return type + +[**HydraOAuth2LoginRequest**](HydraOAuth2LoginRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2LoginRequest | - | +| **410** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + +[[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) + +Get OAuth 2.0 Session Logout Request + +Use this endpoint to fetch an Ory OAuth 2.0 logout request. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class GetOAuth2LogoutRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var logoutChallenge = "logoutChallenge_example"; // string | + + try + { + // Get OAuth 2.0 Session Logout Request + HydraOAuth2LogoutRequest result = apiInstance.GetOAuth2LogoutRequest(logoutChallenge); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.GetOAuth2LogoutRequest: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **string**| | + +### Return type + +[**HydraOAuth2LogoutRequest**](HydraOAuth2LogoutRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2LogoutRequest | - | +| **410** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class GetTrustedOAuth2JwtGrantIssuerExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var id = "id_example"; // string | The id of the desired grant + + try + { + // Get Trusted OAuth2 JWT Bearer Grant Type Issuer + HydraTrustedOAuth2JwtGrantIssuer result = apiInstance.GetTrustedOAuth2JwtGrantIssuer(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.GetTrustedOAuth2JwtGrantIssuer: " + 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 | + +### Return type + +[**HydraTrustedOAuth2JwtGrantIssuer**](HydraTrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | trustedOAuth2JwtGrantIssuer | - | +| **0** | genericError | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class IntrospectOAuth2TokenExample + { + public static void Main() + { + Configuration config = new Configuration(); + 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) + + try + { + // Introspect OAuth2 Access and Refresh Tokens + HydraIntrospectedOAuth2Token result = apiInstance.IntrospectOAuth2Token(token, scope); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.IntrospectOAuth2Token: " + 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] + +### Return type + +[**HydraIntrospectedOAuth2Token**](HydraIntrospectedOAuth2Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | introspectedOAuth2Token | - | +| **0** | errorOAuth2 | - | + +[[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 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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class ListOAuth2ClientsExample + { + public static void Main() + { + Configuration config = new Configuration(); + 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) + + try + { + // List OAuth 2.0 Clients + List result = apiInstance.ListOAuth2Clients(pageSize, pageToken, clientName, owner); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.ListOAuth2Clients: " + 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] + +### Return type + +[**List<HydraOAuth2Client>**](HydraOAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Paginated OAuth2 Client List Response | - | +| **0** | Default Error Response | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class ListOAuth2ConsentSessionsExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + 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") + + try + { + // List OAuth 2.0 Consent Sessions of a Subject + List result = apiInstance.ListOAuth2ConsentSessions(subject, pageSize, pageToken); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.ListOAuth2ConsentSessions: " + 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"] + +### Return type + +[**List<HydraOAuth2ConsentSession>**](HydraOAuth2ConsentSession.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2ConsentSessions | - | +| **0** | errorOAuth2 | - | + +[[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 Trusted OAuth2 JWT Bearer Grant Type Issuers + +Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class ListTrustedOAuth2JwtGrantIssuersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + 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) + + try + { + // List Trusted OAuth2 JWT Bearer Grant Type Issuers + List result = apiInstance.ListTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.ListTrustedOAuth2JwtGrantIssuers: " + 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] + +### Return type + +[**List<HydraTrustedOAuth2JwtGrantIssuer>**](HydraTrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | trustedOAuth2JwtGrantIssuers | - | +| **0** | genericError | - | + +[[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 () + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class OAuth2AuthorizeExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + + try + { + // OAuth 2.0 Authorize Endpoint + HydraErrorOAuth2 result = apiInstance.OAuth2Authorize(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.OAuth2Authorize: " + 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) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class Oauth2TokenExchangeExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + // Configure HTTP basic authorization: basic + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: oauth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; + + 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) + + try + { + // The OAuth 2.0 Token Endpoint + HydraOAuth2TokenExchange result = apiInstance.Oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.Oauth2TokenExchange: " + 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] + +### Return type + +[**HydraOAuth2TokenExchange**](HydraOAuth2TokenExchange.md) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2TokenExchange | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class PatchOAuth2ClientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var id = "id_example"; // string | The id of the OAuth 2.0 Client. + var hydraJsonPatch = new List(); // List | OAuth 2.0 Client JSON Patch Body + + try + { + // Patch OAuth 2.0 Client + HydraOAuth2Client result = apiInstance.PatchOAuth2Client(id, hydraJsonPatch); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.PatchOAuth2Client: " + 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 | + +### Return type + +[**HydraOAuth2Client**](HydraOAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **404** | Not Found Error Response | - | +| **0** | Default Error Response | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class RejectOAuth2ConsentRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + 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) + + try + { + // Reject OAuth 2.0 Consent Request + HydraOAuth2RedirectTo result = apiInstance.RejectOAuth2ConsentRequest(consentChallenge, hydraRejectOAuth2Request); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.RejectOAuth2ConsentRequest: " + 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] + +### Return type + +[**HydraOAuth2RedirectTo**](HydraOAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class RejectOAuth2LoginRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + 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) + + try + { + // Reject OAuth 2.0 Login Request + HydraOAuth2RedirectTo result = apiInstance.RejectOAuth2LoginRequest(loginChallenge, hydraRejectOAuth2Request); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.RejectOAuth2LoginRequest: " + 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] + +### Return type + +[**HydraOAuth2RedirectTo**](HydraOAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class RejectOAuth2LogoutRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var logoutChallenge = "logoutChallenge_example"; // string | + + try + { + // Reject OAuth 2.0 Session Logout Request + apiInstance.RejectOAuth2LogoutRequest(logoutChallenge); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.RejectOAuth2LogoutRequest: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class RevokeOAuth2ConsentSessionsExample + { + public static void Main() + { + Configuration config = new Configuration(); + 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 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); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2ConsentSessions: " + 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] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | errorOAuth2 | - | + +[[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) + +Revokes All OAuth 2.0 Login Sessions of a Subject + +This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class RevokeOAuth2LoginSessionsExample + { + public static void Main() + { + 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. + + try + { + // Revokes All OAuth 2.0 Login Sessions of a Subject + apiInstance.RevokeOAuth2LoginSessions(subject); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2LoginSessions: " + 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. | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class RevokeOAuth2TokenExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + // Configure HTTP basic authorization: basic + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; + // Configure OAuth2 access token for authorization: oauth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new OAuth2Api(config); + var token = "token_example"; // string | + + try + { + // Revoke OAuth 2.0 Access or Refresh Token + apiInstance.RevokeOAuth2Token(token); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.RevokeOAuth2Token: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class SetOAuth2ClientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var id = "id_example"; // string | OAuth 2.0 Client ID + var hydraOAuth2Client = new HydraOAuth2Client(); // HydraOAuth2Client | OAuth 2.0 Client Request Body + + try + { + // Set OAuth 2.0 Client + HydraOAuth2Client result = apiInstance.SetOAuth2Client(id, hydraOAuth2Client); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.SetOAuth2Client: " + 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 | + +### Return type + +[**HydraOAuth2Client**](HydraOAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **400** | Bad Request Error Response | - | +| **404** | Not Found Error Response | - | +| **0** | Default Error Response | - | + +[[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) + +Set OAuth2 Client Token Lifespans + +Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class SetOAuth2ClientLifespansExample + { + public static void Main() + { + Configuration config = new Configuration(); + 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) + + try + { + // Set OAuth2 Client Token Lifespans + HydraOAuth2Client result = apiInstance.SetOAuth2ClientLifespans(id, hydraOAuth2ClientTokenLifespans); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.SetOAuth2ClientLifespans: " + 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] + +### Return type + +[**HydraOAuth2Client**](HydraOAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **0** | genericError | - | + +[[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) + +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). + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class TrustOAuth2JwtGrantIssuerExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OAuth2Api(config); + var hydraTrustOAuth2JwtGrantIssuer = new HydraTrustOAuth2JwtGrantIssuer(); // HydraTrustOAuth2JwtGrantIssuer | (optional) + + try + { + // Trust OAuth2 JWT Bearer Grant Type Issuer + HydraTrustedOAuth2JwtGrantIssuer result = apiInstance.TrustOAuth2JwtGrantIssuer(hydraTrustOAuth2JwtGrantIssuer); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OAuth2Api.TrustOAuth2JwtGrantIssuer: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **hydraTrustOAuth2JwtGrantIssuer** | [**HydraTrustOAuth2JwtGrantIssuer**](HydraTrustOAuth2JwtGrantIssuer.md)| | [optional] + +### Return type + +[**HydraTrustedOAuth2JwtGrantIssuer**](HydraTrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | trustedOAuth2JwtGrantIssuer | - | +| **0** | genericError | - | + +[[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) + diff --git a/clients/hydra/dotnet/docs/OidcApi.md b/clients/hydra/dotnet/docs/OidcApi.md new file mode 100644 index 00000000000..acd3169606c --- /dev/null +++ b/clients/hydra/dotnet/docs/OidcApi.md @@ -0,0 +1,520 @@ +# Ory.Hydra.Client.Api.OidcApi + +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 +[**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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class CreateOidcDynamicClientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OidcApi(config); + var hydraOAuth2Client = new HydraOAuth2Client(); // HydraOAuth2Client | Dynamic Client Registration Request Body + + try + { + // Register OAuth2 Client using OpenID Dynamic Client Registration + HydraOAuth2Client result = apiInstance.CreateOidcDynamicClient(hydraOAuth2Client); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OidcApi.CreateOidcDynamicClient: " + 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 | + +### Return type + +[**HydraOAuth2Client**](HydraOAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | oAuth2Client | - | +| **400** | Bad Request Error Response | - | +| **0** | Default Error Response | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class DeleteOidcDynamicClientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + // Configure Bearer token for authorization: bearer + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new OidcApi(config); + var id = "id_example"; // string | The id of the OAuth 2.0 Client. + + try + { + // Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + apiInstance.DeleteOidcDynamicClient(id); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OidcApi.DeleteOidcDynamicClient: " + 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. | + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **0** | genericError | - | + +[[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 () + +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/ + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class DiscoverOidcConfigurationExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OidcApi(config); + + try + { + // OpenID Connect Discovery + HydraOidcConfiguration result = apiInstance.DiscoverOidcConfiguration(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OidcApi.DiscoverOidcConfiguration: " + 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) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oidcConfiguration | - | +| **0** | errorOAuth2 | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class GetOidcDynamicClientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + // Configure Bearer token for authorization: bearer + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new OidcApi(config); + var id = "id_example"; // string | The id of the OAuth 2.0 Client. + + try + { + // Get OAuth2 Client using OpenID Dynamic Client Registration + HydraOAuth2Client result = apiInstance.GetOidcDynamicClient(id); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OidcApi.GetOidcDynamicClient: " + 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. | + +### Return type + +[**HydraOAuth2Client**](HydraOAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **0** | Default Error Response | - | + +[[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 () + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class GetOidcUserInfoExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + // Configure OAuth2 access token for authorization: oauth2 + config.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new OidcApi(config); + + try + { + // OpenID Connect Userinfo + HydraOidcUserInfo result = apiInstance.GetOidcUserInfo(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OidcApi.GetOidcUserInfo: " + 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) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oidcUserInfo | - | +| **0** | errorOAuth2 | - | + +[[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 () + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class RevokeOidcSessionExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new OidcApi(config); + + try + { + // OpenID Connect Front- and Back-channel Enabled Logout + apiInstance.RevokeOidcSession(); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OidcApi.RevokeOidcSession: " + 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) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | + +[[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) + +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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class SetOidcDynamicClientExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + // Configure Bearer token for authorization: bearer + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new OidcApi(config); + var id = "id_example"; // string | OAuth 2.0 Client ID + var hydraOAuth2Client = new HydraOAuth2Client(); // HydraOAuth2Client | OAuth 2.0 Client Request Body + + try + { + // Set OAuth2 Client using OpenID Dynamic Client Registration + HydraOAuth2Client result = apiInstance.SetOidcDynamicClient(id, hydraOAuth2Client); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling OidcApi.SetOidcDynamicClient: " + 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 | + +### Return type + +[**HydraOAuth2Client**](HydraOAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **404** | Not Found Error Response | - | +| **0** | Default Error Response | - | + +[[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) + diff --git a/clients/hydra/dotnet/docs/PublicApi.md b/clients/hydra/dotnet/docs/PublicApi.md deleted file mode 100644 index 72c4de8ba3d..00000000000 --- a/clients/hydra/dotnet/docs/PublicApi.md +++ /dev/null @@ -1,886 +0,0 @@ -# Ory.Hydra.Client.Api.PublicApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DisconnectUser**](PublicApi.md#disconnectuser) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -[**DiscoverOpenIDConfiguration**](PublicApi.md#discoveropenidconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -[**DynamicClientRegistrationCreateOAuth2Client**](PublicApi.md#dynamicclientregistrationcreateoauth2client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**DynamicClientRegistrationDeleteOAuth2Client**](PublicApi.md#dynamicclientregistrationdeleteoauth2client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**DynamicClientRegistrationGetOAuth2Client**](PublicApi.md#dynamicclientregistrationgetoauth2client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**DynamicClientRegistrationUpdateOAuth2Client**](PublicApi.md#dynamicclientregistrationupdateoauth2client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**IsInstanceReady**](PublicApi.md#isinstanceready) | **GET** /health/ready | Check Readiness Status -[**Oauth2Token**](PublicApi.md#oauth2token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -[**OauthAuth**](PublicApi.md#oauthauth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -[**RevokeOAuth2Token**](PublicApi.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -[**Userinfo**](PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -[**WellKnown**](PublicApi.md#wellknown) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery - - - -# **DisconnectUser** -> void DisconnectUser () - -OpenID Connect Front-Backchannel Enabled Logout - -This endpoint initiates and completes user logout at Ory Hydra 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 - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DisconnectUserExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new PublicApi(config); - - try - { - // OpenID Connect Front-Backchannel Enabled Logout - apiInstance.DisconnectUser(); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.DisconnectUser: " + 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) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | - -[[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) - - -# **DiscoverOpenIDConfiguration** -> HydraWellKnown DiscoverOpenIDConfiguration () - -OpenID Connect Discovery - -The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DiscoverOpenIDConfigurationExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new PublicApi(config); - - try - { - // OpenID Connect Discovery - HydraWellKnown result = apiInstance.DiscoverOpenIDConfiguration(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.DiscoverOpenIDConfiguration: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HydraWellKnown**](HydraWellKnown.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | wellKnown | - | -| **401** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **DynamicClientRegistrationCreateOAuth2Client** -> HydraOAuth2Client DynamicClientRegistrationCreateOAuth2Client (HydraOAuth2Client body) - -Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DynamicClientRegistrationCreateOAuth2ClientExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new PublicApi(config); - var body = new HydraOAuth2Client(); // HydraOAuth2Client | - - try - { - // Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - HydraOAuth2Client result = apiInstance.DynamicClientRegistrationCreateOAuth2Client(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.DynamicClientRegistrationCreateOAuth2Client: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**HydraOAuth2Client**](HydraOAuth2Client.md)| | - -### Return type - -[**HydraOAuth2Client**](HydraOAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | oAuth2Client | - | -| **0** | jsonError | - | - -[[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) - - -# **DynamicClientRegistrationDeleteOAuth2Client** -> void DynamicClientRegistrationDeleteOAuth2Client (string id) - -Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DynamicClientRegistrationDeleteOAuth2ClientExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new PublicApi(config); - var id = "id_example"; // string | The id of the OAuth 2.0 Client. - - try - { - // Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - apiInstance.DynamicClientRegistrationDeleteOAuth2Client(id); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.DynamicClientRegistrationDeleteOAuth2Client: " + 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. | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **0** | jsonError | - | - -[[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) - - -# **DynamicClientRegistrationGetOAuth2Client** -> HydraOAuth2Client DynamicClientRegistrationGetOAuth2Client (string id) - -Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DynamicClientRegistrationGetOAuth2ClientExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new PublicApi(config); - var id = "id_example"; // string | The id of the OAuth 2.0 Client. - - try - { - // Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - HydraOAuth2Client result = apiInstance.DynamicClientRegistrationGetOAuth2Client(id); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.DynamicClientRegistrationGetOAuth2Client: " + 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. | - -### Return type - -[**HydraOAuth2Client**](HydraOAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | oAuth2Client | - | -| **0** | jsonError | - | - -[[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) - - -# **DynamicClientRegistrationUpdateOAuth2Client** -> HydraOAuth2Client DynamicClientRegistrationUpdateOAuth2Client (string id, HydraOAuth2Client body) - -Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class DynamicClientRegistrationUpdateOAuth2ClientExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new PublicApi(config); - var id = "id_example"; // string | The id of the OAuth 2.0 Client. - var body = new HydraOAuth2Client(); // HydraOAuth2Client | - - try - { - // Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - HydraOAuth2Client result = apiInstance.DynamicClientRegistrationUpdateOAuth2Client(id, body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.DynamicClientRegistrationUpdateOAuth2Client: " + 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. | - **body** | [**HydraOAuth2Client**](HydraOAuth2Client.md)| | - -### Return type - -[**HydraOAuth2Client**](HydraOAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | oAuth2Client | - | -| **0** | jsonError | - | - -[[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) - - -# **IsInstanceReady** -> HydraHealthStatus IsInstanceReady () - -Check Readiness Status - -This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class IsInstanceReadyExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new PublicApi(config); - - try - { - // Check Readiness Status - HydraHealthStatus result = apiInstance.IsInstanceReady(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.IsInstanceReady: " + 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) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | healthStatus | - | -| **503** | healthNotReadyStatus | - | - -[[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) - - -# **Oauth2Token** -> HydraOauth2TokenResponse Oauth2Token (string grantType, string code = null, string refreshToken = null, string redirectUri = null, string clientId = null) - -The OAuth 2.0 Token Endpoint - -The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class Oauth2TokenExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - // Configure HTTP basic authorization: basic - config.Username = "YOUR_USERNAME"; - config.Password = "YOUR_PASSWORD"; - // Configure OAuth2 access token for authorization: oauth2 - config.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PublicApi(config); - var grantType = "grantType_example"; // string | - var code = "code_example"; // string | (optional) - var refreshToken = "refreshToken_example"; // string | (optional) - var redirectUri = "redirectUri_example"; // string | (optional) - var clientId = "clientId_example"; // string | (optional) - - try - { - // The OAuth 2.0 Token Endpoint - HydraOauth2TokenResponse result = apiInstance.Oauth2Token(grantType, code, refreshToken, redirectUri, clientId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.Oauth2Token: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grantType** | **string**| | - **code** | **string**| | [optional] - **refreshToken** | **string**| | [optional] - **redirectUri** | **string**| | [optional] - **clientId** | **string**| | [optional] - -### Return type - -[**HydraOauth2TokenResponse**](HydraOauth2TokenResponse.md) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | oauth2TokenResponse | - | -| **400** | jsonError | - | -| **401** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **OauthAuth** -> void OauthAuth () - -The OAuth 2.0 Authorize Endpoint - -This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class OauthAuthExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new PublicApi(config); - - try - { - // The OAuth 2.0 Authorize Endpoint - apiInstance.OauthAuth(); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.OauthAuth: " + 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) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **401** | jsonError | - | -| **500** | jsonError | - | - -[[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) - -Revoke OAuth2 Tokens - -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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class RevokeOAuth2TokenExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - // Configure HTTP basic authorization: basic - config.Username = "YOUR_USERNAME"; - config.Password = "YOUR_PASSWORD"; - // Configure OAuth2 access token for authorization: oauth2 - config.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PublicApi(config); - var token = "token_example"; // string | - - try - { - // Revoke OAuth2 Tokens - apiInstance.RevokeOAuth2Token(token); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.RevokeOAuth2Token: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **string**| | - -### Return type - -void (empty response body) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -| **401** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **Userinfo** -> HydraUserinfoResponse Userinfo () - -OpenID Connect Userinfo - -This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class UserinfoExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - // Configure OAuth2 access token for authorization: oauth2 - config.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PublicApi(config); - - try - { - // OpenID Connect Userinfo - HydraUserinfoResponse result = apiInstance.Userinfo(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.Userinfo: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HydraUserinfoResponse**](HydraUserinfoResponse.md) - -### Authorization - -[oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | userinfoResponse | - | -| **401** | jsonError | - | -| **500** | jsonError | - | - -[[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) - - -# **WellKnown** -> HydraJSONWebKeySet WellKnown () - -JSON Web Keys Discovery - -This endpoint returns JSON Web Keys to be used as public keys for 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. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Ory.Hydra.Client.Api; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Example -{ - public class WellKnownExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "http://localhost"; - var apiInstance = new PublicApi(config); - - try - { - // JSON Web Keys Discovery - HydraJSONWebKeySet result = apiInstance.WellKnown(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PublicApi.WellKnown: " + 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) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | JSONWebKeySet | - | -| **500** | jsonError | - | - -[[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) - diff --git a/clients/hydra/dotnet/docs/WellknownApi.md b/clients/hydra/dotnet/docs/WellknownApi.md new file mode 100644 index 00000000000..59a26805c79 --- /dev/null +++ b/clients/hydra/dotnet/docs/WellknownApi.md @@ -0,0 +1,77 @@ +# Ory.Hydra.Client.Api.WellknownApi + +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 + + + +# **DiscoverJsonWebKeys** +> 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. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Ory.Hydra.Client.Api; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Example +{ + public class DiscoverJsonWebKeysExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + var apiInstance = new WellknownApi(config); + + try + { + // Discover Well-Known JSON Web Keys + HydraJsonWebKeySet result = apiInstance.DiscoverJsonWebKeys(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling WellknownApi.DiscoverJsonWebKeys: " + 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) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + +[[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) + diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/AdminApiTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/AdminApiTests.cs deleted file mode 100644 index 9535ae44242..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/AdminApiTests.cs +++ /dev/null @@ -1,475 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using Xunit; - -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Api; -// uncomment below to import models -//using Ory.Hydra.Client.Model; - -namespace Ory.Hydra.Client.Test.Api -{ - /// - /// Class for testing AdminApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class AdminApiTests : IDisposable - { - private AdminApi instance; - - public AdminApiTests() - { - instance = new AdminApi(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of AdminApi - /// - [Fact] - public void InstanceTest() - { - // TODO uncomment below to test 'IsType' AdminApi - //Assert.IsType(instance); - } - - /// - /// Test AcceptConsentRequest - /// - [Fact] - public void AcceptConsentRequestTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string consentChallenge = null; - //HydraAcceptConsentRequest body = null; - //var response = instance.AcceptConsentRequest(consentChallenge, body); - //Assert.IsType(response); - } - - /// - /// Test AcceptLoginRequest - /// - [Fact] - public void AcceptLoginRequestTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string loginChallenge = null; - //HydraAcceptLoginRequest body = null; - //var response = instance.AcceptLoginRequest(loginChallenge, body); - //Assert.IsType(response); - } - - /// - /// Test AcceptLogoutRequest - /// - [Fact] - public void AcceptLogoutRequestTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string logoutChallenge = null; - //var response = instance.AcceptLogoutRequest(logoutChallenge); - //Assert.IsType(response); - } - - /// - /// Test CreateJsonWebKeySet - /// - [Fact] - public void CreateJsonWebKeySetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string set = null; - //HydraJsonWebKeySetGeneratorRequest body = null; - //var response = instance.CreateJsonWebKeySet(set, body); - //Assert.IsType(response); - } - - /// - /// Test CreateOAuth2Client - /// - [Fact] - public void CreateOAuth2ClientTest() - { - // TODO uncomment below to test the method and replace null with proper value - //HydraOAuth2Client body = null; - //var response = instance.CreateOAuth2Client(body); - //Assert.IsType(response); - } - - /// - /// Test DeleteJsonWebKey - /// - [Fact] - public void DeleteJsonWebKeyTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string kid = null; - //string set = null; - //instance.DeleteJsonWebKey(kid, set); - } - - /// - /// Test DeleteJsonWebKeySet - /// - [Fact] - public void DeleteJsonWebKeySetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string set = null; - //instance.DeleteJsonWebKeySet(set); - } - - /// - /// Test DeleteOAuth2Client - /// - [Fact] - public void DeleteOAuth2ClientTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string id = null; - //instance.DeleteOAuth2Client(id); - } - - /// - /// Test DeleteOAuth2Token - /// - [Fact] - public void DeleteOAuth2TokenTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string clientId = null; - //instance.DeleteOAuth2Token(clientId); - } - - /// - /// Test DeleteTrustedJwtGrantIssuer - /// - [Fact] - public void DeleteTrustedJwtGrantIssuerTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string id = null; - //instance.DeleteTrustedJwtGrantIssuer(id); - } - - /// - /// Test FlushInactiveOAuth2Tokens - /// - [Fact] - public void FlushInactiveOAuth2TokensTest() - { - // TODO uncomment below to test the method and replace null with proper value - //HydraFlushInactiveOAuth2TokensRequest body = null; - //instance.FlushInactiveOAuth2Tokens(body); - } - - /// - /// Test GetConsentRequest - /// - [Fact] - public void GetConsentRequestTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string consentChallenge = null; - //var response = instance.GetConsentRequest(consentChallenge); - //Assert.IsType(response); - } - - /// - /// Test GetJsonWebKey - /// - [Fact] - public void GetJsonWebKeyTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string kid = null; - //string set = null; - //var response = instance.GetJsonWebKey(kid, set); - //Assert.IsType(response); - } - - /// - /// Test GetJsonWebKeySet - /// - [Fact] - public void GetJsonWebKeySetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string set = null; - //var response = instance.GetJsonWebKeySet(set); - //Assert.IsType(response); - } - - /// - /// Test GetLoginRequest - /// - [Fact] - public void GetLoginRequestTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string loginChallenge = null; - //var response = instance.GetLoginRequest(loginChallenge); - //Assert.IsType(response); - } - - /// - /// Test GetLogoutRequest - /// - [Fact] - public void GetLogoutRequestTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string logoutChallenge = null; - //var response = instance.GetLogoutRequest(logoutChallenge); - //Assert.IsType(response); - } - - /// - /// Test GetOAuth2Client - /// - [Fact] - public void GetOAuth2ClientTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string id = null; - //var response = instance.GetOAuth2Client(id); - //Assert.IsType(response); - } - - /// - /// Test GetTrustedJwtGrantIssuer - /// - [Fact] - public void GetTrustedJwtGrantIssuerTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string id = null; - //var response = instance.GetTrustedJwtGrantIssuer(id); - //Assert.IsType(response); - } - - /// - /// Test GetVersion - /// - [Fact] - public void GetVersionTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetVersion(); - //Assert.IsType(response); - } - - /// - /// Test IntrospectOAuth2Token - /// - [Fact] - public void IntrospectOAuth2TokenTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string token = null; - //string scope = null; - //var response = instance.IntrospectOAuth2Token(token, scope); - //Assert.IsType(response); - } - - /// - /// Test IsInstanceAlive - /// - [Fact] - public void IsInstanceAliveTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.IsInstanceAlive(); - //Assert.IsType(response); - } - - /// - /// Test ListOAuth2Clients - /// - [Fact] - public void ListOAuth2ClientsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long? limit = null; - //long? offset = null; - //string clientName = null; - //string owner = null; - //var response = instance.ListOAuth2Clients(limit, offset, clientName, owner); - //Assert.IsType>(response); - } - - /// - /// Test ListSubjectConsentSessions - /// - [Fact] - public void ListSubjectConsentSessionsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string subject = null; - //var response = instance.ListSubjectConsentSessions(subject); - //Assert.IsType>(response); - } - - /// - /// Test ListTrustedJwtGrantIssuers - /// - [Fact] - public void ListTrustedJwtGrantIssuersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string issuer = null; - //long? limit = null; - //long? offset = null; - //var response = instance.ListTrustedJwtGrantIssuers(issuer, limit, offset); - //Assert.IsType>(response); - } - - /// - /// Test PatchOAuth2Client - /// - [Fact] - public void PatchOAuth2ClientTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string id = null; - //List body = null; - //var response = instance.PatchOAuth2Client(id, body); - //Assert.IsType(response); - } - - /// - /// Test RejectConsentRequest - /// - [Fact] - public void RejectConsentRequestTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string consentChallenge = null; - //HydraRejectRequest body = null; - //var response = instance.RejectConsentRequest(consentChallenge, body); - //Assert.IsType(response); - } - - /// - /// Test RejectLoginRequest - /// - [Fact] - public void RejectLoginRequestTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string loginChallenge = null; - //HydraRejectRequest body = null; - //var response = instance.RejectLoginRequest(loginChallenge, body); - //Assert.IsType(response); - } - - /// - /// Test RejectLogoutRequest - /// - [Fact] - public void RejectLogoutRequestTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string logoutChallenge = null; - //HydraRejectRequest body = null; - //instance.RejectLogoutRequest(logoutChallenge, body); - } - - /// - /// Test RevokeAuthenticationSession - /// - [Fact] - public void RevokeAuthenticationSessionTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string subject = null; - //instance.RevokeAuthenticationSession(subject); - } - - /// - /// Test RevokeConsentSessions - /// - [Fact] - public void RevokeConsentSessionsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string subject = null; - //string _client = null; - //bool? all = null; - //instance.RevokeConsentSessions(subject, _client, all); - } - - /// - /// Test TrustJwtGrantIssuer - /// - [Fact] - public void TrustJwtGrantIssuerTest() - { - // TODO uncomment below to test the method and replace null with proper value - //HydraTrustJwtGrantIssuerBody body = null; - //var response = instance.TrustJwtGrantIssuer(body); - //Assert.IsType(response); - } - - /// - /// Test UpdateJsonWebKey - /// - [Fact] - public void UpdateJsonWebKeyTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string kid = null; - //string set = null; - //HydraJSONWebKey body = null; - //var response = instance.UpdateJsonWebKey(kid, set, body); - //Assert.IsType(response); - } - - /// - /// Test UpdateJsonWebKeySet - /// - [Fact] - public void UpdateJsonWebKeySetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string set = null; - //HydraJSONWebKeySet body = null; - //var response = instance.UpdateJsonWebKeySet(set, body); - //Assert.IsType(response); - } - - /// - /// Test UpdateOAuth2Client - /// - [Fact] - public void UpdateOAuth2ClientTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string id = null; - //HydraOAuth2Client body = null; - //var response = instance.UpdateOAuth2Client(id, body); - //Assert.IsType(response); - } - } -} 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 new file mode 100644 index 00000000000..15d708e46ab --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/JwkApiTests.cs @@ -0,0 +1,146 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Api; +// uncomment below to import models +//using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Test.Api +{ + /// + /// Class for testing JwkApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class JwkApiTests : IDisposable + { + private JwkApi instance; + + public JwkApiTests() + { + instance = new JwkApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of JwkApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' JwkApi + //Assert.IsType(instance); + } + + /// + /// Test CreateJsonWebKeySet + /// + [Fact] + public void CreateJsonWebKeySetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string set = null; + //HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet = null; + //var response = instance.CreateJsonWebKeySet(set, hydraCreateJsonWebKeySet); + //Assert.IsType(response); + } + + /// + /// Test DeleteJsonWebKey + /// + [Fact] + public void DeleteJsonWebKeyTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string set = null; + //string kid = null; + //instance.DeleteJsonWebKey(set, kid); + } + + /// + /// Test DeleteJsonWebKeySet + /// + [Fact] + public void DeleteJsonWebKeySetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string set = null; + //instance.DeleteJsonWebKeySet(set); + } + + /// + /// Test GetJsonWebKey + /// + [Fact] + public void GetJsonWebKeyTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string set = null; + //string kid = null; + //var response = instance.GetJsonWebKey(set, kid); + //Assert.IsType(response); + } + + /// + /// Test GetJsonWebKeySet + /// + [Fact] + public void GetJsonWebKeySetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string set = null; + //var response = instance.GetJsonWebKeySet(set); + //Assert.IsType(response); + } + + /// + /// Test SetJsonWebKey + /// + [Fact] + 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; + //var response = instance.SetJsonWebKey(set, kid, hydraJsonWebKey); + //Assert.IsType(response); + } + + /// + /// Test SetJsonWebKeySet + /// + [Fact] + public void SetJsonWebKeySetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string set = 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 35b99a06238..e28c32ca958 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 @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -18,6 +19,8 @@ using Ory.Hydra.Client.Client; using Ory.Hydra.Client.Api; +// uncomment below to import models +//using Ory.Hydra.Client.Model; namespace Ory.Hydra.Client.Test.Api { @@ -53,13 +56,36 @@ public void InstanceTest() } /// - /// Test Prometheus + /// Test GetVersion /// [Fact] - public void PrometheusTest() + public void GetVersionTest() { // TODO uncomment below to test the method and replace null with proper value - //instance.Prometheus(); + //var response = instance.GetVersion(); + //Assert.IsType(response); + } + + /// + /// Test IsAlive + /// + [Fact] + public void IsAliveTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.IsAlive(); + //Assert.IsType(response); + } + + /// + /// Test IsReady + /// + [Fact] + public void IsReadyTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.IsReady(); + //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 new file mode 100644 index 00000000000..8421017f346 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OAuth2ApiTests.cs @@ -0,0 +1,407 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Api; +// uncomment below to import models +//using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Test.Api +{ + /// + /// Class for testing OAuth2Api + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class OAuth2ApiTests : IDisposable + { + private OAuth2Api instance; + + public OAuth2ApiTests() + { + instance = new OAuth2Api(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OAuth2Api + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' OAuth2Api + //Assert.IsType(instance); + } + + /// + /// Test AcceptOAuth2ConsentRequest + /// + [Fact] + public void AcceptOAuth2ConsentRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string consentChallenge = null; + //HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = null; + //var response = instance.AcceptOAuth2ConsentRequest(consentChallenge, hydraAcceptOAuth2ConsentRequest); + //Assert.IsType(response); + } + + /// + /// Test AcceptOAuth2LoginRequest + /// + [Fact] + public void AcceptOAuth2LoginRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string loginChallenge = null; + //HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = null; + //var response = instance.AcceptOAuth2LoginRequest(loginChallenge, hydraAcceptOAuth2LoginRequest); + //Assert.IsType(response); + } + + /// + /// Test AcceptOAuth2LogoutRequest + /// + [Fact] + public void AcceptOAuth2LogoutRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string logoutChallenge = null; + //var response = instance.AcceptOAuth2LogoutRequest(logoutChallenge); + //Assert.IsType(response); + } + + /// + /// Test CreateOAuth2Client + /// + [Fact] + public void CreateOAuth2ClientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //HydraOAuth2Client hydraOAuth2Client = null; + //var response = instance.CreateOAuth2Client(hydraOAuth2Client); + //Assert.IsType(response); + } + + /// + /// Test DeleteOAuth2Client + /// + [Fact] + public void DeleteOAuth2ClientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //instance.DeleteOAuth2Client(id); + } + + /// + /// Test DeleteOAuth2Token + /// + [Fact] + public void DeleteOAuth2TokenTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string clientId = null; + //instance.DeleteOAuth2Token(clientId); + } + + /// + /// Test DeleteTrustedOAuth2JwtGrantIssuer + /// + [Fact] + public void DeleteTrustedOAuth2JwtGrantIssuerTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //instance.DeleteTrustedOAuth2JwtGrantIssuer(id); + } + + /// + /// Test GetOAuth2Client + /// + [Fact] + public void GetOAuth2ClientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //var response = instance.GetOAuth2Client(id); + //Assert.IsType(response); + } + + /// + /// Test GetOAuth2ConsentRequest + /// + [Fact] + public void GetOAuth2ConsentRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string consentChallenge = null; + //var response = instance.GetOAuth2ConsentRequest(consentChallenge); + //Assert.IsType(response); + } + + /// + /// Test GetOAuth2LoginRequest + /// + [Fact] + public void GetOAuth2LoginRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string loginChallenge = null; + //var response = instance.GetOAuth2LoginRequest(loginChallenge); + //Assert.IsType(response); + } + + /// + /// Test GetOAuth2LogoutRequest + /// + [Fact] + public void GetOAuth2LogoutRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string logoutChallenge = null; + //var response = instance.GetOAuth2LogoutRequest(logoutChallenge); + //Assert.IsType(response); + } + + /// + /// Test GetTrustedOAuth2JwtGrantIssuer + /// + [Fact] + public void GetTrustedOAuth2JwtGrantIssuerTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //var response = instance.GetTrustedOAuth2JwtGrantIssuer(id); + //Assert.IsType(response); + } + + /// + /// Test IntrospectOAuth2Token + /// + [Fact] + public void IntrospectOAuth2TokenTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string token = null; + //string scope = null; + //var response = instance.IntrospectOAuth2Token(token, scope); + //Assert.IsType(response); + } + + /// + /// Test ListOAuth2Clients + /// + [Fact] + 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; + //var response = instance.ListOAuth2Clients(pageSize, pageToken, clientName, owner); + //Assert.IsType>(response); + } + + /// + /// Test ListOAuth2ConsentSessions + /// + [Fact] + 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; + //var response = instance.ListOAuth2ConsentSessions(subject, pageSize, pageToken); + //Assert.IsType>(response); + } + + /// + /// Test ListTrustedOAuth2JwtGrantIssuers + /// + [Fact] + 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; + //var response = instance.ListTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer); + //Assert.IsType>(response); + } + + /// + /// Test OAuth2Authorize + /// + [Fact] + public void OAuth2AuthorizeTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.OAuth2Authorize(); + //Assert.IsType(response); + } + + /// + /// Test Oauth2TokenExchange + /// + [Fact] + 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; + //var response = instance.Oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken); + //Assert.IsType(response); + } + + /// + /// Test PatchOAuth2Client + /// + [Fact] + public void PatchOAuth2ClientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //List hydraJsonPatch = null; + //var response = instance.PatchOAuth2Client(id, hydraJsonPatch); + //Assert.IsType(response); + } + + /// + /// Test RejectOAuth2ConsentRequest + /// + [Fact] + public void RejectOAuth2ConsentRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string consentChallenge = null; + //HydraRejectOAuth2Request hydraRejectOAuth2Request = null; + //var response = instance.RejectOAuth2ConsentRequest(consentChallenge, hydraRejectOAuth2Request); + //Assert.IsType(response); + } + + /// + /// Test RejectOAuth2LoginRequest + /// + [Fact] + public void RejectOAuth2LoginRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string loginChallenge = null; + //HydraRejectOAuth2Request hydraRejectOAuth2Request = null; + //var response = instance.RejectOAuth2LoginRequest(loginChallenge, hydraRejectOAuth2Request); + //Assert.IsType(response); + } + + /// + /// Test RejectOAuth2LogoutRequest + /// + [Fact] + public void RejectOAuth2LogoutRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string logoutChallenge = null; + //instance.RejectOAuth2LogoutRequest(logoutChallenge); + } + + /// + /// Test RevokeOAuth2ConsentSessions + /// + [Fact] + public void RevokeOAuth2ConsentSessionsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string subject = null; + //string _client = null; + //bool? all = null; + //instance.RevokeOAuth2ConsentSessions(subject, _client, all); + } + + /// + /// Test RevokeOAuth2LoginSessions + /// + [Fact] + public void RevokeOAuth2LoginSessionsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string subject = null; + //instance.RevokeOAuth2LoginSessions(subject); + } + + /// + /// Test RevokeOAuth2Token + /// + [Fact] + public void RevokeOAuth2TokenTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string token = null; + //instance.RevokeOAuth2Token(token); + } + + /// + /// Test SetOAuth2Client + /// + [Fact] + public void SetOAuth2ClientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //HydraOAuth2Client hydraOAuth2Client = null; + //var response = instance.SetOAuth2Client(id, hydraOAuth2Client); + //Assert.IsType(response); + } + + /// + /// Test SetOAuth2ClientLifespans + /// + [Fact] + public void SetOAuth2ClientLifespansTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = null; + //var response = instance.SetOAuth2ClientLifespans(id, hydraOAuth2ClientTokenLifespans); + //Assert.IsType(response); + } + + /// + /// Test TrustOAuth2JwtGrantIssuer + /// + [Fact] + public void TrustOAuth2JwtGrantIssuerTest() + { + // TODO uncomment below to test the method and replace null with proper value + //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 new file mode 100644 index 00000000000..ea321a95e0c --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/OidcApiTests.cs @@ -0,0 +1,138 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Api; +// uncomment below to import models +//using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Test.Api +{ + /// + /// Class for testing OidcApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class OidcApiTests : IDisposable + { + private OidcApi instance; + + public OidcApiTests() + { + instance = new OidcApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of OidcApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' OidcApi + //Assert.IsType(instance); + } + + /// + /// Test CreateOidcDynamicClient + /// + [Fact] + public void CreateOidcDynamicClientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //HydraOAuth2Client hydraOAuth2Client = null; + //var response = instance.CreateOidcDynamicClient(hydraOAuth2Client); + //Assert.IsType(response); + } + + /// + /// Test DeleteOidcDynamicClient + /// + [Fact] + public void DeleteOidcDynamicClientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //instance.DeleteOidcDynamicClient(id); + } + + /// + /// Test DiscoverOidcConfiguration + /// + [Fact] + public void DiscoverOidcConfigurationTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.DiscoverOidcConfiguration(); + //Assert.IsType(response); + } + + /// + /// Test GetOidcDynamicClient + /// + [Fact] + public void GetOidcDynamicClientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //var response = instance.GetOidcDynamicClient(id); + //Assert.IsType(response); + } + + /// + /// Test GetOidcUserInfo + /// + [Fact] + public void GetOidcUserInfoTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.GetOidcUserInfo(); + //Assert.IsType(response); + } + + /// + /// Test RevokeOidcSession + /// + [Fact] + public void RevokeOidcSessionTest() + { + // TODO uncomment below to test the method and replace null with proper value + //instance.RevokeOidcSession(); + } + + /// + /// Test SetOidcDynamicClient + /// + [Fact] + public void SetOidcDynamicClientTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string id = null; + //HydraOAuth2Client hydraOAuth2Client = null; + //var response = instance.SetOidcDynamicClient(id, hydraOAuth2Client); + //Assert.IsType(response); + } + } +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/PublicApiTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/PublicApiTests.cs deleted file mode 100644 index 980e8b98cd1..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/PublicApiTests.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using RestSharp; -using Xunit; - -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Api; -// uncomment below to import models -//using Ory.Hydra.Client.Model; - -namespace Ory.Hydra.Client.Test.Api -{ - /// - /// Class for testing PublicApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class PublicApiTests : IDisposable - { - private PublicApi instance; - - public PublicApiTests() - { - instance = new PublicApi(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of PublicApi - /// - [Fact] - public void InstanceTest() - { - // TODO uncomment below to test 'IsType' PublicApi - //Assert.IsType(instance); - } - - /// - /// Test DisconnectUser - /// - [Fact] - public void DisconnectUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //instance.DisconnectUser(); - } - - /// - /// Test DiscoverOpenIDConfiguration - /// - [Fact] - public void DiscoverOpenIDConfigurationTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.DiscoverOpenIDConfiguration(); - //Assert.IsType(response); - } - - /// - /// Test DynamicClientRegistrationCreateOAuth2Client - /// - [Fact] - public void DynamicClientRegistrationCreateOAuth2ClientTest() - { - // TODO uncomment below to test the method and replace null with proper value - //HydraOAuth2Client body = null; - //var response = instance.DynamicClientRegistrationCreateOAuth2Client(body); - //Assert.IsType(response); - } - - /// - /// Test DynamicClientRegistrationDeleteOAuth2Client - /// - [Fact] - public void DynamicClientRegistrationDeleteOAuth2ClientTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string id = null; - //instance.DynamicClientRegistrationDeleteOAuth2Client(id); - } - - /// - /// Test DynamicClientRegistrationGetOAuth2Client - /// - [Fact] - public void DynamicClientRegistrationGetOAuth2ClientTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string id = null; - //var response = instance.DynamicClientRegistrationGetOAuth2Client(id); - //Assert.IsType(response); - } - - /// - /// Test DynamicClientRegistrationUpdateOAuth2Client - /// - [Fact] - public void DynamicClientRegistrationUpdateOAuth2ClientTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string id = null; - //HydraOAuth2Client body = null; - //var response = instance.DynamicClientRegistrationUpdateOAuth2Client(id, body); - //Assert.IsType(response); - } - - /// - /// Test IsInstanceReady - /// - [Fact] - public void IsInstanceReadyTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.IsInstanceReady(); - //Assert.IsType(response); - } - - /// - /// Test Oauth2Token - /// - [Fact] - public void Oauth2TokenTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string grantType = null; - //string code = null; - //string refreshToken = null; - //string redirectUri = null; - //string clientId = null; - //var response = instance.Oauth2Token(grantType, code, refreshToken, redirectUri, clientId); - //Assert.IsType(response); - } - - /// - /// Test OauthAuth - /// - [Fact] - public void OauthAuthTest() - { - // TODO uncomment below to test the method and replace null with proper value - //instance.OauthAuth(); - } - - /// - /// Test RevokeOAuth2Token - /// - [Fact] - public void RevokeOAuth2TokenTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string token = null; - //instance.RevokeOAuth2Token(token); - } - - /// - /// Test Userinfo - /// - [Fact] - public void UserinfoTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.Userinfo(); - //Assert.IsType(response); - } - - /// - /// Test WellKnown - /// - [Fact] - public void WellKnownTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.WellKnown(); - //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 new file mode 100644 index 00000000000..f26906af537 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Api/WellknownApiTests.cs @@ -0,0 +1,69 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Api; +// uncomment below to import models +//using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Test.Api +{ + /// + /// Class for testing WellknownApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class WellknownApiTests : IDisposable + { + private WellknownApi instance; + + public WellknownApiTests() + { + instance = new WellknownApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of WellknownApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' WellknownApi + //Assert.IsType(instance); + } + + /// + /// Test DiscoverJsonWebKeys + /// + [Fact] + public void DiscoverJsonWebKeysTest() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.DiscoverJsonWebKeys(); + //Assert.IsType(response); + } + } +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraConsentRequestSessionTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestSessionTests.cs similarity index 61% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraConsentRequestSessionTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestSessionTests.cs index 82551120182..d76f6a19366 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraConsentRequestSessionTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestSessionTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraConsentRequestSession + /// Class for testing HydraAcceptOAuth2ConsentRequestSession /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraConsentRequestSessionTests : IDisposable + public class HydraAcceptOAuth2ConsentRequestSessionTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraConsentRequestSession - //private HydraConsentRequestSession instance; + // TODO uncomment below to declare an instance variable for HydraAcceptOAuth2ConsentRequestSession + //private HydraAcceptOAuth2ConsentRequestSession instance; - public HydraConsentRequestSessionTests() + public HydraAcceptOAuth2ConsentRequestSessionTests() { - // TODO uncomment below to create an instance of HydraConsentRequestSession - //instance = new HydraConsentRequestSession(); + // TODO uncomment below to create an instance of HydraAcceptOAuth2ConsentRequestSession + //instance = new HydraAcceptOAuth2ConsentRequestSession(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraConsentRequestSession + /// Test an instance of HydraAcceptOAuth2ConsentRequestSession /// [Fact] - public void HydraConsentRequestSessionInstanceTest() + public void HydraAcceptOAuth2ConsentRequestSessionInstanceTest() { - // TODO uncomment below to test "IsType" HydraConsentRequestSession - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraAcceptOAuth2ConsentRequestSession + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptConsentRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestTests.cs similarity index 76% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptConsentRequestTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestTests.cs index 933c8195824..74d5392711e 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptConsentRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2ConsentRequestTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraAcceptConsentRequest + /// Class for testing HydraAcceptOAuth2ConsentRequest /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraAcceptConsentRequestTests : IDisposable + public class HydraAcceptOAuth2ConsentRequestTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraAcceptConsentRequest - //private HydraAcceptConsentRequest instance; + // TODO uncomment below to declare an instance variable for HydraAcceptOAuth2ConsentRequest + //private HydraAcceptOAuth2ConsentRequest instance; - public HydraAcceptConsentRequestTests() + public HydraAcceptOAuth2ConsentRequestTests() { - // TODO uncomment below to create an instance of HydraAcceptConsentRequest - //instance = new HydraAcceptConsentRequest(); + // TODO uncomment below to create an instance of HydraAcceptOAuth2ConsentRequest + //instance = new HydraAcceptOAuth2ConsentRequest(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraAcceptConsentRequest + /// Test an instance of HydraAcceptOAuth2ConsentRequest /// [Fact] - public void HydraAcceptConsentRequestInstanceTest() + public void HydraAcceptOAuth2ConsentRequestInstanceTest() { - // TODO uncomment below to test "IsType" HydraAcceptConsentRequest - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraAcceptOAuth2ConsentRequest + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptLoginRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2LoginRequestTests.cs similarity index 78% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptLoginRequestTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2LoginRequestTests.cs index d02e53f2b9a..b7199b943d6 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptLoginRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraAcceptOAuth2LoginRequestTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraAcceptLoginRequest + /// Class for testing HydraAcceptOAuth2LoginRequest /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraAcceptLoginRequestTests : IDisposable + public class HydraAcceptOAuth2LoginRequestTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraAcceptLoginRequest - //private HydraAcceptLoginRequest instance; + // TODO uncomment below to declare an instance variable for HydraAcceptOAuth2LoginRequest + //private HydraAcceptOAuth2LoginRequest instance; - public HydraAcceptLoginRequestTests() + public HydraAcceptOAuth2LoginRequestTests() { - // TODO uncomment below to create an instance of HydraAcceptLoginRequest - //instance = new HydraAcceptLoginRequest(); + // TODO uncomment below to create an instance of HydraAcceptOAuth2LoginRequest + //instance = new HydraAcceptOAuth2LoginRequest(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraAcceptLoginRequest + /// Test an instance of HydraAcceptOAuth2LoginRequest /// [Fact] - public void HydraAcceptLoginRequestInstanceTest() + public void HydraAcceptOAuth2LoginRequestInstanceTest() { - // TODO uncomment below to test "IsType" HydraAcceptLoginRequest - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraAcceptOAuth2LoginRequest + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetGeneratorRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateJsonWebKeySetTests.cs similarity index 64% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetGeneratorRequestTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateJsonWebKeySetTests.cs index 3c729d7e80a..9b2608e9910 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetGeneratorRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCreateJsonWebKeySetTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraJsonWebKeySetGeneratorRequest + /// Class for testing HydraCreateJsonWebKeySet /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraJsonWebKeySetGeneratorRequestTests : IDisposable + public class HydraCreateJsonWebKeySetTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraJsonWebKeySetGeneratorRequest - //private HydraJsonWebKeySetGeneratorRequest instance; + // TODO uncomment below to declare an instance variable for HydraCreateJsonWebKeySet + //private HydraCreateJsonWebKeySet instance; - public HydraJsonWebKeySetGeneratorRequestTests() + public HydraCreateJsonWebKeySetTests() { - // TODO uncomment below to create an instance of HydraJsonWebKeySetGeneratorRequest - //instance = new HydraJsonWebKeySetGeneratorRequest(); + // TODO uncomment below to create an instance of HydraCreateJsonWebKeySet + //instance = new HydraCreateJsonWebKeySet(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraJsonWebKeySetGeneratorRequest + /// Test an instance of HydraCreateJsonWebKeySet /// [Fact] - public void HydraJsonWebKeySetGeneratorRequestInstanceTest() + public void HydraCreateJsonWebKeySetInstanceTest() { - // TODO uncomment below to test "IsType" HydraJsonWebKeySetGeneratorRequest - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraCreateJsonWebKeySet + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonErrorTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraErrorOAuth2Tests.cs similarity index 68% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonErrorTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraErrorOAuth2Tests.cs index f57916b5a53..fddf349d7fc 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonErrorTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraErrorOAuth2Tests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraJsonError + /// Class for testing HydraErrorOAuth2 /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraJsonErrorTests : IDisposable + public class HydraErrorOAuth2Tests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraJsonError - //private HydraJsonError instance; + // TODO uncomment below to declare an instance variable for HydraErrorOAuth2 + //private HydraErrorOAuth2 instance; - public HydraJsonErrorTests() + public HydraErrorOAuth2Tests() { - // TODO uncomment below to create an instance of HydraJsonError - //instance = new HydraJsonError(); + // TODO uncomment below to create an instance of HydraErrorOAuth2 + //instance = new HydraErrorOAuth2(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraJsonError + /// Test an instance of HydraErrorOAuth2 /// [Fact] - public void HydraJsonErrorInstanceTest() + public void HydraErrorOAuth2InstanceTest() { - // TODO uncomment below to test "IsType" HydraJsonError - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraErrorOAuth2 + //Assert.IsType(instance); } @@ -81,6 +82,14 @@ public void ErrorDescriptionTest() // TODO unit test for the property 'ErrorDescription' } /// + /// Test the property 'ErrorHint' + /// + [Fact] + public void ErrorHintTest() + { + // TODO unit test for the property 'ErrorHint' + } + /// /// Test the property 'StatusCode' /// [Fact] diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraFlushInactiveOAuth2TokensRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraFlushInactiveOAuth2TokensRequestTests.cs deleted file mode 100644 index 330aab16a97..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraFlushInactiveOAuth2TokensRequestTests.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraFlushInactiveOAuth2TokensRequest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraFlushInactiveOAuth2TokensRequestTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraFlushInactiveOAuth2TokensRequest - //private HydraFlushInactiveOAuth2TokensRequest instance; - - public HydraFlushInactiveOAuth2TokensRequestTests() - { - // TODO uncomment below to create an instance of HydraFlushInactiveOAuth2TokensRequest - //instance = new HydraFlushInactiveOAuth2TokensRequest(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraFlushInactiveOAuth2TokensRequest - /// - [Fact] - public void HydraFlushInactiveOAuth2TokensRequestInstanceTest() - { - // TODO uncomment below to test "IsType" HydraFlushInactiveOAuth2TokensRequest - //Assert.IsType(instance); - } - - - /// - /// Test the property 'NotAfter' - /// - [Fact] - public void NotAfterTest() - { - // TODO unit test for the property 'NotAfter' - } - - } - -} 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 3f96e19c6c5..204a77d1bbc 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 @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/HydraHealthNotReadyStatusTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthNotReadyStatusTests.cs index a6b15951a78..226661b7707 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 @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/HydraHealthStatusTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraHealthStatusTests.cs index f1e78b50622..dc1a355fdc9 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 @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/HydraPluginConfigNetworkTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse2001Tests.cs similarity index 54% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigNetworkTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse2001Tests.cs index 4ec32a01107..d0f15481c9f 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigNetworkTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse2001Tests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraPluginConfigNetwork + /// Class for testing HydraInlineResponse2001 /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraPluginConfigNetworkTests : IDisposable + public class HydraInlineResponse2001Tests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraPluginConfigNetwork - //private HydraPluginConfigNetwork instance; + // TODO uncomment below to declare an instance variable for HydraInlineResponse2001 + //private HydraInlineResponse2001 instance; - public HydraPluginConfigNetworkTests() + public HydraInlineResponse2001Tests() { - // TODO uncomment below to create an instance of HydraPluginConfigNetwork - //instance = new HydraPluginConfigNetwork(); + // TODO uncomment below to create an instance of HydraInlineResponse2001 + //instance = new HydraInlineResponse2001(); } public void Dispose() @@ -46,23 +47,23 @@ public void Dispose() } /// - /// Test an instance of HydraPluginConfigNetwork + /// Test an instance of HydraInlineResponse2001 /// [Fact] - public void HydraPluginConfigNetworkInstanceTest() + public void HydraInlineResponse2001InstanceTest() { - // TODO uncomment below to test "IsType" HydraPluginConfigNetwork - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraInlineResponse2001 + //Assert.IsType(instance); } /// - /// Test the property 'Type' + /// Test the property '_Version' /// [Fact] - public void TypeTest() + public void _VersionTest() { - // TODO unit test for the property 'Type' + // TODO unit test for the property '_Version' } } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraContainerWaitOKBodyErrorTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse200Tests.cs similarity index 52% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraContainerWaitOKBodyErrorTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse200Tests.cs index f317f9f4d29..a04e1fcad9b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraContainerWaitOKBodyErrorTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse200Tests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraContainerWaitOKBodyError + /// Class for testing HydraInlineResponse200 /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraContainerWaitOKBodyErrorTests : IDisposable + public class HydraInlineResponse200Tests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraContainerWaitOKBodyError - //private HydraContainerWaitOKBodyError instance; + // TODO uncomment below to declare an instance variable for HydraInlineResponse200 + //private HydraInlineResponse200 instance; - public HydraContainerWaitOKBodyErrorTests() + public HydraInlineResponse200Tests() { - // TODO uncomment below to create an instance of HydraContainerWaitOKBodyError - //instance = new HydraContainerWaitOKBodyError(); + // TODO uncomment below to create an instance of HydraInlineResponse200 + //instance = new HydraInlineResponse200(); } public void Dispose() @@ -46,23 +47,23 @@ public void Dispose() } /// - /// Test an instance of HydraContainerWaitOKBodyError + /// Test an instance of HydraInlineResponse200 /// [Fact] - public void HydraContainerWaitOKBodyErrorInstanceTest() + public void HydraInlineResponse200InstanceTest() { - // TODO uncomment below to test "IsType" HydraContainerWaitOKBodyError - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraInlineResponse200 + //Assert.IsType(instance); } /// - /// Test the property 'Message' + /// Test the property 'Status' /// [Fact] - public void MessageTest() + public void StatusTest() { - // TODO unit test for the property 'Message' + // 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/HydraInlineResponse503Tests.cs new file mode 100644 index 00000000000..5e381448d83 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraInlineResponse503Tests.cs @@ -0,0 +1,71 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +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; +using Newtonsoft.Json; + +namespace Ory.Hydra.Client.Test.Model +{ + /// + /// Class for testing HydraInlineResponse503 + /// + /// + /// 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 + { + // TODO uncomment below to declare an instance variable for HydraInlineResponse503 + //private HydraInlineResponse503 instance; + + public HydraInlineResponse503Tests() + { + // TODO uncomment below to create an instance of HydraInlineResponse503 + //instance = new HydraInlineResponse503(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of HydraInlineResponse503 + /// + [Fact] + public void HydraInlineResponse503InstanceTest() + { + // TODO uncomment below to test "IsType" HydraInlineResponse503 + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Errors' + /// + [Fact] + public void ErrorsTest() + { + // TODO unit test for the property 'Errors' + } + + } + +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenIntrospectionTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIntrospectedOAuth2TokenTests.cs similarity index 82% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenIntrospectionTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIntrospectedOAuth2TokenTests.cs index 2c302aa31ff..186bb33b0e8 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenIntrospectionTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraIntrospectedOAuth2TokenTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraOAuth2TokenIntrospection + /// Class for testing HydraIntrospectedOAuth2Token /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraOAuth2TokenIntrospectionTests : IDisposable + public class HydraIntrospectedOAuth2TokenTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraOAuth2TokenIntrospection - //private HydraOAuth2TokenIntrospection instance; + // TODO uncomment below to declare an instance variable for HydraIntrospectedOAuth2Token + //private HydraIntrospectedOAuth2Token instance; - public HydraOAuth2TokenIntrospectionTests() + public HydraIntrospectedOAuth2TokenTests() { - // TODO uncomment below to create an instance of HydraOAuth2TokenIntrospection - //instance = new HydraOAuth2TokenIntrospection(); + // TODO uncomment below to create an instance of HydraIntrospectedOAuth2Token + //instance = new HydraIntrospectedOAuth2Token(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraOAuth2TokenIntrospection + /// Test an instance of HydraIntrospectedOAuth2Token /// [Fact] - public void HydraOAuth2TokenIntrospectionInstanceTest() + public void HydraIntrospectedOAuth2TokenInstanceTest() { - // TODO uncomment below to test "IsType" HydraOAuth2TokenIntrospection - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraIntrospectedOAuth2Token + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPatchDocumentTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonPatchTests.cs similarity index 72% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPatchDocumentTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonPatchTests.cs index 517bb501d49..af2f467d9c4 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPatchDocumentTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonPatchTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraPatchDocument + /// Class for testing HydraJsonPatch /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraPatchDocumentTests : IDisposable + public class HydraJsonPatchTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraPatchDocument - //private HydraPatchDocument instance; + // TODO uncomment below to declare an instance variable for HydraJsonPatch + //private HydraJsonPatch instance; - public HydraPatchDocumentTests() + public HydraJsonPatchTests() { - // TODO uncomment below to create an instance of HydraPatchDocument - //instance = new HydraPatchDocument(); + // TODO uncomment below to create an instance of HydraJsonPatch + //instance = new HydraJsonPatch(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraPatchDocument + /// Test an instance of HydraJsonPatch /// [Fact] - public void HydraPatchDocumentInstanceTest() + public void HydraJsonPatchInstanceTest() { - // TODO uncomment below to test "IsType" HydraPatchDocument - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraJsonPatch + //Assert.IsType(instance); } 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 similarity index 63% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJSONWebKeySetTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeySetTests.cs index d8b3358da5d..9ac2f2d048d 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 @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraJSONWebKeySet + /// Class for testing HydraJsonWebKeySet /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraJSONWebKeySetTests : IDisposable + public class HydraJsonWebKeySetTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraJSONWebKeySet - //private HydraJSONWebKeySet instance; + // TODO uncomment below to declare an instance variable for HydraJsonWebKeySet + //private HydraJsonWebKeySet instance; - public HydraJSONWebKeySetTests() + public HydraJsonWebKeySetTests() { - // TODO uncomment below to create an instance of HydraJSONWebKeySet - //instance = new HydraJSONWebKeySet(); + // TODO uncomment below to create an instance of HydraJsonWebKeySet + //instance = new HydraJsonWebKeySet(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraJSONWebKeySet + /// Test an instance of HydraJsonWebKeySet /// [Fact] - public void HydraJSONWebKeySetInstanceTest() + public void HydraJsonWebKeySetInstanceTest() { - // TODO uncomment below to test "IsType" HydraJSONWebKeySet - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraJsonWebKeySet + //Assert.IsType(instance); } 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 similarity index 86% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJSONWebKeyTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraJsonWebKeyTests.cs index 63e368aa0aa..b72e2fb5a0c 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 @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraJSONWebKey + /// Class for testing HydraJsonWebKey /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraJSONWebKeyTests : IDisposable + public class HydraJsonWebKeyTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraJSONWebKey - //private HydraJSONWebKey instance; + // TODO uncomment below to declare an instance variable for HydraJsonWebKey + //private HydraJsonWebKey instance; - public HydraJSONWebKeyTests() + public HydraJsonWebKeyTests() { - // TODO uncomment below to create an instance of HydraJSONWebKey - //instance = new HydraJSONWebKey(); + // TODO uncomment below to create an instance of HydraJsonWebKey + //instance = new HydraJsonWebKey(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraJSONWebKey + /// Test an instance of HydraJsonWebKey /// [Fact] - public void HydraJSONWebKeyInstanceTest() + public void HydraJsonWebKeyInstanceTest() { - // TODO uncomment below to test "IsType" HydraJSONWebKey - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraJsonWebKey + //Assert.IsType(instance); } 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 f8bf0f9165a..1f275fb26ce 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 @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -73,6 +74,30 @@ public void AudienceTest() // TODO unit test for the property 'Audience' } /// + /// Test the property 'AuthorizationCodeGrantAccessTokenLifespan' + /// + [Fact] + public void AuthorizationCodeGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'AuthorizationCodeGrantAccessTokenLifespan' + } + /// + /// Test the property 'AuthorizationCodeGrantIdTokenLifespan' + /// + [Fact] + public void AuthorizationCodeGrantIdTokenLifespanTest() + { + // TODO unit test for the property 'AuthorizationCodeGrantIdTokenLifespan' + } + /// + /// Test the property 'AuthorizationCodeGrantRefreshTokenLifespan' + /// + [Fact] + public void AuthorizationCodeGrantRefreshTokenLifespanTest() + { + // TODO unit test for the property 'AuthorizationCodeGrantRefreshTokenLifespan' + } + /// /// Test the property 'BackchannelLogoutSessionRequired' /// [Fact] @@ -89,6 +114,14 @@ public void BackchannelLogoutUriTest() // TODO unit test for the property 'BackchannelLogoutUri' } /// + /// Test the property 'ClientCredentialsGrantAccessTokenLifespan' + /// + [Fact] + public void ClientCredentialsGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'ClientCredentialsGrantAccessTokenLifespan' + } + /// /// Test the property 'ClientId' /// [Fact] @@ -169,6 +202,22 @@ public void GrantTypesTest() // TODO unit test for the property 'GrantTypes' } /// + /// Test the property 'ImplicitGrantAccessTokenLifespan' + /// + [Fact] + public void ImplicitGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'ImplicitGrantAccessTokenLifespan' + } + /// + /// Test the property 'ImplicitGrantIdTokenLifespan' + /// + [Fact] + public void ImplicitGrantIdTokenLifespanTest() + { + // TODO unit test for the property 'ImplicitGrantIdTokenLifespan' + } + /// /// Test the property 'Jwks' /// [Fact] @@ -185,6 +234,14 @@ public void JwksUriTest() // TODO unit test for the property 'JwksUri' } /// + /// Test the property 'JwtBearerGrantAccessTokenLifespan' + /// + [Fact] + public void JwtBearerGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'JwtBearerGrantAccessTokenLifespan' + } + /// /// Test the property 'LogoUri' /// [Fact] @@ -233,6 +290,30 @@ public void RedirectUrisTest() // TODO unit test for the property 'RedirectUris' } /// + /// Test the property 'RefreshTokenGrantAccessTokenLifespan' + /// + [Fact] + public void RefreshTokenGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'RefreshTokenGrantAccessTokenLifespan' + } + /// + /// Test the property 'RefreshTokenGrantIdTokenLifespan' + /// + [Fact] + public void RefreshTokenGrantIdTokenLifespanTest() + { + // TODO unit test for the property 'RefreshTokenGrantIdTokenLifespan' + } + /// + /// Test the property 'RefreshTokenGrantRefreshTokenLifespan' + /// + [Fact] + public void RefreshTokenGrantRefreshTokenLifespanTest() + { + // TODO unit test for the property 'RefreshTokenGrantRefreshTokenLifespan' + } + /// /// Test the property 'RegistrationAccessToken' /// [Fact] 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 new file mode 100644 index 00000000000..5ee17cf92f3 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ClientTokenLifespansTests.cs @@ -0,0 +1,143 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +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; +using Newtonsoft.Json; + +namespace Ory.Hydra.Client.Test.Model +{ + /// + /// Class for testing HydraOAuth2ClientTokenLifespans + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class HydraOAuth2ClientTokenLifespansTests : IDisposable + { + // TODO uncomment below to declare an instance variable for HydraOAuth2ClientTokenLifespans + //private HydraOAuth2ClientTokenLifespans instance; + + public HydraOAuth2ClientTokenLifespansTests() + { + // TODO uncomment below to create an instance of HydraOAuth2ClientTokenLifespans + //instance = new HydraOAuth2ClientTokenLifespans(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of HydraOAuth2ClientTokenLifespans + /// + [Fact] + public void HydraOAuth2ClientTokenLifespansInstanceTest() + { + // TODO uncomment below to test "IsType" HydraOAuth2ClientTokenLifespans + //Assert.IsType(instance); + } + + + /// + /// Test the property 'AuthorizationCodeGrantAccessTokenLifespan' + /// + [Fact] + public void AuthorizationCodeGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'AuthorizationCodeGrantAccessTokenLifespan' + } + /// + /// Test the property 'AuthorizationCodeGrantIdTokenLifespan' + /// + [Fact] + public void AuthorizationCodeGrantIdTokenLifespanTest() + { + // TODO unit test for the property 'AuthorizationCodeGrantIdTokenLifespan' + } + /// + /// Test the property 'AuthorizationCodeGrantRefreshTokenLifespan' + /// + [Fact] + public void AuthorizationCodeGrantRefreshTokenLifespanTest() + { + // TODO unit test for the property 'AuthorizationCodeGrantRefreshTokenLifespan' + } + /// + /// Test the property 'ClientCredentialsGrantAccessTokenLifespan' + /// + [Fact] + public void ClientCredentialsGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'ClientCredentialsGrantAccessTokenLifespan' + } + /// + /// Test the property 'ImplicitGrantAccessTokenLifespan' + /// + [Fact] + public void ImplicitGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'ImplicitGrantAccessTokenLifespan' + } + /// + /// Test the property 'ImplicitGrantIdTokenLifespan' + /// + [Fact] + public void ImplicitGrantIdTokenLifespanTest() + { + // TODO unit test for the property 'ImplicitGrantIdTokenLifespan' + } + /// + /// Test the property 'JwtBearerGrantAccessTokenLifespan' + /// + [Fact] + public void JwtBearerGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'JwtBearerGrantAccessTokenLifespan' + } + /// + /// Test the property 'RefreshTokenGrantAccessTokenLifespan' + /// + [Fact] + public void RefreshTokenGrantAccessTokenLifespanTest() + { + // TODO unit test for the property 'RefreshTokenGrantAccessTokenLifespan' + } + /// + /// Test the property 'RefreshTokenGrantIdTokenLifespan' + /// + [Fact] + public void RefreshTokenGrantIdTokenLifespanTest() + { + // TODO unit test for the property 'RefreshTokenGrantIdTokenLifespan' + } + /// + /// Test the property 'RefreshTokenGrantRefreshTokenLifespan' + /// + [Fact] + public void RefreshTokenGrantRefreshTokenLifespanTest() + { + // TODO unit test for the property 'RefreshTokenGrantRefreshTokenLifespan' + } + + } + +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOpenIDConnectContextTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestOpenIDConnectContextTests.cs similarity index 68% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOpenIDConnectContextTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestOpenIDConnectContextTests.cs index 0d17d700cef..d429b82bf69 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOpenIDConnectContextTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestOpenIDConnectContextTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraOpenIDConnectContext + /// Class for testing HydraOAuth2ConsentRequestOpenIDConnectContext /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraOpenIDConnectContextTests : IDisposable + public class HydraOAuth2ConsentRequestOpenIDConnectContextTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraOpenIDConnectContext - //private HydraOpenIDConnectContext instance; + // TODO uncomment below to declare an instance variable for HydraOAuth2ConsentRequestOpenIDConnectContext + //private HydraOAuth2ConsentRequestOpenIDConnectContext instance; - public HydraOpenIDConnectContextTests() + public HydraOAuth2ConsentRequestOpenIDConnectContextTests() { - // TODO uncomment below to create an instance of HydraOpenIDConnectContext - //instance = new HydraOpenIDConnectContext(); + // TODO uncomment below to create an instance of HydraOAuth2ConsentRequestOpenIDConnectContext + //instance = new HydraOAuth2ConsentRequestOpenIDConnectContext(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraOpenIDConnectContext + /// Test an instance of HydraOAuth2ConsentRequestOpenIDConnectContext /// [Fact] - public void HydraOpenIDConnectContextInstanceTest() + public void HydraOAuth2ConsentRequestOpenIDConnectContextInstanceTest() { - // TODO uncomment below to test "IsType" HydraOpenIDConnectContext - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraOAuth2ConsentRequestOpenIDConnectContext + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraConsentRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestTests.cs similarity index 84% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraConsentRequestTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestTests.cs index 3c83b1995de..2c3cd2d2b34 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraConsentRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentRequestTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraConsentRequest + /// Class for testing HydraOAuth2ConsentRequest /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraConsentRequestTests : IDisposable + public class HydraOAuth2ConsentRequestTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraConsentRequest - //private HydraConsentRequest instance; + // TODO uncomment below to declare an instance variable for HydraOAuth2ConsentRequest + //private HydraOAuth2ConsentRequest instance; - public HydraConsentRequestTests() + public HydraOAuth2ConsentRequestTests() { - // TODO uncomment below to create an instance of HydraConsentRequest - //instance = new HydraConsentRequest(); + // TODO uncomment below to create an instance of HydraOAuth2ConsentRequest + //instance = new HydraOAuth2ConsentRequest(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraConsentRequest + /// Test an instance of HydraOAuth2ConsentRequest /// [Fact] - public void HydraConsentRequestInstanceTest() + public void HydraOAuth2ConsentRequestInstanceTest() { - // TODO uncomment below to test "IsType" HydraConsentRequest - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraOAuth2ConsentRequest + //Assert.IsType(instance); } 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 new file mode 100644 index 00000000000..0335e1ddd0b --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionExpiresAtTests.cs @@ -0,0 +1,103 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +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; +using Newtonsoft.Json; + +namespace Ory.Hydra.Client.Test.Model +{ + /// + /// Class for testing HydraOAuth2ConsentSessionExpiresAt + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class HydraOAuth2ConsentSessionExpiresAtTests : IDisposable + { + // TODO uncomment below to declare an instance variable for HydraOAuth2ConsentSessionExpiresAt + //private HydraOAuth2ConsentSessionExpiresAt instance; + + public HydraOAuth2ConsentSessionExpiresAtTests() + { + // TODO uncomment below to create an instance of HydraOAuth2ConsentSessionExpiresAt + //instance = new HydraOAuth2ConsentSessionExpiresAt(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of HydraOAuth2ConsentSessionExpiresAt + /// + [Fact] + public void HydraOAuth2ConsentSessionExpiresAtInstanceTest() + { + // TODO uncomment below to test "IsType" HydraOAuth2ConsentSessionExpiresAt + //Assert.IsType(instance); + } + + + /// + /// Test the property 'AccessToken' + /// + [Fact] + public void AccessTokenTest() + { + // TODO unit test for the property 'AccessToken' + } + /// + /// Test the property 'AuthorizeCode' + /// + [Fact] + public void AuthorizeCodeTest() + { + // TODO unit test for the property 'AuthorizeCode' + } + /// + /// Test the property 'IdToken' + /// + [Fact] + public void IdTokenTest() + { + // TODO unit test for the property 'IdToken' + } + /// + /// Test the property 'ParContext' + /// + [Fact] + public void ParContextTest() + { + // TODO unit test for the property 'ParContext' + } + /// + /// Test the property 'RefreshToken' + /// + [Fact] + public void RefreshTokenTest() + { + // TODO unit test for the property 'RefreshToken' + } + + } + +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPreviousConsentSessionTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionTests.cs similarity index 72% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPreviousConsentSessionTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionTests.cs index 5c11970f119..9ad90a4c472 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPreviousConsentSessionTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2ConsentSessionTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraPreviousConsentSession + /// Class for testing HydraOAuth2ConsentSession /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraPreviousConsentSessionTests : IDisposable + public class HydraOAuth2ConsentSessionTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraPreviousConsentSession - //private HydraPreviousConsentSession instance; + // TODO uncomment below to declare an instance variable for HydraOAuth2ConsentSession + //private HydraOAuth2ConsentSession instance; - public HydraPreviousConsentSessionTests() + public HydraOAuth2ConsentSessionTests() { - // TODO uncomment below to create an instance of HydraPreviousConsentSession - //instance = new HydraPreviousConsentSession(); + // TODO uncomment below to create an instance of HydraOAuth2ConsentSession + //instance = new HydraOAuth2ConsentSession(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraPreviousConsentSession + /// Test an instance of HydraOAuth2ConsentSession /// [Fact] - public void HydraPreviousConsentSessionInstanceTest() + public void HydraOAuth2ConsentSessionInstanceTest() { - // TODO uncomment below to test "IsType" HydraPreviousConsentSession - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraOAuth2ConsentSession + //Assert.IsType(instance); } @@ -65,6 +66,14 @@ public void ConsentRequestTest() // TODO unit test for the property 'ConsentRequest' } /// + /// Test the property 'ExpiresAt' + /// + [Fact] + public void ExpiresAtTest() + { + // TODO unit test for the property 'ExpiresAt' + } + /// /// Test the property 'GrantAccessTokenAudience' /// [Fact] diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraLoginRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LoginRequestTests.cs similarity index 80% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraLoginRequestTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LoginRequestTests.cs index 8a1f2bdca58..c7c319bd811 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraLoginRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LoginRequestTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraLoginRequest + /// Class for testing HydraOAuth2LoginRequest /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraLoginRequestTests : IDisposable + public class HydraOAuth2LoginRequestTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraLoginRequest - //private HydraLoginRequest instance; + // TODO uncomment below to declare an instance variable for HydraOAuth2LoginRequest + //private HydraOAuth2LoginRequest instance; - public HydraLoginRequestTests() + public HydraOAuth2LoginRequestTests() { - // TODO uncomment below to create an instance of HydraLoginRequest - //instance = new HydraLoginRequest(); + // TODO uncomment below to create an instance of HydraOAuth2LoginRequest + //instance = new HydraOAuth2LoginRequest(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraLoginRequest + /// Test an instance of HydraOAuth2LoginRequest /// [Fact] - public void HydraLoginRequestInstanceTest() + public void HydraOAuth2LoginRequestInstanceTest() { - // TODO uncomment below to test "IsType" HydraLoginRequest - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraOAuth2LoginRequest + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraLogoutRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LogoutRequestTests.cs similarity index 75% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraLogoutRequestTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LogoutRequestTests.cs index cb3cc4df3c1..b5cfa0bd8aa 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraLogoutRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2LogoutRequestTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraLogoutRequest + /// Class for testing HydraOAuth2LogoutRequest /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraLogoutRequestTests : IDisposable + public class HydraOAuth2LogoutRequestTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraLogoutRequest - //private HydraLogoutRequest instance; + // TODO uncomment below to declare an instance variable for HydraOAuth2LogoutRequest + //private HydraOAuth2LogoutRequest instance; - public HydraLogoutRequestTests() + public HydraOAuth2LogoutRequestTests() { - // TODO uncomment below to create an instance of HydraLogoutRequest - //instance = new HydraLogoutRequest(); + // TODO uncomment below to create an instance of HydraOAuth2LogoutRequest + //instance = new HydraOAuth2LogoutRequest(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraLogoutRequest + /// Test an instance of HydraOAuth2LogoutRequest /// [Fact] - public void HydraLogoutRequestInstanceTest() + public void HydraOAuth2LogoutRequestInstanceTest() { - // TODO uncomment below to test "IsType" HydraLogoutRequest - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraOAuth2LogoutRequest + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCompletedRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2RedirectToTests.cs similarity index 62% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCompletedRequestTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2RedirectToTests.cs index fdaa758121b..c7a8922e95a 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraCompletedRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2RedirectToTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraCompletedRequest + /// Class for testing HydraOAuth2RedirectTo /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraCompletedRequestTests : IDisposable + public class HydraOAuth2RedirectToTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraCompletedRequest - //private HydraCompletedRequest instance; + // TODO uncomment below to declare an instance variable for HydraOAuth2RedirectTo + //private HydraOAuth2RedirectTo instance; - public HydraCompletedRequestTests() + public HydraOAuth2RedirectToTests() { - // TODO uncomment below to create an instance of HydraCompletedRequest - //instance = new HydraCompletedRequest(); + // TODO uncomment below to create an instance of HydraOAuth2RedirectTo + //instance = new HydraOAuth2RedirectTo(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraCompletedRequest + /// Test an instance of HydraOAuth2RedirectTo /// [Fact] - public void HydraCompletedRequestInstanceTest() + public void HydraOAuth2RedirectToInstanceTest() { - // TODO uncomment below to test "IsType" HydraCompletedRequest - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraOAuth2RedirectTo + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOauth2TokenResponseTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenExchangeTests.cs similarity index 75% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOauth2TokenResponseTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenExchangeTests.cs index 5fb2115a95b..7897ea763f6 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOauth2TokenResponseTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOAuth2TokenExchangeTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraOauth2TokenResponse + /// Class for testing HydraOAuth2TokenExchange /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraOauth2TokenResponseTests : IDisposable + public class HydraOAuth2TokenExchangeTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraOauth2TokenResponse - //private HydraOauth2TokenResponse instance; + // TODO uncomment below to declare an instance variable for HydraOAuth2TokenExchange + //private HydraOAuth2TokenExchange instance; - public HydraOauth2TokenResponseTests() + public HydraOAuth2TokenExchangeTests() { - // TODO uncomment below to create an instance of HydraOauth2TokenResponse - //instance = new HydraOauth2TokenResponse(); + // TODO uncomment below to create an instance of HydraOAuth2TokenExchange + //instance = new HydraOAuth2TokenExchange(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraOauth2TokenResponse + /// Test an instance of HydraOAuth2TokenExchange /// [Fact] - public void HydraOauth2TokenResponseInstanceTest() + public void HydraOAuth2TokenExchangeInstanceTest() { - // TODO uncomment below to test "IsType" HydraOauth2TokenResponse - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraOAuth2TokenExchange + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraWellKnownTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcConfigurationTests.cs similarity index 86% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraWellKnownTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcConfigurationTests.cs index 615cea3d698..f537d83e64c 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraWellKnownTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcConfigurationTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraWellKnown + /// Class for testing HydraOidcConfiguration /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraWellKnownTests : IDisposable + public class HydraOidcConfigurationTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraWellKnown - //private HydraWellKnown instance; + // TODO uncomment below to declare an instance variable for HydraOidcConfiguration + //private HydraOidcConfiguration instance; - public HydraWellKnownTests() + public HydraOidcConfigurationTests() { - // TODO uncomment below to create an instance of HydraWellKnown - //instance = new HydraWellKnown(); + // TODO uncomment below to create an instance of HydraOidcConfiguration + //instance = new HydraOidcConfiguration(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraWellKnown + /// Test an instance of HydraOidcConfiguration /// [Fact] - public void HydraWellKnownInstanceTest() + public void HydraOidcConfigurationInstanceTest() { - // TODO uncomment below to test "IsType" HydraWellKnown - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraOidcConfiguration + //Assert.IsType(instance); } @@ -137,6 +138,14 @@ public void GrantTypesSupportedTest() // TODO unit test for the property 'GrantTypesSupported' } /// + /// Test the property 'IdTokenSignedResponseAlg' + /// + [Fact] + public void IdTokenSignedResponseAlgTest() + { + // TODO unit test for the property 'IdTokenSignedResponseAlg' + } + /// /// Test the property 'IdTokenSigningAlgValuesSupported' /// [Fact] @@ -265,6 +274,14 @@ public void UserinfoEndpointTest() // TODO unit test for the property 'UserinfoEndpoint' } /// + /// Test the property 'UserinfoSignedResponseAlg' + /// + [Fact] + public void UserinfoSignedResponseAlgTest() + { + // TODO unit test for the property 'UserinfoSignedResponseAlg' + } + /// /// Test the property 'UserinfoSigningAlgValuesSupported' /// [Fact] diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraUserinfoResponseTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcUserInfoTests.cs similarity index 87% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraUserinfoResponseTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcUserInfoTests.cs index 2384afb7792..4494758273d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraUserinfoResponseTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraOidcUserInfoTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraUserinfoResponse + /// Class for testing HydraOidcUserInfo /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraUserinfoResponseTests : IDisposable + public class HydraOidcUserInfoTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraUserinfoResponse - //private HydraUserinfoResponse instance; + // TODO uncomment below to declare an instance variable for HydraOidcUserInfo + //private HydraOidcUserInfo instance; - public HydraUserinfoResponseTests() + public HydraOidcUserInfoTests() { - // TODO uncomment below to create an instance of HydraUserinfoResponse - //instance = new HydraUserinfoResponse(); + // TODO uncomment below to create an instance of HydraOidcUserInfo + //instance = new HydraOidcUserInfo(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraUserinfoResponse + /// Test an instance of HydraOidcUserInfo /// [Fact] - public void HydraUserinfoResponseInstanceTest() + public void HydraOidcUserInfoInstanceTest() { - // TODO uncomment below to test "IsType" HydraUserinfoResponse - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraOidcUserInfo + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVolumeUsageDataTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationHeadersTests.cs similarity index 53% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVolumeUsageDataTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationHeadersTests.cs index d28a53efc69..ff13160efdf 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVolumeUsageDataTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationHeadersTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraVolumeUsageData + /// Class for testing HydraPaginationHeaders /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraVolumeUsageDataTests : IDisposable + public class HydraPaginationHeadersTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraVolumeUsageData - //private HydraVolumeUsageData instance; + // TODO uncomment below to declare an instance variable for HydraPaginationHeaders + //private HydraPaginationHeaders instance; - public HydraVolumeUsageDataTests() + public HydraPaginationHeadersTests() { - // TODO uncomment below to create an instance of HydraVolumeUsageData - //instance = new HydraVolumeUsageData(); + // TODO uncomment below to create an instance of HydraPaginationHeaders + //instance = new HydraPaginationHeaders(); } public void Dispose() @@ -46,31 +47,31 @@ public void Dispose() } /// - /// Test an instance of HydraVolumeUsageData + /// Test an instance of HydraPaginationHeaders /// [Fact] - public void HydraVolumeUsageDataInstanceTest() + public void HydraPaginationHeadersInstanceTest() { - // TODO uncomment below to test "IsType" HydraVolumeUsageData - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraPaginationHeaders + //Assert.IsType(instance); } /// - /// Test the property 'RefCount' + /// Test the property 'Link' /// [Fact] - public void RefCountTest() + public void LinkTest() { - // TODO unit test for the property 'RefCount' + // TODO unit test for the property 'Link' } /// - /// Test the property 'Size' + /// Test the property 'XTotalCount' /// [Fact] - public void SizeTest() + public void XTotalCountTest() { - // TODO unit test for the property 'Size' + // TODO unit test for the property 'XTotalCount' } } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigRootfsTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationTests.cs similarity index 54% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigRootfsTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationTests.cs index 265f8d88f26..85c3e758859 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigRootfsTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPaginationTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraPluginConfigRootfs + /// Class for testing HydraPagination /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraPluginConfigRootfsTests : IDisposable + public class HydraPaginationTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraPluginConfigRootfs - //private HydraPluginConfigRootfs instance; + // TODO uncomment below to declare an instance variable for HydraPagination + //private HydraPagination instance; - public HydraPluginConfigRootfsTests() + public HydraPaginationTests() { - // TODO uncomment below to create an instance of HydraPluginConfigRootfs - //instance = new HydraPluginConfigRootfs(); + // TODO uncomment below to create an instance of HydraPagination + //instance = new HydraPagination(); } public void Dispose() @@ -46,31 +47,31 @@ public void Dispose() } /// - /// Test an instance of HydraPluginConfigRootfs + /// Test an instance of HydraPagination /// [Fact] - public void HydraPluginConfigRootfsInstanceTest() + public void HydraPaginationInstanceTest() { - // TODO uncomment below to test "IsType" HydraPluginConfigRootfs - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraPagination + //Assert.IsType(instance); } /// - /// Test the property 'DiffIds' + /// Test the property 'PageSize' /// [Fact] - public void DiffIdsTest() + public void PageSizeTest() { - // TODO unit test for the property 'DiffIds' + // TODO unit test for the property 'PageSize' } /// - /// Test the property 'Type' + /// Test the property 'PageToken' /// [Fact] - public void TypeTest() + public void PageTokenTest() { - // TODO unit test for the property 'Type' + // TODO unit test for the property 'PageToken' } } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigArgsTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigArgsTests.cs deleted file mode 100644 index 7377a6b39d1..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigArgsTests.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraPluginConfigArgs - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraPluginConfigArgsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraPluginConfigArgs - //private HydraPluginConfigArgs instance; - - public HydraPluginConfigArgsTests() - { - // TODO uncomment below to create an instance of HydraPluginConfigArgs - //instance = new HydraPluginConfigArgs(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraPluginConfigArgs - /// - [Fact] - public void HydraPluginConfigArgsInstanceTest() - { - // TODO uncomment below to test "IsType" HydraPluginConfigArgs - //Assert.IsType(instance); - } - - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Settable' - /// - [Fact] - public void SettableTest() - { - // TODO unit test for the property 'Settable' - } - /// - /// Test the property 'Value' - /// - [Fact] - public void ValueTest() - { - // TODO unit test for the property 'Value' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigInterfaceTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigInterfaceTests.cs deleted file mode 100644 index c1e52c4d0f5..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigInterfaceTests.cs +++ /dev/null @@ -1,86 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraPluginConfigInterface - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraPluginConfigInterfaceTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraPluginConfigInterface - //private HydraPluginConfigInterface instance; - - public HydraPluginConfigInterfaceTests() - { - // TODO uncomment below to create an instance of HydraPluginConfigInterface - //instance = new HydraPluginConfigInterface(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraPluginConfigInterface - /// - [Fact] - public void HydraPluginConfigInterfaceInstanceTest() - { - // TODO uncomment below to test "IsType" HydraPluginConfigInterface - //Assert.IsType(instance); - } - - - /// - /// Test the property 'ProtocolScheme' - /// - [Fact] - public void ProtocolSchemeTest() - { - // TODO unit test for the property 'ProtocolScheme' - } - /// - /// Test the property 'Socket' - /// - [Fact] - public void SocketTest() - { - // TODO unit test for the property 'Socket' - } - /// - /// Test the property 'Types' - /// - [Fact] - public void TypesTest() - { - // TODO unit test for the property 'Types' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigLinuxTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigLinuxTests.cs deleted file mode 100644 index 948077e10f8..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigLinuxTests.cs +++ /dev/null @@ -1,86 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraPluginConfigLinux - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraPluginConfigLinuxTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraPluginConfigLinux - //private HydraPluginConfigLinux instance; - - public HydraPluginConfigLinuxTests() - { - // TODO uncomment below to create an instance of HydraPluginConfigLinux - //instance = new HydraPluginConfigLinux(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraPluginConfigLinux - /// - [Fact] - public void HydraPluginConfigLinuxInstanceTest() - { - // TODO uncomment below to test "IsType" HydraPluginConfigLinux - //Assert.IsType(instance); - } - - - /// - /// Test the property 'AllowAllDevices' - /// - [Fact] - public void AllowAllDevicesTest() - { - // TODO unit test for the property 'AllowAllDevices' - } - /// - /// Test the property 'Capabilities' - /// - [Fact] - public void CapabilitiesTest() - { - // TODO unit test for the property 'Capabilities' - } - /// - /// Test the property 'Devices' - /// - [Fact] - public void DevicesTest() - { - // TODO unit test for the property 'Devices' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigTests.cs deleted file mode 100644 index 15553168f9c..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigTests.cs +++ /dev/null @@ -1,190 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraPluginConfig - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraPluginConfigTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraPluginConfig - //private HydraPluginConfig instance; - - public HydraPluginConfigTests() - { - // TODO uncomment below to create an instance of HydraPluginConfig - //instance = new HydraPluginConfig(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraPluginConfig - /// - [Fact] - public void HydraPluginConfigInstanceTest() - { - // TODO uncomment below to test "IsType" HydraPluginConfig - //Assert.IsType(instance); - } - - - /// - /// Test the property 'Args' - /// - [Fact] - public void ArgsTest() - { - // TODO unit test for the property 'Args' - } - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - /// - /// Test the property 'DockerVersion' - /// - [Fact] - public void DockerVersionTest() - { - // TODO unit test for the property 'DockerVersion' - } - /// - /// Test the property 'Documentation' - /// - [Fact] - public void DocumentationTest() - { - // TODO unit test for the property 'Documentation' - } - /// - /// Test the property 'Entrypoint' - /// - [Fact] - public void EntrypointTest() - { - // TODO unit test for the property 'Entrypoint' - } - /// - /// Test the property 'Env' - /// - [Fact] - public void EnvTest() - { - // TODO unit test for the property 'Env' - } - /// - /// Test the property 'Interface' - /// - [Fact] - public void InterfaceTest() - { - // TODO unit test for the property 'Interface' - } - /// - /// Test the property 'IpcHost' - /// - [Fact] - public void IpcHostTest() - { - // TODO unit test for the property 'IpcHost' - } - /// - /// Test the property 'Linux' - /// - [Fact] - public void LinuxTest() - { - // TODO unit test for the property 'Linux' - } - /// - /// Test the property 'Mounts' - /// - [Fact] - public void MountsTest() - { - // TODO unit test for the property 'Mounts' - } - /// - /// Test the property 'Network' - /// - [Fact] - public void NetworkTest() - { - // TODO unit test for the property 'Network' - } - /// - /// Test the property 'PidHost' - /// - [Fact] - public void PidHostTest() - { - // TODO unit test for the property 'PidHost' - } - /// - /// Test the property 'PropagatedMount' - /// - [Fact] - public void PropagatedMountTest() - { - // TODO unit test for the property 'PropagatedMount' - } - /// - /// Test the property 'User' - /// - [Fact] - public void UserTest() - { - // TODO unit test for the property 'User' - } - /// - /// Test the property 'WorkDir' - /// - [Fact] - public void WorkDirTest() - { - // TODO unit test for the property 'WorkDir' - } - /// - /// Test the property 'Rootfs' - /// - [Fact] - public void RootfsTest() - { - // TODO unit test for the property 'Rootfs' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginDeviceTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginDeviceTests.cs deleted file mode 100644 index b1881e36ec8..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginDeviceTests.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraPluginDevice - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraPluginDeviceTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraPluginDevice - //private HydraPluginDevice instance; - - public HydraPluginDeviceTests() - { - // TODO uncomment below to create an instance of HydraPluginDevice - //instance = new HydraPluginDevice(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraPluginDevice - /// - [Fact] - public void HydraPluginDeviceInstanceTest() - { - // TODO uncomment below to test "IsType" HydraPluginDevice - //Assert.IsType(instance); - } - - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Path' - /// - [Fact] - public void PathTest() - { - // TODO unit test for the property 'Path' - } - /// - /// Test the property 'Settable' - /// - [Fact] - public void SettableTest() - { - // TODO unit test for the property 'Settable' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginEnvTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginEnvTests.cs deleted file mode 100644 index c767dde9552..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginEnvTests.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraPluginEnv - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraPluginEnvTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraPluginEnv - //private HydraPluginEnv instance; - - public HydraPluginEnvTests() - { - // TODO uncomment below to create an instance of HydraPluginEnv - //instance = new HydraPluginEnv(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraPluginEnv - /// - [Fact] - public void HydraPluginEnvInstanceTest() - { - // TODO uncomment below to test "IsType" HydraPluginEnv - //Assert.IsType(instance); - } - - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Settable' - /// - [Fact] - public void SettableTest() - { - // TODO unit test for the property 'Settable' - } - /// - /// Test the property 'Value' - /// - [Fact] - public void ValueTest() - { - // TODO unit test for the property 'Value' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginInterfaceTypeTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginInterfaceTypeTests.cs deleted file mode 100644 index 705c4811021..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginInterfaceTypeTests.cs +++ /dev/null @@ -1,86 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraPluginInterfaceType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraPluginInterfaceTypeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraPluginInterfaceType - //private HydraPluginInterfaceType instance; - - public HydraPluginInterfaceTypeTests() - { - // TODO uncomment below to create an instance of HydraPluginInterfaceType - //instance = new HydraPluginInterfaceType(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraPluginInterfaceType - /// - [Fact] - public void HydraPluginInterfaceTypeInstanceTest() - { - // TODO uncomment below to test "IsType" HydraPluginInterfaceType - //Assert.IsType(instance); - } - - - /// - /// Test the property 'Capability' - /// - [Fact] - public void CapabilityTest() - { - // TODO unit test for the property 'Capability' - } - /// - /// Test the property 'Prefix' - /// - [Fact] - public void PrefixTest() - { - // TODO unit test for the property 'Prefix' - } - /// - /// Test the property '_Version' - /// - [Fact] - public void _VersionTest() - { - // TODO unit test for the property '_Version' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginMountTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginMountTests.cs deleted file mode 100644 index 6abff20eff6..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginMountTests.cs +++ /dev/null @@ -1,118 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraPluginMount - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraPluginMountTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraPluginMount - //private HydraPluginMount instance; - - public HydraPluginMountTests() - { - // TODO uncomment below to create an instance of HydraPluginMount - //instance = new HydraPluginMount(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraPluginMount - /// - [Fact] - public void HydraPluginMountInstanceTest() - { - // TODO uncomment below to test "IsType" HydraPluginMount - //Assert.IsType(instance); - } - - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - // TODO unit test for the property 'Description' - } - /// - /// Test the property 'Destination' - /// - [Fact] - public void DestinationTest() - { - // TODO unit test for the property 'Destination' - } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Options' - /// - [Fact] - public void OptionsTest() - { - // TODO unit test for the property 'Options' - } - /// - /// Test the property 'Settable' - /// - [Fact] - public void SettableTest() - { - // TODO unit test for the property 'Settable' - } - /// - /// Test the property 'Source' - /// - [Fact] - public void SourceTest() - { - // TODO unit test for the property 'Source' - } - /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginSettingsTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginSettingsTests.cs deleted file mode 100644 index 34daca2d688..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginSettingsTests.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraPluginSettings - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraPluginSettingsTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraPluginSettings - //private HydraPluginSettings instance; - - public HydraPluginSettingsTests() - { - // TODO uncomment below to create an instance of HydraPluginSettings - //instance = new HydraPluginSettings(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraPluginSettings - /// - [Fact] - public void HydraPluginSettingsInstanceTest() - { - // TODO uncomment below to test "IsType" HydraPluginSettings - //Assert.IsType(instance); - } - - - /// - /// Test the property 'Args' - /// - [Fact] - public void ArgsTest() - { - // TODO unit test for the property 'Args' - } - /// - /// Test the property 'Devices' - /// - [Fact] - public void DevicesTest() - { - // TODO unit test for the property 'Devices' - } - /// - /// Test the property 'Env' - /// - [Fact] - public void EnvTest() - { - // TODO unit test for the property 'Env' - } - /// - /// Test the property 'Mounts' - /// - [Fact] - public void MountsTest() - { - // TODO unit test for the property 'Mounts' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectRequestTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectOAuth2RequestTests.cs similarity index 76% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectRequestTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectOAuth2RequestTests.cs index 7c8b8192530..19e2fb21cb0 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectRequestTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRejectOAuth2RequestTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraRejectRequest + /// Class for testing HydraRejectOAuth2Request /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraRejectRequestTests : IDisposable + public class HydraRejectOAuth2RequestTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraRejectRequest - //private HydraRejectRequest instance; + // TODO uncomment below to declare an instance variable for HydraRejectOAuth2Request + //private HydraRejectOAuth2Request instance; - public HydraRejectRequestTests() + public HydraRejectOAuth2RequestTests() { - // TODO uncomment below to create an instance of HydraRejectRequest - //instance = new HydraRejectRequest(); + // TODO uncomment below to create an instance of HydraRejectOAuth2Request + //instance = new HydraRejectOAuth2Request(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraRejectRequest + /// Test an instance of HydraRejectOAuth2Request /// [Fact] - public void HydraRejectRequestInstanceTest() + public void HydraRejectOAuth2RequestInstanceTest() { - // TODO uncomment below to test "IsType" HydraRejectRequest - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraRejectOAuth2Request + //Assert.IsType(instance); } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRequestWasHandledResponseTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRequestWasHandledResponseTests.cs deleted file mode 100644 index ae67580be78..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraRequestWasHandledResponseTests.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraRequestWasHandledResponse - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraRequestWasHandledResponseTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraRequestWasHandledResponse - //private HydraRequestWasHandledResponse instance; - - public HydraRequestWasHandledResponseTests() - { - // TODO uncomment below to create an instance of HydraRequestWasHandledResponse - //instance = new HydraRequestWasHandledResponse(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraRequestWasHandledResponse - /// - [Fact] - public void HydraRequestWasHandledResponseInstanceTest() - { - // TODO uncomment below to test "IsType" HydraRequestWasHandledResponse - //Assert.IsType(instance); - } - - - /// - /// Test the property 'RedirectTo' - /// - [Fact] - public void RedirectToTest() - { - // TODO unit test for the property 'RedirectTo' - } - - } - -} 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 new file mode 100644 index 00000000000..32734c31029 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationHeadersTests.cs @@ -0,0 +1,79 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +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; +using Newtonsoft.Json; + +namespace Ory.Hydra.Client.Test.Model +{ + /// + /// Class for testing HydraTokenPaginationHeaders + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class HydraTokenPaginationHeadersTests : IDisposable + { + // TODO uncomment below to declare an instance variable for HydraTokenPaginationHeaders + //private HydraTokenPaginationHeaders instance; + + public HydraTokenPaginationHeadersTests() + { + // TODO uncomment below to create an instance of HydraTokenPaginationHeaders + //instance = new HydraTokenPaginationHeaders(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of HydraTokenPaginationHeaders + /// + [Fact] + public void HydraTokenPaginationHeadersInstanceTest() + { + // TODO uncomment below to test "IsType" HydraTokenPaginationHeaders + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Link' + /// + [Fact] + public void LinkTest() + { + // TODO unit test for the property 'Link' + } + /// + /// Test the property 'XTotalCount' + /// + [Fact] + 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 new file mode 100644 index 00000000000..7d1db521051 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationRequestParametersTests.cs @@ -0,0 +1,79 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +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; +using Newtonsoft.Json; + +namespace Ory.Hydra.Client.Test.Model +{ + /// + /// Class for testing HydraTokenPaginationRequestParameters + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class HydraTokenPaginationRequestParametersTests : IDisposable + { + // TODO uncomment below to declare an instance variable for HydraTokenPaginationRequestParameters + //private HydraTokenPaginationRequestParameters instance; + + public HydraTokenPaginationRequestParametersTests() + { + // TODO uncomment below to create an instance of HydraTokenPaginationRequestParameters + //instance = new HydraTokenPaginationRequestParameters(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of HydraTokenPaginationRequestParameters + /// + [Fact] + public void HydraTokenPaginationRequestParametersInstanceTest() + { + // TODO uncomment below to test "IsType" HydraTokenPaginationRequestParameters + //Assert.IsType(instance); + } + + + /// + /// Test the property 'PageSize' + /// + [Fact] + public void PageSizeTest() + { + // TODO unit test for the property 'PageSize' + } + /// + /// Test the property 'PageToken' + /// + [Fact] + 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 new file mode 100644 index 00000000000..b5c6734a211 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationResponseHeadersTests.cs @@ -0,0 +1,79 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +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; +using Newtonsoft.Json; + +namespace Ory.Hydra.Client.Test.Model +{ + /// + /// Class for testing HydraTokenPaginationResponseHeaders + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class HydraTokenPaginationResponseHeadersTests : IDisposable + { + // TODO uncomment below to declare an instance variable for HydraTokenPaginationResponseHeaders + //private HydraTokenPaginationResponseHeaders instance; + + public HydraTokenPaginationResponseHeadersTests() + { + // TODO uncomment below to create an instance of HydraTokenPaginationResponseHeaders + //instance = new HydraTokenPaginationResponseHeaders(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of HydraTokenPaginationResponseHeaders + /// + [Fact] + public void HydraTokenPaginationResponseHeadersInstanceTest() + { + // TODO uncomment below to test "IsType" HydraTokenPaginationResponseHeaders + //Assert.IsType(instance); + } + + + /// + /// Test the property 'Link' + /// + [Fact] + public void LinkTest() + { + // TODO unit test for the property 'Link' + } + /// + /// Test the property 'XTotalCount' + /// + [Fact] + public void XTotalCountTest() + { + // TODO unit test for the property 'XTotalCount' + } + + } + +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigUserTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationTests.cs similarity index 53% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigUserTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationTests.cs index 8844378858a..996dcee0da4 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraPluginConfigUserTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTokenPaginationTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraPluginConfigUser + /// Class for testing HydraTokenPagination /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraPluginConfigUserTests : IDisposable + public class HydraTokenPaginationTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraPluginConfigUser - //private HydraPluginConfigUser instance; + // TODO uncomment below to declare an instance variable for HydraTokenPagination + //private HydraTokenPagination instance; - public HydraPluginConfigUserTests() + public HydraTokenPaginationTests() { - // TODO uncomment below to create an instance of HydraPluginConfigUser - //instance = new HydraPluginConfigUser(); + // TODO uncomment below to create an instance of HydraTokenPagination + //instance = new HydraTokenPagination(); } public void Dispose() @@ -46,31 +47,31 @@ public void Dispose() } /// - /// Test an instance of HydraPluginConfigUser + /// Test an instance of HydraTokenPagination /// [Fact] - public void HydraPluginConfigUserInstanceTest() + public void HydraTokenPaginationInstanceTest() { - // TODO uncomment below to test "IsType" HydraPluginConfigUser - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraTokenPagination + //Assert.IsType(instance); } /// - /// Test the property 'GID' + /// Test the property 'PageSize' /// [Fact] - public void GIDTest() + public void PageSizeTest() { - // TODO unit test for the property 'GID' + // TODO unit test for the property 'PageSize' } /// - /// Test the property 'UID' + /// Test the property 'PageToken' /// [Fact] - public void UIDTest() + public void PageTokenTest() { - // TODO unit test for the property 'UID' + // TODO unit test for the property 'PageToken' } } diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustJwtGrantIssuerBodyTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustOAuth2JwtGrantIssuerTests.cs similarity index 66% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustJwtGrantIssuerBodyTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustOAuth2JwtGrantIssuerTests.cs index bd096f1ff3f..bdbd0daf0ae 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustJwtGrantIssuerBodyTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustOAuth2JwtGrantIssuerTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraTrustJwtGrantIssuerBody + /// Class for testing HydraTrustOAuth2JwtGrantIssuer /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraTrustJwtGrantIssuerBodyTests : IDisposable + public class HydraTrustOAuth2JwtGrantIssuerTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraTrustJwtGrantIssuerBody - //private HydraTrustJwtGrantIssuerBody instance; + // TODO uncomment below to declare an instance variable for HydraTrustOAuth2JwtGrantIssuer + //private HydraTrustOAuth2JwtGrantIssuer instance; - public HydraTrustJwtGrantIssuerBodyTests() + public HydraTrustOAuth2JwtGrantIssuerTests() { - // TODO uncomment below to create an instance of HydraTrustJwtGrantIssuerBody - //instance = new HydraTrustJwtGrantIssuerBody(); + // TODO uncomment below to create an instance of HydraTrustOAuth2JwtGrantIssuer + //instance = new HydraTrustOAuth2JwtGrantIssuer(); } public void Dispose() @@ -46,16 +47,24 @@ public void Dispose() } /// - /// Test an instance of HydraTrustJwtGrantIssuerBody + /// Test an instance of HydraTrustOAuth2JwtGrantIssuer /// [Fact] - public void HydraTrustJwtGrantIssuerBodyInstanceTest() + public void HydraTrustOAuth2JwtGrantIssuerInstanceTest() { - // TODO uncomment below to test "IsType" HydraTrustJwtGrantIssuerBody - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraTrustOAuth2JwtGrantIssuer + //Assert.IsType(instance); } + /// + /// Test the property 'AllowAnySubject' + /// + [Fact] + public void AllowAnySubjectTest() + { + // TODO unit test for the property 'AllowAnySubject' + } /// /// Test the property 'ExpiresAt' /// diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedJwtGrantIssuerTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantIssuerTests.cs similarity index 71% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedJwtGrantIssuerTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantIssuerTests.cs index 3e612a1f816..dbbc735f030 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedJwtGrantIssuerTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantIssuerTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraTrustedJwtGrantIssuer + /// Class for testing HydraTrustedOAuth2JwtGrantIssuer /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraTrustedJwtGrantIssuerTests : IDisposable + public class HydraTrustedOAuth2JwtGrantIssuerTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraTrustedJwtGrantIssuer - //private HydraTrustedJwtGrantIssuer instance; + // TODO uncomment below to declare an instance variable for HydraTrustedOAuth2JwtGrantIssuer + //private HydraTrustedOAuth2JwtGrantIssuer instance; - public HydraTrustedJwtGrantIssuerTests() + public HydraTrustedOAuth2JwtGrantIssuerTests() { - // TODO uncomment below to create an instance of HydraTrustedJwtGrantIssuer - //instance = new HydraTrustedJwtGrantIssuer(); + // TODO uncomment below to create an instance of HydraTrustedOAuth2JwtGrantIssuer + //instance = new HydraTrustedOAuth2JwtGrantIssuer(); } public void Dispose() @@ -46,16 +47,24 @@ public void Dispose() } /// - /// Test an instance of HydraTrustedJwtGrantIssuer + /// Test an instance of HydraTrustedOAuth2JwtGrantIssuer /// [Fact] - public void HydraTrustedJwtGrantIssuerInstanceTest() + public void HydraTrustedOAuth2JwtGrantIssuerInstanceTest() { - // TODO uncomment below to test "IsType" HydraTrustedJwtGrantIssuer - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraTrustedOAuth2JwtGrantIssuer + //Assert.IsType(instance); } + /// + /// Test the property 'AllowAnySubject' + /// + [Fact] + public void AllowAnySubjectTest() + { + // TODO unit test for the property 'AllowAnySubject' + } /// /// Test the property 'CreatedAt' /// diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedJsonWebKeyTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantJsonWebKeyTests.cs similarity index 64% rename from clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedJsonWebKeyTests.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantJsonWebKeyTests.cs index 18edb1b0bbd..dfc4d07515d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedJsonWebKeyTests.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraTrustedOAuth2JwtGrantJsonWebKeyTests.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -23,21 +24,21 @@ namespace Ory.Hydra.Client.Test.Model { /// - /// Class for testing HydraTrustedJsonWebKey + /// Class for testing HydraTrustedOAuth2JwtGrantJsonWebKey /// /// /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). /// Please update the test case below to test the model. /// - public class HydraTrustedJsonWebKeyTests : IDisposable + public class HydraTrustedOAuth2JwtGrantJsonWebKeyTests : IDisposable { - // TODO uncomment below to declare an instance variable for HydraTrustedJsonWebKey - //private HydraTrustedJsonWebKey instance; + // TODO uncomment below to declare an instance variable for HydraTrustedOAuth2JwtGrantJsonWebKey + //private HydraTrustedOAuth2JwtGrantJsonWebKey instance; - public HydraTrustedJsonWebKeyTests() + public HydraTrustedOAuth2JwtGrantJsonWebKeyTests() { - // TODO uncomment below to create an instance of HydraTrustedJsonWebKey - //instance = new HydraTrustedJsonWebKey(); + // TODO uncomment below to create an instance of HydraTrustedOAuth2JwtGrantJsonWebKey + //instance = new HydraTrustedOAuth2JwtGrantJsonWebKey(); } public void Dispose() @@ -46,13 +47,13 @@ public void Dispose() } /// - /// Test an instance of HydraTrustedJsonWebKey + /// Test an instance of HydraTrustedOAuth2JwtGrantJsonWebKey /// [Fact] - public void HydraTrustedJsonWebKeyInstanceTest() + public void HydraTrustedOAuth2JwtGrantJsonWebKeyInstanceTest() { - // TODO uncomment below to test "IsType" HydraTrustedJsonWebKey - //Assert.IsType(instance); + // TODO uncomment below to test "IsType" HydraTrustedOAuth2JwtGrantJsonWebKey + //Assert.IsType(instance); } 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 d674eac7302..531db7cd0cb 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 @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/HydraVolumeTests.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVolumeTests.cs deleted file mode 100644 index 8561a1ce5e2..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client.Test/Model/HydraVolumeTests.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Xunit; - -using System; -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; -using Newtonsoft.Json; - -namespace Ory.Hydra.Client.Test.Model -{ - /// - /// Class for testing HydraVolume - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HydraVolumeTests : IDisposable - { - // TODO uncomment below to declare an instance variable for HydraVolume - //private HydraVolume instance; - - public HydraVolumeTests() - { - // TODO uncomment below to create an instance of HydraVolume - //instance = new HydraVolume(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of HydraVolume - /// - [Fact] - public void HydraVolumeInstanceTest() - { - // TODO uncomment below to test "IsType" HydraVolume - //Assert.IsType(instance); - } - - - /// - /// Test the property 'CreatedAt' - /// - [Fact] - public void CreatedAtTest() - { - // TODO unit test for the property 'CreatedAt' - } - /// - /// Test the property 'Driver' - /// - [Fact] - public void DriverTest() - { - // TODO unit test for the property 'Driver' - } - /// - /// Test the property 'Labels' - /// - [Fact] - public void LabelsTest() - { - // TODO unit test for the property 'Labels' - } - /// - /// Test the property 'Mountpoint' - /// - [Fact] - public void MountpointTest() - { - // TODO unit test for the property 'Mountpoint' - } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Options' - /// - [Fact] - public void OptionsTest() - { - // TODO unit test for the property 'Options' - } - /// - /// Test the property 'Scope' - /// - [Fact] - public void ScopeTest() - { - // TODO unit test for the property 'Scope' - } - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - /// - /// Test the property 'UsageData' - /// - [Fact] - public void UsageDataTest() - { - // TODO unit test for the property 'UsageData' - } - - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/AdminApi.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/AdminApi.cs deleted file mode 100644 index 5ff294e620f..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/AdminApi.cs +++ /dev/null @@ -1,6461 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Ory.Hydra.Client.Api -{ - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAdminApiSync : IApiAccessor - { - #region Synchronous Operations - /// - /// Accept a Consent Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// HydraCompletedRequest - HydraCompletedRequest AcceptConsentRequest(string consentChallenge, HydraAcceptConsentRequest body = default(HydraAcceptConsentRequest)); - - /// - /// Accept a Consent Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of HydraCompletedRequest - ApiResponse AcceptConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptConsentRequest body = default(HydraAcceptConsentRequest)); - /// - /// Accept a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// HydraCompletedRequest - HydraCompletedRequest AcceptLoginRequest(string loginChallenge, HydraAcceptLoginRequest body = default(HydraAcceptLoginRequest)); - - /// - /// Accept a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of HydraCompletedRequest - ApiResponse AcceptLoginRequestWithHttpInfo(string loginChallenge, HydraAcceptLoginRequest body = default(HydraAcceptLoginRequest)); - /// - /// Accept a Logout Request - /// - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// HydraCompletedRequest - HydraCompletedRequest AcceptLogoutRequest(string logoutChallenge); - - /// - /// Accept a Logout Request - /// - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraCompletedRequest - ApiResponse AcceptLogoutRequestWithHttpInfo(string logoutChallenge); - /// - /// Generate a New 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// HydraJSONWebKeySet - HydraJSONWebKeySet CreateJsonWebKeySet(string set, HydraJsonWebKeySetGeneratorRequest body = default(HydraJsonWebKeySetGeneratorRequest)); - - /// - /// Generate a New 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// ApiResponse of HydraJSONWebKeySet - ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySetGeneratorRequest body = default(HydraJsonWebKeySetGeneratorRequest)); - /// - /// Create an OAuth 2.0 Client - /// - /// - /// Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - /// - /// Thrown when fails to make API call - /// - /// HydraOAuth2Client - HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client body); - - /// - /// Create an OAuth 2.0 Client - /// - /// - /// Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraOAuth2Client - ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client body); - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// - void DeleteJsonWebKey(string kid, string set); - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// ApiResponse of Object(void) - ApiResponse DeleteJsonWebKeyWithHttpInfo(string kid, string set); - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The set - /// - void DeleteJsonWebKeySet(string set); - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The set - /// ApiResponse of Object(void) - ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set); - /// - /// Deletes an 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - void DeleteOAuth2Client(string id); - - /// - /// Deletes an 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// ApiResponse of Object(void) - ApiResponse DeleteOAuth2ClientWithHttpInfo(string id); - /// - /// Delete OAuth2 Access Tokens from a Client - /// - /// - /// This endpoint deletes OAuth2 access tokens issued for a client from the database - /// - /// Thrown when fails to make API call - /// - /// - void DeleteOAuth2Token(string clientId); - - /// - /// Delete OAuth2 Access Tokens from a Client - /// - /// - /// This endpoint deletes OAuth2 access tokens issued for a client from the database - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId); - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// - void DeleteTrustedJwtGrantIssuer(string id); - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// ApiResponse of Object(void) - ApiResponse DeleteTrustedJwtGrantIssuerWithHttpInfo(string id); - /// - /// Flush Expired OAuth2 Access Tokens - /// - /// - /// This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - /// - /// Thrown when fails to make API call - /// (optional) - /// - void FlushInactiveOAuth2Tokens(HydraFlushInactiveOAuth2TokensRequest body = default(HydraFlushInactiveOAuth2TokensRequest)); - - /// - /// Flush Expired OAuth2 Access Tokens - /// - /// - /// This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of Object(void) - ApiResponse FlushInactiveOAuth2TokensWithHttpInfo(HydraFlushInactiveOAuth2TokensRequest body = default(HydraFlushInactiveOAuth2TokensRequest)); - /// - /// Get Consent Request Information - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - /// - /// Thrown when fails to make API call - /// - /// HydraConsentRequest - HydraConsentRequest GetConsentRequest(string consentChallenge); - - /// - /// Get Consent Request Information - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraConsentRequest - ApiResponse GetConsentRequestWithHttpInfo(string consentChallenge); - /// - /// Fetch a JSON Web Key - /// - /// - /// This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// HydraJSONWebKeySet - HydraJSONWebKeySet GetJsonWebKey(string kid, string set); - - /// - /// Fetch a JSON Web Key - /// - /// - /// This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// ApiResponse of HydraJSONWebKeySet - ApiResponse GetJsonWebKeyWithHttpInfo(string kid, string 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. - /// - /// Thrown when fails to make API call - /// The set - /// HydraJSONWebKeySet - HydraJSONWebKeySet GetJsonWebKeySet(string 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. - /// - /// Thrown when fails to make API call - /// The set - /// ApiResponse of HydraJSONWebKeySet - ApiResponse GetJsonWebKeySetWithHttpInfo(string set); - /// - /// Get a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - /// - /// Thrown when fails to make API call - /// - /// HydraLoginRequest - HydraLoginRequest GetLoginRequest(string loginChallenge); - - /// - /// Get a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraLoginRequest - ApiResponse GetLoginRequestWithHttpInfo(string loginChallenge); - /// - /// Get a Logout Request - /// - /// - /// Use this endpoint to fetch a logout request. - /// - /// Thrown when fails to make API call - /// - /// HydraLogoutRequest - HydraLogoutRequest GetLogoutRequest(string logoutChallenge); - - /// - /// Get a Logout Request - /// - /// - /// Use this endpoint to fetch a logout request. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraLogoutRequest - ApiResponse GetLogoutRequestWithHttpInfo(string logoutChallenge); - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// HydraOAuth2Client - HydraOAuth2Client GetOAuth2Client(string 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// ApiResponse of HydraOAuth2Client - ApiResponse GetOAuth2ClientWithHttpInfo(string id); - /// - /// Get a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// HydraTrustedJwtGrantIssuer - HydraTrustedJwtGrantIssuer GetTrustedJwtGrantIssuer(string id); - - /// - /// Get a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// ApiResponse of HydraTrustedJwtGrantIssuer - ApiResponse GetTrustedJwtGrantIssuerWithHttpInfo(string id); - /// - /// Get Service Version - /// - /// - /// This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - /// - /// Thrown when fails to make API call - /// HydraVersion - HydraVersion GetVersion(); - - /// - /// Get Service Version - /// - /// - /// This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - /// - /// Thrown when fails to make API call - /// ApiResponse of HydraVersion - ApiResponse GetVersionWithHttpInfo(); - /// - /// Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - /// - /// 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) - /// HydraOAuth2TokenIntrospection - HydraOAuth2TokenIntrospection IntrospectOAuth2Token(string token, string scope = default(string)); - - /// - /// Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - /// - /// 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) - /// ApiResponse of HydraOAuth2TokenIntrospection - ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string scope = default(string)); - /// - /// Check Alive Status - /// - /// - /// This endpoint returns a 200 status code when the HTTP server is up running. 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 - /// HydraHealthStatus - HydraHealthStatus IsInstanceAlive(); - - /// - /// Check Alive Status - /// - /// - /// This endpoint returns a 200 status code when the HTTP server is up running. 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 - /// ApiResponse of HydraHealthStatus - ApiResponse IsInstanceAliveWithHttpInfo(); - /// - /// 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// The maximum amount of clients to returned, upper bound is 500 clients. (optional) - /// The offset from where to start looking. (optional) - /// The name of the clients to filter by. (optional) - /// The owner of the clients to filter by. (optional) - /// List<HydraOAuth2Client> - List ListOAuth2Clients(long? limit = default(long?), long? offset = default(long?), string clientName = default(string), string owner = default(string)); - - /// - /// 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// The maximum amount of clients to returned, upper bound is 500 clients. (optional) - /// The offset from where to start looking. (optional) - /// The name of the clients to filter by. (optional) - /// The owner of the clients to filter by. (optional) - /// ApiResponse of List<HydraOAuth2Client> - ApiResponse> ListOAuth2ClientsWithHttpInfo(long? limit = default(long?), long? offset = default(long?), string clientName = default(string), string owner = default(string)); - /// - /// Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// - /// List<HydraPreviousConsentSession> - List ListSubjectConsentSessions(string subject); - - /// - /// Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of List<HydraPreviousConsentSession> - ApiResponse> ListSubjectConsentSessionsWithHttpInfo(string subject); - /// - /// List Trusted OAuth2 JWT Bearer Grant Type Issuers - /// - /// - /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - /// - /// Thrown when fails to make API call - /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - /// The maximum amount of policies returned, upper bound is 500 policies (optional) - /// The offset from where to start looking. (optional) - /// List<HydraTrustedJwtGrantIssuer> - List ListTrustedJwtGrantIssuers(string issuer = default(string), long? limit = default(long?), long? offset = default(long?)); - - /// - /// List Trusted OAuth2 JWT Bearer Grant Type Issuers - /// - /// - /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - /// - /// Thrown when fails to make API call - /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - /// The maximum amount of policies returned, upper bound is 500 policies (optional) - /// The offset from where to start looking. (optional) - /// ApiResponse of List<HydraTrustedJwtGrantIssuer> - ApiResponse> ListTrustedJwtGrantIssuersWithHttpInfo(string issuer = default(string), long? limit = default(long?), long? offset = default(long?)); - /// - /// Patch an OAuth 2.0 Client - /// - /// - /// Patch an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// HydraOAuth2Client - HydraOAuth2Client PatchOAuth2Client(string id, List body); - - /// - /// Patch an OAuth 2.0 Client - /// - /// - /// Patch an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// ApiResponse of HydraOAuth2Client - ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List body); - /// - /// Reject a Consent Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// HydraCompletedRequest - HydraCompletedRequest RejectConsentRequest(string consentChallenge, HydraRejectRequest body = default(HydraRejectRequest)); - - /// - /// Reject a Consent Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of HydraCompletedRequest - ApiResponse RejectConsentRequestWithHttpInfo(string consentChallenge, HydraRejectRequest body = default(HydraRejectRequest)); - /// - /// Reject a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// HydraCompletedRequest - HydraCompletedRequest RejectLoginRequest(string loginChallenge, HydraRejectRequest body = default(HydraRejectRequest)); - - /// - /// Reject a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of HydraCompletedRequest - ApiResponse RejectLoginRequestWithHttpInfo(string loginChallenge, HydraRejectRequest body = default(HydraRejectRequest)); - /// - /// Reject a Logout Request - /// - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// - void RejectLogoutRequest(string logoutChallenge, HydraRejectRequest body = default(HydraRejectRequest)); - - /// - /// Reject a Logout Request - /// - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of Object(void) - ApiResponse RejectLogoutRequestWithHttpInfo(string logoutChallenge, HydraRejectRequest body = default(HydraRejectRequest)); - /// - /// Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - /// - /// - /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - /// - /// Thrown when fails to make API call - /// - /// - void RevokeAuthenticationSession(string subject); - - /// - /// Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - /// - /// - /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse RevokeAuthenticationSessionWithHttpInfo(string subject); - /// - /// Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - /// - /// - /// This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - /// - /// Thrown when fails to make API call - /// The subject (Subject) who's consent sessions should be deleted. - /// If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - /// If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - /// - void RevokeConsentSessions(string subject, string _client = default(string), bool? all = default(bool?)); - - /// - /// Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - /// - /// - /// This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - /// - /// Thrown when fails to make API call - /// The subject (Subject) who's consent sessions should be deleted. - /// If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - /// If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - /// ApiResponse of Object(void) - ApiResponse RevokeConsentSessionsWithHttpInfo(string subject, string _client = default(string), bool? all = default(bool?)); - /// - /// Trust an 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). - /// - /// Thrown when fails to make API call - /// (optional) - /// HydraTrustedJwtGrantIssuer - HydraTrustedJwtGrantIssuer TrustJwtGrantIssuer(HydraTrustJwtGrantIssuerBody body = default(HydraTrustJwtGrantIssuerBody)); - - /// - /// Trust an 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). - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of HydraTrustedJwtGrantIssuer - ApiResponse TrustJwtGrantIssuerWithHttpInfo(HydraTrustJwtGrantIssuerBody body = default(HydraTrustJwtGrantIssuerBody)); - /// - /// Update a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// (optional) - /// HydraJSONWebKey - HydraJSONWebKey UpdateJsonWebKey(string kid, string set, HydraJSONWebKey body = default(HydraJSONWebKey)); - - /// - /// Update a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// (optional) - /// ApiResponse of HydraJSONWebKey - ApiResponse UpdateJsonWebKeyWithHttpInfo(string kid, string set, HydraJSONWebKey body = default(HydraJSONWebKey)); - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// HydraJSONWebKeySet - HydraJSONWebKeySet UpdateJsonWebKeySet(string set, HydraJSONWebKeySet body = default(HydraJSONWebKeySet)); - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// ApiResponse of HydraJSONWebKeySet - ApiResponse UpdateJsonWebKeySetWithHttpInfo(string set, HydraJSONWebKeySet body = default(HydraJSONWebKeySet)); - /// - /// Update an OAuth 2.0 Client - /// - /// - /// Update an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// HydraOAuth2Client - HydraOAuth2Client UpdateOAuth2Client(string id, HydraOAuth2Client body); - - /// - /// Update an OAuth 2.0 Client - /// - /// - /// Update an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// ApiResponse of HydraOAuth2Client - ApiResponse UpdateOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client body); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAdminApiAsync : IApiAccessor - { - #region Asynchronous Operations - /// - /// Accept a Consent Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - System.Threading.Tasks.Task AcceptConsentRequestAsync(string consentChallenge, HydraAcceptConsentRequest body = default(HydraAcceptConsentRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Accept a Consent Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - System.Threading.Tasks.Task> AcceptConsentRequestWithHttpInfoAsync(string consentChallenge, HydraAcceptConsentRequest body = default(HydraAcceptConsentRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Accept a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - System.Threading.Tasks.Task AcceptLoginRequestAsync(string loginChallenge, HydraAcceptLoginRequest body = default(HydraAcceptLoginRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Accept a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - System.Threading.Tasks.Task> AcceptLoginRequestWithHttpInfoAsync(string loginChallenge, HydraAcceptLoginRequest body = default(HydraAcceptLoginRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Accept a Logout Request - /// - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - System.Threading.Tasks.Task AcceptLogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Accept a Logout Request - /// - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - System.Threading.Tasks.Task> AcceptLogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Generate a New 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKeySet - System.Threading.Tasks.Task CreateJsonWebKeySetAsync(string set, HydraJsonWebKeySetGeneratorRequest body = default(HydraJsonWebKeySetGeneratorRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Generate a New 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKeySet) - System.Threading.Tasks.Task> CreateJsonWebKeySetWithHttpInfoAsync(string set, HydraJsonWebKeySetGeneratorRequest body = default(HydraJsonWebKeySetGeneratorRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Create an OAuth 2.0 Client - /// - /// - /// Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - System.Threading.Tasks.Task CreateOAuth2ClientAsync(HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Create an OAuth 2.0 Client - /// - /// - /// Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> CreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteJsonWebKeyAsync(string kid, string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteJsonWebKeyWithHttpInfoAsync(string kid, string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The set - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteJsonWebKeySetAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The set - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteJsonWebKeySetWithHttpInfoAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Deletes an 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Deletes an 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete OAuth2 Access Tokens from a Client - /// - /// - /// This endpoint deletes OAuth2 access tokens issued for a client from the database - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteOAuth2TokenAsync(string clientId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Delete OAuth2 Access Tokens from a Client - /// - /// - /// This endpoint deletes OAuth2 access tokens issued for a client from the database - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOAuth2TokenWithHttpInfoAsync(string clientId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteTrustedJwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteTrustedJwtGrantIssuerWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Flush Expired OAuth2 Access Tokens - /// - /// - /// This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task FlushInactiveOAuth2TokensAsync(HydraFlushInactiveOAuth2TokensRequest body = default(HydraFlushInactiveOAuth2TokensRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Flush Expired OAuth2 Access Tokens - /// - /// - /// This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> FlushInactiveOAuth2TokensWithHttpInfoAsync(HydraFlushInactiveOAuth2TokensRequest body = default(HydraFlushInactiveOAuth2TokensRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get Consent Request Information - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraConsentRequest - System.Threading.Tasks.Task GetConsentRequestAsync(string consentChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get Consent Request Information - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraConsentRequest) - System.Threading.Tasks.Task> GetConsentRequestWithHttpInfoAsync(string consentChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Fetch a JSON Web Key - /// - /// - /// This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKeySet - System.Threading.Tasks.Task GetJsonWebKeyAsync(string kid, string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Fetch a JSON Web Key - /// - /// - /// This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKeySet) - System.Threading.Tasks.Task> GetJsonWebKeyWithHttpInfoAsync(string kid, string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKeySet - System.Threading.Tasks.Task GetJsonWebKeySetAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// 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)); - /// - /// Get a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraLoginRequest - System.Threading.Tasks.Task GetLoginRequestAsync(string loginChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraLoginRequest) - System.Threading.Tasks.Task> GetLoginRequestWithHttpInfoAsync(string loginChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a Logout Request - /// - /// - /// Use this endpoint to fetch a logout request. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraLogoutRequest - System.Threading.Tasks.Task GetLogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a Logout Request - /// - /// - /// Use this endpoint to fetch a logout request. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraLogoutRequest) - System.Threading.Tasks.Task> GetLogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - System.Threading.Tasks.Task GetOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// 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)); - /// - /// Get a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// Cancellation Token to cancel the request. - /// Task of HydraTrustedJwtGrantIssuer - System.Threading.Tasks.Task GetTrustedJwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraTrustedJwtGrantIssuer) - System.Threading.Tasks.Task> GetTrustedJwtGrantIssuerWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get Service Version - /// - /// - /// This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of HydraVersion - System.Threading.Tasks.Task GetVersionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get Service Version - /// - /// - /// This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraVersion) - System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - /// - /// 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) - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2TokenIntrospection - System.Threading.Tasks.Task IntrospectOAuth2TokenAsync(string token, string scope = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - /// - /// 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) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2TokenIntrospection) - System.Threading.Tasks.Task> IntrospectOAuth2TokenWithHttpInfoAsync(string token, string scope = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Check Alive Status - /// - /// - /// This endpoint returns a 200 status code when the HTTP server is up running. 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 - /// Cancellation Token to cancel the request. - /// Task of HydraHealthStatus - System.Threading.Tasks.Task IsInstanceAliveAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Check Alive Status - /// - /// - /// This endpoint returns a 200 status code when the HTTP server is up running. 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 - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraHealthStatus) - System.Threading.Tasks.Task> IsInstanceAliveWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// The maximum amount of clients to returned, upper bound is 500 clients. (optional) - /// The offset from where to start looking. (optional) - /// The name of the clients to filter by. (optional) - /// The owner of the clients to filter by. (optional) - /// Cancellation Token to cancel the request. - /// Task of List<HydraOAuth2Client> - System.Threading.Tasks.Task> ListOAuth2ClientsAsync(long? limit = default(long?), long? offset = default(long?), string clientName = default(string), string owner = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// The maximum amount of clients to returned, upper bound is 500 clients. (optional) - /// The offset from where to start looking. (optional) - /// The name of the clients to filter by. (optional) - /// The owner of the clients to filter by. (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<HydraOAuth2Client>) - System.Threading.Tasks.Task>> ListOAuth2ClientsWithHttpInfoAsync(long? limit = default(long?), long? offset = default(long?), string clientName = default(string), string owner = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of List<HydraPreviousConsentSession> - System.Threading.Tasks.Task> ListSubjectConsentSessionsAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<HydraPreviousConsentSession>) - System.Threading.Tasks.Task>> ListSubjectConsentSessionsWithHttpInfoAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// List Trusted OAuth2 JWT Bearer Grant Type Issuers - /// - /// - /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - /// - /// Thrown when fails to make API call - /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - /// The maximum amount of policies returned, upper bound is 500 policies (optional) - /// The offset from where to start looking. (optional) - /// Cancellation Token to cancel the request. - /// Task of List<HydraTrustedJwtGrantIssuer> - System.Threading.Tasks.Task> ListTrustedJwtGrantIssuersAsync(string issuer = default(string), long? limit = default(long?), long? offset = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// List Trusted OAuth2 JWT Bearer Grant Type Issuers - /// - /// - /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - /// - /// Thrown when fails to make API call - /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - /// The maximum amount of policies returned, upper bound is 500 policies (optional) - /// The offset from where to start looking. (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<HydraTrustedJwtGrantIssuer>) - System.Threading.Tasks.Task>> ListTrustedJwtGrantIssuersWithHttpInfoAsync(string issuer = default(string), long? limit = default(long?), long? offset = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Patch an OAuth 2.0 Client - /// - /// - /// Patch an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - System.Threading.Tasks.Task PatchOAuth2ClientAsync(string id, List body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Patch an OAuth 2.0 Client - /// - /// - /// Patch an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> PatchOAuth2ClientWithHttpInfoAsync(string id, List body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Reject a Consent Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - System.Threading.Tasks.Task RejectConsentRequestAsync(string consentChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Reject a Consent Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - System.Threading.Tasks.Task> RejectConsentRequestWithHttpInfoAsync(string consentChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Reject a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - System.Threading.Tasks.Task RejectLoginRequestAsync(string loginChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Reject a Login Request - /// - /// - /// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - System.Threading.Tasks.Task> RejectLoginRequestWithHttpInfoAsync(string loginChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Reject a Logout Request - /// - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task RejectLogoutRequestAsync(string logoutChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Reject a Logout Request - /// - /// - /// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> RejectLogoutRequestWithHttpInfoAsync(string logoutChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - /// - /// - /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task RevokeAuthenticationSessionAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - /// - /// - /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> RevokeAuthenticationSessionWithHttpInfoAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - /// - /// - /// This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - /// - /// Thrown when fails to make API call - /// The subject (Subject) who's consent sessions should be deleted. - /// If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - /// If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task RevokeConsentSessionsAsync(string subject, string _client = default(string), bool? all = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - /// - /// - /// This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - /// - /// Thrown when fails to make API call - /// The subject (Subject) who's consent sessions should be deleted. - /// If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - /// If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> RevokeConsentSessionsWithHttpInfoAsync(string subject, string _client = default(string), bool? all = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Trust an 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). - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraTrustedJwtGrantIssuer - System.Threading.Tasks.Task TrustJwtGrantIssuerAsync(HydraTrustJwtGrantIssuerBody body = default(HydraTrustJwtGrantIssuerBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Trust an 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). - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraTrustedJwtGrantIssuer) - System.Threading.Tasks.Task> TrustJwtGrantIssuerWithHttpInfoAsync(HydraTrustJwtGrantIssuerBody body = default(HydraTrustJwtGrantIssuerBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKey - System.Threading.Tasks.Task UpdateJsonWebKeyAsync(string kid, string set, HydraJSONWebKey body = default(HydraJSONWebKey), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Update a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKey) - System.Threading.Tasks.Task> UpdateJsonWebKeyWithHttpInfoAsync(string kid, string set, HydraJSONWebKey body = default(HydraJSONWebKey), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKeySet - System.Threading.Tasks.Task UpdateJsonWebKeySetAsync(string set, HydraJSONWebKeySet body = default(HydraJSONWebKeySet), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKeySet) - System.Threading.Tasks.Task> UpdateJsonWebKeySetWithHttpInfoAsync(string set, HydraJSONWebKeySet body = default(HydraJSONWebKeySet), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update an OAuth 2.0 Client - /// - /// - /// Update an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - System.Threading.Tasks.Task UpdateOAuth2ClientAsync(string id, HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Update an OAuth 2.0 Client - /// - /// - /// Update an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> UpdateOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAdminApi : IAdminApiSync, IAdminApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AdminApi : IAdminApi - { - private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AdminApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public AdminApi(string basePath) - { - this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( - Ory.Hydra.Client.Client.GlobalConfiguration.Instance, - new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } - ); - this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public AdminApi(Ory.Hydra.Client.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( - Ory.Hydra.Client.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public AdminApi(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Accept a Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// HydraCompletedRequest - public HydraCompletedRequest AcceptConsentRequest(string consentChallenge, HydraAcceptConsentRequest body = default(HydraAcceptConsentRequest)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptConsentRequestWithHttpInfo(consentChallenge, body); - return localVarResponse.Data; - } - - /// - /// Accept a Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of HydraCompletedRequest - public Ory.Hydra.Client.Client.ApiResponse AcceptConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptConsentRequest body = default(HydraAcceptConsentRequest)) - { - // verify the required parameter 'consentChallenge' is set - if (consentChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling AdminApi->AcceptConsentRequest"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/oauth2/auth/requests/consent/accept", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AcceptConsentRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Accept a Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - public async System.Threading.Tasks.Task AcceptConsentRequestAsync(string consentChallenge, HydraAcceptConsentRequest body = default(HydraAcceptConsentRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptConsentRequestWithHttpInfoAsync(consentChallenge, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Accept a Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - public async System.Threading.Tasks.Task> AcceptConsentRequestWithHttpInfoAsync(string consentChallenge, HydraAcceptConsentRequest body = default(HydraAcceptConsentRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'consentChallenge' is set - if (consentChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling AdminApi->AcceptConsentRequest"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/oauth2/auth/requests/consent/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AcceptConsentRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Accept a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// HydraCompletedRequest - public HydraCompletedRequest AcceptLoginRequest(string loginChallenge, HydraAcceptLoginRequest body = default(HydraAcceptLoginRequest)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptLoginRequestWithHttpInfo(loginChallenge, body); - return localVarResponse.Data; - } - - /// - /// Accept a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of HydraCompletedRequest - public Ory.Hydra.Client.Client.ApiResponse AcceptLoginRequestWithHttpInfo(string loginChallenge, HydraAcceptLoginRequest body = default(HydraAcceptLoginRequest)) - { - // verify the required parameter 'loginChallenge' is set - if (loginChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling AdminApi->AcceptLoginRequest"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/oauth2/auth/requests/login/accept", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AcceptLoginRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Accept a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - public async System.Threading.Tasks.Task AcceptLoginRequestAsync(string loginChallenge, HydraAcceptLoginRequest body = default(HydraAcceptLoginRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptLoginRequestWithHttpInfoAsync(loginChallenge, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Accept a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - public async System.Threading.Tasks.Task> AcceptLoginRequestWithHttpInfoAsync(string loginChallenge, HydraAcceptLoginRequest body = default(HydraAcceptLoginRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'loginChallenge' is set - if (loginChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling AdminApi->AcceptLoginRequest"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/oauth2/auth/requests/login/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AcceptLoginRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Accept a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// HydraCompletedRequest - public HydraCompletedRequest AcceptLogoutRequest(string logoutChallenge) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptLogoutRequestWithHttpInfo(logoutChallenge); - return localVarResponse.Data; - } - - /// - /// Accept a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraCompletedRequest - public Ory.Hydra.Client.Client.ApiResponse AcceptLogoutRequestWithHttpInfo(string logoutChallenge) - { - // verify the required parameter 'logoutChallenge' is set - if (logoutChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling AdminApi->AcceptLogoutRequest"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); - - - // make the HTTP request - var localVarResponse = this.Client.Put("/oauth2/auth/requests/logout/accept", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AcceptLogoutRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Accept a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - public async System.Threading.Tasks.Task AcceptLogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptLogoutRequestWithHttpInfoAsync(logoutChallenge, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Accept a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - public async System.Threading.Tasks.Task> AcceptLogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'logoutChallenge' is set - if (logoutChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling AdminApi->AcceptLogoutRequest"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/oauth2/auth/requests/logout/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("AcceptLogoutRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate a New 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// HydraJSONWebKeySet - public HydraJSONWebKeySet CreateJsonWebKeySet(string set, HydraJsonWebKeySetGeneratorRequest body = default(HydraJsonWebKeySetGeneratorRequest)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateJsonWebKeySetWithHttpInfo(set, body); - return localVarResponse.Data; - } - - /// - /// Generate a New 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// ApiResponse of HydraJSONWebKeySet - public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySetGeneratorRequest body = default(HydraJsonWebKeySetGeneratorRequest)) - { - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->CreateJsonWebKeySet"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/keys/{set}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateJsonWebKeySet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate a New 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKeySet - public async System.Threading.Tasks.Task CreateJsonWebKeySetAsync(string set, HydraJsonWebKeySetGeneratorRequest body = default(HydraJsonWebKeySetGeneratorRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateJsonWebKeySetWithHttpInfoAsync(set, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Generate a New 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKeySet) - public async System.Threading.Tasks.Task> CreateJsonWebKeySetWithHttpInfoAsync(string set, HydraJsonWebKeySetGeneratorRequest body = default(HydraJsonWebKeySetGeneratorRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->CreateJsonWebKeySet"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateJsonWebKeySet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create an OAuth 2.0 Client Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - /// - /// Thrown when fails to make API call - /// - /// HydraOAuth2Client - public HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client body) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateOAuth2ClientWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Create an OAuth 2.0 Client Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client body) - { - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling AdminApi->CreateOAuth2Client"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/clients", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create an OAuth 2.0 Client Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task CreateOAuth2ClientAsync(HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateOAuth2ClientWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Create an OAuth 2.0 Client Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> CreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling AdminApi->CreateOAuth2Client"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// - public void DeleteJsonWebKey(string kid, string set) - { - DeleteJsonWebKeyWithHttpInfo(kid, set); - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo(string kid, string set) - { - // verify the required parameter 'kid' is set - if (kid == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling AdminApi->DeleteJsonWebKey"); - } - - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->DeleteJsonWebKey"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteJsonWebKey", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeleteJsonWebKeyAsync(string kid, string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await DeleteJsonWebKeyWithHttpInfoAsync(kid, set, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteJsonWebKeyWithHttpInfoAsync(string kid, string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'kid' is set - if (kid == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling AdminApi->DeleteJsonWebKey"); - } - - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->DeleteJsonWebKey"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteJsonWebKey", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The set - /// - public void DeleteJsonWebKeySet(string set) - { - DeleteJsonWebKeySetWithHttpInfo(set); - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The set - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set) - { - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->DeleteJsonWebKeySet"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/keys/{set}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteJsonWebKeySet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The set - /// 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)) - { - await DeleteJsonWebKeySetWithHttpInfoAsync(set, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The set - /// 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)) - { - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->DeleteJsonWebKeySet"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteJsonWebKeySet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Deletes an 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - public void DeleteOAuth2Client(string id) - { - DeleteOAuth2ClientWithHttpInfo(id); - } - - /// - /// Deletes an 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInfo(string id) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->DeleteOAuth2Client"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/clients/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Deletes an 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// 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)) - { - await DeleteOAuth2ClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes an 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// 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)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->DeleteOAuth2Client"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete OAuth2 Access Tokens from a Client This endpoint deletes OAuth2 access tokens issued for a client from the database - /// - /// Thrown when fails to make API call - /// - /// - public void DeleteOAuth2Token(string clientId) - { - DeleteOAuth2TokenWithHttpInfo(clientId); - } - - /// - /// Delete OAuth2 Access Tokens from a Client This endpoint deletes OAuth2 access tokens issued for a client from the database - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId) - { - // verify the required parameter 'clientId' is set - if (clientId == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'clientId' when calling AdminApi->DeleteOAuth2Token"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_id", clientId)); - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/oauth2/tokens", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteOAuth2Token", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete OAuth2 Access Tokens from a Client This endpoint deletes OAuth2 access tokens issued for a client from the database - /// - /// Thrown when fails to make API call - /// - /// 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)) - { - await DeleteOAuth2TokenWithHttpInfoAsync(clientId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete OAuth2 Access Tokens from a Client This endpoint deletes OAuth2 access tokens issued for a client from the database - /// - /// Thrown when fails to make API call - /// - /// 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)) - { - // verify the required parameter 'clientId' is set - if (clientId == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'clientId' when calling AdminApi->DeleteOAuth2Token"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_id", clientId)); - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/oauth2/tokens", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteOAuth2Token", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// - public void DeleteTrustedJwtGrantIssuer(string id) - { - DeleteTrustedJwtGrantIssuerWithHttpInfo(id); - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedJwtGrantIssuerWithHttpInfo(string id) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->DeleteTrustedJwtGrantIssuer"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteTrustedJwtGrantIssuer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeleteTrustedJwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await DeleteTrustedJwtGrantIssuerWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteTrustedJwtGrantIssuerWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->DeleteTrustedJwtGrantIssuer"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteTrustedJwtGrantIssuer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Flush Expired OAuth2 Access Tokens This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - /// - /// Thrown when fails to make API call - /// (optional) - /// - public void FlushInactiveOAuth2Tokens(HydraFlushInactiveOAuth2TokensRequest body = default(HydraFlushInactiveOAuth2TokensRequest)) - { - FlushInactiveOAuth2TokensWithHttpInfo(body); - } - - /// - /// Flush Expired OAuth2 Access Tokens This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse FlushInactiveOAuth2TokensWithHttpInfo(HydraFlushInactiveOAuth2TokensRequest body = default(HydraFlushInactiveOAuth2TokensRequest)) - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/oauth2/flush", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("FlushInactiveOAuth2Tokens", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Flush Expired OAuth2 Access Tokens This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task FlushInactiveOAuth2TokensAsync(HydraFlushInactiveOAuth2TokensRequest body = default(HydraFlushInactiveOAuth2TokensRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await FlushInactiveOAuth2TokensWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - } - - /// - /// Flush Expired OAuth2 Access Tokens This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> FlushInactiveOAuth2TokensWithHttpInfoAsync(HydraFlushInactiveOAuth2TokensRequest body = default(HydraFlushInactiveOAuth2TokensRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/flush", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("FlushInactiveOAuth2Tokens", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Consent Request Information When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - /// - /// Thrown when fails to make API call - /// - /// HydraConsentRequest - public HydraConsentRequest GetConsentRequest(string consentChallenge) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetConsentRequestWithHttpInfo(consentChallenge); - return localVarResponse.Data; - } - - /// - /// Get Consent Request Information When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraConsentRequest - public Ory.Hydra.Client.Client.ApiResponse GetConsentRequestWithHttpInfo(string consentChallenge) - { - // verify the required parameter 'consentChallenge' is set - if (consentChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling AdminApi->GetConsentRequest"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); - - - // make the HTTP request - var localVarResponse = this.Client.Get("/oauth2/auth/requests/consent", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetConsentRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Consent Request Information When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraConsentRequest - public async System.Threading.Tasks.Task GetConsentRequestAsync(string consentChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetConsentRequestWithHttpInfoAsync(consentChallenge, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get Consent Request Information When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraConsentRequest) - public async System.Threading.Tasks.Task> GetConsentRequestWithHttpInfoAsync(string consentChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'consentChallenge' is set - if (consentChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling AdminApi->GetConsentRequest"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/auth/requests/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetConsentRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Fetch a JSON Web Key This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// HydraJSONWebKeySet - public HydraJSONWebKeySet GetJsonWebKey(string kid, string set) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetJsonWebKeyWithHttpInfo(kid, set); - return localVarResponse.Data; - } - - /// - /// Fetch a JSON Web Key This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// ApiResponse of HydraJSONWebKeySet - public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWithHttpInfo(string kid, string set) - { - // verify the required parameter 'kid' is set - if (kid == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling AdminApi->GetJsonWebKey"); - } - - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->GetJsonWebKey"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Get("/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetJsonWebKey", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Fetch a JSON Web Key This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKeySet - public async System.Threading.Tasks.Task GetJsonWebKeyAsync(string kid, string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeyWithHttpInfoAsync(kid, set, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Fetch a JSON Web Key This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKeySet) - public async System.Threading.Tasks.Task> GetJsonWebKeyWithHttpInfoAsync(string kid, string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'kid' is set - if (kid == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling AdminApi->GetJsonWebKey"); - } - - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->GetJsonWebKey"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetJsonWebKey", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// HydraJSONWebKeySet - public HydraJSONWebKeySet GetJsonWebKeySet(string set) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetJsonWebKeySetWithHttpInfo(set); - return localVarResponse.Data; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// ApiResponse of HydraJSONWebKeySet - public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetWithHttpInfo(string set) - { - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->GetJsonWebKeySet"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Get("/keys/{set}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetJsonWebKeySet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// 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)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeySetWithHttpInfoAsync(set, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// 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)) - { - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->GetJsonWebKeySet"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetJsonWebKeySet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - /// - /// Thrown when fails to make API call - /// - /// HydraLoginRequest - public HydraLoginRequest GetLoginRequest(string loginChallenge) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetLoginRequestWithHttpInfo(loginChallenge); - return localVarResponse.Data; - } - - /// - /// Get a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraLoginRequest - public Ory.Hydra.Client.Client.ApiResponse GetLoginRequestWithHttpInfo(string loginChallenge) - { - // verify the required parameter 'loginChallenge' is set - if (loginChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling AdminApi->GetLoginRequest"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); - - - // make the HTTP request - var localVarResponse = this.Client.Get("/oauth2/auth/requests/login", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetLoginRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraLoginRequest - public async System.Threading.Tasks.Task GetLoginRequestAsync(string loginChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetLoginRequestWithHttpInfoAsync(loginChallenge, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraLoginRequest) - public async System.Threading.Tasks.Task> GetLoginRequestWithHttpInfoAsync(string loginChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'loginChallenge' is set - if (loginChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling AdminApi->GetLoginRequest"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/auth/requests/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetLoginRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Logout Request Use this endpoint to fetch a logout request. - /// - /// Thrown when fails to make API call - /// - /// HydraLogoutRequest - public HydraLogoutRequest GetLogoutRequest(string logoutChallenge) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetLogoutRequestWithHttpInfo(logoutChallenge); - return localVarResponse.Data; - } - - /// - /// Get a Logout Request Use this endpoint to fetch a logout request. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraLogoutRequest - public Ory.Hydra.Client.Client.ApiResponse GetLogoutRequestWithHttpInfo(string logoutChallenge) - { - // verify the required parameter 'logoutChallenge' is set - if (logoutChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling AdminApi->GetLogoutRequest"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); - - - // make the HTTP request - var localVarResponse = this.Client.Get("/oauth2/auth/requests/logout", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetLogoutRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a Logout Request Use this endpoint to fetch a logout request. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraLogoutRequest - public async System.Threading.Tasks.Task GetLogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetLogoutRequestWithHttpInfoAsync(logoutChallenge, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a Logout Request Use this endpoint to fetch a logout request. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraLogoutRequest) - public async System.Threading.Tasks.Task> GetLogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'logoutChallenge' is set - if (logoutChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling AdminApi->GetLogoutRequest"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/auth/requests/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetLogoutRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// HydraOAuth2Client - public HydraOAuth2Client GetOAuth2Client(string id) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2ClientWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWithHttpInfo(string id) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->GetOAuth2Client"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Get("/clients/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// 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)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2ClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// 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)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->GetOAuth2Client"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// HydraTrustedJwtGrantIssuer - public HydraTrustedJwtGrantIssuer GetTrustedJwtGrantIssuer(string id) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetTrustedJwtGrantIssuerWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// ApiResponse of HydraTrustedJwtGrantIssuer - public Ory.Hydra.Client.Client.ApiResponse GetTrustedJwtGrantIssuerWithHttpInfo(string id) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->GetTrustedJwtGrantIssuer"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Get("/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTrustedJwtGrantIssuer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// Cancellation Token to cancel the request. - /// Task of HydraTrustedJwtGrantIssuer - public async System.Threading.Tasks.Task GetTrustedJwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetTrustedJwtGrantIssuerWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a 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. - /// - /// Thrown when fails to make API call - /// The id of the desired grant - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraTrustedJwtGrantIssuer) - public async System.Threading.Tasks.Task> GetTrustedJwtGrantIssuerWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->GetTrustedJwtGrantIssuer"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetTrustedJwtGrantIssuer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Service Version This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - /// - /// Thrown when fails to make API call - /// HydraVersion - public HydraVersion GetVersion() - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetVersionWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get Service Version This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - /// - /// Thrown when fails to make API call - /// ApiResponse of HydraVersion - public Ory.Hydra.Client.Client.ApiResponse GetVersionWithHttpInfo() - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = this.Client.Get("/version", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetVersion", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get Service Version This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of HydraVersion - public async System.Threading.Tasks.Task GetVersionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetVersionWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get Service Version This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraVersion) - public async System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/version", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetVersion", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - /// - /// 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) - /// HydraOAuth2TokenIntrospection - public HydraOAuth2TokenIntrospection IntrospectOAuth2Token(string token, string scope = default(string)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = IntrospectOAuth2TokenWithHttpInfo(token, scope); - return localVarResponse.Data; - } - - /// - /// Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - /// - /// 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) - /// ApiResponse of HydraOAuth2TokenIntrospection - public Ory.Hydra.Client.Client.ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string scope = default(string)) - { - // verify the required parameter 'token' is set - if (token == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling AdminApi->IntrospectOAuth2Token"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter - if (scope != null) - { - localVarRequestOptions.FormParameters.Add("scope", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(scope)); // form parameter - } - - - // make the HTTP request - var localVarResponse = this.Client.Post("/oauth2/introspect", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("IntrospectOAuth2Token", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - /// - /// 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) - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2TokenIntrospection - public async System.Threading.Tasks.Task IntrospectOAuth2TokenAsync(string token, string scope = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IntrospectOAuth2TokenWithHttpInfoAsync(token, scope, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - /// - /// 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) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2TokenIntrospection) - public async System.Threading.Tasks.Task> IntrospectOAuth2TokenWithHttpInfoAsync(string token, string scope = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'token' is set - if (token == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling AdminApi->IntrospectOAuth2Token"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter - if (scope != null) - { - localVarRequestOptions.FormParameters.Add("scope", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(scope)); // form parameter - } - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/introspect", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("IntrospectOAuth2Token", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Check Alive Status This endpoint returns a 200 status code when the HTTP server is up running. 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 - /// HydraHealthStatus - public HydraHealthStatus IsInstanceAlive() - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = IsInstanceAliveWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Check Alive Status This endpoint returns a 200 status code when the HTTP server is up running. 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 - /// ApiResponse of HydraHealthStatus - public Ory.Hydra.Client.Client.ApiResponse IsInstanceAliveWithHttpInfo() - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = this.Client.Get("/health/alive", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("IsInstanceAlive", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Check Alive Status This endpoint returns a 200 status code when the HTTP server is up running. 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 - /// Cancellation Token to cancel the request. - /// Task of HydraHealthStatus - public async System.Threading.Tasks.Task IsInstanceAliveAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsInstanceAliveWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Check Alive Status This endpoint returns a 200 status code when the HTTP server is up running. 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 - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraHealthStatus) - public async System.Threading.Tasks.Task> IsInstanceAliveWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/health/alive", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("IsInstanceAlive", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// The maximum amount of clients to returned, upper bound is 500 clients. (optional) - /// The offset from where to start looking. (optional) - /// The name of the clients to filter by. (optional) - /// The owner of the clients to filter by. (optional) - /// List<HydraOAuth2Client> - public List ListOAuth2Clients(long? limit = default(long?), long? offset = default(long?), string clientName = default(string), string owner = default(string)) - { - Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListOAuth2ClientsWithHttpInfo(limit, offset, clientName, owner); - return localVarResponse.Data; - } - - /// - /// 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// The maximum amount of clients to returned, upper bound is 500 clients. (optional) - /// The offset from where to start looking. (optional) - /// The name of the clients to filter by. (optional) - /// The owner of the clients to filter by. (optional) - /// ApiResponse of List<HydraOAuth2Client> - public Ory.Hydra.Client.Client.ApiResponse> ListOAuth2ClientsWithHttpInfo(long? limit = default(long?), long? offset = default(long?), string clientName = default(string), string owner = default(string)) - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } - if (clientName != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_name", clientName)); - } - if (owner != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "owner", owner)); - } - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/clients", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ListOAuth2Clients", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// The maximum amount of clients to returned, upper bound is 500 clients. (optional) - /// The offset from where to start looking. (optional) - /// The name of the clients to filter by. (optional) - /// The owner of the clients to filter by. (optional) - /// Cancellation Token to cancel the request. - /// Task of List<HydraOAuth2Client> - public async System.Threading.Tasks.Task> ListOAuth2ClientsAsync(long? limit = default(long?), long? offset = default(long?), string clientName = default(string), string owner = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListOAuth2ClientsWithHttpInfoAsync(limit, offset, clientName, owner, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// The maximum amount of clients to returned, upper bound is 500 clients. (optional) - /// The offset from where to start looking. (optional) - /// The name of the clients to filter by. (optional) - /// The owner of the clients to filter by. (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<HydraOAuth2Client>) - public async System.Threading.Tasks.Task>> ListOAuth2ClientsWithHttpInfoAsync(long? limit = default(long?), long? offset = default(long?), string clientName = default(string), string owner = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } - if (clientName != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_name", clientName)); - } - if (owner != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "owner", owner)); - } - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ListOAuth2Clients", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// - /// List<HydraPreviousConsentSession> - public List ListSubjectConsentSessions(string subject) - { - Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListSubjectConsentSessionsWithHttpInfo(subject); - return localVarResponse.Data; - } - - /// - /// Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of List<HydraPreviousConsentSession> - public Ory.Hydra.Client.Client.ApiResponse> ListSubjectConsentSessionsWithHttpInfo(string subject) - { - // verify the required parameter 'subject' is set - if (subject == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling AdminApi->ListSubjectConsentSessions"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ListSubjectConsentSessions", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of List<HydraPreviousConsentSession> - public async System.Threading.Tasks.Task> ListSubjectConsentSessionsAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListSubjectConsentSessionsWithHttpInfoAsync(subject, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<HydraPreviousConsentSession>) - public async System.Threading.Tasks.Task>> ListSubjectConsentSessionsWithHttpInfoAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'subject' is set - if (subject == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling AdminApi->ListSubjectConsentSessions"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ListSubjectConsentSessions", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - /// - /// Thrown when fails to make API call - /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - /// The maximum amount of policies returned, upper bound is 500 policies (optional) - /// The offset from where to start looking. (optional) - /// List<HydraTrustedJwtGrantIssuer> - public List ListTrustedJwtGrantIssuers(string issuer = default(string), long? limit = default(long?), long? offset = default(long?)) - { - Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListTrustedJwtGrantIssuersWithHttpInfo(issuer, limit, offset); - return localVarResponse.Data; - } - - /// - /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - /// - /// Thrown when fails to make API call - /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - /// The maximum amount of policies returned, upper bound is 500 policies (optional) - /// The offset from where to start looking. (optional) - /// ApiResponse of List<HydraTrustedJwtGrantIssuer> - public Ory.Hydra.Client.Client.ApiResponse> ListTrustedJwtGrantIssuersWithHttpInfo(string issuer = default(string), long? limit = default(long?), long? offset = default(long?)) - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (issuer != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "issuer", issuer)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ListTrustedJwtGrantIssuers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - /// - /// Thrown when fails to make API call - /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - /// The maximum amount of policies returned, upper bound is 500 policies (optional) - /// The offset from where to start looking. (optional) - /// Cancellation Token to cancel the request. - /// Task of List<HydraTrustedJwtGrantIssuer> - public async System.Threading.Tasks.Task> ListTrustedJwtGrantIssuersAsync(string issuer = default(string), long? limit = default(long?), long? offset = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListTrustedJwtGrantIssuersWithHttpInfoAsync(issuer, limit, offset, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - /// - /// Thrown when fails to make API call - /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - /// The maximum amount of policies returned, upper bound is 500 policies (optional) - /// The offset from where to start looking. (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<HydraTrustedJwtGrantIssuer>) - public async System.Threading.Tasks.Task>> ListTrustedJwtGrantIssuersWithHttpInfoAsync(string issuer = default(string), long? limit = default(long?), long? offset = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (issuer != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "issuer", issuer)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ListTrustedJwtGrantIssuers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Patch an OAuth 2.0 Client Patch an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// HydraOAuth2Client - public HydraOAuth2Client PatchOAuth2Client(string id, List body) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = PatchOAuth2ClientWithHttpInfo(id, body); - return localVarResponse.Data; - } - - /// - /// Patch an OAuth 2.0 Client Patch an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List body) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->PatchOAuth2Client"); - } - - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling AdminApi->PatchOAuth2Client"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Patch("/clients/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("PatchOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Patch an OAuth 2.0 Client Patch an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task PatchOAuth2ClientAsync(string id, List body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await PatchOAuth2ClientWithHttpInfoAsync(id, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Patch an OAuth 2.0 Client Patch an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> PatchOAuth2ClientWithHttpInfoAsync(string id, List body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->PatchOAuth2Client"); - } - - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling AdminApi->PatchOAuth2Client"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("PatchOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Reject a Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// HydraCompletedRequest - public HydraCompletedRequest RejectConsentRequest(string consentChallenge, HydraRejectRequest body = default(HydraRejectRequest)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = RejectConsentRequestWithHttpInfo(consentChallenge, body); - return localVarResponse.Data; - } - - /// - /// Reject a Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of HydraCompletedRequest - public Ory.Hydra.Client.Client.ApiResponse RejectConsentRequestWithHttpInfo(string consentChallenge, HydraRejectRequest body = default(HydraRejectRequest)) - { - // verify the required parameter 'consentChallenge' is set - if (consentChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling AdminApi->RejectConsentRequest"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/oauth2/auth/requests/consent/reject", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RejectConsentRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Reject a Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - public async System.Threading.Tasks.Task RejectConsentRequestAsync(string consentChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectConsentRequestWithHttpInfoAsync(consentChallenge, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Reject a Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - public async System.Threading.Tasks.Task> RejectConsentRequestWithHttpInfoAsync(string consentChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'consentChallenge' is set - if (consentChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling AdminApi->RejectConsentRequest"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/oauth2/auth/requests/consent/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RejectConsentRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Reject a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// HydraCompletedRequest - public HydraCompletedRequest RejectLoginRequest(string loginChallenge, HydraRejectRequest body = default(HydraRejectRequest)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = RejectLoginRequestWithHttpInfo(loginChallenge, body); - return localVarResponse.Data; - } - - /// - /// Reject a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of HydraCompletedRequest - public Ory.Hydra.Client.Client.ApiResponse RejectLoginRequestWithHttpInfo(string loginChallenge, HydraRejectRequest body = default(HydraRejectRequest)) - { - // verify the required parameter 'loginChallenge' is set - if (loginChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling AdminApi->RejectLoginRequest"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/oauth2/auth/requests/login/reject", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RejectLoginRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Reject a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraCompletedRequest - public async System.Threading.Tasks.Task RejectLoginRequestAsync(string loginChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectLoginRequestWithHttpInfoAsync(loginChallenge, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Reject a Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraCompletedRequest) - public async System.Threading.Tasks.Task> RejectLoginRequestWithHttpInfoAsync(string loginChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'loginChallenge' is set - if (loginChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling AdminApi->RejectLoginRequest"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/oauth2/auth/requests/login/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RejectLoginRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Reject a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// - public void RejectLogoutRequest(string logoutChallenge, HydraRejectRequest body = default(HydraRejectRequest)) - { - RejectLogoutRequestWithHttpInfo(logoutChallenge, body); - } - - /// - /// Reject a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse RejectLogoutRequestWithHttpInfo(string logoutChallenge, HydraRejectRequest body = default(HydraRejectRequest)) - { - // verify the required parameter 'logoutChallenge' is set - if (logoutChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling AdminApi->RejectLogoutRequest"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/oauth2/auth/requests/logout/reject", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RejectLogoutRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Reject a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task RejectLogoutRequestAsync(string logoutChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await RejectLogoutRequestWithHttpInfoAsync(logoutChallenge, body, cancellationToken).ConfigureAwait(false); - } - - /// - /// Reject a Logout Request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> RejectLogoutRequestWithHttpInfoAsync(string logoutChallenge, HydraRejectRequest body = default(HydraRejectRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'logoutChallenge' is set - if (logoutChallenge == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling AdminApi->RejectLogoutRequest"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/oauth2/auth/requests/logout/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RejectLogoutRequest", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - /// - /// Thrown when fails to make API call - /// - /// - public void RevokeAuthenticationSession(string subject) - { - RevokeAuthenticationSessionWithHttpInfo(subject); - } - - /// - /// Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse RevokeAuthenticationSessionWithHttpInfo(string subject) - { - // verify the required parameter 'subject' is set - if (subject == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling AdminApi->RevokeAuthenticationSession"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/oauth2/auth/sessions/login", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RevokeAuthenticationSession", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task RevokeAuthenticationSessionAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await RevokeAuthenticationSessionWithHttpInfoAsync(subject, cancellationToken).ConfigureAwait(false); - } - - /// - /// Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> RevokeAuthenticationSessionWithHttpInfoAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'subject' is set - if (subject == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling AdminApi->RevokeAuthenticationSession"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/oauth2/auth/sessions/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RevokeAuthenticationSession", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - /// - /// Thrown when fails to make API call - /// The subject (Subject) who's consent sessions should be deleted. - /// If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - /// If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - /// - public void RevokeConsentSessions(string subject, string _client = default(string), bool? all = default(bool?)) - { - RevokeConsentSessionsWithHttpInfo(subject, _client, all); - } - - /// - /// Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - /// - /// Thrown when fails to make API call - /// The subject (Subject) who's consent sessions should be deleted. - /// If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - /// If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse RevokeConsentSessionsWithHttpInfo(string subject, string _client = default(string), bool? all = default(bool?)) - { - // verify the required parameter 'subject' is set - if (subject == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling AdminApi->RevokeConsentSessions"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); - if (_client != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", _client)); - } - if (all != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "all", all)); - } - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RevokeConsentSessions", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - /// - /// Thrown when fails to make API call - /// The subject (Subject) who's consent sessions should be deleted. - /// If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - /// If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task RevokeConsentSessionsAsync(string subject, string _client = default(string), bool? all = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await RevokeConsentSessionsWithHttpInfoAsync(subject, _client, all, cancellationToken).ConfigureAwait(false); - } - - /// - /// Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - /// - /// Thrown when fails to make API call - /// The subject (Subject) who's consent sessions should be deleted. - /// If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - /// If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> RevokeConsentSessionsWithHttpInfoAsync(string subject, string _client = default(string), bool? all = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'subject' is set - if (subject == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling AdminApi->RevokeConsentSessions"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); - if (_client != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", _client)); - } - if (all != null) - { - localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "all", all)); - } - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RevokeConsentSessions", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Trust an 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). - /// - /// Thrown when fails to make API call - /// (optional) - /// HydraTrustedJwtGrantIssuer - public HydraTrustedJwtGrantIssuer TrustJwtGrantIssuer(HydraTrustJwtGrantIssuerBody body = default(HydraTrustJwtGrantIssuerBody)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = TrustJwtGrantIssuerWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Trust an 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). - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of HydraTrustedJwtGrantIssuer - public Ory.Hydra.Client.Client.ApiResponse TrustJwtGrantIssuerWithHttpInfo(HydraTrustJwtGrantIssuerBody body = default(HydraTrustJwtGrantIssuerBody)) - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("TrustJwtGrantIssuer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Trust an 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). - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraTrustedJwtGrantIssuer - public async System.Threading.Tasks.Task TrustJwtGrantIssuerAsync(HydraTrustJwtGrantIssuerBody body = default(HydraTrustJwtGrantIssuerBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await TrustJwtGrantIssuerWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Trust an 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). - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraTrustedJwtGrantIssuer) - public async System.Threading.Tasks.Task> TrustJwtGrantIssuerWithHttpInfoAsync(HydraTrustJwtGrantIssuerBody body = default(HydraTrustJwtGrantIssuerBody), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("TrustJwtGrantIssuer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// (optional) - /// HydraJSONWebKey - public HydraJSONWebKey UpdateJsonWebKey(string kid, string set, HydraJSONWebKey body = default(HydraJSONWebKey)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = UpdateJsonWebKeyWithHttpInfo(kid, set, body); - return localVarResponse.Data; - } - - /// - /// Update a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// (optional) - /// ApiResponse of HydraJSONWebKey - public Ory.Hydra.Client.Client.ApiResponse UpdateJsonWebKeyWithHttpInfo(string kid, string set, HydraJSONWebKey body = default(HydraJSONWebKey)) - { - // verify the required parameter 'kid' is set - if (kid == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling AdminApi->UpdateJsonWebKey"); - } - - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->UpdateJsonWebKey"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateJsonWebKey", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKey - public async System.Threading.Tasks.Task UpdateJsonWebKeyAsync(string kid, string set, HydraJSONWebKey body = default(HydraJSONWebKey), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await UpdateJsonWebKeyWithHttpInfoAsync(kid, set, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Update a 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. - /// - /// Thrown when fails to make API call - /// The kid of the desired key - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKey) - public async System.Threading.Tasks.Task> UpdateJsonWebKeyWithHttpInfoAsync(string kid, string set, HydraJSONWebKey body = default(HydraJSONWebKey), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'kid' is set - if (kid == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling AdminApi->UpdateJsonWebKey"); - } - - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->UpdateJsonWebKey"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("kid", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(kid)); // path parameter - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateJsonWebKey", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// HydraJSONWebKeySet - public HydraJSONWebKeySet UpdateJsonWebKeySet(string set, HydraJSONWebKeySet body = default(HydraJSONWebKeySet)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = UpdateJsonWebKeySetWithHttpInfo(set, body); - return localVarResponse.Data; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// ApiResponse of HydraJSONWebKeySet - public Ory.Hydra.Client.Client.ApiResponse UpdateJsonWebKeySetWithHttpInfo(string set, HydraJSONWebKeySet body = default(HydraJSONWebKeySet)) - { - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->UpdateJsonWebKeySet"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/keys/{set}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateJsonWebKeySet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKeySet - public async System.Threading.Tasks.Task UpdateJsonWebKeySetAsync(string set, HydraJSONWebKeySet body = default(HydraJSONWebKeySet), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await UpdateJsonWebKeySetWithHttpInfoAsync(set, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// 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. - /// - /// Thrown when fails to make API call - /// The set - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKeySet) - public async System.Threading.Tasks.Task> UpdateJsonWebKeySetWithHttpInfoAsync(string set, HydraJSONWebKeySet body = default(HydraJSONWebKeySet), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'set' is set - if (set == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling AdminApi->UpdateJsonWebKeySet"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateJsonWebKeySet", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// HydraOAuth2Client - public HydraOAuth2Client UpdateOAuth2Client(string id, HydraOAuth2Client body) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = UpdateOAuth2ClientWithHttpInfo(id, body); - return localVarResponse.Data; - } - - /// - /// Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse UpdateOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client body) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->UpdateOAuth2Client"); - } - - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling AdminApi->UpdateOAuth2Client"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/clients/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task UpdateOAuth2ClientAsync(string id, HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await UpdateOAuth2ClientWithHttpInfoAsync(id, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> UpdateOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling AdminApi->UpdateOAuth2Client"); - } - - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling AdminApi->UpdateOAuth2Client"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - } -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs new file mode 100644 index 00000000000..3e4fc35cb40 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/JwkApi.cs @@ -0,0 +1,1516 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IJwkApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// HydraJsonWebKeySet + HydraJsonWebKeySet CreateJsonWebKeySet(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// ApiResponse of HydraJsonWebKeySet + ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// + void DeleteJsonWebKey(string set, string kid); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// ApiResponse of Object(void) + ApiResponse DeleteJsonWebKeyWithHttpInfo(string set, string kid); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// + void DeleteJsonWebKeySet(string set); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// ApiResponse of Object(void) + ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set); + /// + /// 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). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// HydraJsonWebKeySet + HydraJsonWebKeySet GetJsonWebKey(string set, string 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). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// ApiResponse of HydraJsonWebKeySet + ApiResponse GetJsonWebKeyWithHttpInfo(string set, string kid); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// HydraJsonWebKeySet + HydraJsonWebKeySet GetJsonWebKeySet(string 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. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// ApiResponse of HydraJsonWebKeySet + ApiResponse GetJsonWebKeySetWithHttpInfo(string set); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// HydraJsonWebKey + HydraJsonWebKey SetJsonWebKey(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// ApiResponse of HydraJsonWebKey + ApiResponse SetJsonWebKeyWithHttpInfo(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// HydraJsonWebKeySet + HydraJsonWebKeySet SetJsonWebKeySet(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// ApiResponse of HydraJsonWebKeySet + ApiResponse SetJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet)); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IJwkApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteJsonWebKeySetAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteJsonWebKeySetWithHttpInfoAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// 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)); + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + System.Threading.Tasks.Task GetJsonWebKeySetAsync(string set, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// 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)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IJwkApi : IJwkApiSync, IJwkApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class JwkApi : IJwkApi + { + private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public JwkApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public JwkApi(string basePath) + { + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public JwkApi(Ory.Hydra.Client.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public JwkApi(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// HydraJsonWebKeySet + public HydraJsonWebKeySet CreateJsonWebKeySet(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateJsonWebKeySetWithHttpInfo(set, hydraCreateJsonWebKeySet); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse CreateJsonWebKeySetWithHttpInfo(string set, HydraCreateJsonWebKeySet hydraCreateJsonWebKeySet) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->CreateJsonWebKeySet"); + } + + // verify the required parameter 'hydraCreateJsonWebKeySet' is set + if (hydraCreateJsonWebKeySet == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraCreateJsonWebKeySet' when calling JwkApi->CreateJsonWebKeySet"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Data = hydraCreateJsonWebKeySet; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/admin/keys/{set}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateJsonWebKeySetWithHttpInfoAsync(set, hydraCreateJsonWebKeySet, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// + /// 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)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->CreateJsonWebKeySet"); + } + + // verify the required parameter 'hydraCreateJsonWebKeySet' is set + if (hydraCreateJsonWebKeySet == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraCreateJsonWebKeySet' when calling JwkApi->CreateJsonWebKeySet"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Data = hydraCreateJsonWebKeySet; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// + public void DeleteJsonWebKey(string set, string kid) + { + DeleteJsonWebKeyWithHttpInfo(set, kid); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeyWithHttpInfo(string set, string kid) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->DeleteJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->DeleteJsonWebKey"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + 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 + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// 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)) + { + await DeleteJsonWebKeyWithHttpInfoAsync(set, kid, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// The JSON Web Key ID (kid) + /// 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)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->DeleteJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->DeleteJsonWebKey"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + 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 + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// + public void DeleteJsonWebKeySet(string set) + { + DeleteJsonWebKeySetWithHttpInfo(set); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteJsonWebKeySetWithHttpInfo(string set) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->DeleteJsonWebKeySet"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/keys/{set}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// 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)) + { + await DeleteJsonWebKeySetWithHttpInfoAsync(set, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set + /// 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)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->DeleteJsonWebKeySet"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// HydraJsonWebKeySet + public HydraJsonWebKeySet GetJsonWebKey(string set, string kid) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetJsonWebKeyWithHttpInfo(set, kid); + return localVarResponse.Data; + } + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeyWithHttpInfo(string set, string kid) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->GetJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->GetJsonWebKey"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + 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 + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeyWithHttpInfoAsync(set, kid, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// JSON Web Key ID + /// 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)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->GetJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->GetJsonWebKey"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + 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 + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// HydraJsonWebKeySet + public HydraJsonWebKeySet GetJsonWebKeySet(string set) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetJsonWebKeySetWithHttpInfo(set); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse GetJsonWebKeySetWithHttpInfo(string set) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->GetJsonWebKeySet"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/keys/{set}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetJsonWebKeySetWithHttpInfoAsync(set, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// JSON Web Key Set ID + /// 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)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->GetJsonWebKeySet"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// HydraJsonWebKey + public HydraJsonWebKey SetJsonWebKey(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetJsonWebKeyWithHttpInfo(set, kid, hydraJsonWebKey); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// ApiResponse of HydraJsonWebKey + public Ory.Hydra.Client.Client.ApiResponse SetJsonWebKeyWithHttpInfo(string set, string kid, HydraJsonWebKey hydraJsonWebKey = default(HydraJsonWebKey)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->SetJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->SetJsonWebKey"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + 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.Data = hydraJsonWebKey; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetJsonWebKeyWithHttpInfoAsync(set, kid, hydraJsonWebKey, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// JSON Web Key ID + /// (optional) + /// 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)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->SetJsonWebKey"); + } + + // verify the required parameter 'kid' is set + if (kid == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'kid' when calling JwkApi->SetJsonWebKey"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + 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.Data = hydraJsonWebKey; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/keys/{set}/{kid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetJsonWebKey", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// HydraJsonWebKeySet + public HydraJsonWebKeySet SetJsonWebKeySet(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetJsonWebKeySetWithHttpInfo(set, hydraJsonWebKeySet); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse SetJsonWebKeySetWithHttpInfo(string set, HydraJsonWebKeySet hydraJsonWebKeySet = default(HydraJsonWebKeySet)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->SetJsonWebKeySet"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Data = hydraJsonWebKeySet; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/keys/{set}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetJsonWebKeySetWithHttpInfoAsync(set, hydraJsonWebKeySet, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The JSON Web Key Set ID + /// (optional) + /// 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)) + { + // verify the required parameter 'set' is set + if (set == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'set' when calling JwkApi->SetJsonWebKeySet"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("set", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(set)); // path parameter + localVarRequestOptions.Data = hydraJsonWebKeySet; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/keys/{set}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetJsonWebKeySet", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} 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 14d25df267e..f1ec6bde219 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/MetadataApi.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/MetadataApi.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -15,6 +16,7 @@ using System.Net; using System.Net.Mime; using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; namespace Ory.Hydra.Client.Api { @@ -26,24 +28,62 @@ public interface IMetadataApiSync : IApiAccessor { #region Synchronous Operations /// - /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + /// Return Running Software Version. /// /// - /// ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + /// 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 - /// - void Prometheus(); + /// HydraInlineResponse2001 + 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 + ApiResponse GetVersionWithHttpInfo(); + /// + /// 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 + /// HydraHealthStatus + 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 + /// ApiResponse of HydraHealthStatus + ApiResponse IsAliveWithHttpInfo(); + /// + /// 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 + HydraInlineResponse200 IsReady(); /// - /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + /// Check HTTP Server and Database Status /// /// - /// ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + /// 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 Object(void) - ApiResponse PrometheusWithHttpInfo(); + /// ApiResponse of HydraInlineResponse200 + ApiResponse IsReadyWithHttpInfo(); #endregion Synchronous Operations } @@ -54,26 +94,68 @@ public interface IMetadataApiAsync : IApiAccessor { #region Asynchronous Operations /// - /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraInlineResponse2001 + System.Threading.Tasks.Task GetVersionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Return Running Software Version. /// /// - /// ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + /// 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 /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task PrometheusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (HydraInlineResponse2001) + System.Threading.Tasks.Task> GetVersionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraHealthStatus + System.Threading.Tasks.Task IsAliveAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraHealthStatus) + System.Threading.Tasks.Task> IsAliveWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraInlineResponse200 + System.Threading.Tasks.Task IsReadyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + /// Check HTTP Server and Database Status /// /// - /// ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + /// 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 /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> PrometheusWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (HydraInlineResponse200) + System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -195,21 +277,254 @@ public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory } /// - /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + /// 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 - /// - public void Prometheus() + /// HydraInlineResponse2001 + public HydraInlineResponse2001 GetVersion() + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetVersionWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// 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() + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = this.Client.Get("/version", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetVersion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraInlineResponse2001 + public async System.Threading.Tasks.Task GetVersionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetVersionWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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 + /// 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)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/version", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetVersion", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// HydraHealthStatus + public HydraHealthStatus IsAlive() + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = IsAliveWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// 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 + /// ApiResponse of HydraHealthStatus + public Ory.Hydra.Client.Client.ApiResponse IsAliveWithHttpInfo() + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = this.Client.Get("/health/alive", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IsAlive", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraHealthStatus + public async System.Threading.Tasks.Task IsAliveAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsAliveWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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 + /// 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)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/health/alive", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IsAlive", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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() { - PrometheusWithHttpInfo(); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = IsReadyWithHttpInfo(); + return localVarResponse.Data; } /// - /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + /// 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 Object(void) - public Ory.Hydra.Client.Client.ApiResponse PrometheusWithHttpInfo() + /// ApiResponse of HydraInlineResponse200 + public Ory.Hydra.Client.Client.ApiResponse IsReadyWithHttpInfo() { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -218,6 +533,7 @@ public Ory.Hydra.Client.Client.ApiResponse PrometheusWithHttpInfo() // to determine the Accept header string[] _accepts = new string[] { + "application/json" }; var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -235,10 +551,10 @@ public Ory.Hydra.Client.Client.ApiResponse PrometheusWithHttpInfo() // make the HTTP request - var localVarResponse = this.Client.Get("/metrics/prometheus", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/health/ready", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("Prometheus", localVarResponse); + Exception _exception = this.ExceptionFactory("IsReady", localVarResponse); if (_exception != null) { throw _exception; @@ -249,23 +565,24 @@ public Ory.Hydra.Client.Client.ApiResponse PrometheusWithHttpInfo() } /// - /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + /// 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 /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task PrometheusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of HydraInlineResponse200 + public async System.Threading.Tasks.Task IsReadyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await PrometheusWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsReadyWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// - /// Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + /// 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 /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> PrometheusWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (HydraInlineResponse200) + public async System.Threading.Tasks.Task> IsReadyWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); @@ -275,6 +592,7 @@ public Ory.Hydra.Client.Client.ApiResponse PrometheusWithHttpInfo() // to determine the Accept header string[] _accepts = new string[] { + "application/json" }; var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -292,11 +610,11 @@ public Ory.Hydra.Client.Client.ApiResponse PrometheusWithHttpInfo() // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/metrics/prometheus", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/health/ready", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("Prometheus", localVarResponse); + Exception _exception = this.ExceptionFactory("IsReady", localVarResponse); if (_exception != null) { throw _exception; diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OAuth2Api.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OAuth2Api.cs new file mode 100644 index 00000000000..491ff3daf8f --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OAuth2Api.cs @@ -0,0 +1,5474 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOAuth2ApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse AcceptOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo AcceptOAuth2LoginRequest(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse AcceptOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest(string logoutChallenge); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse AcceptOAuth2LogoutRequestWithHttpInfo(string logoutChallenge); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// HydraOAuth2Client + HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client hydraOAuth2Client); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// ApiResponse of HydraOAuth2Client + ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// + void DeleteOAuth2Client(string id); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// ApiResponse of Object(void) + ApiResponse DeleteOAuth2ClientWithHttpInfo(string id); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// + void DeleteOAuth2Token(string clientId); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// ApiResponse of Object(void) + ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// + void DeleteTrustedOAuth2JwtGrantIssuer(string id); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// ApiResponse of Object(void) + ApiResponse DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(string 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// HydraOAuth2Client + HydraOAuth2Client GetOAuth2Client(string 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// ApiResponse of HydraOAuth2Client + ApiResponse GetOAuth2ClientWithHttpInfo(string id); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// HydraOAuth2ConsentRequest + HydraOAuth2ConsentRequest GetOAuth2ConsentRequest(string consentChallenge); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// ApiResponse of HydraOAuth2ConsentRequest + ApiResponse GetOAuth2ConsentRequestWithHttpInfo(string consentChallenge); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// HydraOAuth2LoginRequest + HydraOAuth2LoginRequest GetOAuth2LoginRequest(string loginChallenge); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// ApiResponse of HydraOAuth2LoginRequest + ApiResponse GetOAuth2LoginRequestWithHttpInfo(string loginChallenge); + /// + /// Get OAuth 2.0 Session Logout Request + /// + /// + /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// HydraOAuth2LogoutRequest + HydraOAuth2LogoutRequest GetOAuth2LogoutRequest(string logoutChallenge); + + /// + /// Get OAuth 2.0 Session Logout Request + /// + /// + /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of HydraOAuth2LogoutRequest + ApiResponse GetOAuth2LogoutRequestWithHttpInfo(string logoutChallenge); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// HydraTrustedOAuth2JwtGrantIssuer + HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(string 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer + ApiResponse GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id); + /// + /// 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. + /// + /// 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) + /// HydraIntrospectedOAuth2Token + HydraIntrospectedOAuth2Token IntrospectOAuth2Token(string token, string scope = default(string)); + + /// + /// 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. + /// + /// 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) + /// ApiResponse of HydraIntrospectedOAuth2Token + ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string scope = default(string)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// 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 name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// List<HydraOAuth2Client> + List ListOAuth2Clients(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// 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 name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// ApiResponse of List<HydraOAuth2Client> + ApiResponse> ListOAuth2ClientsWithHttpInfo(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// 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") + /// List<HydraOAuth2ConsentSession> + List ListOAuth2ConsentSessions(string subject, long? pageSize = default(long?), string pageToken = default(string)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// 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") + /// ApiResponse of List<HydraOAuth2ConsentSession> + ApiResponse> ListOAuth2ConsentSessionsWithHttpInfo(string subject, long? pageSize = default(long?), string pageToken = default(string)); + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers + /// + /// + /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// List<HydraTrustedOAuth2JwtGrantIssuer> + List ListTrustedOAuth2JwtGrantIssuers(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string)); + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers + /// + /// + /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// ApiResponse of List<HydraTrustedOAuth2JwtGrantIssuer> + ApiResponse> ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string)); + /// + /// 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 + /// HydraErrorOAuth2 + 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 + /// ApiResponse of HydraErrorOAuth2 + ApiResponse OAuth2AuthorizeWithHttpInfo(); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// HydraOAuth2TokenExchange + HydraOAuth2TokenExchange Oauth2TokenExchange(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// ApiResponse of HydraOAuth2TokenExchange + ApiResponse Oauth2TokenExchangeWithHttpInfo(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// HydraOAuth2Client + HydraOAuth2Client PatchOAuth2Client(string id, List hydraJsonPatch); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// ApiResponse of HydraOAuth2Client + ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List hydraJsonPatch); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo RejectOAuth2ConsentRequest(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse RejectOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// HydraOAuth2RedirectTo + HydraOAuth2RedirectTo RejectOAuth2LoginRequest(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// ApiResponse of HydraOAuth2RedirectTo + ApiResponse RejectOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// + void RejectOAuth2LogoutRequest(string logoutChallenge); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse RejectOAuth2LogoutRequestWithHttpInfo(string logoutChallenge); + /// + /// 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. + /// + /// 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) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// + void RevokeOAuth2ConsentSessions(string subject, string _client = default(string), bool? all = default(bool?)); + + /// + /// 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. + /// + /// 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) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// ApiResponse of Object(void) + ApiResponse RevokeOAuth2ConsentSessionsWithHttpInfo(string subject, string _client = default(string), bool? all = default(bool?)); + /// + /// Revokes All OAuth 2.0 Login Sessions of a Subject + /// + /// + /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. + /// + void RevokeOAuth2LoginSessions(string subject); + + /// + /// Revokes All OAuth 2.0 Login Sessions of a Subject + /// + /// + /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. + /// ApiResponse of Object(void) + ApiResponse RevokeOAuth2LoginSessionsWithHttpInfo(string subject); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// + void RevokeOAuth2Token(string token); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + ApiResponse RevokeOAuth2TokenWithHttpInfo(string token); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// HydraOAuth2Client + HydraOAuth2Client SetOAuth2Client(string id, HydraOAuth2Client hydraOAuth2Client); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// ApiResponse of HydraOAuth2Client + ApiResponse SetOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client); + /// + /// Set OAuth2 Client Token Lifespans + /// + /// + /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// HydraOAuth2Client + HydraOAuth2Client SetOAuth2ClientLifespans(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans)); + + /// + /// Set OAuth2 Client Token Lifespans + /// + /// + /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// ApiResponse of HydraOAuth2Client + ApiResponse SetOAuth2ClientLifespansWithHttpInfo(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans)); + /// + /// 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). + /// + /// Thrown when fails to make API call + /// (optional) + /// HydraTrustedOAuth2JwtGrantIssuer + HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer)); + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer + ApiResponse TrustOAuth2JwtGrantIssuerWithHttpInfo(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer)); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOAuth2ApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2RedirectTo + System.Threading.Tasks.Task AcceptOAuth2LogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task CreateOAuth2ClientAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteOAuth2TokenAsync(string clientId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteOAuth2TokenWithHttpInfoAsync(string clientId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteTrustedOAuth2JwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task GetOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2ConsentRequest + System.Threading.Tasks.Task GetOAuth2ConsentRequestAsync(string consentChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2LoginRequest + System.Threading.Tasks.Task GetOAuth2LoginRequestAsync(string loginChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// 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)); + /// + /// Get OAuth 2.0 Session Logout Request + /// + /// + /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2LogoutRequest + System.Threading.Tasks.Task GetOAuth2LogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get OAuth 2.0 Session Logout Request + /// + /// + /// Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// Cancellation Token to cancel the request. + /// Task of HydraTrustedOAuth2JwtGrantIssuer + System.Threading.Tasks.Task GetTrustedOAuth2JwtGrantIssuerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// 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)); + /// + /// 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. + /// + /// 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) + /// 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)); + + /// + /// 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. + /// + /// 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) + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// 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 name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// 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 name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// 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") + /// 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), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// 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") + /// 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), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers + /// + /// + /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// 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)); + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers + /// + /// + /// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// 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)); + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraErrorOAuth2 + System.Threading.Tasks.Task OAuth2AuthorizeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraErrorOAuth2) + System.Threading.Tasks.Task> OAuth2AuthorizeWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RejectOAuth2LogoutRequestAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RejectOAuth2LogoutRequestWithHttpInfoAsync(string logoutChallenge, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// 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) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// 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)); + + /// + /// 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. + /// + /// 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) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// 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)); + /// + /// Revokes All OAuth 2.0 Login Sessions of a Subject + /// + /// + /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RevokeOAuth2LoginSessionsAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Revokes All OAuth 2.0 Login Sessions of a Subject + /// + /// + /// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RevokeOAuth2LoginSessionsWithHttpInfoAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// 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)); + /// + /// Set OAuth2 Client Token Lifespans + /// + /// + /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// 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)); + + /// + /// Set OAuth2 Client Token Lifespans + /// + /// + /// Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// 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)); + /// + /// 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). + /// + /// Thrown when fails to make API call + /// (optional) + /// 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)); + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// (optional) + /// 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)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOAuth2Api : IOAuth2ApiSync, IOAuth2ApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class OAuth2Api : IOAuth2Api + { + private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public OAuth2Api() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public OAuth2Api(string basePath) + { + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public OAuth2Api(Ory.Hydra.Client.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public OAuth2Api(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo AcceptOAuth2ConsentRequest(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptOAuth2ConsentRequestWithHttpInfo(consentChallenge, hydraAcceptOAuth2ConsentRequest); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraAcceptOAuth2ConsentRequest hydraAcceptOAuth2ConsentRequest = default(HydraAcceptOAuth2ConsentRequest)) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->AcceptOAuth2ConsentRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Data = hydraAcceptOAuth2ConsentRequest; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/consent/accept", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, hydraAcceptOAuth2ConsentRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// 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)) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->AcceptOAuth2ConsentRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Data = hydraAcceptOAuth2ConsentRequest; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/consent/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo AcceptOAuth2LoginRequest(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptOAuth2LoginRequestWithHttpInfo(loginChallenge, hydraAcceptOAuth2LoginRequest); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraAcceptOAuth2LoginRequest hydraAcceptOAuth2LoginRequest = default(HydraAcceptOAuth2LoginRequest)) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->AcceptOAuth2LoginRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Data = hydraAcceptOAuth2LoginRequest; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/login/accept", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, hydraAcceptOAuth2LoginRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// 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)) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->AcceptOAuth2LoginRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Data = hydraAcceptOAuth2LoginRequest; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/login/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo AcceptOAuth2LogoutRequest(string logoutChallenge) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = AcceptOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse AcceptOAuth2LogoutRequestWithHttpInfo(string logoutChallenge) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->AcceptOAuth2LogoutRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/logout/accept", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await AcceptOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Logout Request Challenge + /// 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)) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->AcceptOAuth2LogoutRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/logout/accept", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("AcceptOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// HydraOAuth2Client + public HydraOAuth2Client CreateOAuth2Client(HydraOAuth2Client hydraOAuth2Client) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateOAuth2ClientWithHttpInfo(hydraOAuth2Client); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse CreateOAuth2ClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client) + { + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OAuth2Api->CreateOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraOAuth2Client; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/admin/clients", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateOAuth2ClientWithHttpInfoAsync(hydraOAuth2Client, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client Request Body + /// 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)) + { + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OAuth2Api->CreateOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraOAuth2Client; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// + public void DeleteOAuth2Client(string id) + { + DeleteOAuth2ClientWithHttpInfo(id); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2ClientWithHttpInfo(string id) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->DeleteOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/clients/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)) + { + await DeleteOAuth2ClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->DeleteOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// + public void DeleteOAuth2Token(string clientId) + { + DeleteOAuth2TokenWithHttpInfo(clientId); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteOAuth2TokenWithHttpInfo(string clientId) + { + // verify the required parameter 'clientId' is set + if (clientId == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'clientId' when calling OAuth2Api->DeleteOAuth2Token"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_id", clientId)); + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/oauth2/tokens", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// 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)) + { + await DeleteOAuth2TokenWithHttpInfoAsync(clientId, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// 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)) + { + // verify the required parameter 'clientId' is set + if (clientId == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'clientId' when calling OAuth2Api->DeleteOAuth2Token"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_id", clientId)); + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/oauth2/tokens", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// + public void DeleteTrustedOAuth2JwtGrantIssuer(string id) + { + DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->DeleteTrustedOAuth2JwtGrantIssuer"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteTrustedOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// 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)) + { + await DeleteTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->DeleteTrustedOAuth2JwtGrantIssuer"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteTrustedOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// HydraOAuth2Client + public HydraOAuth2Client GetOAuth2Client(string id) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2ClientWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ClientWithHttpInfo(string id) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->GetOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/clients/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2ClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->GetOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// HydraOAuth2ConsentRequest + public HydraOAuth2ConsentRequest GetOAuth2ConsentRequest(string consentChallenge) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2ConsentRequestWithHttpInfo(consentChallenge); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// ApiResponse of HydraOAuth2ConsentRequest + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2ConsentRequestWithHttpInfo(string consentChallenge) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->GetOAuth2ConsentRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/oauth2/auth/requests/consent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// 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)) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->GetOAuth2ConsentRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/oauth2/auth/requests/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// HydraOAuth2LoginRequest + public HydraOAuth2LoginRequest GetOAuth2LoginRequest(string loginChallenge) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2LoginRequestWithHttpInfo(loginChallenge); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// ApiResponse of HydraOAuth2LoginRequest + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2LoginRequestWithHttpInfo(string loginChallenge) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->GetOAuth2LoginRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/oauth2/auth/requests/login", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// 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)) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->GetOAuth2LoginRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/oauth2/auth/requests/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// HydraOAuth2LogoutRequest + public HydraOAuth2LogoutRequest GetOAuth2LogoutRequest(string logoutChallenge) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + return localVarResponse.Data; + } + + /// + /// Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of HydraOAuth2LogoutRequest + public Ory.Hydra.Client.Client.ApiResponse GetOAuth2LogoutRequestWithHttpInfo(string logoutChallenge) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->GetOAuth2LogoutRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/oauth2/auth/requests/logout", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request. + /// + /// Thrown when fails to make API call + /// + /// 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)) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->GetOAuth2LogoutRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/oauth2/auth/requests/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// HydraTrustedOAuth2JwtGrantIssuer + public HydraTrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(string id) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer + public Ory.Hydra.Client.Client.ApiResponse GetTrustedOAuth2JwtGrantIssuerWithHttpInfo(string id) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->GetTrustedOAuth2JwtGrantIssuer"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + + // make the HTTP request + var localVarResponse = this.Client.Get("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTrustedOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetTrustedOAuth2JwtGrantIssuerWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the desired grant + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->GetTrustedOAuth2JwtGrantIssuer"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/admin/trust/grants/jwt-bearer/issuers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetTrustedOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// 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) + /// HydraIntrospectedOAuth2Token + public HydraIntrospectedOAuth2Token IntrospectOAuth2Token(string token, string scope = default(string)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = IntrospectOAuth2TokenWithHttpInfo(token, scope); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// 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) + /// ApiResponse of HydraIntrospectedOAuth2Token + public Ory.Hydra.Client.Client.ApiResponse IntrospectOAuth2TokenWithHttpInfo(string token, string scope = default(string)) + { + // verify the required parameter 'token' is set + if (token == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling OAuth2Api->IntrospectOAuth2Token"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (scope != null) + { + localVarRequestOptions.FormParameters.Add("scope", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(scope)); // form parameter + } + localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + + + // make the HTTP request + var localVarResponse = this.Client.Post("/admin/oauth2/introspect", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IntrospectOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// 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) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IntrospectOAuth2TokenWithHttpInfoAsync(token, scope, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// 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) + /// 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)) + { + // verify the required parameter 'token' is set + if (token == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling OAuth2Api->IntrospectOAuth2Token"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (scope != null) + { + localVarRequestOptions.FormParameters.Add("scope", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(scope)); // form parameter + } + localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/oauth2/introspect", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("IntrospectOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// 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 name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// List<HydraOAuth2Client> + public List ListOAuth2Clients(long? pageSize = default(long?), string pageToken = default(string), string clientName = default(string), string owner = default(string)) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListOAuth2ClientsWithHttpInfo(pageSize, pageToken, clientName, owner); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// 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 name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// 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)) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + if (clientName != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_name", clientName)); + } + if (owner != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "owner", owner)); + } + + + // make the HTTP request + var localVarResponse = this.Client.Get>("/admin/clients", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListOAuth2Clients", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// 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 name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListOAuth2ClientsWithHttpInfoAsync(pageSize, pageToken, clientName, owner, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// 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 name of the clients to filter by. (optional) + /// The owner of the clients to filter by. (optional) + /// 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)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + if (clientName != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client_name", clientName)); + } + if (owner != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "owner", owner)); + } + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/admin/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListOAuth2Clients", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// 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") + /// List<HydraOAuth2ConsentSession> + public List ListOAuth2ConsentSessions(string subject, long? pageSize = default(long?), string pageToken = default(string)) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListOAuth2ConsentSessionsWithHttpInfo(subject, pageSize, pageToken); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// 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") + /// ApiResponse of List<HydraOAuth2ConsentSession> + public Ory.Hydra.Client.Client.ApiResponse> ListOAuth2ConsentSessionsWithHttpInfo(string subject, long? pageSize = default(long?), string pageToken = default(string)) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->ListOAuth2ConsentSessions"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + + + // make the HTTP request + var localVarResponse = this.Client.Get>("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListOAuth2ConsentSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// 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") + /// 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), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListOAuth2ConsentSessionsWithHttpInfoAsync(subject, pageSize, pageToken, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The subject to list the consent sessions for. + /// 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") + /// 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), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->ListOAuth2ConsentSessions"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (pageSize != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_size", pageSize)); + } + if (pageToken != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "page_token", pageToken)); + } + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListOAuth2ConsentSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// List<HydraTrustedOAuth2JwtGrantIssuer> + public List ListTrustedOAuth2JwtGrantIssuers(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string)) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(maxItems, defaultItems, issuer); + return localVarResponse.Data; + } + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// ApiResponse of List<HydraTrustedOAuth2JwtGrantIssuer> + public Ory.Hydra.Client.Client.ApiResponse> ListTrustedOAuth2JwtGrantIssuersWithHttpInfo(long? maxItems = default(long?), long? defaultItems = default(long?), string issuer = default(string)) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (maxItems != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "MaxItems", maxItems)); + } + if (defaultItems != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "DefaultItems", defaultItems)); + } + if (issuer != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "issuer", issuer)); + } + + + // make the HTTP request + var localVarResponse = this.Client.Get>("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListTrustedOAuth2JwtGrantIssuers", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse> localVarResponse = await ListTrustedOAuth2JwtGrantIssuersWithHttpInfoAsync(maxItems, defaultItems, issuer, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + /// + /// Thrown when fails to make API call + /// (optional) + /// (optional) + /// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + /// 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)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (maxItems != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "MaxItems", maxItems)); + } + if (defaultItems != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "DefaultItems", defaultItems)); + } + if (issuer != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "issuer", issuer)); + } + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync>("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListTrustedOAuth2JwtGrantIssuers", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// HydraErrorOAuth2 + public HydraErrorOAuth2 OAuth2Authorize() + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = OAuth2AuthorizeWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// 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 + /// ApiResponse of HydraErrorOAuth2 + public Ory.Hydra.Client.Client.ApiResponse OAuth2AuthorizeWithHttpInfo() + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = this.Client.Get("/oauth2/auth", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("OAuth2Authorize", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraErrorOAuth2 + public async System.Threading.Tasks.Task OAuth2AuthorizeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await OAuth2AuthorizeWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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 + /// 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)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/auth", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("OAuth2Authorize", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// HydraOAuth2TokenExchange + public HydraOAuth2TokenExchange Oauth2TokenExchange(string grantType, string clientId = default(string), string code = default(string), string redirectUri = default(string), string refreshToken = default(string)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = Oauth2TokenExchangeWithHttpInfo(grantType, clientId, code, redirectUri, refreshToken); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// 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)) + { + // verify the required parameter 'grantType' is set + if (grantType == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'grantType' when calling OAuth2Api->Oauth2TokenExchange"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (clientId != null) + { + localVarRequestOptions.FormParameters.Add("client_id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientId)); // form parameter + } + if (code != null) + { + localVarRequestOptions.FormParameters.Add("code", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(code)); // form parameter + } + localVarRequestOptions.FormParameters.Add("grant_type", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(grantType)); // form parameter + if (redirectUri != null) + { + localVarRequestOptions.FormParameters.Add("redirect_uri", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(redirectUri)); // form parameter + } + if (refreshToken != null) + { + localVarRequestOptions.FormParameters.Add("refresh_token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(refreshToken)); // form parameter + } + + // authentication (basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // oauth required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/oauth2/token", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Oauth2TokenExchange", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await Oauth2TokenExchangeWithHttpInfoAsync(grantType, clientId, code, redirectUri, refreshToken, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// (optional) + /// (optional) + /// (optional) + /// 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)) + { + // verify the required parameter 'grantType' is set + if (grantType == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'grantType' when calling OAuth2Api->Oauth2TokenExchange"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (clientId != null) + { + localVarRequestOptions.FormParameters.Add("client_id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientId)); // form parameter + } + if (code != null) + { + localVarRequestOptions.FormParameters.Add("code", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(code)); // form parameter + } + localVarRequestOptions.FormParameters.Add("grant_type", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(grantType)); // form parameter + if (redirectUri != null) + { + localVarRequestOptions.FormParameters.Add("redirect_uri", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(redirectUri)); // form parameter + } + if (refreshToken != null) + { + localVarRequestOptions.FormParameters.Add("refresh_token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(refreshToken)); // form parameter + } + + // authentication (basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // oauth required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/token", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Oauth2TokenExchange", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// HydraOAuth2Client + public HydraOAuth2Client PatchOAuth2Client(string id, List hydraJsonPatch) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = PatchOAuth2ClientWithHttpInfo(id, hydraJsonPatch); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse PatchOAuth2ClientWithHttpInfo(string id, List hydraJsonPatch) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->PatchOAuth2Client"); + } + + // verify the required parameter 'hydraJsonPatch' is set + if (hydraJsonPatch == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraJsonPatch' when calling OAuth2Api->PatchOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraJsonPatch; + + + // make the HTTP request + var localVarResponse = this.Client.Patch("/admin/clients/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("PatchOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await PatchOAuth2ClientWithHttpInfoAsync(id, hydraJsonPatch, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// OAuth 2.0 Client JSON Patch Body + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->PatchOAuth2Client"); + } + + // verify the required parameter 'hydraJsonPatch' is set + if (hydraJsonPatch == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraJsonPatch' when calling OAuth2Api->PatchOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraJsonPatch; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PatchAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("PatchOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo RejectOAuth2ConsentRequest(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = RejectOAuth2ConsentRequestWithHttpInfo(consentChallenge, hydraRejectOAuth2Request); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2ConsentRequestWithHttpInfo(string consentChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->RejectOAuth2ConsentRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Data = hydraRejectOAuth2Request; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/consent/reject", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectOAuth2ConsentRequestWithHttpInfoAsync(consentChallenge, hydraRejectOAuth2Request, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Consent Request Challenge + /// (optional) + /// 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)) + { + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'consentChallenge' when calling OAuth2Api->RejectOAuth2ConsentRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "consent_challenge", consentChallenge)); + localVarRequestOptions.Data = hydraRejectOAuth2Request; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/consent/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2ConsentRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// HydraOAuth2RedirectTo + public HydraOAuth2RedirectTo RejectOAuth2LoginRequest(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = RejectOAuth2LoginRequestWithHttpInfo(loginChallenge, hydraRejectOAuth2Request); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// ApiResponse of HydraOAuth2RedirectTo + public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LoginRequestWithHttpInfo(string loginChallenge, HydraRejectOAuth2Request hydraRejectOAuth2Request = default(HydraRejectOAuth2Request)) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->RejectOAuth2LoginRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Data = hydraRejectOAuth2Request; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/login/reject", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await RejectOAuth2LoginRequestWithHttpInfoAsync(loginChallenge, hydraRejectOAuth2Request, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Login Request Challenge + /// (optional) + /// 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)) + { + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'loginChallenge' when calling OAuth2Api->RejectOAuth2LoginRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "login_challenge", loginChallenge)); + localVarRequestOptions.Data = hydraRejectOAuth2Request; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/login/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2LoginRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// + public void RejectOAuth2LogoutRequest(string logoutChallenge) + { + RejectOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RejectOAuth2LogoutRequestWithHttpInfo(string logoutChallenge) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->RejectOAuth2LogoutRequest"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/oauth2/auth/requests/logout/reject", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// 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)) + { + await RejectOAuth2LogoutRequestWithHttpInfoAsync(logoutChallenge, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// 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)) + { + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'logoutChallenge' when calling OAuth2Api->RejectOAuth2LogoutRequest"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "logout_challenge", logoutChallenge)); + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/oauth2/auth/requests/logout/reject", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RejectOAuth2LogoutRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// 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) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// + public void RevokeOAuth2ConsentSessions(string subject, string _client = default(string), bool? all = default(bool?)) + { + RevokeOAuth2ConsentSessionsWithHttpInfo(subject, _client, all); + } + + /// + /// 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. + /// + /// 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) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2ConsentSessionsWithHttpInfo(string subject, string _client = default(string), bool? all = default(bool?)) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->RevokeOAuth2ConsentSessions"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + if (_client != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", _client)); + } + if (all != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "all", all)); + } + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2ConsentSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// 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) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// 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)) + { + await RevokeOAuth2ConsentSessionsWithHttpInfoAsync(subject, _client, all, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// 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) + /// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + /// 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)) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->RevokeOAuth2ConsentSessions"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + if (_client != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "client", _client)); + } + if (all != null) + { + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "all", all)); + } + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/oauth2/auth/sessions/consent", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2ConsentSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Revokes All OAuth 2.0 Login Sessions of a Subject This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. + /// + public void RevokeOAuth2LoginSessions(string subject) + { + RevokeOAuth2LoginSessionsWithHttpInfo(subject); + } + + /// + /// Revokes All OAuth 2.0 Login Sessions of a Subject This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2LoginSessionsWithHttpInfo(string subject) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->RevokeOAuth2LoginSessions"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + + + // make the HTTP request + var localVarResponse = this.Client.Delete("/admin/oauth2/auth/sessions/login", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2LoginSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Revokes All OAuth 2.0 Login Sessions of a Subject This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RevokeOAuth2LoginSessionsAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RevokeOAuth2LoginSessionsWithHttpInfoAsync(subject, cancellationToken).ConfigureAwait(false); + } + + /// + /// Revokes All OAuth 2.0 Login Sessions of a Subject This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Subject The subject to revoke authentication sessions for. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RevokeOAuth2LoginSessionsWithHttpInfoAsync(string subject, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'subject' is set + if (subject == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'subject' when calling OAuth2Api->RevokeOAuth2LoginSessions"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.QueryParameters.Add(Ory.Hydra.Client.Client.ClientUtils.ParameterToMultiMap("", "subject", subject)); + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/admin/oauth2/auth/sessions/login", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2LoginSessions", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// + public void RevokeOAuth2Token(string token) + { + RevokeOAuth2TokenWithHttpInfo(token); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2TokenWithHttpInfo(string token) + { + // verify the required parameter 'token' is set + if (token == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling OAuth2Api->RevokeOAuth2Token"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + + // authentication (basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // oauth required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/oauth2/revoke", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RevokeOAuth2TokenWithHttpInfoAsync(token, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'token' is set + if (token == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling OAuth2Api->RevokeOAuth2Token"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/x-www-form-urlencoded" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter + + // authentication (basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + // authentication (oauth2) required + // oauth required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/revoke", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOAuth2Token", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// HydraOAuth2Client + public HydraOAuth2Client SetOAuth2Client(string id, HydraOAuth2Client hydraOAuth2Client) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetOAuth2ClientWithHttpInfo(id, hydraOAuth2Client); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->SetOAuth2Client"); + } + + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OAuth2Api->SetOAuth2Client"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2Client; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/clients/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOAuth2ClientWithHttpInfoAsync(id, hydraOAuth2Client, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->SetOAuth2Client"); + } + + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OAuth2Api->SetOAuth2Client"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2Client; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOAuth2Client", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// HydraOAuth2Client + public HydraOAuth2Client SetOAuth2ClientLifespans(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetOAuth2ClientLifespansWithHttpInfo(id, hydraOAuth2ClientTokenLifespans); + return localVarResponse.Data; + } + + /// + /// Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse SetOAuth2ClientLifespansWithHttpInfo(string id, HydraOAuth2ClientTokenLifespans hydraOAuth2ClientTokenLifespans = default(HydraOAuth2ClientTokenLifespans)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->SetOAuth2ClientLifespans"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2ClientTokenLifespans; + + + // make the HTTP request + var localVarResponse = this.Client.Put("/admin/clients/{id}/lifespans", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOAuth2ClientLifespans", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOAuth2ClientLifespansWithHttpInfoAsync(id, hydraOAuth2ClientTokenLifespans, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// (optional) + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OAuth2Api->SetOAuth2ClientLifespans"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2ClientTokenLifespans; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/admin/clients/{id}/lifespans", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOAuth2ClientLifespans", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// (optional) + /// HydraTrustedOAuth2JwtGrantIssuer + public HydraTrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = TrustOAuth2JwtGrantIssuerWithHttpInfo(hydraTrustOAuth2JwtGrantIssuer); + return localVarResponse.Data; + } + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of HydraTrustedOAuth2JwtGrantIssuer + public Ory.Hydra.Client.Client.ApiResponse TrustOAuth2JwtGrantIssuerWithHttpInfo(HydraTrustOAuth2JwtGrantIssuer hydraTrustOAuth2JwtGrantIssuer = default(HydraTrustOAuth2JwtGrantIssuer)) + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraTrustOAuth2JwtGrantIssuer; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TrustOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// (optional) + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await TrustOAuth2JwtGrantIssuerWithHttpInfoAsync(hydraTrustOAuth2JwtGrantIssuer, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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). + /// + /// Thrown when fails to make API call + /// (optional) + /// 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)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraTrustOAuth2JwtGrantIssuer; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/admin/trust/grants/jwt-bearer/issuers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TrustOAuth2JwtGrantIssuer", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OidcApi.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OidcApi.cs new file mode 100644 index 00000000000..8d0675e8e83 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/OidcApi.cs @@ -0,0 +1,1408 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOidcApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// HydraOAuth2Client + HydraOAuth2Client CreateOidcDynamicClient(HydraOAuth2Client hydraOAuth2Client); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// ApiResponse of HydraOAuth2Client + ApiResponse CreateOidcDynamicClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// + void DeleteOidcDynamicClient(string id); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// ApiResponse of Object(void) + ApiResponse DeleteOidcDynamicClientWithHttpInfo(string id); + /// + /// 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 + /// HydraOidcConfiguration + 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 + /// ApiResponse of HydraOidcConfiguration + ApiResponse DiscoverOidcConfigurationWithHttpInfo(); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// HydraOAuth2Client + HydraOAuth2Client GetOidcDynamicClient(string 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// ApiResponse of HydraOAuth2Client + ApiResponse GetOidcDynamicClientWithHttpInfo(string id); + /// + /// 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 + /// HydraOidcUserInfo + 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 + /// ApiResponse of HydraOidcUserInfo + ApiResponse GetOidcUserInfoWithHttpInfo(); + /// + /// 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 + /// + 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 + /// ApiResponse of Object(void) + ApiResponse RevokeOidcSessionWithHttpInfo(); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// HydraOAuth2Client + HydraOAuth2Client SetOidcDynamicClient(string id, HydraOAuth2Client hydraOAuth2Client); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// ApiResponse of HydraOAuth2Client + ApiResponse SetOidcDynamicClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOidcApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task CreateOidcDynamicClientAsync(HydraOAuth2Client hydraOAuth2Client, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// 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)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteOidcDynamicClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteOidcDynamicClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraOidcConfiguration + System.Threading.Tasks.Task DiscoverOidcConfigurationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOidcConfiguration) + System.Threading.Tasks.Task> DiscoverOidcConfigurationWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// Cancellation Token to cancel the request. + /// Task of HydraOAuth2Client + System.Threading.Tasks.Task GetOidcDynamicClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)); + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraOidcUserInfo + System.Threading.Tasks.Task GetOidcUserInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraOidcUserInfo) + System.Threading.Tasks.Task> GetOidcUserInfoWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task RevokeOidcSessionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> RevokeOidcSessionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// 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)); + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// 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)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOidcApi : IOidcApiSync, IOidcApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class OidcApi : IOidcApi + { + private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public OidcApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public OidcApi(string basePath) + { + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public OidcApi(Ory.Hydra.Client.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public OidcApi(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// HydraOAuth2Client + public HydraOAuth2Client CreateOidcDynamicClient(HydraOAuth2Client hydraOAuth2Client) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = CreateOidcDynamicClientWithHttpInfo(hydraOAuth2Client); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse CreateOidcDynamicClientWithHttpInfo(HydraOAuth2Client hydraOAuth2Client) + { + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OidcApi->CreateOidcDynamicClient"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraOAuth2Client; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/oauth2/register", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await CreateOidcDynamicClientWithHttpInfoAsync(hydraOAuth2Client, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// Dynamic Client Registration Request Body + /// 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)) + { + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OidcApi->CreateOidcDynamicClient"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.Data = hydraOAuth2Client; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/register", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// + public void DeleteOidcDynamicClient(string id) + { + DeleteOidcDynamicClientWithHttpInfo(id); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse DeleteOidcDynamicClientWithHttpInfo(string id) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->DeleteOidcDynamicClient"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/oauth2/register/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)) + { + await DeleteOidcDynamicClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->DeleteOidcDynamicClient"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/oauth2/register/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// HydraOidcConfiguration + public HydraOidcConfiguration DiscoverOidcConfiguration() + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = DiscoverOidcConfigurationWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// 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 + /// ApiResponse of HydraOidcConfiguration + public Ory.Hydra.Client.Client.ApiResponse DiscoverOidcConfigurationWithHttpInfo() + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = this.Client.Get("/.well-known/openid-configuration", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DiscoverOidcConfiguration", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraOidcConfiguration + public async System.Threading.Tasks.Task DiscoverOidcConfigurationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DiscoverOidcConfigurationWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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 + /// 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)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/.well-known/openid-configuration", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DiscoverOidcConfiguration", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// HydraOAuth2Client + public HydraOAuth2Client GetOidcDynamicClient(string id) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOidcDynamicClientWithHttpInfo(id); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse GetOidcDynamicClientWithHttpInfo(string id) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->GetOidcDynamicClient"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/oauth2/register/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOidcDynamicClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// The id of the OAuth 2.0 Client. + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->GetOidcDynamicClient"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/register/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// HydraOidcUserInfo + public HydraOidcUserInfo GetOidcUserInfo() + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = GetOidcUserInfoWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// 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 + /// ApiResponse of HydraOidcUserInfo + public Ory.Hydra.Client.Client.ApiResponse GetOidcUserInfoWithHttpInfo() + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + // authentication (oauth2) required + // oauth required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/userinfo", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOidcUserInfo", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraOidcUserInfo + public async System.Threading.Tasks.Task GetOidcUserInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await GetOidcUserInfoWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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 + /// 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)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + // authentication (oauth2) required + // oauth required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/userinfo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetOidcUserInfo", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// + public void RevokeOidcSession() + { + 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 + /// ApiResponse of Object(void) + public Ory.Hydra.Client.Client.ApiResponse RevokeOidcSessionWithHttpInfo() + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = this.Client.Get("/oauth2/sessions/logout", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOidcSession", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task RevokeOidcSessionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await RevokeOidcSessionWithHttpInfoAsync(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 + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RevokeOidcSessionWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/sessions/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("RevokeOidcSession", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// HydraOAuth2Client + public HydraOAuth2Client SetOidcDynamicClient(string id, HydraOAuth2Client hydraOAuth2Client) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = SetOidcDynamicClientWithHttpInfo(id, hydraOAuth2Client); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// ApiResponse of HydraOAuth2Client + public Ory.Hydra.Client.Client.ApiResponse SetOidcDynamicClientWithHttpInfo(string id, HydraOAuth2Client hydraOAuth2Client) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->SetOidcDynamicClient"); + } + + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OidcApi->SetOidcDynamicClient"); + } + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2Client; + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Put("/oauth2/register/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// 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)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await SetOidcDynamicClientWithHttpInfoAsync(id, hydraOAuth2Client, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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. + /// + /// Thrown when fails to make API call + /// OAuth 2.0 Client ID + /// OAuth 2.0 Client Request Body + /// 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)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling OidcApi->SetOidcDynamicClient"); + } + + // verify the required parameter 'hydraOAuth2Client' is set + if (hydraOAuth2Client == null) + { + throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'hydraOAuth2Client' when calling OidcApi->SetOidcDynamicClient"); + } + + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter + localVarRequestOptions.Data = hydraOAuth2Client; + + // authentication (bearer) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PutAsync("/oauth2/register/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("SetOidcDynamicClient", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/PublicApi.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/PublicApi.cs deleted file mode 100644 index 3c4d696cf8a..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/PublicApi.cs +++ /dev/null @@ -1,2307 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using Ory.Hydra.Client.Client; -using Ory.Hydra.Client.Model; - -namespace Ory.Hydra.Client.Api -{ - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IPublicApiSync : IApiAccessor - { - #region Synchronous Operations - /// - /// OpenID Connect Front-Backchannel Enabled Logout - /// - /// - /// This endpoint initiates and completes user logout at Ory Hydra 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 - /// - /// Thrown when fails to make API call - /// - void DisconnectUser(); - - /// - /// OpenID Connect Front-Backchannel Enabled Logout - /// - /// - /// This endpoint initiates and completes user logout at Ory Hydra 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 - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse DisconnectUserWithHttpInfo(); - /// - /// OpenID Connect Discovery - /// - /// - /// The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 - /// HydraWellKnown - HydraWellKnown DiscoverOpenIDConfiguration(); - - /// - /// OpenID Connect Discovery - /// - /// - /// The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 - /// ApiResponse of HydraWellKnown - ApiResponse DiscoverOpenIDConfigurationWithHttpInfo(); - /// - /// Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// 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. - /// - /// Thrown when fails to make API call - /// - /// HydraOAuth2Client - HydraOAuth2Client DynamicClientRegistrationCreateOAuth2Client(HydraOAuth2Client body); - - /// - /// Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// 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. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraOAuth2Client - ApiResponse DynamicClientRegistrationCreateOAuth2ClientWithHttpInfo(HydraOAuth2Client body); - /// - /// Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - void DynamicClientRegistrationDeleteOAuth2Client(string id); - - /// - /// Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// ApiResponse of Object(void) - ApiResponse DynamicClientRegistrationDeleteOAuth2ClientWithHttpInfo(string id); - /// - /// Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// HydraOAuth2Client - HydraOAuth2Client DynamicClientRegistrationGetOAuth2Client(string id); - - /// - /// Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// ApiResponse of HydraOAuth2Client - ApiResponse DynamicClientRegistrationGetOAuth2ClientWithHttpInfo(string id); - /// - /// Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// HydraOAuth2Client - HydraOAuth2Client DynamicClientRegistrationUpdateOAuth2Client(string id, HydraOAuth2Client body); - - /// - /// Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// ApiResponse of HydraOAuth2Client - ApiResponse DynamicClientRegistrationUpdateOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client body); - /// - /// Check Readiness Status - /// - /// - /// This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - /// - /// Thrown when fails to make API call - /// HydraHealthStatus - HydraHealthStatus IsInstanceReady(); - - /// - /// Check Readiness Status - /// - /// - /// This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - /// - /// Thrown when fails to make API call - /// ApiResponse of HydraHealthStatus - ApiResponse IsInstanceReadyWithHttpInfo(); - /// - /// The OAuth 2.0 Token Endpoint - /// - /// - /// The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// HydraOauth2TokenResponse - HydraOauth2TokenResponse Oauth2Token(string grantType, string code = default(string), string refreshToken = default(string), string redirectUri = default(string), string clientId = default(string)); - - /// - /// The OAuth 2.0 Token Endpoint - /// - /// - /// The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// ApiResponse of HydraOauth2TokenResponse - ApiResponse Oauth2TokenWithHttpInfo(string grantType, string code = default(string), string refreshToken = default(string), string redirectUri = default(string), string clientId = default(string)); - /// - /// The OAuth 2.0 Authorize Endpoint - /// - /// - /// This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - /// - /// Thrown when fails to make API call - /// - void OauthAuth(); - - /// - /// The OAuth 2.0 Authorize Endpoint - /// - /// - /// This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse OauthAuthWithHttpInfo(); - /// - /// Revoke OAuth2 Tokens - /// - /// - /// 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. - /// - /// Thrown when fails to make API call - /// - /// - void RevokeOAuth2Token(string token); - - /// - /// Revoke OAuth2 Tokens - /// - /// - /// 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. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse RevokeOAuth2TokenWithHttpInfo(string token); - /// - /// OpenID Connect Userinfo - /// - /// - /// This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 - /// HydraUserinfoResponse - HydraUserinfoResponse Userinfo(); - - /// - /// OpenID Connect Userinfo - /// - /// - /// This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 - /// ApiResponse of HydraUserinfoResponse - ApiResponse UserinfoWithHttpInfo(); - /// - /// JSON Web Keys Discovery - /// - /// - /// This endpoint returns JSON Web Keys to be used as public keys for 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 - /// HydraJSONWebKeySet - HydraJSONWebKeySet WellKnown(); - - /// - /// JSON Web Keys Discovery - /// - /// - /// This endpoint returns JSON Web Keys to be used as public keys for 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 - /// ApiResponse of HydraJSONWebKeySet - ApiResponse WellKnownWithHttpInfo(); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IPublicApiAsync : IApiAccessor - { - #region Asynchronous Operations - /// - /// OpenID Connect Front-Backchannel Enabled Logout - /// - /// - /// This endpoint initiates and completes user logout at Ory Hydra 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 - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DisconnectUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// OpenID Connect Front-Backchannel Enabled Logout - /// - /// - /// This endpoint initiates and completes user logout at Ory Hydra 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 - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DisconnectUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// OpenID Connect Discovery - /// - /// - /// The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 - /// Cancellation Token to cancel the request. - /// Task of HydraWellKnown - System.Threading.Tasks.Task DiscoverOpenIDConfigurationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// OpenID Connect Discovery - /// - /// - /// The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraWellKnown) - System.Threading.Tasks.Task> DiscoverOpenIDConfigurationWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - System.Threading.Tasks.Task DynamicClientRegistrationCreateOAuth2ClientAsync(HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> DynamicClientRegistrationCreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DynamicClientRegistrationDeleteOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DynamicClientRegistrationDeleteOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - System.Threading.Tasks.Task DynamicClientRegistrationGetOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> DynamicClientRegistrationGetOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - System.Threading.Tasks.Task DynamicClientRegistrationUpdateOAuth2ClientAsync(string id, HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - /// - /// - /// This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - System.Threading.Tasks.Task> DynamicClientRegistrationUpdateOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Check Readiness Status - /// - /// - /// This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of HydraHealthStatus - System.Threading.Tasks.Task IsInstanceReadyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Check Readiness Status - /// - /// - /// This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraHealthStatus) - System.Threading.Tasks.Task> IsInstanceReadyWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// The OAuth 2.0 Token Endpoint - /// - /// - /// The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraOauth2TokenResponse - System.Threading.Tasks.Task Oauth2TokenAsync(string grantType, string code = default(string), string refreshToken = default(string), string redirectUri = default(string), string clientId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// The OAuth 2.0 Token Endpoint - /// - /// - /// The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOauth2TokenResponse) - System.Threading.Tasks.Task> Oauth2TokenWithHttpInfoAsync(string grantType, string code = default(string), string refreshToken = default(string), string redirectUri = default(string), string clientId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// The OAuth 2.0 Authorize Endpoint - /// - /// - /// This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task OauthAuthAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// The OAuth 2.0 Authorize Endpoint - /// - /// - /// This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> OauthAuthWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Revoke OAuth2 Tokens - /// - /// - /// 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Revoke OAuth2 Tokens - /// - /// - /// 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// OpenID Connect Userinfo - /// - /// - /// This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 - /// Cancellation Token to cancel the request. - /// Task of HydraUserinfoResponse - System.Threading.Tasks.Task UserinfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// OpenID Connect Userinfo - /// - /// - /// This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraUserinfoResponse) - System.Threading.Tasks.Task> UserinfoWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// JSON Web Keys Discovery - /// - /// - /// This endpoint returns JSON Web Keys to be used as public keys for 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 - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKeySet - System.Threading.Tasks.Task WellKnownAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// JSON Web Keys Discovery - /// - /// - /// This endpoint returns JSON Web Keys to be used as public keys for 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 - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKeySet) - System.Threading.Tasks.Task> WellKnownWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IPublicApi : IPublicApiSync, IPublicApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class PublicApi : IPublicApi - { - private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public PublicApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public PublicApi(string basePath) - { - this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( - Ory.Hydra.Client.Client.GlobalConfiguration.Instance, - new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } - ); - this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public PublicApi(Ory.Hydra.Client.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( - Ory.Hydra.Client.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public PublicApi(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// OpenID Connect Front-Backchannel Enabled Logout This endpoint initiates and completes user logout at Ory Hydra 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 - /// - /// Thrown when fails to make API call - /// - public void DisconnectUser() - { - DisconnectUserWithHttpInfo(); - } - - /// - /// OpenID Connect Front-Backchannel Enabled Logout This endpoint initiates and completes user logout at Ory Hydra 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 - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DisconnectUserWithHttpInfo() - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = this.Client.Get("/oauth2/sessions/logout", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DisconnectUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// OpenID Connect Front-Backchannel Enabled Logout This endpoint initiates and completes user logout at Ory Hydra 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 - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DisconnectUserAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await DisconnectUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - } - - /// - /// OpenID Connect Front-Backchannel Enabled Logout This endpoint initiates and completes user logout at Ory Hydra 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 - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DisconnectUserWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/sessions/logout", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DisconnectUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// OpenID Connect Discovery The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 - /// HydraWellKnown - public HydraWellKnown DiscoverOpenIDConfiguration() - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = DiscoverOpenIDConfigurationWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// OpenID Connect Discovery The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 - /// ApiResponse of HydraWellKnown - public Ory.Hydra.Client.Client.ApiResponse DiscoverOpenIDConfigurationWithHttpInfo() - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = this.Client.Get("/.well-known/openid-configuration", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DiscoverOpenIDConfiguration", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// OpenID Connect Discovery The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 - /// Cancellation Token to cancel the request. - /// Task of HydraWellKnown - public async System.Threading.Tasks.Task DiscoverOpenIDConfigurationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DiscoverOpenIDConfigurationWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// OpenID Connect Discovery The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraWellKnown) - public async System.Threading.Tasks.Task> DiscoverOpenIDConfigurationWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/.well-known/openid-configuration", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DiscoverOpenIDConfiguration", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol 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. - /// - /// Thrown when fails to make API call - /// - /// HydraOAuth2Client - public HydraOAuth2Client DynamicClientRegistrationCreateOAuth2Client(HydraOAuth2Client body) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = DynamicClientRegistrationCreateOAuth2ClientWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol 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. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse DynamicClientRegistrationCreateOAuth2ClientWithHttpInfo(HydraOAuth2Client body) - { - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling PublicApi->DynamicClientRegistrationCreateOAuth2Client"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/connect/register", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DynamicClientRegistrationCreateOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task DynamicClientRegistrationCreateOAuth2ClientAsync(HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DynamicClientRegistrationCreateOAuth2ClientWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> DynamicClientRegistrationCreateOAuth2ClientWithHttpInfoAsync(HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling PublicApi->DynamicClientRegistrationCreateOAuth2Client"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/connect/register", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DynamicClientRegistrationCreateOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - public void DynamicClientRegistrationDeleteOAuth2Client(string id) - { - DynamicClientRegistrationDeleteOAuth2ClientWithHttpInfo(id); - } - - /// - /// Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse DynamicClientRegistrationDeleteOAuth2ClientWithHttpInfo(string id) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling PublicApi->DynamicClientRegistrationDeleteOAuth2Client"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/connect/register/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DynamicClientRegistrationDeleteOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DynamicClientRegistrationDeleteOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await DynamicClientRegistrationDeleteOAuth2ClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DynamicClientRegistrationDeleteOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling PublicApi->DynamicClientRegistrationDeleteOAuth2Client"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/connect/register/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DynamicClientRegistrationDeleteOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// HydraOAuth2Client - public HydraOAuth2Client DynamicClientRegistrationGetOAuth2Client(string id) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = DynamicClientRegistrationGetOAuth2ClientWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse DynamicClientRegistrationGetOAuth2ClientWithHttpInfo(string id) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling PublicApi->DynamicClientRegistrationGetOAuth2Client"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = this.Client.Get("/connect/register/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DynamicClientRegistrationGetOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task DynamicClientRegistrationGetOAuth2ClientAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DynamicClientRegistrationGetOAuth2ClientWithHttpInfoAsync(id, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> DynamicClientRegistrationGetOAuth2ClientWithHttpInfoAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling PublicApi->DynamicClientRegistrationGetOAuth2Client"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/connect/register/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DynamicClientRegistrationGetOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// HydraOAuth2Client - public HydraOAuth2Client DynamicClientRegistrationUpdateOAuth2Client(string id, HydraOAuth2Client body) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = DynamicClientRegistrationUpdateOAuth2ClientWithHttpInfo(id, body); - return localVarResponse.Data; - } - - /// - /// Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// ApiResponse of HydraOAuth2Client - public Ory.Hydra.Client.Client.ApiResponse DynamicClientRegistrationUpdateOAuth2ClientWithHttpInfo(string id, HydraOAuth2Client body) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling PublicApi->DynamicClientRegistrationUpdateOAuth2Client"); - } - - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling PublicApi->DynamicClientRegistrationUpdateOAuth2Client"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/connect/register/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DynamicClientRegistrationUpdateOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of HydraOAuth2Client - public async System.Threading.Tasks.Task DynamicClientRegistrationUpdateOAuth2ClientAsync(string id, HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DynamicClientRegistrationUpdateOAuth2ClientWithHttpInfoAsync(id, body, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - /// - /// Thrown when fails to make API call - /// The id of the OAuth 2.0 Client. - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOAuth2Client) - public async System.Threading.Tasks.Task> DynamicClientRegistrationUpdateOAuth2ClientWithHttpInfoAsync(string id, HydraOAuth2Client body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'id' when calling PublicApi->DynamicClientRegistrationUpdateOAuth2Client"); - } - - // verify the required parameter 'body' is set - if (body == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'body' when calling PublicApi->DynamicClientRegistrationUpdateOAuth2Client"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/connect/register/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DynamicClientRegistrationUpdateOAuth2Client", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Check Readiness Status This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - /// - /// Thrown when fails to make API call - /// HydraHealthStatus - public HydraHealthStatus IsInstanceReady() - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = IsInstanceReadyWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Check Readiness Status This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - /// - /// Thrown when fails to make API call - /// ApiResponse of HydraHealthStatus - public Ory.Hydra.Client.Client.ApiResponse IsInstanceReadyWithHttpInfo() - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = this.Client.Get("/health/ready", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("IsInstanceReady", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Check Readiness Status This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of HydraHealthStatus - public async System.Threading.Tasks.Task IsInstanceReadyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await IsInstanceReadyWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Check Readiness Status This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraHealthStatus) - public async System.Threading.Tasks.Task> IsInstanceReadyWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/health/ready", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("IsInstanceReady", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// The OAuth 2.0 Token Endpoint The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// HydraOauth2TokenResponse - public HydraOauth2TokenResponse Oauth2Token(string grantType, string code = default(string), string refreshToken = default(string), string redirectUri = default(string), string clientId = default(string)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = Oauth2TokenWithHttpInfo(grantType, code, refreshToken, redirectUri, clientId); - return localVarResponse.Data; - } - - /// - /// The OAuth 2.0 Token Endpoint The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// ApiResponse of HydraOauth2TokenResponse - public Ory.Hydra.Client.Client.ApiResponse Oauth2TokenWithHttpInfo(string grantType, string code = default(string), string refreshToken = default(string), string redirectUri = default(string), string clientId = default(string)) - { - // verify the required parameter 'grantType' is set - if (grantType == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'grantType' when calling PublicApi->Oauth2Token"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.FormParameters.Add("grant_type", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(grantType)); // form parameter - if (code != null) - { - localVarRequestOptions.FormParameters.Add("code", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(code)); // form parameter - } - if (refreshToken != null) - { - localVarRequestOptions.FormParameters.Add("refresh_token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(refreshToken)); // form parameter - } - if (redirectUri != null) - { - localVarRequestOptions.FormParameters.Add("redirect_uri", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(redirectUri)); // form parameter - } - if (clientId != null) - { - localVarRequestOptions.FormParameters.Add("client_id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientId)); // form parameter - } - - // authentication (basic) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - // authentication (oauth2) required - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/oauth2/token", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("Oauth2Token", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// The OAuth 2.0 Token Endpoint The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of HydraOauth2TokenResponse - public async System.Threading.Tasks.Task Oauth2TokenAsync(string grantType, string code = default(string), string refreshToken = default(string), string redirectUri = default(string), string clientId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await Oauth2TokenWithHttpInfoAsync(grantType, code, refreshToken, redirectUri, clientId, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// The OAuth 2.0 Token Endpoint The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraOauth2TokenResponse) - public async System.Threading.Tasks.Task> Oauth2TokenWithHttpInfoAsync(string grantType, string code = default(string), string refreshToken = default(string), string redirectUri = default(string), string clientId = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'grantType' is set - if (grantType == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'grantType' when calling PublicApi->Oauth2Token"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.FormParameters.Add("grant_type", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(grantType)); // form parameter - if (code != null) - { - localVarRequestOptions.FormParameters.Add("code", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(code)); // form parameter - } - if (refreshToken != null) - { - localVarRequestOptions.FormParameters.Add("refresh_token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(refreshToken)); // form parameter - } - if (redirectUri != null) - { - localVarRequestOptions.FormParameters.Add("redirect_uri", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(redirectUri)); // form parameter - } - if (clientId != null) - { - localVarRequestOptions.FormParameters.Add("client_id", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(clientId)); // form parameter - } - - // authentication (basic) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - // authentication (oauth2) required - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/token", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("Oauth2Token", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// The OAuth 2.0 Authorize Endpoint This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - /// - /// Thrown when fails to make API call - /// - public void OauthAuth() - { - OauthAuthWithHttpInfo(); - } - - /// - /// The OAuth 2.0 Authorize Endpoint This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse OauthAuthWithHttpInfo() - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = this.Client.Get("/oauth2/auth", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("OauthAuth", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// The OAuth 2.0 Authorize Endpoint This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task OauthAuthAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await OauthAuthWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - } - - /// - /// The OAuth 2.0 Authorize Endpoint This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> OauthAuthWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/oauth2/auth", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("OauthAuth", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Revoke OAuth2 Tokens 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. - /// - /// Thrown when fails to make API call - /// - /// - public void RevokeOAuth2Token(string token) - { - RevokeOAuth2TokenWithHttpInfo(token); - } - - /// - /// Revoke OAuth2 Tokens 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. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public Ory.Hydra.Client.Client.ApiResponse RevokeOAuth2TokenWithHttpInfo(string token) - { - // verify the required parameter 'token' is set - if (token == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling PublicApi->RevokeOAuth2Token"); - } - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter - - // authentication (basic) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - // authentication (oauth2) required - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/oauth2/revoke", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RevokeOAuth2Token", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Revoke OAuth2 Tokens 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task RevokeOAuth2TokenAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - await RevokeOAuth2TokenWithHttpInfoAsync(token, cancellationToken).ConfigureAwait(false); - } - - /// - /// Revoke OAuth2 Tokens 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. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> RevokeOAuth2TokenWithHttpInfoAsync(string token, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'token' is set - if (token == null) - { - throw new Ory.Hydra.Client.Client.ApiException(400, "Missing required parameter 'token' when calling PublicApi->RevokeOAuth2Token"); - } - - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.FormParameters.Add("token", Ory.Hydra.Client.Client.ClientUtils.ParameterToString(token)); // form parameter - - // authentication (basic) required - // http basic authentication required - if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Ory.Hydra.Client.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); - } - // authentication (oauth2) required - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/oauth2/revoke", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RevokeOAuth2Token", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 - /// HydraUserinfoResponse - public HydraUserinfoResponse Userinfo() - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = UserinfoWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 - /// ApiResponse of HydraUserinfoResponse - public Ory.Hydra.Client.Client.ApiResponse UserinfoWithHttpInfo() - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - // authentication (oauth2) required - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/userinfo", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("Userinfo", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 - /// Cancellation Token to cancel the request. - /// Task of HydraUserinfoResponse - public async System.Threading.Tasks.Task UserinfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await UserinfoWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraUserinfoResponse) - public async System.Threading.Tasks.Task> UserinfoWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - // authentication (oauth2) required - // oauth required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/userinfo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("Userinfo", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// JSON Web Keys Discovery This endpoint returns JSON Web Keys to be used as public keys for 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 - /// HydraJSONWebKeySet - public HydraJSONWebKeySet WellKnown() - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = WellKnownWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// JSON Web Keys Discovery This endpoint returns JSON Web Keys to be used as public keys for 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 - /// ApiResponse of HydraJSONWebKeySet - public Ory.Hydra.Client.Client.ApiResponse WellKnownWithHttpInfo() - { - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = this.Client.Get("/.well-known/jwks.json", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("WellKnown", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// JSON Web Keys Discovery This endpoint returns JSON Web Keys to be used as public keys for 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 - /// Cancellation Token to cancel the request. - /// Task of HydraJSONWebKeySet - public async System.Threading.Tasks.Task WellKnownAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - Ory.Hydra.Client.Client.ApiResponse localVarResponse = await WellKnownWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// JSON Web Keys Discovery This endpoint returns JSON Web Keys to be used as public keys for 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 - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HydraJSONWebKeySet) - public async System.Threading.Tasks.Task> WellKnownWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/.well-known/jwks.json", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("WellKnown", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - } -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/WellknownApi.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/WellknownApi.cs new file mode 100644 index 00000000000..f45dce4bb17 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Api/WellknownApi.cs @@ -0,0 +1,316 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Ory.Hydra.Client.Client; +using Ory.Hydra.Client.Model; + +namespace Ory.Hydra.Client.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWellknownApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// 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 + /// HydraJsonWebKeySet + 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 + /// ApiResponse of HydraJsonWebKeySet + ApiResponse DiscoverJsonWebKeysWithHttpInfo(); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWellknownApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + System.Threading.Tasks.Task DiscoverJsonWebKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (HydraJsonWebKeySet) + System.Threading.Tasks.Task> DiscoverJsonWebKeysWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IWellknownApi : IWellknownApiSync, IWellknownApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class WellknownApi : IWellknownApi + { + private Ory.Hydra.Client.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public WellknownApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public WellknownApi(string basePath) + { + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + new Ory.Hydra.Client.Client.Configuration { BasePath = basePath } + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public WellknownApi(Ory.Hydra.Client.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Ory.Hydra.Client.Client.Configuration.MergeConfigurations( + Ory.Hydra.Client.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Ory.Hydra.Client.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public WellknownApi(Ory.Hydra.Client.Client.ISynchronousClient client, Ory.Hydra.Client.Client.IAsynchronousClient asyncClient, Ory.Hydra.Client.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Ory.Hydra.Client.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Ory.Hydra.Client.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Ory.Hydra.Client.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Ory.Hydra.Client.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Ory.Hydra.Client.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// 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 + /// HydraJsonWebKeySet + public HydraJsonWebKeySet DiscoverJsonWebKeys() + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = DiscoverJsonWebKeysWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// 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 + /// ApiResponse of HydraJsonWebKeySet + public Ory.Hydra.Client.Client.ApiResponse DiscoverJsonWebKeysWithHttpInfo() + { + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = this.Client.Get("/.well-known/jwks.json", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DiscoverJsonWebKeys", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// 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 + /// Cancellation Token to cancel the request. + /// Task of HydraJsonWebKeySet + public async System.Threading.Tasks.Task DiscoverJsonWebKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Ory.Hydra.Client.Client.ApiResponse localVarResponse = await DiscoverJsonWebKeysWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// 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 + /// 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)) + { + + Ory.Hydra.Client.Client.RequestOptions localVarRequestOptions = new Ory.Hydra.Client.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Ory.Hydra.Client.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/.well-known/jwks.json", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DiscoverJsonWebKeys", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} 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 b4d1c4e90f0..72269c4426f 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiClient.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiClient.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/ApiException.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiException.cs index 5615e2b30d8..c97636927e0 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiException.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiException.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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 0c16061d2c0..5d6745153d6 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiResponse.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ApiResponse.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/ClientUtils.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ClientUtils.cs index 3dc61799ca1..f3850c0b795 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ClientUtils.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ClientUtils.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/Configuration.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Configuration.cs index 81212afc630..b4e841bdf7d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Configuration.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Configuration.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -31,7 +32,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "1.11.0"; + public const string Version = "2.0.1"; /// /// Identifier for ISO 8601 DateTime Format @@ -106,7 +107,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = "OpenAPI-Generator/1.11.0/csharp"; + UserAgent = "OpenAPI-Generator/2.0.1/csharp"; BasePath = "http://localhost"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -450,8 +451,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: v1.11.0\n"; - report += " SDK Package Version: 1.11.0\n"; + report += " Version of the API: v2.0.1\n"; + report += " SDK Package Version: 2.0.1\n"; return report; } 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 f7aab7ea15c..3705697d48d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ExceptionFactory.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ExceptionFactory.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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 a4779e9000f..3f94459f3b5 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/GlobalConfiguration.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/GlobalConfiguration.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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 becb4fe5b3d..7032bc0fc0c 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/HttpMethod.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/HttpMethod.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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 998e30c414c..91f87702918 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IApiAccessor.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IApiAccessor.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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 a09c40a5de5..e43c39305c2 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IAsynchronousClient.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IAsynchronousClient.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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 1198b4bc73c..79679295a7d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IReadableConfiguration.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/IReadableConfiguration.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/ISynchronousClient.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ISynchronousClient.cs index b7cf3830251..1d13f9ddb99 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ISynchronousClient.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/ISynchronousClient.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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 b29b20c8fa4..7ca3e2dbf6a 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Multimap.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/Multimap.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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 76baa84ccce..c8e03882ce4 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/OpenAPIDateConverter.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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 7d449eb3407..fb48f4fbe20 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RequestOptions.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RequestOptions.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/RetryConfiguration.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RetryConfiguration.cs index 238cc7743ce..3889cc89f9d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RetryConfiguration.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Client/RetryConfiguration.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/AbstractOpenAPISchema.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs index 6961eadf48a..df139b7f67d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/AbstractOpenAPISchema.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/HydraAcceptConsentRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs similarity index 87% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptConsentRequest.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs index 64128bfe2db..d5c315ab0c2 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptConsentRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequest.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,13 +27,13 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraAcceptConsentRequest + /// HydraAcceptOAuth2ConsentRequest /// - [DataContract(Name = "acceptConsentRequest")] - public partial class HydraAcceptConsentRequest : IEquatable, IValidatableObject + [DataContract(Name = "acceptOAuth2ConsentRequest")] + public partial class HydraAcceptOAuth2ConsentRequest : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// grantAccessTokenAudience. /// grantScope. @@ -40,7 +41,7 @@ public partial class HydraAcceptConsentRequest : IEquatableRemember, 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.. /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.. /// session. - public HydraAcceptConsentRequest(List grantAccessTokenAudience = default(List), List grantScope = default(List), DateTime handledAt = default(DateTime), bool remember = default(bool), long rememberFor = default(long), HydraConsentRequestSession session = default(HydraConsentRequestSession)) + public HydraAcceptOAuth2ConsentRequest(List grantAccessTokenAudience = default(List), List grantScope = default(List), DateTime handledAt = default(DateTime), bool remember = default(bool), long rememberFor = default(long), HydraAcceptOAuth2ConsentRequestSession session = default(HydraAcceptOAuth2ConsentRequestSession)) { this.GrantAccessTokenAudience = grantAccessTokenAudience; this.GrantScope = grantScope; @@ -87,7 +88,7 @@ public partial class HydraAcceptConsentRequest : IEquatable [DataMember(Name = "session", EmitDefaultValue = false)] - public HydraConsentRequestSession Session { get; set; } + public HydraAcceptOAuth2ConsentRequestSession Session { get; set; } /// /// Gets or Sets additional properties @@ -102,7 +103,7 @@ public partial class HydraAcceptConsentRequest : IEquatableBoolean public override bool Equals(object input) { - return this.Equals(input as HydraAcceptConsentRequest); + return this.Equals(input as HydraAcceptOAuth2ConsentRequest); } /// - /// Returns true if HydraAcceptConsentRequest instances are equal + /// Returns true if HydraAcceptOAuth2ConsentRequest instances are equal /// - /// Instance of HydraAcceptConsentRequest to be compared + /// Instance of HydraAcceptOAuth2ConsentRequest to be compared /// Boolean - public bool Equals(HydraAcceptConsentRequest input) + public bool Equals(HydraAcceptOAuth2ConsentRequest input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraConsentRequestSession.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs similarity index 84% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraConsentRequestSession.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs index b8407c90e70..61ee512f40a 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraConsentRequestSession.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2ConsentRequestSession.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,17 +27,17 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraConsentRequestSession + /// HydraAcceptOAuth2ConsentRequestSession /// - [DataContract(Name = "consentRequestSession")] - public partial class HydraConsentRequestSession : IEquatable, IValidatableObject + [DataContract(Name = "acceptOAuth2ConsentRequestSession")] + public partial class HydraAcceptOAuth2ConsentRequestSession : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// 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!. /// 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 HydraConsentRequestSession(Object accessToken = default(Object), Object idToken = default(Object)) + public HydraAcceptOAuth2ConsentRequestSession(Object accessToken = default(Object), Object idToken = default(Object)) { this.AccessToken = accessToken; this.IdToken = idToken; @@ -47,14 +48,14 @@ public partial class HydraConsentRequestSession : IEquatable /// 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! - [DataMember(Name = "access_token", EmitDefaultValue = false)] + [DataMember(Name = "access_token", EmitDefaultValue = true)] public Object AccessToken { get; set; } /// /// 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! /// /// 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! - [DataMember(Name = "id_token", EmitDefaultValue = false)] + [DataMember(Name = "id_token", EmitDefaultValue = true)] public Object IdToken { get; set; } /// @@ -70,7 +71,7 @@ public partial class HydraConsentRequestSession : IEquatableBoolean public override bool Equals(object input) { - return this.Equals(input as HydraConsentRequestSession); + return this.Equals(input as HydraAcceptOAuth2ConsentRequestSession); } /// - /// Returns true if HydraConsentRequestSession instances are equal + /// Returns true if HydraAcceptOAuth2ConsentRequestSession instances are equal /// - /// Instance of HydraConsentRequestSession to be compared + /// Instance of HydraAcceptOAuth2ConsentRequestSession to be compared /// Boolean - public bool Equals(HydraConsentRequestSession input) + public bool Equals(HydraAcceptOAuth2ConsentRequestSession input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptLoginRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs similarity index 91% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptLoginRequest.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs index bccaf8e73e9..02bfcca4630 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptLoginRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraAcceptOAuth2LoginRequest.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,21 +27,21 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraAcceptLoginRequest + /// HydraAcceptOAuth2LoginRequest /// - [DataContract(Name = "acceptLoginRequest")] - public partial class HydraAcceptLoginRequest : IEquatable, IValidatableObject + [DataContract(Name = "acceptOAuth2LoginRequest")] + public partial class HydraAcceptOAuth2LoginRequest : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraAcceptLoginRequest() + protected HydraAcceptOAuth2LoginRequest() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// 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. @@ -49,11 +50,11 @@ protected HydraAcceptLoginRequest() /// 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.. /// 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 is the user ID of the end-user that authenticated. (required). - public HydraAcceptLoginRequest(string acr = default(string), List amr = default(List), Object context = default(Object), string forceSubjectIdentifier = default(string), bool remember = default(bool), long rememberFor = default(long), string subject = default(string)) + public HydraAcceptOAuth2LoginRequest(string acr = default(string), List amr = default(List), Object context = default(Object), string forceSubjectIdentifier = default(string), bool remember = default(bool), long rememberFor = default(long), string subject = default(string)) { // to ensure "subject" is required (not null) if (subject == null) { - throw new ArgumentNullException("subject is a required property for HydraAcceptLoginRequest and cannot be null"); + throw new ArgumentNullException("subject is a required property for HydraAcceptOAuth2LoginRequest and cannot be null"); } this.Subject = subject; this.Acr = acr; @@ -81,7 +82,7 @@ protected HydraAcceptLoginRequest() /// /// Gets or Sets Context /// - [DataMember(Name = "context", EmitDefaultValue = false)] + [DataMember(Name = "context", EmitDefaultValue = true)] public Object Context { get; set; } /// @@ -125,7 +126,7 @@ protected HydraAcceptLoginRequest() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraAcceptLoginRequest {\n"); + sb.Append("class HydraAcceptOAuth2LoginRequest {\n"); sb.Append(" Acr: ").Append(Acr).Append("\n"); sb.Append(" Amr: ").Append(Amr).Append("\n"); sb.Append(" Context: ").Append(Context).Append("\n"); @@ -154,15 +155,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraAcceptLoginRequest); + return this.Equals(input as HydraAcceptOAuth2LoginRequest); } /// - /// Returns true if HydraAcceptLoginRequest instances are equal + /// Returns true if HydraAcceptOAuth2LoginRequest instances are equal /// - /// Instance of HydraAcceptLoginRequest to be compared + /// Instance of HydraAcceptOAuth2LoginRequest to be compared /// Boolean - public bool Equals(HydraAcceptLoginRequest input) + public bool Equals(HydraAcceptOAuth2LoginRequest input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySetGeneratorRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs similarity index 67% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySetGeneratorRequest.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs index 6106fdd936d..a529bbdecd1 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySetGeneratorRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCreateJsonWebKeySet.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,63 +27,63 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraJsonWebKeySetGeneratorRequest + /// Create JSON Web Key Set Request Body /// - [DataContract(Name = "jsonWebKeySetGeneratorRequest")] - public partial class HydraJsonWebKeySetGeneratorRequest : IEquatable, IValidatableObject + [DataContract(Name = "createJsonWebKeySet")] + public partial class HydraCreateJsonWebKeySet : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraJsonWebKeySetGeneratorRequest() + protected HydraCreateJsonWebKeySet() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" (required). - /// The kid of the key to be created (required). - /// 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\". (required). - public HydraJsonWebKeySetGeneratorRequest(string alg = default(string), string kid = default(string), string use = default(string)) + /// JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. (required). + /// JSON Web Key ID The Key ID of the key to be created. (required). + /// 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\". (required). + public HydraCreateJsonWebKeySet(string alg = default(string), string kid = default(string), string use = default(string)) { // to ensure "alg" is required (not null) if (alg == null) { - throw new ArgumentNullException("alg is a required property for HydraJsonWebKeySetGeneratorRequest and cannot be 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) { - throw new ArgumentNullException("kid is a required property for HydraJsonWebKeySetGeneratorRequest and cannot be 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) { - throw new ArgumentNullException("use is a required property for HydraJsonWebKeySetGeneratorRequest and cannot be null"); + throw new ArgumentNullException("use is a required property for HydraCreateJsonWebKeySet and cannot be null"); } this.Use = use; this.AdditionalProperties = new Dictionary(); } /// - /// 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`. /// - /// 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)] public string Alg { get; set; } /// - /// The kid of the key to be created + /// JSON Web Key ID The Key ID of the key to be created. /// - /// The kid 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)] public string Kid { get; set; } /// - /// 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\". /// - /// 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)] public string Use { get; set; } @@ -99,7 +100,7 @@ protected HydraJsonWebKeySetGeneratorRequest() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraJsonWebKeySetGeneratorRequest {\n"); + sb.Append("class HydraCreateJsonWebKeySet {\n"); sb.Append(" Alg: ").Append(Alg).Append("\n"); sb.Append(" Kid: ").Append(Kid).Append("\n"); sb.Append(" Use: ").Append(Use).Append("\n"); @@ -124,15 +125,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraJsonWebKeySetGeneratorRequest); + return this.Equals(input as HydraCreateJsonWebKeySet); } /// - /// Returns true if HydraJsonWebKeySetGeneratorRequest instances are equal + /// Returns true if HydraCreateJsonWebKeySet instances are equal /// - /// Instance of HydraJsonWebKeySetGeneratorRequest to be compared + /// Instance of HydraCreateJsonWebKeySet to be compared /// Boolean - public bool Equals(HydraJsonWebKeySetGeneratorRequest input) + public bool Equals(HydraCreateJsonWebKeySet input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonError.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs similarity index 70% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonError.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs index e1c6059688c..7e27a1e0ddd 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonError.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraErrorOAuth2.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,52 +27,61 @@ namespace Ory.Hydra.Client.Model { /// - /// Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. + /// Error /// - [DataContract(Name = "jsonError")] - public partial class HydraJsonError : IEquatable, IValidatableObject + [DataContract(Name = "errorOAuth2")] + public partial class HydraErrorOAuth2 : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Name is the error name.. - /// Debug contains debug information. This is usually not available and has to be enabled.. - /// Description contains further information on the nature of the error.. - /// Code represents the error status code (404, 403, 401, ...).. - public HydraJsonError(string error = default(string), string errorDebug = default(string), string errorDescription = default(string), long statusCode = default(long)) + /// Error. + /// Error Debug Information Only available in dev mode.. + /// Error Description. + /// Error Hint Helps the user identify the error cause.. + /// HTTP Status Code. + public HydraErrorOAuth2(string error = default(string), string errorDebug = default(string), string errorDescription = default(string), string errorHint = default(string), long statusCode = default(long)) { this.Error = error; this.ErrorDebug = errorDebug; this.ErrorDescription = errorDescription; + this.ErrorHint = errorHint; this.StatusCode = statusCode; this.AdditionalProperties = new Dictionary(); } /// - /// Name is the error name. + /// Error /// - /// Name is the error name. + /// Error [DataMember(Name = "error", EmitDefaultValue = false)] public string Error { get; set; } /// - /// Debug contains debug information. This is usually not available and has to be enabled. + /// Error Debug Information Only available in dev mode. /// - /// Debug contains debug information. This is usually not available and has to be enabled. + /// Error Debug Information Only available in dev mode. [DataMember(Name = "error_debug", EmitDefaultValue = false)] public string ErrorDebug { get; set; } /// - /// Description contains further information on the nature of the error. + /// Error Description /// - /// Description contains further information on the nature of the error. + /// Error Description [DataMember(Name = "error_description", EmitDefaultValue = false)] public string ErrorDescription { get; set; } /// - /// Code represents the error status code (404, 403, 401, ...). + /// Error Hint Helps the user identify the error cause. /// - /// Code represents the error status code (404, 403, 401, ...). + /// Error Hint Helps the user identify the error cause. + [DataMember(Name = "error_hint", EmitDefaultValue = false)] + public string ErrorHint { get; set; } + + /// + /// HTTP Status Code + /// + /// HTTP Status Code [DataMember(Name = "status_code", EmitDefaultValue = false)] public long StatusCode { get; set; } @@ -88,10 +98,11 @@ public partial class HydraJsonError : IEquatable, IValidatableOb public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraJsonError {\n"); + sb.Append("class HydraErrorOAuth2 {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" ErrorDebug: ").Append(ErrorDebug).Append("\n"); sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); + sb.Append(" ErrorHint: ").Append(ErrorHint).Append("\n"); sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); @@ -114,15 +125,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraJsonError); + return this.Equals(input as HydraErrorOAuth2); } /// - /// Returns true if HydraJsonError instances are equal + /// Returns true if HydraErrorOAuth2 instances are equal /// - /// Instance of HydraJsonError to be compared + /// Instance of HydraErrorOAuth2 to be compared /// Boolean - public bool Equals(HydraJsonError input) + public bool Equals(HydraErrorOAuth2 input) { if (input == null) { @@ -144,6 +155,11 @@ public bool Equals(HydraJsonError input) (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) @@ -172,6 +188,10 @@ public override int GetHashCode() { 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) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraFlushInactiveOAuth2TokensRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraFlushInactiveOAuth2TokensRequest.cs deleted file mode 100644 index 6477fcae490..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraFlushInactiveOAuth2TokensRequest.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// HydraFlushInactiveOAuth2TokensRequest - /// - [DataContract(Name = "flushInactiveOAuth2TokensRequest")] - public partial class HydraFlushInactiveOAuth2TokensRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing.. - public HydraFlushInactiveOAuth2TokensRequest(DateTime notAfter = default(DateTime)) - { - this.NotAfter = notAfter; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. - /// - /// NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. - [DataMember(Name = "notAfter", EmitDefaultValue = false)] - public DateTime NotAfter { 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 HydraFlushInactiveOAuth2TokensRequest {\n"); - sb.Append(" NotAfter: ").Append(NotAfter).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 HydraFlushInactiveOAuth2TokensRequest); - } - - /// - /// Returns true if HydraFlushInactiveOAuth2TokensRequest instances are equal - /// - /// Instance of HydraFlushInactiveOAuth2TokensRequest to be compared - /// Boolean - public bool Equals(HydraFlushInactiveOAuth2TokensRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.NotAfter == input.NotAfter || - (this.NotAfter != null && - this.NotAfter.Equals(input.NotAfter)) - ) - && (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.NotAfter != null) - { - hashCode = (hashCode * 59) + this.NotAfter.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/HydraGenericError.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGenericError.cs index 3ca91bf867e..a2c638783d1 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGenericError.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraGenericError.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -85,7 +86,7 @@ protected HydraGenericError() /// Further error details /// /// Further error details - [DataMember(Name = "details", EmitDefaultValue = false)] + [DataMember(Name = "details", EmitDefaultValue = true)] public Object Details { get; set; } /// 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 3afa691b905..4fe871cb60b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthNotReadyStatus.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/HydraHealthStatus.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthStatus.cs index 0c3ae38ea01..0d968525e1a 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthStatus.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraHealthStatus.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/HydraPluginConfigUser.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse200.cs similarity index 64% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigUser.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse200.cs index bd1a4c7f240..6d898ef5123 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigUser.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse200.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,36 +27,27 @@ namespace Ory.Hydra.Client.Model { /// - /// PluginConfigUser plugin config user + /// HydraInlineResponse200 /// - [DataContract(Name = "PluginConfigUser")] - public partial class HydraPluginConfigUser : IEquatable, IValidatableObject + [DataContract(Name = "inline_response_200")] + public partial class HydraInlineResponse200 : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// g ID. - /// UID. - public HydraPluginConfigUser(int gID = default(int), int uID = default(int)) + /// Always \"ok\".. + public HydraInlineResponse200(string status = default(string)) { - this.GID = gID; - this.UID = uID; + this.Status = status; this.AdditionalProperties = new Dictionary(); } /// - /// g ID + /// Always \"ok\". /// - /// g ID - [DataMember(Name = "GID", EmitDefaultValue = false)] - public int GID { get; set; } - - /// - /// UID - /// - /// UID - [DataMember(Name = "UID", EmitDefaultValue = false)] - public int UID { get; set; } + /// Always \"ok\". + [DataMember(Name = "status", EmitDefaultValue = false)] + public string Status { get; set; } /// /// Gets or Sets additional properties @@ -70,9 +62,8 @@ public partial class HydraPluginConfigUser : IEquatable, public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraPluginConfigUser {\n"); - sb.Append(" GID: ").Append(GID).Append("\n"); - sb.Append(" UID: ").Append(UID).Append("\n"); + sb.Append("class HydraInlineResponse200 {\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -94,15 +85,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraPluginConfigUser); + return this.Equals(input as HydraInlineResponse200); } /// - /// Returns true if HydraPluginConfigUser instances are equal + /// Returns true if HydraInlineResponse200 instances are equal /// - /// Instance of HydraPluginConfigUser to be compared + /// Instance of HydraInlineResponse200 to be compared /// Boolean - public bool Equals(HydraPluginConfigUser input) + public bool Equals(HydraInlineResponse200 input) { if (input == null) { @@ -110,12 +101,9 @@ public bool Equals(HydraPluginConfigUser input) } return ( - this.GID == input.GID || - this.GID.Equals(input.GID) - ) && - ( - this.UID == input.UID || - this.UID.Equals(input.UID) + this.Status == input.Status || + (this.Status != null && + this.Status.Equals(input.Status)) ) && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); } @@ -129,8 +117,10 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.GID.GetHashCode(); - hashCode = (hashCode * 59) + this.UID.GetHashCode(); + if (this.Status != null) + { + hashCode = (hashCode * 59) + this.Status.GetHashCode(); + } if (this.AdditionalProperties != null) { hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraContainerWaitOKBodyError.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse2001.cs similarity index 68% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraContainerWaitOKBodyError.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse2001.cs index 0346764cb19..e08138a4919 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraContainerWaitOKBodyError.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse2001.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,27 +27,27 @@ namespace Ory.Hydra.Client.Model { /// - /// ContainerWaitOKBodyError container waiting error, if any + /// HydraInlineResponse2001 /// - [DataContract(Name = "ContainerWaitOKBodyError")] - public partial class HydraContainerWaitOKBodyError : IEquatable, IValidatableObject + [DataContract(Name = "inline_response_200_1")] + public partial class HydraInlineResponse2001 : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Details of an error. - public HydraContainerWaitOKBodyError(string message = default(string)) + /// The version of Ory Hydra.. + public HydraInlineResponse2001(string version = default(string)) { - this.Message = message; + this._Version = version; this.AdditionalProperties = new Dictionary(); } /// - /// Details of an error + /// The version of Ory Hydra. /// - /// Details of an error - [DataMember(Name = "Message", EmitDefaultValue = false)] - public string Message { get; set; } + /// The version of Ory Hydra. + [DataMember(Name = "version", EmitDefaultValue = false)] + public string _Version { get; set; } /// /// Gets or Sets additional properties @@ -61,8 +62,8 @@ public partial class HydraContainerWaitOKBodyError : IEquatableBoolean public override bool Equals(object input) { - return this.Equals(input as HydraContainerWaitOKBodyError); + return this.Equals(input as HydraInlineResponse2001); } /// - /// Returns true if HydraContainerWaitOKBodyError instances are equal + /// Returns true if HydraInlineResponse2001 instances are equal /// - /// Instance of HydraContainerWaitOKBodyError to be compared + /// Instance of HydraInlineResponse2001 to be compared /// Boolean - public bool Equals(HydraContainerWaitOKBodyError input) + public bool Equals(HydraInlineResponse2001 input) { if (input == null) { @@ -100,9 +101,9 @@ public bool Equals(HydraContainerWaitOKBodyError input) } return ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) + this._Version == input._Version || + (this._Version != null && + this._Version.Equals(input._Version)) ) && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); } @@ -116,9 +117,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Message != null) + if (this._Version != null) { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); + hashCode = (hashCode * 59) + this._Version.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigNetwork.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse503.cs similarity index 62% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigNetwork.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse503.cs index a3f3ce2d5e5..89f7c89572e 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigNetwork.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraInlineResponse503.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,39 +27,27 @@ namespace Ory.Hydra.Client.Model { /// - /// PluginConfigNetwork plugin config network + /// HydraInlineResponse503 /// - [DataContract(Name = "PluginConfigNetwork")] - public partial class HydraPluginConfigNetwork : IEquatable, IValidatableObject + [DataContract(Name = "inline_response_503")] + public partial class HydraInlineResponse503 : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected HydraPluginConfigNetwork() + /// Errors contains a list of errors that caused the not ready status.. + public HydraInlineResponse503(Dictionary errors = default(Dictionary)) { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// type (required). - public HydraPluginConfigNetwork(string type = default(string)) - { - // to ensure "type" is required (not null) - if (type == null) { - throw new ArgumentNullException("type is a required property for HydraPluginConfigNetwork and cannot be null"); - } - this.Type = type; + this.Errors = errors; this.AdditionalProperties = new Dictionary(); } /// - /// type + /// Errors contains a list of errors that caused the not ready status. /// - /// type - [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = false)] - public string Type { get; set; } + /// Errors contains a list of errors that caused the not ready status. + [DataMember(Name = "errors", EmitDefaultValue = false)] + public Dictionary Errors { get; set; } /// /// Gets or Sets additional properties @@ -73,8 +62,8 @@ protected HydraPluginConfigNetwork() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraPluginConfigNetwork {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("class HydraInlineResponse503 {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -96,15 +85,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraPluginConfigNetwork); + return this.Equals(input as HydraInlineResponse503); } /// - /// Returns true if HydraPluginConfigNetwork instances are equal + /// Returns true if HydraInlineResponse503 instances are equal /// - /// Instance of HydraPluginConfigNetwork to be compared + /// Instance of HydraInlineResponse503 to be compared /// Boolean - public bool Equals(HydraPluginConfigNetwork input) + public bool Equals(HydraInlineResponse503 input) { if (input == null) { @@ -112,9 +101,10 @@ public bool Equals(HydraPluginConfigNetwork input) } return ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) + 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()); } @@ -128,9 +118,9 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Type != null) + if (this.Errors != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.Errors.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenIntrospection.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs similarity index 91% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenIntrospection.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs index b170646c85c..ff3597763e5 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenIntrospection.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraIntrospectedOAuth2Token.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,21 +27,21 @@ namespace Ory.Hydra.Client.Model { /// - /// https://tools.ietf.org/html/rfc7662 + /// Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) /// - [DataContract(Name = "oAuth2TokenIntrospection")] - public partial class HydraOAuth2TokenIntrospection : IEquatable, IValidatableObject + [DataContract(Name = "introspectedOAuth2Token")] + public partial class HydraIntrospectedOAuth2Token : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraOAuth2TokenIntrospection() + protected HydraIntrospectedOAuth2Token() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// 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). (required). /// Audience contains a list of the token's intended audiences.. @@ -56,7 +57,7 @@ protected HydraOAuth2TokenIntrospection() /// TokenType is the introspected token's type, typically `Bearer`.. /// TokenUse is the introspected token's use, for example `access_token` or `refresh_token`.. /// Username is a human-readable identifier for the resource owner who authorized this token.. - public HydraOAuth2TokenIntrospection(bool active = default(bool), List aud = default(List), string clientId = default(string), long exp = default(long), Object ext = default(Object), long iat = default(long), string iss = default(string), long nbf = default(long), string obfuscatedSubject = default(string), string scope = default(string), string sub = default(string), string tokenType = default(string), string tokenUse = default(string), string username = default(string)) + public HydraIntrospectedOAuth2Token(bool active = default(bool), List aud = default(List), string clientId = default(string), long exp = default(long), Dictionary ext = default(Dictionary), long iat = default(long), string iss = default(string), long nbf = default(long), string obfuscatedSubject = default(string), string scope = default(string), string sub = default(string), string tokenType = default(string), string tokenUse = default(string), string username = default(string)) { this.Active = active; this.Aud = aud; @@ -108,7 +109,7 @@ protected HydraOAuth2TokenIntrospection() /// /// Extra is arbitrary data set by the session. [DataMember(Name = "ext", EmitDefaultValue = false)] - public Object Ext { get; set; } + public Dictionary Ext { get; set; } /// /// Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued. @@ -186,7 +187,7 @@ protected HydraOAuth2TokenIntrospection() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraOAuth2TokenIntrospection {\n"); + sb.Append("class HydraIntrospectedOAuth2Token {\n"); sb.Append(" Active: ").Append(Active).Append("\n"); sb.Append(" Aud: ").Append(Aud).Append("\n"); sb.Append(" ClientId: ").Append(ClientId).Append("\n"); @@ -222,15 +223,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraOAuth2TokenIntrospection); + return this.Equals(input as HydraIntrospectedOAuth2Token); } /// - /// Returns true if HydraOAuth2TokenIntrospection instances are equal + /// Returns true if HydraIntrospectedOAuth2Token instances are equal /// - /// Instance of HydraOAuth2TokenIntrospection to be compared + /// Instance of HydraIntrospectedOAuth2Token to be compared /// Boolean - public bool Equals(HydraOAuth2TokenIntrospection input) + public bool Equals(HydraIntrospectedOAuth2Token input) { if (input == null) { @@ -258,8 +259,9 @@ public bool Equals(HydraOAuth2TokenIntrospection input) ) && ( this.Ext == input.Ext || - (this.Ext != null && - this.Ext.Equals(input.Ext)) + this.Ext != null && + input.Ext != null && + this.Ext.SequenceEqual(input.Ext) ) && ( this.Iat == input.Iat || diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPatchDocument.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonPatch.cs similarity index 65% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPatchDocument.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonPatch.cs index 58949ac1516..4628517f8ef 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPatchDocument.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonPatch.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -28,34 +29,34 @@ namespace Ory.Hydra.Client.Model /// /// A JSONPatch document as defined by RFC 6902 /// - [DataContract(Name = "patchDocument")] - public partial class HydraPatchDocument : IEquatable, IValidatableObject + [DataContract(Name = "jsonPatch")] + public partial class HydraJsonPatch : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraPatchDocument() + protected HydraJsonPatch() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// A JSON-pointer. - /// The operation to be performed (required). - /// A JSON-pointer (required). - /// The value to be used within the operations. - public HydraPatchDocument(string from = default(string), string op = default(string), string path = default(string), Object value = default(Object)) + /// 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).. + /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". (required). + /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). (required). + /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).. + 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) { - throw new ArgumentNullException("op is a required property for HydraPatchDocument and cannot be 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) { - throw new ArgumentNullException("path is a required property for HydraPatchDocument and cannot be null"); + throw new ArgumentNullException("path is a required property for HydraJsonPatch and cannot be null"); } this.Path = path; this.From = from; @@ -64,31 +65,31 @@ protected HydraPatchDocument() } /// - /// A JSON-pointer + /// 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). /// - /// A JSON-pointer + /// 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). [DataMember(Name = "from", EmitDefaultValue = false)] public string From { get; set; } /// - /// The operation to be performed + /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". /// - /// The operation to be performed + /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". [DataMember(Name = "op", IsRequired = true, EmitDefaultValue = false)] public string Op { get; set; } /// - /// A JSON-pointer + /// The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). /// - /// A JSON-pointer + /// 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)] public string Path { get; set; } /// - /// The value to be used within the operations + /// 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 - [DataMember(Name = "value", EmitDefaultValue = false)] + /// The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + [DataMember(Name = "value", EmitDefaultValue = true)] public Object Value { get; set; } /// @@ -104,7 +105,7 @@ protected HydraPatchDocument() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraPatchDocument {\n"); + sb.Append("class HydraJsonPatch {\n"); sb.Append(" From: ").Append(From).Append("\n"); sb.Append(" Op: ").Append(Op).Append("\n"); sb.Append(" Path: ").Append(Path).Append("\n"); @@ -130,15 +131,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraPatchDocument); + return this.Equals(input as HydraJsonPatch); } /// - /// Returns true if HydraPatchDocument instances are equal + /// Returns true if HydraJsonPatch instances are equal /// - /// Instance of HydraPatchDocument to be compared + /// Instance of HydraJsonPatch to be compared /// Boolean - public bool Equals(HydraPatchDocument input) + public bool Equals(HydraJsonPatch input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJSONWebKey.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKey.cs similarity index 94% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJSONWebKey.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKey.cs index 78923810ea9..598e728959e 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJSONWebKey.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKey.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,21 +27,21 @@ namespace Ory.Hydra.Client.Model { /// - /// It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. + /// HydraJsonWebKey /// - [DataContract(Name = "JSONWebKey")] - public partial class HydraJSONWebKey : IEquatable, IValidatableObject + [DataContract(Name = "jsonWebKey")] + public partial class HydraJsonWebKey : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraJSONWebKey() + protected HydraJsonWebKey() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// 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. (required). /// crv. @@ -59,26 +60,26 @@ protected HydraJSONWebKey() /// x. /// 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. - 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)) + 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) { - throw new ArgumentNullException("alg is a required property for HydraJSONWebKey and cannot be 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) { - throw new ArgumentNullException("kid is a required property for HydraJSONWebKey and cannot be 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) { - throw new ArgumentNullException("kty is a required property for HydraJSONWebKey and cannot be 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) { - throw new ArgumentNullException("use is a required property for HydraJSONWebKey and cannot be null"); + throw new ArgumentNullException("use is a required property for HydraJsonWebKey and cannot be null"); } this.Use = use; this.Crv = crv; @@ -217,7 +218,7 @@ protected HydraJSONWebKey() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraJSONWebKey {\n"); + sb.Append("class HydraJsonWebKey {\n"); sb.Append(" Alg: ").Append(Alg).Append("\n"); sb.Append(" Crv: ").Append(Crv).Append("\n"); sb.Append(" D: ").Append(D).Append("\n"); @@ -256,15 +257,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraJSONWebKey); + return this.Equals(input as HydraJsonWebKey); } /// - /// Returns true if HydraJSONWebKey instances are equal + /// Returns true if HydraJsonWebKey instances are equal /// - /// Instance of HydraJSONWebKey to be compared + /// Instance of HydraJsonWebKey to be compared /// Boolean - public bool Equals(HydraJSONWebKey input) + public bool Equals(HydraJsonWebKey input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJSONWebKeySet.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs similarity index 64% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJSONWebKeySet.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs index 95558f27e80..d474286c738 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJSONWebKeySet.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraJsonWebKeySet.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,27 +27,27 @@ namespace Ory.Hydra.Client.Model { /// - /// It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. + /// JSON Web Key Set /// - [DataContract(Name = "JSONWebKeySet")] - public partial class HydraJSONWebKeySet : IEquatable, IValidatableObject + [DataContract(Name = "jsonWebKeySet")] + public partial class HydraJsonWebKeySet : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The value of the \"keys\" parameter is an array of 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 HydraJSONWebKeySet(List keys = default(List)) + /// 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 HydraJsonWebKeySet(List keys = default(List)) { this.Keys = keys; this.AdditionalProperties = new Dictionary(); } /// - /// The value of the \"keys\" parameter is an array of 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. + /// 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. /// - /// The value of the \"keys\" parameter is an array of 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. + /// 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. [DataMember(Name = "keys", EmitDefaultValue = false)] - public List Keys { get; set; } + public List Keys { get; set; } /// /// Gets or Sets additional properties @@ -61,7 +62,7 @@ public partial class HydraJSONWebKeySet : IEquatable, IValid public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraJSONWebKeySet {\n"); + sb.Append("class HydraJsonWebKeySet {\n"); sb.Append(" Keys: ").Append(Keys).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); @@ -84,15 +85,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraJSONWebKeySet); + return this.Equals(input as HydraJsonWebKeySet); } /// - /// Returns true if HydraJSONWebKeySet instances are equal + /// Returns true if HydraJsonWebKeySet instances are equal /// - /// Instance of HydraJSONWebKeySet to be compared + /// Instance of HydraJsonWebKeySet to be compared /// Boolean - public bool Equals(HydraJSONWebKeySet input) + public bool Equals(HydraJsonWebKeySet input) { if (input == null) { 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 05e6a0c3aa7..66beb1ad805 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2Client.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2Client.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,7 +27,7 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraOAuth2Client + /// 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 @@ -36,45 +37,59 @@ public partial class HydraOAuth2Client : IEquatable, IValidat /// /// allowedCorsOrigins. /// audience. - /// 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.. - /// RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.. - /// ID is the id for this client.. - /// Name is the human-readable string name of the client to be presented to the end-user during authorization.. - /// Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again.. - /// SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0.. - /// ClientURI is an 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.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// 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.. + /// 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.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// OAuth 2.0 Client ID The ID is autogenerated and immutable.. + /// OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.. + /// 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.. + /// OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.. + /// 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. - /// CreatedAt returns the timestamp of the client's creation.. - /// 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.. - /// 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.. + /// OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.. + /// 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.. + /// 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.. /// grantTypes. - /// jwks. - /// 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.. - /// LogoURI is an URL string that references a logo for the client.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// 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.. + /// 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.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// OAuth 2.0 Client Logo URI A URL string referencing the client's logo.. /// metadata. - /// Owner is a string identifying the owner of the OAuth 2.0 Client.. - /// 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.. + /// OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.. + /// 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.. /// postLogoutRedirectUris. /// redirectUris. - /// RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client.. - /// RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.. - /// 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.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// 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.. + /// OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.. + /// 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.. /// requestUris. /// responseTypes. - /// 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.. - /// 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.. - /// SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.. - /// Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none.. - /// Requested Client Authentication signing algorithm for the Token Endpoint.. - /// TermsOfServiceURI is a URL string that points 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.. - /// UpdatedAt returns the timestamp of the last update.. - /// 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(List allowedCorsOrigins = default(List), List audience = default(List), bool backchannelLogoutSessionRequired = default(bool), string backchannelLogoutUri = 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), Object jwks = default(Object), string jwksUri = 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 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), string subjectType = default(string), string tokenEndpointAuthMethod = default(string), string tokenEndpointAuthSigningAlg = default(string), string tosUri = default(string), DateTime updatedAt = default(DateTime), string userinfoSignedResponseAlg = default(string)) + /// 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.. + /// 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.. + /// 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`.. + /// OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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.. + /// OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.. + /// 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(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), string subjectType = default(string), string tokenEndpointAuthMethod = default(string), string tokenEndpointAuthSigningAlg = default(string), string tosUri = default(string), DateTime updatedAt = default(DateTime), string userinfoSignedResponseAlg = default(string)) { this.AllowedCorsOrigins = allowedCorsOrigins; this.Audience = audience; + this.AuthorizationCodeGrantAccessTokenLifespan = authorizationCodeGrantAccessTokenLifespan; + this.AuthorizationCodeGrantIdTokenLifespan = authorizationCodeGrantIdTokenLifespan; + this.AuthorizationCodeGrantRefreshTokenLifespan = authorizationCodeGrantRefreshTokenLifespan; this.BackchannelLogoutSessionRequired = backchannelLogoutSessionRequired; this.BackchannelLogoutUri = backchannelLogoutUri; + this.ClientCredentialsGrantAccessTokenLifespan = clientCredentialsGrantAccessTokenLifespan; this.ClientId = clientId; this.ClientName = clientName; this.ClientSecret = clientSecret; @@ -85,14 +100,20 @@ public partial class HydraOAuth2Client : IEquatable, IValidat this.FrontchannelLogoutSessionRequired = frontchannelLogoutSessionRequired; this.FrontchannelLogoutUri = frontchannelLogoutUri; this.GrantTypes = grantTypes; + this.ImplicitGrantAccessTokenLifespan = implicitGrantAccessTokenLifespan; + this.ImplicitGrantIdTokenLifespan = implicitGrantIdTokenLifespan; this.Jwks = jwks; this.JwksUri = jwksUri; + this.JwtBearerGrantAccessTokenLifespan = jwtBearerGrantAccessTokenLifespan; this.LogoUri = logoUri; this.Metadata = metadata; this.Owner = owner; this.PolicyUri = policyUri; this.PostLogoutRedirectUris = postLogoutRedirectUris; this.RedirectUris = redirectUris; + this.RefreshTokenGrantAccessTokenLifespan = refreshTokenGrantAccessTokenLifespan; + this.RefreshTokenGrantIdTokenLifespan = refreshTokenGrantIdTokenLifespan; + this.RefreshTokenGrantRefreshTokenLifespan = refreshTokenGrantRefreshTokenLifespan; this.RegistrationAccessToken = registrationAccessToken; this.RegistrationClientUri = registrationClientUri; this.RequestObjectSigningAlg = requestObjectSigningAlg; @@ -122,51 +143,79 @@ public partial class HydraOAuth2Client : IEquatable, IValidat public List Audience { get; set; } /// - /// 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. + /// Specify a time duration in milliseconds, seconds, minutes, hours. /// - /// 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. + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_access_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_id_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_refresh_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantRefreshTokenLifespan { get; set; } + + /// + /// 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. + /// + /// 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. [DataMember(Name = "backchannel_logout_session_required", EmitDefaultValue = true)] public bool BackchannelLogoutSessionRequired { get; set; } /// - /// RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + /// 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. /// - /// RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + /// 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. [DataMember(Name = "backchannel_logout_uri", EmitDefaultValue = false)] public string BackchannelLogoutUri { get; set; } /// - /// ID is the id for this client. + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "client_credentials_grant_access_token_lifespan", EmitDefaultValue = false)] + public string ClientCredentialsGrantAccessTokenLifespan { get; set; } + + /// + /// OAuth 2.0 Client ID The ID is autogenerated and immutable. /// - /// ID is the id for this client. + /// OAuth 2.0 Client ID The ID is autogenerated and immutable. [DataMember(Name = "client_id", EmitDefaultValue = false)] public string ClientId { get; set; } /// - /// Name is the human-readable string name of the client to be presented to the end-user during authorization. + /// OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. /// - /// Name is the human-readable string name of the client to be presented to the end-user during authorization. + /// OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. [DataMember(Name = "client_name", EmitDefaultValue = false)] public string ClientName { get; set; } /// - /// Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. + /// 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. /// - /// Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. + /// 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. [DataMember(Name = "client_secret", EmitDefaultValue = false)] public string ClientSecret { get; set; } /// - /// SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. + /// OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. /// - /// SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. + /// OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. [DataMember(Name = "client_secret_expires_at", EmitDefaultValue = false)] public long ClientSecretExpiresAt { get; set; } /// - /// ClientURI is an 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. + /// 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. /// - /// ClientURI is an 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. + /// 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. [DataMember(Name = "client_uri", EmitDefaultValue = false)] public string ClientUri { get; set; } @@ -177,23 +226,23 @@ public partial class HydraOAuth2Client : IEquatable, IValidat public List Contacts { get; set; } /// - /// CreatedAt returns the timestamp of the client's creation. + /// OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. /// - /// CreatedAt returns the timestamp of the client's creation. + /// OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. [DataMember(Name = "created_at", EmitDefaultValue = false)] public DateTime CreatedAt { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. [DataMember(Name = "frontchannel_logout_session_required", EmitDefaultValue = true)] public bool FrontchannelLogoutSessionRequired { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. [DataMember(Name = "frontchannel_logout_uri", EmitDefaultValue = false)] public string FrontchannelLogoutUri { get; set; } @@ -204,42 +253,64 @@ public partial class HydraOAuth2Client : IEquatable, IValidat public List GrantTypes { get; set; } /// - /// Gets or Sets Jwks + /// Specify a time duration in milliseconds, seconds, minutes, hours. /// - [DataMember(Name = "jwks", EmitDefaultValue = false)] + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "implicit_grant_access_token_lifespan", EmitDefaultValue = false)] + public string ImplicitGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "implicit_grant_id_token_lifespan", EmitDefaultValue = false)] + public string ImplicitGrantIdTokenLifespan { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "jwks", EmitDefaultValue = true)] public Object Jwks { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. [DataMember(Name = "jwks_uri", EmitDefaultValue = false)] public string JwksUri { get; set; } /// - /// LogoURI is an URL string that references a logo for the client. + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "jwt_bearer_grant_access_token_lifespan", EmitDefaultValue = false)] + public string JwtBearerGrantAccessTokenLifespan { get; set; } + + /// + /// OAuth 2.0 Client Logo URI A URL string referencing the client's logo. /// - /// LogoURI is an URL string that references a logo for the client. + /// OAuth 2.0 Client Logo URI A URL string referencing the client's logo. [DataMember(Name = "logo_uri", EmitDefaultValue = false)] public string LogoUri { get; set; } /// /// Gets or Sets Metadata /// - [DataMember(Name = "metadata", EmitDefaultValue = false)] + [DataMember(Name = "metadata", EmitDefaultValue = true)] public Object Metadata { get; set; } /// - /// Owner is a string identifying the owner of the OAuth 2.0 Client. + /// OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. /// - /// Owner is a string identifying the owner of the OAuth 2.0 Client. + /// OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. [DataMember(Name = "owner", EmitDefaultValue = false)] public string Owner { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. [DataMember(Name = "policy_uri", EmitDefaultValue = false)] public string PolicyUri { get; set; } @@ -256,23 +327,44 @@ public partial class HydraOAuth2Client : IEquatable, IValidat public List RedirectUris { get; set; } /// - /// RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_access_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. /// - /// RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_id_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_refresh_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantRefreshTokenLifespan { get; set; } + + /// + /// 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. + /// + /// 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. [DataMember(Name = "registration_access_token", EmitDefaultValue = false)] public string RegistrationAccessToken { get; set; } /// - /// RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + /// OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. /// - /// RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + /// OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. [DataMember(Name = "registration_client_uri", EmitDefaultValue = false)] public string RegistrationClientUri { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. [DataMember(Name = "request_object_signing_alg", EmitDefaultValue = false)] public string RequestObjectSigningAlg { get; set; } @@ -289,58 +381,58 @@ public partial class HydraOAuth2Client : IEquatable, IValidat public List ResponseTypes { get; set; } /// - /// 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. /// - /// 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. [DataMember(Name = "scope", EmitDefaultValue = false)] public string Scope { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. [DataMember(Name = "sector_identifier_uri", EmitDefaultValue = false)] public string SectorIdentifierUri { get; set; } /// - /// SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + /// 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`. /// - /// SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + /// 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`. [DataMember(Name = "subject_type", EmitDefaultValue = false)] public string SubjectType { get; set; } /// - /// Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. + /// OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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. /// - /// Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. + /// OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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. [DataMember(Name = "token_endpoint_auth_method", EmitDefaultValue = false)] public string TokenEndpointAuthMethod { get; set; } /// - /// Requested Client Authentication signing algorithm for the Token Endpoint. + /// OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. /// - /// Requested Client Authentication signing algorithm for the Token Endpoint. + /// OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. [DataMember(Name = "token_endpoint_auth_signing_alg", EmitDefaultValue = false)] public string TokenEndpointAuthSigningAlg { get; set; } /// - /// TermsOfServiceURI is a URL string that points 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 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. /// - /// TermsOfServiceURI is a URL string that points 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 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. [DataMember(Name = "tos_uri", EmitDefaultValue = false)] public string TosUri { get; set; } /// - /// UpdatedAt returns the timestamp of the last update. + /// OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. /// - /// UpdatedAt returns the timestamp of the last update. + /// OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. [DataMember(Name = "updated_at", EmitDefaultValue = false)] public DateTime UpdatedAt { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. [DataMember(Name = "userinfo_signed_response_alg", EmitDefaultValue = false)] public string UserinfoSignedResponseAlg { get; set; } @@ -360,8 +452,12 @@ public override string ToString() sb.Append("class HydraOAuth2Client {\n"); sb.Append(" AllowedCorsOrigins: ").Append(AllowedCorsOrigins).Append("\n"); sb.Append(" Audience: ").Append(Audience).Append("\n"); + sb.Append(" AuthorizationCodeGrantAccessTokenLifespan: ").Append(AuthorizationCodeGrantAccessTokenLifespan).Append("\n"); + sb.Append(" AuthorizationCodeGrantIdTokenLifespan: ").Append(AuthorizationCodeGrantIdTokenLifespan).Append("\n"); + sb.Append(" AuthorizationCodeGrantRefreshTokenLifespan: ").Append(AuthorizationCodeGrantRefreshTokenLifespan).Append("\n"); sb.Append(" BackchannelLogoutSessionRequired: ").Append(BackchannelLogoutSessionRequired).Append("\n"); sb.Append(" BackchannelLogoutUri: ").Append(BackchannelLogoutUri).Append("\n"); + sb.Append(" ClientCredentialsGrantAccessTokenLifespan: ").Append(ClientCredentialsGrantAccessTokenLifespan).Append("\n"); sb.Append(" ClientId: ").Append(ClientId).Append("\n"); sb.Append(" ClientName: ").Append(ClientName).Append("\n"); sb.Append(" ClientSecret: ").Append(ClientSecret).Append("\n"); @@ -372,14 +468,20 @@ public override string ToString() sb.Append(" FrontchannelLogoutSessionRequired: ").Append(FrontchannelLogoutSessionRequired).Append("\n"); sb.Append(" FrontchannelLogoutUri: ").Append(FrontchannelLogoutUri).Append("\n"); sb.Append(" GrantTypes: ").Append(GrantTypes).Append("\n"); + sb.Append(" ImplicitGrantAccessTokenLifespan: ").Append(ImplicitGrantAccessTokenLifespan).Append("\n"); + sb.Append(" ImplicitGrantIdTokenLifespan: ").Append(ImplicitGrantIdTokenLifespan).Append("\n"); sb.Append(" Jwks: ").Append(Jwks).Append("\n"); sb.Append(" JwksUri: ").Append(JwksUri).Append("\n"); + sb.Append(" JwtBearerGrantAccessTokenLifespan: ").Append(JwtBearerGrantAccessTokenLifespan).Append("\n"); sb.Append(" LogoUri: ").Append(LogoUri).Append("\n"); sb.Append(" Metadata: ").Append(Metadata).Append("\n"); sb.Append(" Owner: ").Append(Owner).Append("\n"); sb.Append(" PolicyUri: ").Append(PolicyUri).Append("\n"); sb.Append(" PostLogoutRedirectUris: ").Append(PostLogoutRedirectUris).Append("\n"); sb.Append(" RedirectUris: ").Append(RedirectUris).Append("\n"); + sb.Append(" RefreshTokenGrantAccessTokenLifespan: ").Append(RefreshTokenGrantAccessTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantIdTokenLifespan: ").Append(RefreshTokenGrantIdTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantRefreshTokenLifespan: ").Append(RefreshTokenGrantRefreshTokenLifespan).Append("\n"); sb.Append(" RegistrationAccessToken: ").Append(RegistrationAccessToken).Append("\n"); sb.Append(" RegistrationClientUri: ").Append(RegistrationClientUri).Append("\n"); sb.Append(" RequestObjectSigningAlg: ").Append(RequestObjectSigningAlg).Append("\n"); @@ -441,6 +543,21 @@ public bool Equals(HydraOAuth2Client input) 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) @@ -450,6 +567,11 @@ public bool Equals(HydraOAuth2Client input) (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 && @@ -500,6 +622,16 @@ public bool Equals(HydraOAuth2Client input) 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 && @@ -510,6 +642,11 @@ public bool Equals(HydraOAuth2Client input) (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 && @@ -542,6 +679,21 @@ public bool Equals(HydraOAuth2Client input) 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 && @@ -629,11 +781,27 @@ public override int GetHashCode() { 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(); @@ -668,6 +836,14 @@ public override int GetHashCode() { 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(); @@ -676,6 +852,10 @@ public override int GetHashCode() { 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(); @@ -700,6 +880,18 @@ public override int GetHashCode() { 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(); @@ -767,11 +959,74 @@ public override int GetHashCode() /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { - // Scope (string) pattern - Regex regexScope = new Regex(@"([a-zA-Z0-9\\.\\*]+\\s?)+", RegexOptions.CultureInvariant); - if (false == regexScope.Match(this.Scope).Success) + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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 Scope, must match a pattern of " + regexScope, new [] { "Scope" }); + 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 new file mode 100644 index 00000000000..590d0d178e2 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ClientTokenLifespans.cs @@ -0,0 +1,384 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 +{ + /// + /// Lifespans of different token types issued for this OAuth 2.0 Client. + /// + [DataContract(Name = "oAuth2ClientTokenLifespans")] + public partial class HydraOAuth2ClientTokenLifespans : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + /// Specify a time duration in milliseconds, seconds, minutes, hours.. + public HydraOAuth2ClientTokenLifespans(string authorizationCodeGrantAccessTokenLifespan = default(string), string authorizationCodeGrantIdTokenLifespan = default(string), string authorizationCodeGrantRefreshTokenLifespan = default(string), string clientCredentialsGrantAccessTokenLifespan = default(string), string implicitGrantAccessTokenLifespan = default(string), string implicitGrantIdTokenLifespan = default(string), string jwtBearerGrantAccessTokenLifespan = default(string), string refreshTokenGrantAccessTokenLifespan = default(string), string refreshTokenGrantIdTokenLifespan = default(string), string refreshTokenGrantRefreshTokenLifespan = default(string)) + { + this.AuthorizationCodeGrantAccessTokenLifespan = authorizationCodeGrantAccessTokenLifespan; + this.AuthorizationCodeGrantIdTokenLifespan = authorizationCodeGrantIdTokenLifespan; + this.AuthorizationCodeGrantRefreshTokenLifespan = authorizationCodeGrantRefreshTokenLifespan; + this.ClientCredentialsGrantAccessTokenLifespan = clientCredentialsGrantAccessTokenLifespan; + this.ImplicitGrantAccessTokenLifespan = implicitGrantAccessTokenLifespan; + this.ImplicitGrantIdTokenLifespan = implicitGrantIdTokenLifespan; + this.JwtBearerGrantAccessTokenLifespan = jwtBearerGrantAccessTokenLifespan; + this.RefreshTokenGrantAccessTokenLifespan = refreshTokenGrantAccessTokenLifespan; + this.RefreshTokenGrantIdTokenLifespan = refreshTokenGrantIdTokenLifespan; + this.RefreshTokenGrantRefreshTokenLifespan = refreshTokenGrantRefreshTokenLifespan; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_access_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_id_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "authorization_code_grant_refresh_token_lifespan", EmitDefaultValue = false)] + public string AuthorizationCodeGrantRefreshTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "client_credentials_grant_access_token_lifespan", EmitDefaultValue = false)] + public string ClientCredentialsGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "implicit_grant_access_token_lifespan", EmitDefaultValue = false)] + public string ImplicitGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "implicit_grant_id_token_lifespan", EmitDefaultValue = false)] + public string ImplicitGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "jwt_bearer_grant_access_token_lifespan", EmitDefaultValue = false)] + public string JwtBearerGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_access_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantAccessTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_id_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantIdTokenLifespan { get; set; } + + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + /// + /// Specify a time duration in milliseconds, seconds, minutes, hours. + [DataMember(Name = "refresh_token_grant_refresh_token_lifespan", EmitDefaultValue = false)] + public string RefreshTokenGrantRefreshTokenLifespan { 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 HydraOAuth2ClientTokenLifespans {\n"); + sb.Append(" AuthorizationCodeGrantAccessTokenLifespan: ").Append(AuthorizationCodeGrantAccessTokenLifespan).Append("\n"); + sb.Append(" AuthorizationCodeGrantIdTokenLifespan: ").Append(AuthorizationCodeGrantIdTokenLifespan).Append("\n"); + sb.Append(" AuthorizationCodeGrantRefreshTokenLifespan: ").Append(AuthorizationCodeGrantRefreshTokenLifespan).Append("\n"); + sb.Append(" ClientCredentialsGrantAccessTokenLifespan: ").Append(ClientCredentialsGrantAccessTokenLifespan).Append("\n"); + sb.Append(" ImplicitGrantAccessTokenLifespan: ").Append(ImplicitGrantAccessTokenLifespan).Append("\n"); + sb.Append(" ImplicitGrantIdTokenLifespan: ").Append(ImplicitGrantIdTokenLifespan).Append("\n"); + sb.Append(" JwtBearerGrantAccessTokenLifespan: ").Append(JwtBearerGrantAccessTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantAccessTokenLifespan: ").Append(RefreshTokenGrantAccessTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantIdTokenLifespan: ").Append(RefreshTokenGrantIdTokenLifespan).Append("\n"); + sb.Append(" RefreshTokenGrantRefreshTokenLifespan: ").Append(RefreshTokenGrantRefreshTokenLifespan).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 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) + { + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + // 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" }); + } + + yield break; + } + } + +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraConsentRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs similarity index 91% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraConsentRequest.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs index f4451ca5e8d..fc155a9cc65 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraConsentRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequest.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,21 +27,21 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraConsentRequest + /// HydraOAuth2ConsentRequest /// - [DataContract(Name = "consentRequest")] - public partial class HydraConsentRequest : IEquatable, IValidatableObject + [DataContract(Name = "oAuth2ConsentRequest")] + public partial class HydraOAuth2ConsentRequest : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraConsentRequest() + protected HydraOAuth2ConsentRequest() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// 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. @@ -55,11 +56,11 @@ protected HydraConsentRequest() /// 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 HydraConsentRequest(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), HydraOpenIDConnectContext oidcContext = default(HydraOpenIDConnectContext), 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 _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)) { // to ensure "challenge" is required (not null) if (challenge == null) { - throw new ArgumentNullException("challenge is a required property for HydraConsentRequest and cannot be null"); + throw new ArgumentNullException("challenge is a required property for HydraOAuth2ConsentRequest and cannot be null"); } this.Challenge = challenge; this.Acr = acr; @@ -106,7 +107,7 @@ protected HydraConsentRequest() /// /// Gets or Sets Context /// - [DataMember(Name = "context", EmitDefaultValue = false)] + [DataMember(Name = "context", EmitDefaultValue = true)] public Object Context { get; set; } /// @@ -127,7 +128,7 @@ protected HydraConsentRequest() /// Gets or Sets OidcContext /// [DataMember(Name = "oidc_context", EmitDefaultValue = false)] - public HydraOpenIDConnectContext OidcContext { get; set; } + public HydraOAuth2ConsentRequestOpenIDConnectContext OidcContext { get; set; } /// /// 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. @@ -175,7 +176,7 @@ protected HydraConsentRequest() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraConsentRequest {\n"); + sb.Append("class HydraOAuth2ConsentRequest {\n"); sb.Append(" Acr: ").Append(Acr).Append("\n"); sb.Append(" Amr: ").Append(Amr).Append("\n"); sb.Append(" Challenge: ").Append(Challenge).Append("\n"); @@ -210,15 +211,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraConsentRequest); + return this.Equals(input as HydraOAuth2ConsentRequest); } /// - /// Returns true if HydraConsentRequest instances are equal + /// Returns true if HydraOAuth2ConsentRequest instances are equal /// - /// Instance of HydraConsentRequest to be compared + /// Instance of HydraOAuth2ConsentRequest to be compared /// Boolean - public bool Equals(HydraConsentRequest input) + public bool Equals(HydraOAuth2ConsentRequest input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOpenIDConnectContext.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs similarity index 90% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOpenIDConnectContext.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs index c62144f9a18..8388d91d7e1 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOpenIDConnectContext.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentRequestOpenIDConnectContext.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,20 +27,20 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraOpenIDConnectContext + /// HydraOAuth2ConsentRequestOpenIDConnectContext /// - [DataContract(Name = "openIDConnectContext")] - public partial class HydraOpenIDConnectContext : IEquatable, IValidatableObject + [DataContract(Name = "oAuth2ConsentRequestOpenIDConnectContext")] + public partial class HydraOAuth2ConsentRequestOpenIDConnectContext : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// 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 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.. /// 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.. /// 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.. /// 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 HydraOpenIDConnectContext(List acrValues = default(List), string display = default(string), Object idTokenHintClaims = default(Object), string loginHint = default(string), List uiLocales = default(List)) + public HydraOAuth2ConsentRequestOpenIDConnectContext(List acrValues = default(List), string display = default(string), Dictionary idTokenHintClaims = default(Dictionary), string loginHint = default(string), List uiLocales = default(List)) { this.AcrValues = acrValues; this.Display = display; @@ -68,7 +69,7 @@ public partial class HydraOpenIDConnectContext : IEquatable /// 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. [DataMember(Name = "id_token_hint_claims", EmitDefaultValue = false)] - public Object IdTokenHintClaims { get; set; } + public Dictionary IdTokenHintClaims { get; set; } /// /// 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. @@ -97,7 +98,7 @@ public partial class HydraOpenIDConnectContext : IEquatableBoolean public override bool Equals(object input) { - return this.Equals(input as HydraOpenIDConnectContext); + return this.Equals(input as HydraOAuth2ConsentRequestOpenIDConnectContext); } /// - /// Returns true if HydraOpenIDConnectContext instances are equal + /// Returns true if HydraOAuth2ConsentRequestOpenIDConnectContext instances are equal /// - /// Instance of HydraOpenIDConnectContext to be compared + /// Instance of HydraOAuth2ConsentRequestOpenIDConnectContext to be compared /// Boolean - public bool Equals(HydraOpenIDConnectContext input) + public bool Equals(HydraOAuth2ConsentRequestOpenIDConnectContext input) { if (input == null) { @@ -152,8 +153,9 @@ public bool Equals(HydraOpenIDConnectContext input) ) && ( this.IdTokenHintClaims == input.IdTokenHintClaims || - (this.IdTokenHintClaims != null && - this.IdTokenHintClaims.Equals(input.IdTokenHintClaims)) + this.IdTokenHintClaims != null && + input.IdTokenHintClaims != null && + this.IdTokenHintClaims.SequenceEqual(input.IdTokenHintClaims) ) && ( this.LoginHint == input.LoginHint || diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPreviousConsentSession.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs similarity index 70% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPreviousConsentSession.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs index db79cb4b93f..7c338c0f9c7 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPreviousConsentSession.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSession.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,24 +27,26 @@ namespace Ory.Hydra.Client.Model { /// - /// The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json + /// A completed OAuth 2.0 Consent Session. /// - [DataContract(Name = "PreviousConsentSession")] - public partial class HydraPreviousConsentSession : IEquatable, IValidatableObject + [DataContract(Name = "oAuth2ConsentSession")] + public partial class HydraOAuth2ConsentSession : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// consentRequest. + /// expiresAt. /// grantAccessTokenAudience. /// grantScope. /// handledAt. - /// 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.. - /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.. + /// 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 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. - public HydraPreviousConsentSession(HydraConsentRequest consentRequest = default(HydraConsentRequest), List grantAccessTokenAudience = default(List), List grantScope = default(List), DateTime handledAt = default(DateTime), bool remember = default(bool), long rememberFor = default(long), HydraConsentRequestSession session = default(HydraConsentRequestSession)) + public HydraOAuth2ConsentSession(HydraOAuth2ConsentRequest consentRequest = default(HydraOAuth2ConsentRequest), HydraOAuth2ConsentSessionExpiresAt expiresAt = default(HydraOAuth2ConsentSessionExpiresAt), List grantAccessTokenAudience = default(List), List grantScope = default(List), DateTime handledAt = default(DateTime), bool remember = default(bool), long rememberFor = default(long), HydraAcceptOAuth2ConsentRequestSession session = default(HydraAcceptOAuth2ConsentRequestSession)) { this.ConsentRequest = consentRequest; + this.ExpiresAt = expiresAt; this.GrantAccessTokenAudience = grantAccessTokenAudience; this.GrantScope = grantScope; this.HandledAt = handledAt; @@ -57,7 +60,13 @@ public partial class HydraPreviousConsentSession : IEquatable [DataMember(Name = "consent_request", EmitDefaultValue = false)] - public HydraConsentRequest ConsentRequest { get; set; } + public HydraOAuth2ConsentRequest ConsentRequest { get; set; } + + /// + /// Gets or Sets ExpiresAt + /// + [DataMember(Name = "expires_at", EmitDefaultValue = false)] + public HydraOAuth2ConsentSessionExpiresAt ExpiresAt { get; set; } /// /// Gets or Sets GrantAccessTokenAudience @@ -78,16 +87,16 @@ public partial class HydraPreviousConsentSession : IEquatable - /// 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 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, 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 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. [DataMember(Name = "remember", EmitDefaultValue = true)] public bool Remember { get; set; } /// - /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + /// 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. /// - /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + /// 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. [DataMember(Name = "remember_for", EmitDefaultValue = false)] public long RememberFor { get; set; } @@ -95,7 +104,7 @@ public partial class HydraPreviousConsentSession : IEquatable [DataMember(Name = "session", EmitDefaultValue = false)] - public HydraConsentRequestSession Session { get; set; } + public HydraAcceptOAuth2ConsentRequestSession Session { get; set; } /// /// Gets or Sets additional properties @@ -110,8 +119,9 @@ public partial class HydraPreviousConsentSession : IEquatableBoolean public override bool Equals(object input) { - return this.Equals(input as HydraPreviousConsentSession); + return this.Equals(input as HydraOAuth2ConsentSession); } /// - /// Returns true if HydraPreviousConsentSession instances are equal + /// Returns true if HydraOAuth2ConsentSession instances are equal /// - /// Instance of HydraPreviousConsentSession to be compared + /// Instance of HydraOAuth2ConsentSession to be compared /// Boolean - public bool Equals(HydraPreviousConsentSession input) + public bool Equals(HydraOAuth2ConsentSession input) { if (input == null) { @@ -159,6 +169,11 @@ public bool Equals(HydraPreviousConsentSession input) (this.ConsentRequest != null && this.ConsentRequest.Equals(input.ConsentRequest)) ) && + ( + this.ExpiresAt == input.ExpiresAt || + (this.ExpiresAt != null && + this.ExpiresAt.Equals(input.ExpiresAt)) + ) && ( this.GrantAccessTokenAudience == input.GrantAccessTokenAudience || this.GrantAccessTokenAudience != null && @@ -205,6 +220,10 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.ConsentRequest.GetHashCode(); } + if (this.ExpiresAt != null) + { + hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); + } if (this.GrantAccessTokenAudience != null) { hashCode = (hashCode * 59) + this.GrantAccessTokenAudience.GetHashCode(); diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOauth2TokenResponse.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs similarity index 65% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOauth2TokenResponse.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs index 5c56621b723..7f29c7f6f5b 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOauth2TokenResponse.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2ConsentSessionExpiresAt.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,28 +27,26 @@ namespace Ory.Hydra.Client.Model { /// - /// The Access Token Response + /// HydraOAuth2ConsentSessionExpiresAt /// - [DataContract(Name = "oauth2TokenResponse")] - public partial class HydraOauth2TokenResponse : IEquatable, IValidatableObject + [DataContract(Name = "oAuth2ConsentSession_expires_at")] + public partial class HydraOAuth2ConsentSessionExpiresAt : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// accessToken. - /// expiresIn. + /// authorizeCode. /// idToken. + /// parContext. /// refreshToken. - /// scope. - /// tokenType. - public HydraOauth2TokenResponse(string accessToken = default(string), long expiresIn = default(long), string idToken = default(string), string refreshToken = default(string), string scope = default(string), string tokenType = default(string)) + public HydraOAuth2ConsentSessionExpiresAt(DateTime accessToken = default(DateTime), DateTime authorizeCode = default(DateTime), DateTime idToken = default(DateTime), DateTime parContext = default(DateTime), DateTime refreshToken = default(DateTime)) { this.AccessToken = accessToken; - this.ExpiresIn = expiresIn; + this.AuthorizeCode = authorizeCode; this.IdToken = idToken; + this.ParContext = parContext; this.RefreshToken = refreshToken; - this.Scope = scope; - this.TokenType = tokenType; this.AdditionalProperties = new Dictionary(); } @@ -55,37 +54,31 @@ public partial class HydraOauth2TokenResponse : IEquatable [DataMember(Name = "access_token", EmitDefaultValue = false)] - public string AccessToken { get; set; } + public DateTime AccessToken { get; set; } /// - /// Gets or Sets ExpiresIn + /// Gets or Sets AuthorizeCode /// - [DataMember(Name = "expires_in", EmitDefaultValue = false)] - public long ExpiresIn { get; set; } + [DataMember(Name = "authorize_code", EmitDefaultValue = false)] + public DateTime AuthorizeCode { get; set; } /// /// Gets or Sets IdToken /// [DataMember(Name = "id_token", EmitDefaultValue = false)] - public string IdToken { get; set; } + public DateTime IdToken { get; set; } /// - /// Gets or Sets RefreshToken - /// - [DataMember(Name = "refresh_token", EmitDefaultValue = false)] - public string RefreshToken { get; set; } - - /// - /// Gets or Sets Scope + /// Gets or Sets ParContext /// - [DataMember(Name = "scope", EmitDefaultValue = false)] - public string Scope { get; set; } + [DataMember(Name = "par_context", EmitDefaultValue = false)] + public DateTime ParContext { get; set; } /// - /// Gets or Sets TokenType + /// Gets or Sets RefreshToken /// - [DataMember(Name = "token_type", EmitDefaultValue = false)] - public string TokenType { get; set; } + [DataMember(Name = "refresh_token", EmitDefaultValue = false)] + public DateTime RefreshToken { get; set; } /// /// Gets or Sets additional properties @@ -100,13 +93,12 @@ public partial class HydraOauth2TokenResponse : IEquatableBoolean public override bool Equals(object input) { - return this.Equals(input as HydraOauth2TokenResponse); + return this.Equals(input as HydraOAuth2ConsentSessionExpiresAt); } /// - /// Returns true if HydraOauth2TokenResponse instances are equal + /// Returns true if HydraOAuth2ConsentSessionExpiresAt instances are equal /// - /// Instance of HydraOauth2TokenResponse to be compared + /// Instance of HydraOAuth2ConsentSessionExpiresAt to be compared /// Boolean - public bool Equals(HydraOauth2TokenResponse input) + public bool Equals(HydraOAuth2ConsentSessionExpiresAt input) { if (input == null) { @@ -149,28 +141,24 @@ public bool Equals(HydraOauth2TokenResponse input) this.AccessToken.Equals(input.AccessToken)) ) && ( - this.ExpiresIn == input.ExpiresIn || - this.ExpiresIn.Equals(input.ExpiresIn) + 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.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()); } @@ -188,22 +176,21 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + this.AccessToken.GetHashCode(); } - hashCode = (hashCode * 59) + this.ExpiresIn.GetHashCode(); - if (this.IdToken != null) + if (this.AuthorizeCode != null) { - hashCode = (hashCode * 59) + this.IdToken.GetHashCode(); + hashCode = (hashCode * 59) + this.AuthorizeCode.GetHashCode(); } - if (this.RefreshToken != null) + if (this.IdToken != null) { - hashCode = (hashCode * 59) + this.RefreshToken.GetHashCode(); + hashCode = (hashCode * 59) + this.IdToken.GetHashCode(); } - if (this.Scope != null) + if (this.ParContext != null) { - hashCode = (hashCode * 59) + this.Scope.GetHashCode(); + hashCode = (hashCode * 59) + this.ParContext.GetHashCode(); } - if (this.TokenType != null) + if (this.RefreshToken != null) { - hashCode = (hashCode * 59) + this.TokenType.GetHashCode(); + hashCode = (hashCode * 59) + this.RefreshToken.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraLoginRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs similarity index 89% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraLoginRequest.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs index fc24e6d3dd3..d09397544f9 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraLoginRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LoginRequest.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,21 +27,21 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraLoginRequest + /// HydraOAuth2LoginRequest /// - [DataContract(Name = "loginRequest")] - public partial class HydraLoginRequest : IEquatable, IValidatableObject + [DataContract(Name = "oAuth2LoginRequest")] + public partial class HydraOAuth2LoginRequest : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraLoginRequest() + protected HydraOAuth2LoginRequest() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. + /// 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). @@ -51,37 +52,37 @@ protected HydraLoginRequest() /// 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 HydraLoginRequest(string challenge = default(string), HydraOAuth2Client _client = default(HydraOAuth2Client), HydraOpenIDConnectContext oidcContext = default(HydraOpenIDConnectContext), 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 _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)) { // to ensure "challenge" is required (not null) if (challenge == null) { - throw new ArgumentNullException("challenge is a required property for HydraLoginRequest and cannot be 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 HydraLoginRequest and cannot be null"); + throw new ArgumentNullException("_client is a required property for HydraOAuth2LoginRequest and cannot be null"); } this._Client = _client; // to ensure "requestUrl" is required (not null) if (requestUrl == null) { - throw new ArgumentNullException("requestUrl is a required property for HydraLoginRequest and cannot be null"); + throw new ArgumentNullException("requestUrl is a required property for HydraOAuth2LoginRequest and cannot be null"); } this.RequestUrl = requestUrl; // to ensure "requestedAccessTokenAudience" is required (not null) if (requestedAccessTokenAudience == null) { - throw new ArgumentNullException("requestedAccessTokenAudience is a required property for HydraLoginRequest and cannot be null"); + throw new ArgumentNullException("requestedAccessTokenAudience is a required property for HydraOAuth2LoginRequest and cannot be null"); } this.RequestedAccessTokenAudience = requestedAccessTokenAudience; // to ensure "requestedScope" is required (not null) if (requestedScope == null) { - throw new ArgumentNullException("requestedScope is a required property for HydraLoginRequest and cannot be null"); + throw new ArgumentNullException("requestedScope is a required property for HydraOAuth2LoginRequest and cannot be null"); } this.RequestedScope = requestedScope; this.Skip = skip; // to ensure "subject" is required (not null) if (subject == null) { - throw new ArgumentNullException("subject is a required property for HydraLoginRequest and cannot be null"); + throw new ArgumentNullException("subject is a required property for HydraOAuth2LoginRequest and cannot be null"); } this.Subject = subject; this.OidcContext = oidcContext; @@ -106,7 +107,7 @@ protected HydraLoginRequest() /// Gets or Sets OidcContext /// [DataMember(Name = "oidc_context", EmitDefaultValue = false)] - public HydraOpenIDConnectContext OidcContext { get; set; } + public HydraOAuth2ConsentRequestOpenIDConnectContext OidcContext { get; set; } /// /// 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. @@ -161,7 +162,7 @@ protected HydraLoginRequest() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraLoginRequest {\n"); + sb.Append("class HydraOAuth2LoginRequest {\n"); sb.Append(" Challenge: ").Append(Challenge).Append("\n"); sb.Append(" _Client: ").Append(_Client).Append("\n"); sb.Append(" OidcContext: ").Append(OidcContext).Append("\n"); @@ -192,15 +193,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraLoginRequest); + return this.Equals(input as HydraOAuth2LoginRequest); } /// - /// Returns true if HydraLoginRequest instances are equal + /// Returns true if HydraOAuth2LoginRequest instances are equal /// - /// Instance of HydraLoginRequest to be compared + /// Instance of HydraOAuth2LoginRequest to be compared /// Boolean - public bool Equals(HydraLoginRequest input) + public bool Equals(HydraOAuth2LoginRequest input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraLogoutRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs similarity index 89% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraLogoutRequest.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs index 517b7ab92af..0cfe9f460fd 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraLogoutRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2LogoutRequest.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,13 +27,13 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraLogoutRequest + /// HydraOAuth2LogoutRequest /// - [DataContract(Name = "logoutRequest")] - public partial class HydraLogoutRequest : IEquatable, IValidatableObject + [DataContract(Name = "oAuth2LogoutRequest")] + public partial class HydraOAuth2LogoutRequest : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// 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. @@ -40,7 +41,7 @@ public partial class HydraLogoutRequest : IEquatable, IValid /// 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 HydraLogoutRequest(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 _client = default(HydraOAuth2Client), string requestUrl = default(string), bool rpInitiated = default(bool), string sid = default(string), string subject = default(string)) { this.Challenge = challenge; this._Client = _client; @@ -105,7 +106,7 @@ public partial class HydraLogoutRequest : IEquatable, IValid public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraLogoutRequest {\n"); + sb.Append("class HydraOAuth2LogoutRequest {\n"); sb.Append(" Challenge: ").Append(Challenge).Append("\n"); sb.Append(" _Client: ").Append(_Client).Append("\n"); sb.Append(" RequestUrl: ").Append(RequestUrl).Append("\n"); @@ -133,15 +134,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraLogoutRequest); + return this.Equals(input as HydraOAuth2LogoutRequest); } /// - /// Returns true if HydraLogoutRequest instances are equal + /// Returns true if HydraOAuth2LogoutRequest instances are equal /// - /// Instance of HydraLogoutRequest to be compared + /// Instance of HydraOAuth2LogoutRequest to be compared /// Boolean - public bool Equals(HydraLogoutRequest input) + public bool Equals(HydraOAuth2LogoutRequest input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCompletedRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs similarity index 77% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCompletedRequest.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs index db09be3433e..22421270555 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraCompletedRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2RedirectTo.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,37 +27,37 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraCompletedRequest + /// Contains a redirect URL used to complete a login, consent, or logout request. /// - [DataContract(Name = "completedRequest")] - public partial class HydraCompletedRequest : IEquatable, IValidatableObject + [DataContract(Name = "oAuth2RedirectTo")] + public partial class HydraOAuth2RedirectTo : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraCompletedRequest() + protected HydraOAuth2RedirectTo() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// RedirectURL is the URL which you should redirect the user to once the authentication process is completed. (required). - public HydraCompletedRequest(string redirectTo = default(string)) + /// RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. (required). + public HydraOAuth2RedirectTo(string redirectTo = default(string)) { // to ensure "redirectTo" is required (not null) if (redirectTo == null) { - throw new ArgumentNullException("redirectTo is a required property for HydraCompletedRequest and cannot be null"); + throw new ArgumentNullException("redirectTo is a required property for HydraOAuth2RedirectTo and cannot be null"); } this.RedirectTo = redirectTo; this.AdditionalProperties = new Dictionary(); } /// - /// RedirectURL is the URL which you should redirect the user 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. /// - /// RedirectURL is the URL which you should redirect the user 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)] public string RedirectTo { get; set; } @@ -73,7 +74,7 @@ protected HydraCompletedRequest() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraCompletedRequest {\n"); + sb.Append("class HydraOAuth2RedirectTo {\n"); sb.Append(" RedirectTo: ").Append(RedirectTo).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); @@ -96,15 +97,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraCompletedRequest); + return this.Equals(input as HydraOAuth2RedirectTo); } /// - /// Returns true if HydraCompletedRequest instances are equal + /// Returns true if HydraOAuth2RedirectTo instances are equal /// - /// Instance of HydraCompletedRequest to be compared + /// Instance of HydraOAuth2RedirectTo to be compared /// Boolean - public bool Equals(HydraCompletedRequest input) + public bool Equals(HydraOAuth2RedirectTo input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs new file mode 100644 index 00000000000..0e81cf8d0c7 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOAuth2TokenExchange.cs @@ -0,0 +1,226 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 +{ + /// + /// OAuth2 Token Exchange Result + /// + [DataContract(Name = "oAuth2TokenExchange")] + public partial class HydraOAuth2TokenExchange : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The access token issued by the authorization server.. + /// 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.. + /// To retrieve a refresh token request the id_token scope.. + /// The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request.. + /// The scope of the access token. + /// The type of the token issued. + public HydraOAuth2TokenExchange(string accessToken = default(string), long expiresIn = default(long), long idToken = default(long), string refreshToken = default(string), long scope = default(long), string tokenType = default(string)) + { + this.AccessToken = accessToken; + this.ExpiresIn = expiresIn; + this.IdToken = idToken; + this.RefreshToken = refreshToken; + this.Scope = scope; + this.TokenType = tokenType; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// The access token issued by the authorization server. + /// + /// The access token issued by the authorization server. + [DataMember(Name = "access_token", EmitDefaultValue = false)] + public string AccessToken { get; set; } + + /// + /// 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. + /// + /// 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. + [DataMember(Name = "expires_in", EmitDefaultValue = false)] + public long ExpiresIn { get; set; } + + /// + /// To retrieve a refresh token request the id_token scope. + /// + /// To retrieve a refresh token request the id_token scope. + [DataMember(Name = "id_token", EmitDefaultValue = false)] + public long IdToken { get; set; } + + /// + /// The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. + /// + /// The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. + [DataMember(Name = "refresh_token", EmitDefaultValue = false)] + public string RefreshToken { get; set; } + + /// + /// The scope of the access token + /// + /// The scope of the access token + [DataMember(Name = "scope", EmitDefaultValue = false)] + public long Scope { get; set; } + + /// + /// The type of the token issued + /// + /// The type of the token issued + [DataMember(Name = "token_type", EmitDefaultValue = false)] + public string TokenType { 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 HydraOAuth2TokenExchange {\n"); + sb.Append(" AccessToken: ").Append(AccessToken).Append("\n"); + sb.Append(" ExpiresIn: ").Append(ExpiresIn).Append("\n"); + sb.Append(" IdToken: ").Append(IdToken).Append("\n"); + sb.Append(" RefreshToken: ").Append(RefreshToken).Append("\n"); + sb.Append(" Scope: ").Append(Scope).Append("\n"); + sb.Append(" TokenType: ").Append(TokenType).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 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.Equals(input.IdToken) + ) && + ( + this.RefreshToken == input.RefreshToken || + (this.RefreshToken != null && + this.RefreshToken.Equals(input.RefreshToken)) + ) && + ( + this.Scope == input.Scope || + 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(); + hashCode = (hashCode * 59) + this.IdToken.GetHashCode(); + if (this.RefreshToken != null) + { + hashCode = (hashCode * 59) + this.RefreshToken.GetHashCode(); + } + 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) + { + yield break; + } + } + +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraWellKnown.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs similarity index 51% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraWellKnown.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs index d194c07a17e..a4747e7c10f 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraWellKnown.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcConfiguration.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,86 +27,98 @@ namespace Ory.Hydra.Client.Model { /// - /// It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. + /// Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. /// - [DataContract(Name = "wellKnown")] - public partial class HydraWellKnown : IEquatable, IValidatableObject + [DataContract(Name = "oidcConfiguration")] + public partial class HydraOidcConfiguration : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraWellKnown() + protected HydraOidcConfiguration() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. - /// - /// URL of the OP's OAuth 2.0 Authorization Endpoint. (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. - /// Boolean value specifying whether the OP supports back-channel logout, with true indicating support.. - /// Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.. - /// 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.. - /// JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.. - /// URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.. - /// 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.. - /// Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.. - /// JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.. - /// 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. (required). - /// 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. (required). - /// 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. (required). - /// URL of the OP's Dynamic Client Registration Endpoint.. - /// 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).. - /// Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.. - /// Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.. - /// Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter.. - /// JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.. - /// 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. (required). - /// URL of the authorization server's OAuth 2.0 revocation endpoint.. - /// SON 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. - /// JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. (required). - /// URL of the OP's OAuth 2.0 Token Endpoint (required). - /// 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. - /// URL of the OP's UserInfo Endpoint.. - /// 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 HydraWellKnown(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 endSessionEndpoint = default(string), bool frontchannelLogoutSessionSupported = default(bool), bool frontchannelLogoutSupported = default(bool), List grantTypesSupported = 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 userinfoSigningAlgValuesSupported = default(List)) + /// Initializes a new instance of the class. + /// + /// OAuth 2.0 Authorization Endpoint URL (required). + /// 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. + /// OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support.. + /// OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.. + /// 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.. + /// 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.. + /// 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.. + /// 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.. + /// OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.. + /// OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.. + /// OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. (required). + /// 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. (required). + /// 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. (required). + /// 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. (required). + /// OpenID Connect Dynamic Client Registration Endpoint URL. + /// 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).. + /// OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.. + /// OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.. + /// 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.. + /// OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.. + /// 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. (required). + /// OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint.. + /// 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. + /// 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. (required). + /// OAuth 2.0 Token Endpoint URL (required). + /// 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. + /// OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint.. + /// OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. (required). + /// 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 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 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) { - throw new ArgumentNullException("authorizationEndpoint is a required property for HydraWellKnown and cannot be 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) { + 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) { - throw new ArgumentNullException("idTokenSigningAlgValuesSupported is a required property for HydraWellKnown and cannot be 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) { - throw new ArgumentNullException("issuer is a required property for HydraWellKnown and cannot be 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) { - throw new ArgumentNullException("jwksUri is a required property for HydraWellKnown and cannot be 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) { - throw new ArgumentNullException("responseTypesSupported is a required property for HydraWellKnown and cannot be 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) { - throw new ArgumentNullException("subjectTypesSupported is a required property for HydraWellKnown and cannot be 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) { - throw new ArgumentNullException("tokenEndpoint is a required property for HydraWellKnown and cannot be 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) { + throw new ArgumentNullException("userinfoSignedResponseAlg is a required property for HydraOidcConfiguration and cannot be null"); + } + this.UserinfoSignedResponseAlg = userinfoSignedResponseAlg; this.BackchannelLogoutSessionSupported = backchannelLogoutSessionSupported; this.BackchannelLogoutSupported = backchannelLogoutSupported; this.ClaimsParameterSupported = claimsParameterSupported; @@ -130,191 +143,205 @@ protected HydraWellKnown() } /// - /// URL of the OP's OAuth 2.0 Authorization Endpoint. + /// OAuth 2.0 Authorization Endpoint URL /// - /// URL of the OP's OAuth 2.0 Authorization Endpoint. + /// OAuth 2.0 Authorization Endpoint URL [DataMember(Name = "authorization_endpoint", IsRequired = true, EmitDefaultValue = false)] public string AuthorizationEndpoint { get; set; } /// - /// 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 + /// 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 /// - /// 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 + /// 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 [DataMember(Name = "backchannel_logout_session_supported", EmitDefaultValue = true)] public bool BackchannelLogoutSessionSupported { get; set; } /// - /// Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + /// OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. /// - /// Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + /// OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. [DataMember(Name = "backchannel_logout_supported", EmitDefaultValue = true)] public bool BackchannelLogoutSupported { get; set; } /// - /// Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + /// OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. /// - /// Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + /// OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. [DataMember(Name = "claims_parameter_supported", EmitDefaultValue = true)] public bool ClaimsParameterSupported { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. [DataMember(Name = "claims_supported", EmitDefaultValue = false)] public List ClaimsSupported { get; set; } /// - /// JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. + /// 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. /// - /// JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. + /// 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. [DataMember(Name = "code_challenge_methods_supported", EmitDefaultValue = false)] public List CodeChallengeMethodsSupported { get; set; } /// - /// URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + /// 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. /// - /// URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + /// 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. [DataMember(Name = "end_session_endpoint", EmitDefaultValue = false)] public string EndSessionEndpoint { get; set; } /// - /// 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. + /// 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. /// - /// 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. + /// 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. [DataMember(Name = "frontchannel_logout_session_supported", EmitDefaultValue = true)] public bool FrontchannelLogoutSessionSupported { get; set; } /// - /// Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + /// OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. /// - /// Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + /// OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. [DataMember(Name = "frontchannel_logout_supported", EmitDefaultValue = true)] public bool FrontchannelLogoutSupported { get; set; } /// - /// JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + /// OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. /// - /// JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + /// OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. [DataMember(Name = "grant_types_supported", EmitDefaultValue = false)] public List GrantTypesSupported { get; set; } /// - /// 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 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)] + 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. /// - /// 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)] public List IdTokenSigningAlgValuesSupported { get; set; } /// - /// 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. /// - /// 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)] public string Issuer { get; set; } /// - /// 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. /// - /// 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)] public string JwksUri { get; set; } /// - /// URL of the OP's Dynamic Client Registration Endpoint. + /// OpenID Connect Dynamic Client Registration Endpoint URL /// - /// URL of the OP's Dynamic Client Registration Endpoint. + /// OpenID Connect Dynamic Client Registration Endpoint URL [DataMember(Name = "registration_endpoint", EmitDefaultValue = false)] public string RegistrationEndpoint { get; set; } /// - /// 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). + /// 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). /// - /// 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). + /// 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). [DataMember(Name = "request_object_signing_alg_values_supported", EmitDefaultValue = false)] public List RequestObjectSigningAlgValuesSupported { get; set; } /// - /// Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + /// OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. /// - /// Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + /// OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. [DataMember(Name = "request_parameter_supported", EmitDefaultValue = true)] public bool RequestParameterSupported { get; set; } /// - /// Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + /// OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. /// - /// Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + /// OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. [DataMember(Name = "request_uri_parameter_supported", EmitDefaultValue = true)] public bool RequestUriParameterSupported { get; set; } /// - /// Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. + /// 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. /// - /// Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. + /// 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. [DataMember(Name = "require_request_uri_registration", EmitDefaultValue = true)] public bool RequireRequestUriRegistration { get; set; } /// - /// JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + /// OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. /// - /// JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + /// OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. [DataMember(Name = "response_modes_supported", EmitDefaultValue = false)] public List ResponseModesSupported { get; set; } /// - /// 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. /// - /// 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)] public List ResponseTypesSupported { get; set; } /// - /// URL of the authorization server's OAuth 2.0 revocation endpoint. + /// OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. /// - /// URL of the authorization server's OAuth 2.0 revocation endpoint. + /// OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. [DataMember(Name = "revocation_endpoint", EmitDefaultValue = false)] public string RevocationEndpoint { get; set; } /// - /// SON 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 + /// 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 /// - /// SON 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 + /// 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 [DataMember(Name = "scopes_supported", EmitDefaultValue = false)] public List ScopesSupported { get; set; } /// - /// 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. /// - /// 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)] public List SubjectTypesSupported { get; set; } /// - /// URL of the OP's OAuth 2.0 Token Endpoint + /// OAuth 2.0 Token Endpoint URL /// - /// URL of the OP's OAuth 2.0 Token Endpoint + /// OAuth 2.0 Token Endpoint URL [DataMember(Name = "token_endpoint", IsRequired = true, EmitDefaultValue = false)] public string TokenEndpoint { get; set; } /// - /// 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 + /// 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 /// - /// 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 + /// 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 [DataMember(Name = "token_endpoint_auth_methods_supported", EmitDefaultValue = false)] public List TokenEndpointAuthMethodsSupported { get; set; } /// - /// URL of the OP's UserInfo Endpoint. + /// OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. /// - /// URL of the OP's UserInfo Endpoint. + /// OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. [DataMember(Name = "userinfo_endpoint", EmitDefaultValue = false)] public string UserinfoEndpoint { get; set; } /// - /// 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]. + /// 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)] + public List UserinfoSignedResponseAlg { get; set; } + + /// + /// 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]. /// - /// 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]. + /// 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]. [DataMember(Name = "userinfo_signing_alg_values_supported", EmitDefaultValue = false)] public List UserinfoSigningAlgValuesSupported { get; set; } @@ -331,7 +358,7 @@ protected HydraWellKnown() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraWellKnown {\n"); + sb.Append("class HydraOidcConfiguration {\n"); sb.Append(" AuthorizationEndpoint: ").Append(AuthorizationEndpoint).Append("\n"); sb.Append(" BackchannelLogoutSessionSupported: ").Append(BackchannelLogoutSessionSupported).Append("\n"); sb.Append(" BackchannelLogoutSupported: ").Append(BackchannelLogoutSupported).Append("\n"); @@ -342,6 +369,7 @@ public override string ToString() sb.Append(" FrontchannelLogoutSessionSupported: ").Append(FrontchannelLogoutSessionSupported).Append("\n"); sb.Append(" FrontchannelLogoutSupported: ").Append(FrontchannelLogoutSupported).Append("\n"); sb.Append(" GrantTypesSupported: ").Append(GrantTypesSupported).Append("\n"); + sb.Append(" IdTokenSignedResponseAlg: ").Append(IdTokenSignedResponseAlg).Append("\n"); sb.Append(" IdTokenSigningAlgValuesSupported: ").Append(IdTokenSigningAlgValuesSupported).Append("\n"); sb.Append(" Issuer: ").Append(Issuer).Append("\n"); sb.Append(" JwksUri: ").Append(JwksUri).Append("\n"); @@ -358,6 +386,7 @@ public override string ToString() sb.Append(" TokenEndpoint: ").Append(TokenEndpoint).Append("\n"); sb.Append(" TokenEndpointAuthMethodsSupported: ").Append(TokenEndpointAuthMethodsSupported).Append("\n"); sb.Append(" UserinfoEndpoint: ").Append(UserinfoEndpoint).Append("\n"); + sb.Append(" UserinfoSignedResponseAlg: ").Append(UserinfoSignedResponseAlg).Append("\n"); sb.Append(" UserinfoSigningAlgValuesSupported: ").Append(UserinfoSigningAlgValuesSupported).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); @@ -380,15 +409,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraWellKnown); + return this.Equals(input as HydraOidcConfiguration); } /// - /// Returns true if HydraWellKnown instances are equal + /// Returns true if HydraOidcConfiguration instances are equal /// - /// Instance of HydraWellKnown to be compared + /// Instance of HydraOidcConfiguration to be compared /// Boolean - public bool Equals(HydraWellKnown input) + public bool Equals(HydraOidcConfiguration input) { if (input == null) { @@ -443,6 +472,12 @@ public bool Equals(HydraWellKnown input) 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 && @@ -527,6 +562,12 @@ public bool Equals(HydraWellKnown input) (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 && @@ -570,6 +611,10 @@ public override int GetHashCode() { 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(); @@ -625,6 +670,10 @@ public override int GetHashCode() { 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(); diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraUserinfoResponse.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs similarity index 95% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraUserinfoResponse.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs index 9595073c98e..70765b960d9 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraUserinfoResponse.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraOidcUserInfo.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,13 +27,13 @@ namespace Ory.Hydra.Client.Model { /// - /// The userinfo response + /// OpenID Connect Userinfo /// - [DataContract(Name = "userinfoResponse")] - public partial class HydraUserinfoResponse : IEquatable, IValidatableObject + [DataContract(Name = "oidcUserInfo")] + public partial class HydraOidcUserInfo : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// 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.. /// 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.. @@ -53,7 +54,7 @@ public partial class HydraUserinfoResponse : IEquatable, /// 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.. /// 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.. /// String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.. - public HydraUserinfoResponse(string birthdate = default(string), string email = default(string), bool emailVerified = default(bool), string familyName = default(string), string gender = default(string), string givenName = default(string), string locale = default(string), string middleName = default(string), string name = default(string), string nickname = default(string), string phoneNumber = default(string), bool phoneNumberVerified = default(bool), string picture = default(string), string preferredUsername = default(string), string profile = default(string), string sub = default(string), long updatedAt = default(long), string website = default(string), string zoneinfo = default(string)) + public HydraOidcUserInfo(string birthdate = default(string), string email = default(string), bool emailVerified = default(bool), string familyName = default(string), string gender = default(string), string givenName = default(string), string locale = default(string), string middleName = default(string), string name = default(string), string nickname = default(string), string phoneNumber = default(string), bool phoneNumberVerified = default(bool), string picture = default(string), string preferredUsername = default(string), string profile = default(string), string sub = default(string), long updatedAt = default(long), string website = default(string), string zoneinfo = default(string)) { this.Birthdate = birthdate; this.Email = email; @@ -223,7 +224,7 @@ public partial class HydraUserinfoResponse : IEquatable, public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraUserinfoResponse {\n"); + sb.Append("class HydraOidcUserInfo {\n"); sb.Append(" Birthdate: ").Append(Birthdate).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" EmailVerified: ").Append(EmailVerified).Append("\n"); @@ -264,15 +265,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraUserinfoResponse); + return this.Equals(input as HydraOidcUserInfo); } /// - /// Returns true if HydraUserinfoResponse instances are equal + /// Returns true if HydraOidcUserInfo instances are equal /// - /// Instance of HydraUserinfoResponse to be compared + /// Instance of HydraOidcUserInfo to be compared /// Boolean - public bool Equals(HydraUserinfoResponse input) + public bool Equals(HydraOidcUserInfo input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPagination.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPagination.cs new file mode 100644 index 00000000000..b20039e982c --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPagination.cs @@ -0,0 +1,171 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 +{ + /// + /// HydraPagination + /// + [DataContract(Name = "pagination")] + public partial class HydraPagination : IEquatable, 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") + { + this.PageSize = pageSize; + // use default value if no "pageToken" provided + this.PageToken = pageToken ?? "1"; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// 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). + /// + /// 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). + [DataMember(Name = "page_size", EmitDefaultValue = false)] + public long PageSize { get; set; } + + /// + /// 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). + /// + /// 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). + [DataMember(Name = "page_token", EmitDefaultValue = false)] + public string PageToken { 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 HydraPagination {\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" PageToken: ").Append(PageToken).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 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) + { + // 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" }); + } + + // 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 break; + } + } + +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigRootfs.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs similarity index 56% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigRootfs.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs index fe0dad7c41d..872a39fd02d 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigRootfs.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPaginationHeaders.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,36 +27,36 @@ namespace Ory.Hydra.Client.Model { /// - /// PluginConfigRootfs plugin config rootfs + /// HydraPaginationHeaders /// - [DataContract(Name = "PluginConfigRootfs")] - public partial class HydraPluginConfigRootfs : IEquatable, IValidatableObject + [DataContract(Name = "paginationHeaders")] + public partial class HydraPaginationHeaders : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// diff ids. - /// type. - public HydraPluginConfigRootfs(List diffIds = default(List), string type = default(string)) + /// 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. + /// The total number of clients. in: header. + public HydraPaginationHeaders(string link = default(string), string xTotalCount = default(string)) { - this.DiffIds = diffIds; - this.Type = type; + this.Link = link; + this.XTotalCount = xTotalCount; this.AdditionalProperties = new Dictionary(); } /// - /// diff ids + /// 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 /// - /// diff ids - [DataMember(Name = "diff_ids", EmitDefaultValue = false)] - public List DiffIds { get; set; } + /// 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 + [DataMember(Name = "link", EmitDefaultValue = false)] + public string Link { get; set; } /// - /// type + /// The total number of clients. in: header /// - /// type - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } + /// The total number of clients. in: header + [DataMember(Name = "x-total-count", EmitDefaultValue = false)] + public string XTotalCount { get; set; } /// /// Gets or Sets additional properties @@ -70,9 +71,9 @@ public partial class HydraPluginConfigRootfs : IEquatableBoolean public override bool Equals(object input) { - return this.Equals(input as HydraPluginConfigRootfs); + return this.Equals(input as HydraPaginationHeaders); } /// - /// Returns true if HydraPluginConfigRootfs instances are equal + /// Returns true if HydraPaginationHeaders instances are equal /// - /// Instance of HydraPluginConfigRootfs to be compared + /// Instance of HydraPaginationHeaders to be compared /// Boolean - public bool Equals(HydraPluginConfigRootfs input) + public bool Equals(HydraPaginationHeaders input) { if (input == null) { @@ -110,15 +111,14 @@ public bool Equals(HydraPluginConfigRootfs input) } return ( - this.DiffIds == input.DiffIds || - this.DiffIds != null && - input.DiffIds != null && - this.DiffIds.SequenceEqual(input.DiffIds) + this.Link == input.Link || + (this.Link != null && + this.Link.Equals(input.Link)) ) && ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) + this.XTotalCount == input.XTotalCount || + (this.XTotalCount != null && + this.XTotalCount.Equals(input.XTotalCount)) ) && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); } @@ -132,13 +132,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.DiffIds != null) + if (this.Link != null) { - hashCode = (hashCode * 59) + this.DiffIds.GetHashCode(); + hashCode = (hashCode * 59) + this.Link.GetHashCode(); } - if (this.Type != null) + if (this.XTotalCount != null) { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); + hashCode = (hashCode * 59) + this.XTotalCount.GetHashCode(); } if (this.AdditionalProperties != null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfig.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfig.cs deleted file mode 100644 index 83717d818ff..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfig.cs +++ /dev/null @@ -1,468 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// HydraPluginConfig - /// - [DataContract(Name = "PluginConfig")] - public partial class HydraPluginConfig : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraPluginConfig() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// args (required). - /// description (required). - /// Docker Version used to create the plugin. - /// documentation (required). - /// entrypoint (required). - /// env (required). - /// _interface (required). - /// ipc host (required). - /// linux (required). - /// mounts (required). - /// network (required). - /// pid host (required). - /// propagated mount (required). - /// user. - /// work dir (required). - /// rootfs. - public HydraPluginConfig(HydraPluginConfigArgs args = default(HydraPluginConfigArgs), string description = default(string), string dockerVersion = default(string), string documentation = default(string), List entrypoint = default(List), List env = default(List), HydraPluginConfigInterface _interface = default(HydraPluginConfigInterface), bool ipcHost = default(bool), HydraPluginConfigLinux linux = default(HydraPluginConfigLinux), List mounts = default(List), HydraPluginConfigNetwork network = default(HydraPluginConfigNetwork), bool pidHost = default(bool), string propagatedMount = default(string), HydraPluginConfigUser user = default(HydraPluginConfigUser), string workDir = default(string), HydraPluginConfigRootfs rootfs = default(HydraPluginConfigRootfs)) - { - // to ensure "args" is required (not null) - if (args == null) { - throw new ArgumentNullException("args is a required property for HydraPluginConfig and cannot be null"); - } - this.Args = args; - // to ensure "description" is required (not null) - if (description == null) { - throw new ArgumentNullException("description is a required property for HydraPluginConfig and cannot be null"); - } - this.Description = description; - // to ensure "documentation" is required (not null) - if (documentation == null) { - throw new ArgumentNullException("documentation is a required property for HydraPluginConfig and cannot be null"); - } - this.Documentation = documentation; - // to ensure "entrypoint" is required (not null) - if (entrypoint == null) { - throw new ArgumentNullException("entrypoint is a required property for HydraPluginConfig and cannot be null"); - } - this.Entrypoint = entrypoint; - // to ensure "env" is required (not null) - if (env == null) { - throw new ArgumentNullException("env is a required property for HydraPluginConfig and cannot be null"); - } - this.Env = env; - // to ensure "_interface" is required (not null) - if (_interface == null) { - throw new ArgumentNullException("_interface is a required property for HydraPluginConfig and cannot be null"); - } - this.Interface = _interface; - this.IpcHost = ipcHost; - // to ensure "linux" is required (not null) - if (linux == null) { - throw new ArgumentNullException("linux is a required property for HydraPluginConfig and cannot be null"); - } - this.Linux = linux; - // to ensure "mounts" is required (not null) - if (mounts == null) { - throw new ArgumentNullException("mounts is a required property for HydraPluginConfig and cannot be null"); - } - this.Mounts = mounts; - // to ensure "network" is required (not null) - if (network == null) { - throw new ArgumentNullException("network is a required property for HydraPluginConfig and cannot be null"); - } - this.Network = network; - this.PidHost = pidHost; - // to ensure "propagatedMount" is required (not null) - if (propagatedMount == null) { - throw new ArgumentNullException("propagatedMount is a required property for HydraPluginConfig and cannot be null"); - } - this.PropagatedMount = propagatedMount; - // to ensure "workDir" is required (not null) - if (workDir == null) { - throw new ArgumentNullException("workDir is a required property for HydraPluginConfig and cannot be null"); - } - this.WorkDir = workDir; - this.DockerVersion = dockerVersion; - this.User = user; - this.Rootfs = rootfs; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Gets or Sets Args - /// - [DataMember(Name = "Args", IsRequired = true, EmitDefaultValue = false)] - public HydraPluginConfigArgs Args { get; set; } - - /// - /// description - /// - /// description - [DataMember(Name = "Description", IsRequired = true, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Docker Version used to create the plugin - /// - /// Docker Version used to create the plugin - [DataMember(Name = "DockerVersion", EmitDefaultValue = false)] - public string DockerVersion { get; set; } - - /// - /// documentation - /// - /// documentation - [DataMember(Name = "Documentation", IsRequired = true, EmitDefaultValue = false)] - public string Documentation { get; set; } - - /// - /// entrypoint - /// - /// entrypoint - [DataMember(Name = "Entrypoint", IsRequired = true, EmitDefaultValue = false)] - public List Entrypoint { get; set; } - - /// - /// env - /// - /// env - [DataMember(Name = "Env", IsRequired = true, EmitDefaultValue = false)] - public List Env { get; set; } - - /// - /// Gets or Sets Interface - /// - [DataMember(Name = "Interface", IsRequired = true, EmitDefaultValue = false)] - public HydraPluginConfigInterface Interface { get; set; } - - /// - /// ipc host - /// - /// ipc host - [DataMember(Name = "IpcHost", IsRequired = true, EmitDefaultValue = true)] - public bool IpcHost { get; set; } - - /// - /// Gets or Sets Linux - /// - [DataMember(Name = "Linux", IsRequired = true, EmitDefaultValue = false)] - public HydraPluginConfigLinux Linux { get; set; } - - /// - /// mounts - /// - /// mounts - [DataMember(Name = "Mounts", IsRequired = true, EmitDefaultValue = false)] - public List Mounts { get; set; } - - /// - /// Gets or Sets Network - /// - [DataMember(Name = "Network", IsRequired = true, EmitDefaultValue = false)] - public HydraPluginConfigNetwork Network { get; set; } - - /// - /// pid host - /// - /// pid host - [DataMember(Name = "PidHost", IsRequired = true, EmitDefaultValue = true)] - public bool PidHost { get; set; } - - /// - /// propagated mount - /// - /// propagated mount - [DataMember(Name = "PropagatedMount", IsRequired = true, EmitDefaultValue = false)] - public string PropagatedMount { get; set; } - - /// - /// Gets or Sets User - /// - [DataMember(Name = "User", EmitDefaultValue = false)] - public HydraPluginConfigUser User { get; set; } - - /// - /// work dir - /// - /// work dir - [DataMember(Name = "WorkDir", IsRequired = true, EmitDefaultValue = false)] - public string WorkDir { get; set; } - - /// - /// Gets or Sets Rootfs - /// - [DataMember(Name = "rootfs", EmitDefaultValue = false)] - public HydraPluginConfigRootfs Rootfs { 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 HydraPluginConfig {\n"); - sb.Append(" Args: ").Append(Args).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DockerVersion: ").Append(DockerVersion).Append("\n"); - sb.Append(" Documentation: ").Append(Documentation).Append("\n"); - sb.Append(" Entrypoint: ").Append(Entrypoint).Append("\n"); - sb.Append(" Env: ").Append(Env).Append("\n"); - sb.Append(" Interface: ").Append(Interface).Append("\n"); - sb.Append(" IpcHost: ").Append(IpcHost).Append("\n"); - sb.Append(" Linux: ").Append(Linux).Append("\n"); - sb.Append(" Mounts: ").Append(Mounts).Append("\n"); - sb.Append(" Network: ").Append(Network).Append("\n"); - sb.Append(" PidHost: ").Append(PidHost).Append("\n"); - sb.Append(" PropagatedMount: ").Append(PropagatedMount).Append("\n"); - sb.Append(" User: ").Append(User).Append("\n"); - sb.Append(" WorkDir: ").Append(WorkDir).Append("\n"); - sb.Append(" Rootfs: ").Append(Rootfs).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 HydraPluginConfig); - } - - /// - /// Returns true if HydraPluginConfig instances are equal - /// - /// Instance of HydraPluginConfig to be compared - /// Boolean - public bool Equals(HydraPluginConfig input) - { - if (input == null) - { - return false; - } - return - ( - this.Args == input.Args || - (this.Args != null && - this.Args.Equals(input.Args)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DockerVersion == input.DockerVersion || - (this.DockerVersion != null && - this.DockerVersion.Equals(input.DockerVersion)) - ) && - ( - this.Documentation == input.Documentation || - (this.Documentation != null && - this.Documentation.Equals(input.Documentation)) - ) && - ( - this.Entrypoint == input.Entrypoint || - this.Entrypoint != null && - input.Entrypoint != null && - this.Entrypoint.SequenceEqual(input.Entrypoint) - ) && - ( - this.Env == input.Env || - this.Env != null && - input.Env != null && - this.Env.SequenceEqual(input.Env) - ) && - ( - this.Interface == input.Interface || - (this.Interface != null && - this.Interface.Equals(input.Interface)) - ) && - ( - this.IpcHost == input.IpcHost || - this.IpcHost.Equals(input.IpcHost) - ) && - ( - this.Linux == input.Linux || - (this.Linux != null && - this.Linux.Equals(input.Linux)) - ) && - ( - this.Mounts == input.Mounts || - this.Mounts != null && - input.Mounts != null && - this.Mounts.SequenceEqual(input.Mounts) - ) && - ( - this.Network == input.Network || - (this.Network != null && - this.Network.Equals(input.Network)) - ) && - ( - this.PidHost == input.PidHost || - this.PidHost.Equals(input.PidHost) - ) && - ( - this.PropagatedMount == input.PropagatedMount || - (this.PropagatedMount != null && - this.PropagatedMount.Equals(input.PropagatedMount)) - ) && - ( - this.User == input.User || - (this.User != null && - this.User.Equals(input.User)) - ) && - ( - this.WorkDir == input.WorkDir || - (this.WorkDir != null && - this.WorkDir.Equals(input.WorkDir)) - ) && - ( - this.Rootfs == input.Rootfs || - (this.Rootfs != null && - this.Rootfs.Equals(input.Rootfs)) - ) - && (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.Args != null) - { - hashCode = (hashCode * 59) + this.Args.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DockerVersion != null) - { - hashCode = (hashCode * 59) + this.DockerVersion.GetHashCode(); - } - if (this.Documentation != null) - { - hashCode = (hashCode * 59) + this.Documentation.GetHashCode(); - } - if (this.Entrypoint != null) - { - hashCode = (hashCode * 59) + this.Entrypoint.GetHashCode(); - } - if (this.Env != null) - { - hashCode = (hashCode * 59) + this.Env.GetHashCode(); - } - if (this.Interface != null) - { - hashCode = (hashCode * 59) + this.Interface.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IpcHost.GetHashCode(); - if (this.Linux != null) - { - hashCode = (hashCode * 59) + this.Linux.GetHashCode(); - } - if (this.Mounts != null) - { - hashCode = (hashCode * 59) + this.Mounts.GetHashCode(); - } - if (this.Network != null) - { - hashCode = (hashCode * 59) + this.Network.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PidHost.GetHashCode(); - if (this.PropagatedMount != null) - { - hashCode = (hashCode * 59) + this.PropagatedMount.GetHashCode(); - } - if (this.User != null) - { - hashCode = (hashCode * 59) + this.User.GetHashCode(); - } - if (this.WorkDir != null) - { - hashCode = (hashCode * 59) + this.WorkDir.GetHashCode(); - } - if (this.Rootfs != null) - { - hashCode = (hashCode * 59) + this.Rootfs.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/HydraPluginConfigArgs.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigArgs.cs deleted file mode 100644 index f8a5a44c5d7..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigArgs.cs +++ /dev/null @@ -1,225 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// PluginConfigArgs plugin config args - /// - [DataContract(Name = "PluginConfigArgs")] - public partial class HydraPluginConfigArgs : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraPluginConfigArgs() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// description (required). - /// name (required). - /// settable (required). - /// value (required). - public HydraPluginConfigArgs(string description = default(string), string name = default(string), List settable = default(List), List value = default(List)) - { - // to ensure "description" is required (not null) - if (description == null) { - throw new ArgumentNullException("description is a required property for HydraPluginConfigArgs and cannot be null"); - } - this.Description = description; - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for HydraPluginConfigArgs and cannot be null"); - } - this.Name = name; - // to ensure "settable" is required (not null) - if (settable == null) { - throw new ArgumentNullException("settable is a required property for HydraPluginConfigArgs and cannot be null"); - } - this.Settable = settable; - // to ensure "value" is required (not null) - if (value == null) { - throw new ArgumentNullException("value is a required property for HydraPluginConfigArgs and cannot be null"); - } - this.Value = value; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// description - /// - /// description - [DataMember(Name = "Description", IsRequired = true, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// name - /// - /// name - [DataMember(Name = "Name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// settable - /// - /// settable - [DataMember(Name = "Settable", IsRequired = true, EmitDefaultValue = false)] - public List Settable { get; set; } - - /// - /// value - /// - /// value - [DataMember(Name = "Value", IsRequired = true, EmitDefaultValue = false)] - public List Value { 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 HydraPluginConfigArgs {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Settable: ").Append(Settable).Append("\n"); - sb.Append(" Value: ").Append(Value).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 HydraPluginConfigArgs); - } - - /// - /// Returns true if HydraPluginConfigArgs instances are equal - /// - /// Instance of HydraPluginConfigArgs to be compared - /// Boolean - public bool Equals(HydraPluginConfigArgs input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Settable == input.Settable || - this.Settable != null && - input.Settable != null && - this.Settable.SequenceEqual(input.Settable) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(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.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Settable != null) - { - hashCode = (hashCode * 59) + this.Settable.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) - { - yield break; - } - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigInterface.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigInterface.cs deleted file mode 100644 index 63cb76607c6..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigInterface.cs +++ /dev/null @@ -1,197 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// PluginConfigInterface The interface between Docker and the plugin - /// - [DataContract(Name = "PluginConfigInterface")] - public partial class HydraPluginConfigInterface : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraPluginConfigInterface() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// Protocol to use for clients connecting to the plugin.. - /// socket (required). - /// types (required). - public HydraPluginConfigInterface(string protocolScheme = default(string), string socket = default(string), List types = default(List)) - { - // to ensure "socket" is required (not null) - if (socket == null) { - throw new ArgumentNullException("socket is a required property for HydraPluginConfigInterface and cannot be null"); - } - this.Socket = socket; - // to ensure "types" is required (not null) - if (types == null) { - throw new ArgumentNullException("types is a required property for HydraPluginConfigInterface and cannot be null"); - } - this.Types = types; - this.ProtocolScheme = protocolScheme; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Protocol to use for clients connecting to the plugin. - /// - /// Protocol to use for clients connecting to the plugin. - [DataMember(Name = "ProtocolScheme", EmitDefaultValue = false)] - public string ProtocolScheme { get; set; } - - /// - /// socket - /// - /// socket - [DataMember(Name = "Socket", IsRequired = true, EmitDefaultValue = false)] - public string Socket { get; set; } - - /// - /// types - /// - /// types - [DataMember(Name = "Types", IsRequired = true, EmitDefaultValue = false)] - public List Types { 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 HydraPluginConfigInterface {\n"); - sb.Append(" ProtocolScheme: ").Append(ProtocolScheme).Append("\n"); - sb.Append(" Socket: ").Append(Socket).Append("\n"); - sb.Append(" Types: ").Append(Types).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 HydraPluginConfigInterface); - } - - /// - /// Returns true if HydraPluginConfigInterface instances are equal - /// - /// Instance of HydraPluginConfigInterface to be compared - /// Boolean - public bool Equals(HydraPluginConfigInterface input) - { - if (input == null) - { - return false; - } - return - ( - this.ProtocolScheme == input.ProtocolScheme || - (this.ProtocolScheme != null && - this.ProtocolScheme.Equals(input.ProtocolScheme)) - ) && - ( - this.Socket == input.Socket || - (this.Socket != null && - this.Socket.Equals(input.Socket)) - ) && - ( - 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.ProtocolScheme != null) - { - hashCode = (hashCode * 59) + this.ProtocolScheme.GetHashCode(); - } - if (this.Socket != null) - { - hashCode = (hashCode * 59) + this.Socket.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) - { - yield break; - } - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigLinux.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigLinux.cs deleted file mode 100644 index d5660eb14b5..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginConfigLinux.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// PluginConfigLinux plugin config linux - /// - [DataContract(Name = "PluginConfigLinux")] - public partial class HydraPluginConfigLinux : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraPluginConfigLinux() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// allow all devices (required). - /// capabilities (required). - /// devices (required). - public HydraPluginConfigLinux(bool allowAllDevices = default(bool), List capabilities = default(List), List devices = default(List)) - { - this.AllowAllDevices = allowAllDevices; - // to ensure "capabilities" is required (not null) - if (capabilities == null) { - throw new ArgumentNullException("capabilities is a required property for HydraPluginConfigLinux and cannot be null"); - } - this.Capabilities = capabilities; - // to ensure "devices" is required (not null) - if (devices == null) { - throw new ArgumentNullException("devices is a required property for HydraPluginConfigLinux and cannot be null"); - } - this.Devices = devices; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// allow all devices - /// - /// allow all devices - [DataMember(Name = "AllowAllDevices", IsRequired = true, EmitDefaultValue = true)] - public bool AllowAllDevices { get; set; } - - /// - /// capabilities - /// - /// capabilities - [DataMember(Name = "Capabilities", IsRequired = true, EmitDefaultValue = false)] - public List Capabilities { get; set; } - - /// - /// devices - /// - /// devices - [DataMember(Name = "Devices", IsRequired = true, EmitDefaultValue = false)] - public List Devices { 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 HydraPluginConfigLinux {\n"); - sb.Append(" AllowAllDevices: ").Append(AllowAllDevices).Append("\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" Devices: ").Append(Devices).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 HydraPluginConfigLinux); - } - - /// - /// Returns true if HydraPluginConfigLinux instances are equal - /// - /// Instance of HydraPluginConfigLinux to be compared - /// Boolean - public bool Equals(HydraPluginConfigLinux input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowAllDevices == input.AllowAllDevices || - this.AllowAllDevices.Equals(input.AllowAllDevices) - ) && - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.Devices == input.Devices || - this.Devices != null && - input.Devices != null && - this.Devices.SequenceEqual(input.Devices) - ) - && (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.AllowAllDevices.GetHashCode(); - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.Devices != null) - { - hashCode = (hashCode * 59) + this.Devices.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/HydraPluginDevice.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginDevice.cs deleted file mode 100644 index e2e74104a57..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginDevice.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// PluginDevice plugin device - /// - [DataContract(Name = "PluginDevice")] - public partial class HydraPluginDevice : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraPluginDevice() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// description (required). - /// name (required). - /// path (required). - /// settable (required). - public HydraPluginDevice(string description = default(string), string name = default(string), string path = default(string), List settable = default(List)) - { - // to ensure "description" is required (not null) - if (description == null) { - throw new ArgumentNullException("description is a required property for HydraPluginDevice and cannot be null"); - } - this.Description = description; - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for HydraPluginDevice and cannot be null"); - } - this.Name = name; - // to ensure "path" is required (not null) - if (path == null) { - throw new ArgumentNullException("path is a required property for HydraPluginDevice and cannot be null"); - } - this.Path = path; - // to ensure "settable" is required (not null) - if (settable == null) { - throw new ArgumentNullException("settable is a required property for HydraPluginDevice and cannot be null"); - } - this.Settable = settable; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// description - /// - /// description - [DataMember(Name = "Description", IsRequired = true, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// name - /// - /// name - [DataMember(Name = "Name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// path - /// - /// path - [DataMember(Name = "Path", IsRequired = true, EmitDefaultValue = false)] - public string Path { get; set; } - - /// - /// settable - /// - /// settable - [DataMember(Name = "Settable", IsRequired = true, EmitDefaultValue = false)] - public List Settable { 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 HydraPluginDevice {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Path: ").Append(Path).Append("\n"); - sb.Append(" Settable: ").Append(Settable).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 HydraPluginDevice); - } - - /// - /// Returns true if HydraPluginDevice instances are equal - /// - /// Instance of HydraPluginDevice to be compared - /// Boolean - public bool Equals(HydraPluginDevice input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Path == input.Path || - (this.Path != null && - this.Path.Equals(input.Path)) - ) && - ( - this.Settable == input.Settable || - this.Settable != null && - input.Settable != null && - this.Settable.SequenceEqual(input.Settable) - ) - && (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.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Path != null) - { - hashCode = (hashCode * 59) + this.Path.GetHashCode(); - } - if (this.Settable != null) - { - hashCode = (hashCode * 59) + this.Settable.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/HydraPluginEnv.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginEnv.cs deleted file mode 100644 index 5b7b75d1a9f..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginEnv.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// PluginEnv plugin env - /// - [DataContract(Name = "PluginEnv")] - public partial class HydraPluginEnv : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraPluginEnv() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// description (required). - /// name (required). - /// settable (required). - /// value (required). - public HydraPluginEnv(string description = default(string), string name = default(string), List settable = default(List), string value = default(string)) - { - // to ensure "description" is required (not null) - if (description == null) { - throw new ArgumentNullException("description is a required property for HydraPluginEnv and cannot be null"); - } - this.Description = description; - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for HydraPluginEnv and cannot be null"); - } - this.Name = name; - // to ensure "settable" is required (not null) - if (settable == null) { - throw new ArgumentNullException("settable is a required property for HydraPluginEnv and cannot be null"); - } - this.Settable = settable; - // to ensure "value" is required (not null) - if (value == null) { - throw new ArgumentNullException("value is a required property for HydraPluginEnv and cannot be null"); - } - this.Value = value; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// description - /// - /// description - [DataMember(Name = "Description", IsRequired = true, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// name - /// - /// name - [DataMember(Name = "Name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// settable - /// - /// settable - [DataMember(Name = "Settable", IsRequired = true, EmitDefaultValue = false)] - public List Settable { get; set; } - - /// - /// value - /// - /// value - [DataMember(Name = "Value", IsRequired = true, EmitDefaultValue = false)] - public string Value { 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 HydraPluginEnv {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Settable: ").Append(Settable).Append("\n"); - sb.Append(" Value: ").Append(Value).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 HydraPluginEnv); - } - - /// - /// Returns true if HydraPluginEnv instances are equal - /// - /// Instance of HydraPluginEnv to be compared - /// Boolean - public bool Equals(HydraPluginEnv input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Settable == input.Settable || - this.Settable != null && - input.Settable != null && - this.Settable.SequenceEqual(input.Settable) - ) && - ( - 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.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Settable != null) - { - hashCode = (hashCode * 59) + this.Settable.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) - { - yield break; - } - } - -} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginInterfaceType.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginInterfaceType.cs deleted file mode 100644 index a2108bd2875..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginInterfaceType.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// PluginInterfaceType plugin interface type - /// - [DataContract(Name = "PluginInterfaceType")] - public partial class HydraPluginInterfaceType : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraPluginInterfaceType() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// capability (required). - /// prefix (required). - /// version (required). - public HydraPluginInterfaceType(string capability = default(string), string prefix = default(string), string version = default(string)) - { - // to ensure "capability" is required (not null) - if (capability == null) { - throw new ArgumentNullException("capability is a required property for HydraPluginInterfaceType and cannot be null"); - } - this.Capability = capability; - // to ensure "prefix" is required (not null) - if (prefix == null) { - throw new ArgumentNullException("prefix is a required property for HydraPluginInterfaceType and cannot be null"); - } - this.Prefix = prefix; - // to ensure "version" is required (not null) - if (version == null) { - throw new ArgumentNullException("version is a required property for HydraPluginInterfaceType and cannot be null"); - } - this._Version = version; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// capability - /// - /// capability - [DataMember(Name = "Capability", IsRequired = true, EmitDefaultValue = false)] - public string Capability { get; set; } - - /// - /// prefix - /// - /// prefix - [DataMember(Name = "Prefix", IsRequired = true, EmitDefaultValue = false)] - public string Prefix { get; set; } - - /// - /// version - /// - /// version - [DataMember(Name = "Version", IsRequired = true, 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 HydraPluginInterfaceType {\n"); - sb.Append(" Capability: ").Append(Capability).Append("\n"); - sb.Append(" Prefix: ").Append(Prefix).Append("\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 HydraPluginInterfaceType); - } - - /// - /// Returns true if HydraPluginInterfaceType instances are equal - /// - /// Instance of HydraPluginInterfaceType to be compared - /// Boolean - public bool Equals(HydraPluginInterfaceType input) - { - if (input == null) - { - return false; - } - return - ( - this.Capability == input.Capability || - (this.Capability != null && - this.Capability.Equals(input.Capability)) - ) && - ( - this.Prefix == input.Prefix || - (this.Prefix != null && - this.Prefix.Equals(input.Prefix)) - ) && - ( - 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.Capability != null) - { - hashCode = (hashCode * 59) + this.Capability.GetHashCode(); - } - if (this.Prefix != null) - { - hashCode = (hashCode * 59) + this.Prefix.GetHashCode(); - } - 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/HydraPluginMount.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginMount.cs deleted file mode 100644 index e84e5cbd0cd..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginMount.cs +++ /dev/null @@ -1,294 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// PluginMount plugin mount - /// - [DataContract(Name = "PluginMount")] - public partial class HydraPluginMount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraPluginMount() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// description (required). - /// destination (required). - /// name (required). - /// options (required). - /// settable (required). - /// source (required). - /// type (required). - public HydraPluginMount(string description = default(string), string destination = default(string), string name = default(string), List options = default(List), List settable = default(List), string source = default(string), string type = default(string)) - { - // to ensure "description" is required (not null) - if (description == null) { - throw new ArgumentNullException("description is a required property for HydraPluginMount and cannot be null"); - } - this.Description = description; - // to ensure "destination" is required (not null) - if (destination == null) { - throw new ArgumentNullException("destination is a required property for HydraPluginMount and cannot be null"); - } - this.Destination = destination; - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for HydraPluginMount and cannot be null"); - } - this.Name = name; - // to ensure "options" is required (not null) - if (options == null) { - throw new ArgumentNullException("options is a required property for HydraPluginMount and cannot be null"); - } - this.Options = options; - // to ensure "settable" is required (not null) - if (settable == null) { - throw new ArgumentNullException("settable is a required property for HydraPluginMount and cannot be null"); - } - this.Settable = settable; - // to ensure "source" is required (not null) - if (source == null) { - throw new ArgumentNullException("source is a required property for HydraPluginMount and cannot be null"); - } - this.Source = source; - // to ensure "type" is required (not null) - if (type == null) { - throw new ArgumentNullException("type is a required property for HydraPluginMount and cannot be null"); - } - this.Type = type; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// description - /// - /// description - [DataMember(Name = "Description", IsRequired = true, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// destination - /// - /// destination - [DataMember(Name = "Destination", IsRequired = true, EmitDefaultValue = false)] - public string Destination { get; set; } - - /// - /// name - /// - /// name - [DataMember(Name = "Name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// options - /// - /// options - [DataMember(Name = "Options", IsRequired = true, EmitDefaultValue = false)] - public List Options { get; set; } - - /// - /// settable - /// - /// settable - [DataMember(Name = "Settable", IsRequired = true, EmitDefaultValue = false)] - public List Settable { get; set; } - - /// - /// source - /// - /// source - [DataMember(Name = "Source", IsRequired = true, EmitDefaultValue = false)] - public string Source { get; set; } - - /// - /// type - /// - /// type - [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = false)] - public string Type { 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 HydraPluginMount {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Destination: ").Append(Destination).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Options: ").Append(Options).Append("\n"); - sb.Append(" Settable: ").Append(Settable).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Type: ").Append(Type).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 HydraPluginMount); - } - - /// - /// Returns true if HydraPluginMount instances are equal - /// - /// Instance of HydraPluginMount to be compared - /// Boolean - public bool Equals(HydraPluginMount input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Destination == input.Destination || - (this.Destination != null && - this.Destination.Equals(input.Destination)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Options == input.Options || - this.Options != null && - input.Options != null && - this.Options.SequenceEqual(input.Options) - ) && - ( - this.Settable == input.Settable || - this.Settable != null && - input.Settable != null && - this.Settable.SequenceEqual(input.Settable) - ) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) - && (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.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Destination != null) - { - hashCode = (hashCode * 59) + this.Destination.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Options != null) - { - hashCode = (hashCode * 59) + this.Options.GetHashCode(); - } - if (this.Settable != null) - { - hashCode = (hashCode * 59) + this.Settable.GetHashCode(); - } - if (this.Source != null) - { - hashCode = (hashCode * 59) + this.Source.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.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/HydraPluginSettings.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginSettings.cs deleted file mode 100644 index 3e418e63138..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraPluginSettings.cs +++ /dev/null @@ -1,227 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// HydraPluginSettings - /// - [DataContract(Name = "PluginSettings")] - public partial class HydraPluginSettings : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraPluginSettings() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// args (required). - /// devices (required). - /// env (required). - /// mounts (required). - public HydraPluginSettings(List args = default(List), List devices = default(List), List env = default(List), List mounts = default(List)) - { - // to ensure "args" is required (not null) - if (args == null) { - throw new ArgumentNullException("args is a required property for HydraPluginSettings and cannot be null"); - } - this.Args = args; - // to ensure "devices" is required (not null) - if (devices == null) { - throw new ArgumentNullException("devices is a required property for HydraPluginSettings and cannot be null"); - } - this.Devices = devices; - // to ensure "env" is required (not null) - if (env == null) { - throw new ArgumentNullException("env is a required property for HydraPluginSettings and cannot be null"); - } - this.Env = env; - // to ensure "mounts" is required (not null) - if (mounts == null) { - throw new ArgumentNullException("mounts is a required property for HydraPluginSettings and cannot be null"); - } - this.Mounts = mounts; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// args - /// - /// args - [DataMember(Name = "Args", IsRequired = true, EmitDefaultValue = false)] - public List Args { get; set; } - - /// - /// devices - /// - /// devices - [DataMember(Name = "Devices", IsRequired = true, EmitDefaultValue = false)] - public List Devices { get; set; } - - /// - /// env - /// - /// env - [DataMember(Name = "Env", IsRequired = true, EmitDefaultValue = false)] - public List Env { get; set; } - - /// - /// mounts - /// - /// mounts - [DataMember(Name = "Mounts", IsRequired = true, EmitDefaultValue = false)] - public List Mounts { 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 HydraPluginSettings {\n"); - sb.Append(" Args: ").Append(Args).Append("\n"); - sb.Append(" Devices: ").Append(Devices).Append("\n"); - sb.Append(" Env: ").Append(Env).Append("\n"); - sb.Append(" Mounts: ").Append(Mounts).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 HydraPluginSettings); - } - - /// - /// Returns true if HydraPluginSettings instances are equal - /// - /// Instance of HydraPluginSettings to be compared - /// Boolean - public bool Equals(HydraPluginSettings input) - { - if (input == null) - { - return false; - } - return - ( - this.Args == input.Args || - this.Args != null && - input.Args != null && - this.Args.SequenceEqual(input.Args) - ) && - ( - this.Devices == input.Devices || - this.Devices != null && - input.Devices != null && - this.Devices.SequenceEqual(input.Devices) - ) && - ( - this.Env == input.Env || - this.Env != null && - input.Env != null && - this.Env.SequenceEqual(input.Env) - ) && - ( - this.Mounts == input.Mounts || - this.Mounts != null && - input.Mounts != null && - this.Mounts.SequenceEqual(input.Mounts) - ) - && (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.Args != null) - { - hashCode = (hashCode * 59) + this.Args.GetHashCode(); - } - if (this.Devices != null) - { - hashCode = (hashCode * 59) + this.Devices.GetHashCode(); - } - if (this.Env != null) - { - hashCode = (hashCode * 59) + this.Env.GetHashCode(); - } - if (this.Mounts != null) - { - hashCode = (hashCode * 59) + this.Mounts.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/HydraRejectRequest.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs similarity index 89% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRejectRequest.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs index 4883caf573b..9c93f8078ad 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRejectRequest.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRejectOAuth2Request.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,20 +27,20 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraRejectRequest + /// HydraRejectOAuth2Request /// - [DataContract(Name = "rejectRequest")] - public partial class HydraRejectRequest : IEquatable, IValidatableObject + [DataContract(Name = "rejectOAuth2Request")] + public partial class HydraRejectOAuth2Request : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`.. /// Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs.. /// Description of the error in a human readable format.. /// Hint to help resolve the error.. /// Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400. - public HydraRejectRequest(string error = default(string), string errorDebug = default(string), string errorDescription = default(string), string errorHint = default(string), long statusCode = default(long)) + public HydraRejectOAuth2Request(string error = default(string), string errorDebug = default(string), string errorDescription = default(string), string errorHint = default(string), long statusCode = default(long)) { this.Error = error; this.ErrorDebug = errorDebug; @@ -97,7 +98,7 @@ public partial class HydraRejectRequest : IEquatable, IValid public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraRejectRequest {\n"); + sb.Append("class HydraRejectOAuth2Request {\n"); sb.Append(" Error: ").Append(Error).Append("\n"); sb.Append(" ErrorDebug: ").Append(ErrorDebug).Append("\n"); sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); @@ -124,15 +125,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraRejectRequest); + return this.Equals(input as HydraRejectOAuth2Request); } /// - /// Returns true if HydraRejectRequest instances are equal + /// Returns true if HydraRejectOAuth2Request instances are equal /// - /// Instance of HydraRejectRequest to be compared + /// Instance of HydraRejectOAuth2Request to be compared /// Boolean - public bool Equals(HydraRejectRequest input) + public bool Equals(HydraRejectOAuth2Request input) { if (input == null) { diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRequestWasHandledResponse.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRequestWasHandledResponse.cs deleted file mode 100644 index 427f9e9fdc1..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraRequestWasHandledResponse.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// HydraRequestWasHandledResponse - /// - [DataContract(Name = "requestWasHandledResponse")] - public partial class HydraRequestWasHandledResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraRequestWasHandledResponse() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// Original request URL to which you should redirect the user if request was already handled. (required). - public HydraRequestWasHandledResponse(string redirectTo = default(string)) - { - // to ensure "redirectTo" is required (not null) - if (redirectTo == null) { - throw new ArgumentNullException("redirectTo is a required property for HydraRequestWasHandledResponse and cannot be null"); - } - this.RedirectTo = redirectTo; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Original request URL to which you should redirect the user if request was already handled. - /// - /// Original request URL to which you should redirect the user if request was already handled. - [DataMember(Name = "redirect_to", IsRequired = true, EmitDefaultValue = false)] - public string RedirectTo { 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 HydraRequestWasHandledResponse {\n"); - sb.Append(" RedirectTo: ").Append(RedirectTo).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 HydraRequestWasHandledResponse); - } - - /// - /// Returns true if HydraRequestWasHandledResponse instances are equal - /// - /// Instance of HydraRequestWasHandledResponse to be compared - /// Boolean - public bool Equals(HydraRequestWasHandledResponse 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) - { - 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 new file mode 100644 index 00000000000..3d3b3c3722d --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPagination.cs @@ -0,0 +1,171 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 +{ + /// + /// HydraTokenPagination + /// + [DataContract(Name = "tokenPagination")] + public partial class HydraTokenPagination : IEquatable, 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") + { + this.PageSize = pageSize; + // use default value if no "pageToken" provided + this.PageToken = pageToken ?? "1"; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// 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). + /// + /// 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). + [DataMember(Name = "page_size", EmitDefaultValue = false)] + public long PageSize { get; set; } + + /// + /// 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). + /// + /// 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). + [DataMember(Name = "page_token", EmitDefaultValue = false)] + public string PageToken { 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 HydraTokenPagination {\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" PageToken: ").Append(PageToken).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 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) + { + // 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" }); + } + + // 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 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 new file mode 100644 index 00000000000..3fa4458d226 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationHeaders.cs @@ -0,0 +1,162 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 +{ + /// + /// HydraTokenPaginationHeaders + /// + [DataContract(Name = "tokenPaginationHeaders")] + public partial class HydraTokenPaginationHeaders : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// 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. + /// The total number of clients. in: header. + public HydraTokenPaginationHeaders(string link = default(string), string xTotalCount = default(string)) + { + this.Link = link; + this.XTotalCount = xTotalCount; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// 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 + /// + /// 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 + [DataMember(Name = "link", EmitDefaultValue = false)] + public string Link { get; set; } + + /// + /// The total number of clients. in: header + /// + /// The total number of clients. in: header + [DataMember(Name = "x-total-count", EmitDefaultValue = false)] + public string XTotalCount { 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 HydraTokenPaginationHeaders {\n"); + sb.Append(" Link: ").Append(Link).Append("\n"); + sb.Append(" XTotalCount: ").Append(XTotalCount).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 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) + { + 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 new file mode 100644 index 00000000000..165ea1b57b1 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationRequestParameters.cs @@ -0,0 +1,171 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 +{ + /// + /// The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?limit={limit}&offset={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 + { + /// + /// 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") + { + this.PageSize = pageSize; + // use default value if no "pageToken" provided + this.PageToken = pageToken ?? "1"; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// 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). + /// + /// 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). + [DataMember(Name = "page_size", EmitDefaultValue = false)] + public long PageSize { get; set; } + + /// + /// 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). + /// + /// 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). + [DataMember(Name = "page_token", EmitDefaultValue = false)] + public string PageToken { 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 HydraTokenPaginationRequestParameters {\n"); + sb.Append(" PageSize: ").Append(PageSize).Append("\n"); + sb.Append(" PageToken: ").Append(PageToken).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 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) + { + // 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" }); + } + + // 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 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 new file mode 100644 index 00000000000..d78b555df67 --- /dev/null +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTokenPaginationResponseHeaders.cs @@ -0,0 +1,158 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 +{ + /// + /// The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?limit={limit}&offset={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 + { + /// + /// Initializes a new instance of the class. + /// + /// 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=20>; rel=\"last\". + /// The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection.. + public HydraTokenPaginationResponseHeaders(string link = default(string), long xTotalCount = default(long)) + { + this.Link = link; + this.XTotalCount = xTotalCount; + this.AdditionalProperties = new Dictionary(); + } + + /// + /// 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=20>; rel=\"last\" + /// + /// 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=20>; rel=\"last\" + [DataMember(Name = "link", EmitDefaultValue = false)] + public string Link { get; set; } + + /// + /// The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + /// + /// The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + [DataMember(Name = "x-total-count", EmitDefaultValue = false)] + public long XTotalCount { 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 HydraTokenPaginationResponseHeaders {\n"); + sb.Append(" Link: ").Append(Link).Append("\n"); + sb.Append(" XTotalCount: ").Append(XTotalCount).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 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) + { + yield break; + } + } + +} diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustJwtGrantIssuerBody.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs similarity index 77% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustJwtGrantIssuerBody.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs index 4c9c8b3cac7..d7ea76767dd 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustJwtGrantIssuerBody.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustOAuth2JwtGrantIssuer.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,53 +27,58 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraTrustJwtGrantIssuerBody + /// Trust OAuth2 JWT Bearer Grant Type Issuer Request Body /// - [DataContract(Name = "trustJwtGrantIssuerBody")] - public partial class HydraTrustJwtGrantIssuerBody : IEquatable, IValidatableObject + [DataContract(Name = "trustOAuth2JwtGrantIssuer")] + public partial class HydraTrustOAuth2JwtGrantIssuer : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// [JsonConstructorAttribute] - protected HydraTrustJwtGrantIssuerBody() + protected HydraTrustOAuth2JwtGrantIssuer() { this.AdditionalProperties = new Dictionary(); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.. /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". (required). /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). (required). /// jwk (required). /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) (required). - /// The \"subject\" identifies the principal that is the subject of the JWT. (required). - public HydraTrustJwtGrantIssuerBody(DateTime expiresAt = default(DateTime), string issuer = default(string), HydraJSONWebKey jwk = default(HydraJSONWebKey), List scope = default(List), string subject = default(string)) + /// The \"subject\" identifies the principal that is the subject of the JWT.. + public HydraTrustOAuth2JwtGrantIssuer(bool allowAnySubject = default(bool), DateTime expiresAt = default(DateTime), string issuer = default(string), HydraJsonWebKey jwk = default(HydraJsonWebKey), List scope = default(List), string subject = default(string)) { this.ExpiresAt = expiresAt; // to ensure "issuer" is required (not null) if (issuer == null) { - throw new ArgumentNullException("issuer is a required property for HydraTrustJwtGrantIssuerBody and cannot be 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) { - throw new ArgumentNullException("jwk is a required property for HydraTrustJwtGrantIssuerBody and cannot be 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) { - throw new ArgumentNullException("scope is a required property for HydraTrustJwtGrantIssuerBody and cannot be null"); + throw new ArgumentNullException("scope is a required property for HydraTrustOAuth2JwtGrantIssuer and cannot be null"); } this.Scope = scope; - // to ensure "subject" is required (not null) - if (subject == null) { - throw new ArgumentNullException("subject is a required property for HydraTrustJwtGrantIssuerBody and cannot be null"); - } + this.AllowAnySubject = allowAnySubject; this.Subject = subject; this.AdditionalProperties = new Dictionary(); } + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + [DataMember(Name = "allow_any_subject", EmitDefaultValue = true)] + public bool AllowAnySubject { get; set; } + /// /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". /// @@ -91,7 +97,7 @@ protected HydraTrustJwtGrantIssuerBody() /// Gets or Sets Jwk /// [DataMember(Name = "jwk", IsRequired = true, EmitDefaultValue = false)] - public HydraJSONWebKey Jwk { get; set; } + public HydraJsonWebKey Jwk { get; set; } /// /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) @@ -104,7 +110,7 @@ protected HydraTrustJwtGrantIssuerBody() /// The \"subject\" identifies the principal that is the subject of the JWT. /// /// The \"subject\" identifies the principal that is the subject of the JWT. - [DataMember(Name = "subject", IsRequired = true, EmitDefaultValue = false)] + [DataMember(Name = "subject", EmitDefaultValue = false)] public string Subject { get; set; } /// @@ -120,7 +126,8 @@ protected HydraTrustJwtGrantIssuerBody() public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraTrustJwtGrantIssuerBody {\n"); + sb.Append("class HydraTrustOAuth2JwtGrantIssuer {\n"); + sb.Append(" AllowAnySubject: ").Append(AllowAnySubject).Append("\n"); sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); sb.Append(" Issuer: ").Append(Issuer).Append("\n"); sb.Append(" Jwk: ").Append(Jwk).Append("\n"); @@ -147,21 +154,25 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraTrustJwtGrantIssuerBody); + return this.Equals(input as HydraTrustOAuth2JwtGrantIssuer); } /// - /// Returns true if HydraTrustJwtGrantIssuerBody instances are equal + /// Returns true if HydraTrustOAuth2JwtGrantIssuer instances are equal /// - /// Instance of HydraTrustJwtGrantIssuerBody to be compared + /// Instance of HydraTrustOAuth2JwtGrantIssuer to be compared /// Boolean - public bool Equals(HydraTrustJwtGrantIssuerBody input) + 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 && @@ -200,6 +211,7 @@ 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(); diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedJwtGrantIssuer.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs similarity index 80% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedJwtGrantIssuer.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs index 25a373fa4be..e05546203d1 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedJwtGrantIssuer.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantIssuer.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,14 +27,15 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraTrustedJwtGrantIssuer + /// OAuth2 JWT Bearer Grant Type Issuer Trust Relationship /// - [DataContract(Name = "trustedJwtGrantIssuer")] - public partial class HydraTrustedJwtGrantIssuer : IEquatable, IValidatableObject + [DataContract(Name = "trustedOAuth2JwtGrantIssuer")] + public partial class HydraTrustedOAuth2JwtGrantIssuer : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT.. /// The \"created_at\" indicates, when grant was created.. /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\".. /// id. @@ -41,8 +43,9 @@ public partial class HydraTrustedJwtGrantIssuer : IEquatablepublicKey. /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]). /// The \"subject\" identifies the principal that is the subject of the JWT.. - public HydraTrustedJwtGrantIssuer(DateTime createdAt = default(DateTime), DateTime expiresAt = default(DateTime), string id = default(string), string issuer = default(string), HydraTrustedJsonWebKey publicKey = default(HydraTrustedJsonWebKey), List scope = default(List), string subject = default(string)) + public HydraTrustedOAuth2JwtGrantIssuer(bool allowAnySubject = default(bool), DateTime createdAt = default(DateTime), DateTime expiresAt = default(DateTime), string id = default(string), string issuer = default(string), HydraTrustedOAuth2JwtGrantJsonWebKey publicKey = default(HydraTrustedOAuth2JwtGrantJsonWebKey), List scope = default(List), string subject = default(string)) { + this.AllowAnySubject = allowAnySubject; this.CreatedAt = createdAt; this.ExpiresAt = expiresAt; this.Id = id; @@ -53,6 +56,13 @@ public partial class HydraTrustedJwtGrantIssuer : IEquatable(); } + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + /// + /// The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + [DataMember(Name = "allow_any_subject", EmitDefaultValue = true)] + public bool AllowAnySubject { get; set; } + /// /// The \"created_at\" indicates, when grant was created. /// @@ -84,7 +94,7 @@ public partial class HydraTrustedJwtGrantIssuer : IEquatable [DataMember(Name = "public_key", EmitDefaultValue = false)] - public HydraTrustedJsonWebKey PublicKey { get; set; } + public HydraTrustedOAuth2JwtGrantJsonWebKey PublicKey { get; set; } /// /// The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) @@ -113,7 +123,8 @@ public partial class HydraTrustedJwtGrantIssuer : IEquatableBoolean public override bool Equals(object input) { - return this.Equals(input as HydraTrustedJwtGrantIssuer); + return this.Equals(input as HydraTrustedOAuth2JwtGrantIssuer); } /// - /// Returns true if HydraTrustedJwtGrantIssuer instances are equal + /// Returns true if HydraTrustedOAuth2JwtGrantIssuer instances are equal /// - /// Instance of HydraTrustedJwtGrantIssuer to be compared + /// Instance of HydraTrustedOAuth2JwtGrantIssuer to be compared /// Boolean - public bool Equals(HydraTrustedJwtGrantIssuer input) + 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 && @@ -205,6 +220,7 @@ 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(); diff --git a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedJsonWebKey.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs similarity index 84% rename from clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedJsonWebKey.cs rename to clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs index 70992d9f747..b4b24488321 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedJsonWebKey.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraTrustedOAuth2JwtGrantJsonWebKey.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -26,17 +27,17 @@ namespace Ory.Hydra.Client.Model { /// - /// HydraTrustedJsonWebKey + /// OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key /// - [DataContract(Name = "trustedJsonWebKey")] - public partial class HydraTrustedJsonWebKey : IEquatable, IValidatableObject + [DataContract(Name = "trustedOAuth2JwtGrantJsonWebKey")] + public partial class HydraTrustedOAuth2JwtGrantJsonWebKey : IEquatable, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The \"key_id\" is key unique identifier (same as kid header in jws/jwt).. /// The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant.. - public HydraTrustedJsonWebKey(string kid = default(string), string set = default(string)) + public HydraTrustedOAuth2JwtGrantJsonWebKey(string kid = default(string), string set = default(string)) { this.Kid = kid; this.Set = set; @@ -70,7 +71,7 @@ public partial class HydraTrustedJsonWebKey : IEquatable public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class HydraTrustedJsonWebKey {\n"); + sb.Append("class HydraTrustedOAuth2JwtGrantJsonWebKey {\n"); sb.Append(" Kid: ").Append(Kid).Append("\n"); sb.Append(" Set: ").Append(Set).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); @@ -94,15 +95,15 @@ public virtual string ToJson() /// Boolean public override bool Equals(object input) { - return this.Equals(input as HydraTrustedJsonWebKey); + return this.Equals(input as HydraTrustedOAuth2JwtGrantJsonWebKey); } /// - /// Returns true if HydraTrustedJsonWebKey instances are equal + /// Returns true if HydraTrustedOAuth2JwtGrantJsonWebKey instances are equal /// - /// Instance of HydraTrustedJsonWebKey to be compared + /// Instance of HydraTrustedOAuth2JwtGrantJsonWebKey to be compared /// Boolean - public bool Equals(HydraTrustedJsonWebKey input) + public bool Equals(HydraTrustedOAuth2JwtGrantJsonWebKey input) { if (input == null) { 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 a3b3a5a36d6..b5df61889a9 100644 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVersion.cs +++ b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVersion.cs @@ -1,9 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.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/HydraVolume.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVolume.cs deleted file mode 100644 index 619c854fa41..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVolume.cs +++ /dev/null @@ -1,327 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// Volume volume - /// - [DataContract(Name = "Volume")] - public partial class HydraVolume : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraVolume() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// Date/Time the volume was created.. - /// Name of the volume driver used by the volume. (required). - /// User-defined key/value metadata. (required). - /// Mount path of the volume on the host. (required). - /// Name of the volume. (required). - /// The driver specific options used when creating the volume. (required). - /// The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. (required). - /// Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature.. - /// usageData. - public HydraVolume(string createdAt = default(string), string driver = default(string), Dictionary labels = default(Dictionary), string mountpoint = default(string), string name = default(string), Dictionary options = default(Dictionary), string scope = default(string), Object status = default(Object), HydraVolumeUsageData usageData = default(HydraVolumeUsageData)) - { - // to ensure "driver" is required (not null) - if (driver == null) { - throw new ArgumentNullException("driver is a required property for HydraVolume and cannot be null"); - } - this.Driver = driver; - // to ensure "labels" is required (not null) - if (labels == null) { - throw new ArgumentNullException("labels is a required property for HydraVolume and cannot be null"); - } - this.Labels = labels; - // to ensure "mountpoint" is required (not null) - if (mountpoint == null) { - throw new ArgumentNullException("mountpoint is a required property for HydraVolume and cannot be null"); - } - this.Mountpoint = mountpoint; - // to ensure "name" is required (not null) - if (name == null) { - throw new ArgumentNullException("name is a required property for HydraVolume and cannot be null"); - } - this.Name = name; - // to ensure "options" is required (not null) - if (options == null) { - throw new ArgumentNullException("options is a required property for HydraVolume and cannot be null"); - } - this.Options = options; - // to ensure "scope" is required (not null) - if (scope == null) { - throw new ArgumentNullException("scope is a required property for HydraVolume and cannot be null"); - } - this.Scope = scope; - this.CreatedAt = createdAt; - this.Status = status; - this.UsageData = usageData; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// Date/Time the volume was created. - /// - /// Date/Time the volume was created. - [DataMember(Name = "CreatedAt", EmitDefaultValue = false)] - public string CreatedAt { get; set; } - - /// - /// Name of the volume driver used by the volume. - /// - /// Name of the volume driver used by the volume. - [DataMember(Name = "Driver", IsRequired = true, EmitDefaultValue = false)] - public string Driver { get; set; } - - /// - /// User-defined key/value metadata. - /// - /// User-defined key/value metadata. - [DataMember(Name = "Labels", IsRequired = true, EmitDefaultValue = false)] - public Dictionary Labels { get; set; } - - /// - /// Mount path of the volume on the host. - /// - /// Mount path of the volume on the host. - [DataMember(Name = "Mountpoint", IsRequired = true, EmitDefaultValue = false)] - public string Mountpoint { get; set; } - - /// - /// Name of the volume. - /// - /// Name of the volume. - [DataMember(Name = "Name", IsRequired = true, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The driver specific options used when creating the volume. - /// - /// The driver specific options used when creating the volume. - [DataMember(Name = "Options", IsRequired = true, EmitDefaultValue = false)] - public Dictionary Options { get; set; } - - /// - /// The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - /// - /// The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - [DataMember(Name = "Scope", IsRequired = true, EmitDefaultValue = false)] - public string Scope { get; set; } - - /// - /// Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - /// - /// Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - [DataMember(Name = "Status", EmitDefaultValue = false)] - public Object Status { get; set; } - - /// - /// Gets or Sets UsageData - /// - [DataMember(Name = "UsageData", EmitDefaultValue = false)] - public HydraVolumeUsageData UsageData { 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 HydraVolume {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Driver: ").Append(Driver).Append("\n"); - sb.Append(" Labels: ").Append(Labels).Append("\n"); - sb.Append(" Mountpoint: ").Append(Mountpoint).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Options: ").Append(Options).Append("\n"); - sb.Append(" Scope: ").Append(Scope).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" UsageData: ").Append(UsageData).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 HydraVolume); - } - - /// - /// Returns true if HydraVolume instances are equal - /// - /// Instance of HydraVolume to be compared - /// Boolean - public bool Equals(HydraVolume input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Driver == input.Driver || - (this.Driver != null && - this.Driver.Equals(input.Driver)) - ) && - ( - this.Labels == input.Labels || - this.Labels != null && - input.Labels != null && - this.Labels.SequenceEqual(input.Labels) - ) && - ( - this.Mountpoint == input.Mountpoint || - (this.Mountpoint != null && - this.Mountpoint.Equals(input.Mountpoint)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Options == input.Options || - this.Options != null && - input.Options != null && - this.Options.SequenceEqual(input.Options) - ) && - ( - this.Scope == input.Scope || - (this.Scope != null && - this.Scope.Equals(input.Scope)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.UsageData == input.UsageData || - (this.UsageData != null && - this.UsageData.Equals(input.UsageData)) - ) - && (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.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Driver != null) - { - hashCode = (hashCode * 59) + this.Driver.GetHashCode(); - } - if (this.Labels != null) - { - hashCode = (hashCode * 59) + this.Labels.GetHashCode(); - } - if (this.Mountpoint != null) - { - hashCode = (hashCode * 59) + this.Mountpoint.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Options != null) - { - hashCode = (hashCode * 59) + this.Options.GetHashCode(); - } - if (this.Scope != null) - { - hashCode = (hashCode * 59) + this.Scope.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.UsageData != null) - { - hashCode = (hashCode * 59) + this.UsageData.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/HydraVolumeUsageData.cs b/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVolumeUsageData.cs deleted file mode 100644 index 6c2e359295e..00000000000 --- a/clients/hydra/dotnet/src/Ory.Hydra.Client/Model/HydraVolumeUsageData.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * 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 -{ - /// - /// VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - /// - [DataContract(Name = "VolumeUsageData")] - public partial class HydraVolumeUsageData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HydraVolumeUsageData() - { - this.AdditionalProperties = new Dictionary(); - } - /// - /// Initializes a new instance of the class. - /// - /// The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. (required). - /// Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") (required). - public HydraVolumeUsageData(long refCount = default(long), long size = default(long)) - { - this.RefCount = refCount; - this.Size = size; - this.AdditionalProperties = new Dictionary(); - } - - /// - /// The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - /// - /// The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - [DataMember(Name = "RefCount", IsRequired = true, EmitDefaultValue = false)] - public long RefCount { get; set; } - - /// - /// Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - /// - /// Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - [DataMember(Name = "Size", IsRequired = true, EmitDefaultValue = false)] - public long Size { 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 HydraVolumeUsageData {\n"); - sb.Append(" RefCount: ").Append(RefCount).Append("\n"); - sb.Append(" Size: ").Append(Size).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 HydraVolumeUsageData); - } - - /// - /// Returns true if HydraVolumeUsageData instances are equal - /// - /// Instance of HydraVolumeUsageData to be compared - /// Boolean - public bool Equals(HydraVolumeUsageData input) - { - if (input == null) - { - return false; - } - return - ( - this.RefCount == input.RefCount || - this.RefCount.Equals(input.RefCount) - ) && - ( - this.Size == input.Size || - this.Size.Equals(input.Size) - ) - && (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.RefCount.GetHashCode(); - hashCode = (hashCode * 59) + this.Size.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/Ory.Hydra.Client.csproj b/clients/hydra/dotnet/src/Ory.Hydra.Client/Ory.Hydra.Client.csproj index 3d8eca543f0..dd3c780f215 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 @@ -12,7 +12,7 @@ A library generated from a OpenAPI doc No Copyright Ory.Hydra.Client - 1.11.0 + 2.0.1 bin\$(Configuration)\$(TargetFramework)\Ory.Hydra.Client.xml Apache-2.0 https://github.com/ory/sdk.git diff --git a/clients/hydra/elixir/.formatter.exs b/clients/hydra/elixir/.formatter.exs new file mode 100644 index 00000000000..d304ff320a5 --- /dev/null +++ b/clients/hydra/elixir/.formatter.exs @@ -0,0 +1,3 @@ +[ + inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"] +] diff --git a/clients/hydra/elixir/.openapi-generator/FILES b/clients/hydra/elixir/.openapi-generator/FILES index cf151739925..8bb8730277b 100644 --- a/clients/hydra/elixir/.openapi-generator/FILES +++ b/clients/hydra/elixir/.openapi-generator/FILES @@ -1,56 +1,54 @@ +.formatter.exs .gitignore .openapi-generator-ignore README.md config/config.exs -lib/ory/api/admin.ex +config/runtime.exs +lib/ory/api/jwk.ex lib/ory/api/metadata.ex -lib/ory/api/public.ex +lib/ory/api/o_auth2.ex +lib/ory/api/oidc.ex +lib/ory/api/wellknown.ex lib/ory/connection.ex lib/ory/deserializer.ex -lib/ory/model/accept_consent_request.ex -lib/ory/model/accept_login_request.ex -lib/ory/model/completed_request.ex -lib/ory/model/consent_request.ex -lib/ory/model/consent_request_session.ex -lib/ory/model/container_wait_ok_body_error.ex -lib/ory/model/flush_inactive_o_auth2_tokens_request.ex +lib/ory/model/accept_o_auth2_consent_request.ex +lib/ory/model/accept_o_auth2_consent_request_session.ex +lib/ory/model/accept_o_auth2_login_request.ex +lib/ory/model/create_json_web_key_set.ex +lib/ory/model/error_o_auth2.ex lib/ory/model/generic_error.ex +lib/ory/model/get_version_200_response.ex lib/ory/model/health_not_ready_status.ex lib/ory/model/health_status.ex -lib/ory/model/json_error.ex +lib/ory/model/introspected_o_auth2_token.ex +lib/ory/model/is_ready_200_response.ex +lib/ory/model/is_ready_503_response.ex +lib/ory/model/json_patch.ex lib/ory/model/json_web_key.ex lib/ory/model/json_web_key_set.ex -lib/ory/model/json_web_key_set_generator_request.ex -lib/ory/model/login_request.ex -lib/ory/model/logout_request.ex lib/ory/model/o_auth2_client.ex -lib/ory/model/o_auth2_token_introspection.ex -lib/ory/model/oauth2_token_response.ex -lib/ory/model/open_id_connect_context.ex -lib/ory/model/patch_document.ex -lib/ory/model/plugin_config.ex -lib/ory/model/plugin_config_args.ex -lib/ory/model/plugin_config_interface.ex -lib/ory/model/plugin_config_linux.ex -lib/ory/model/plugin_config_network.ex -lib/ory/model/plugin_config_rootfs.ex -lib/ory/model/plugin_config_user.ex -lib/ory/model/plugin_device.ex -lib/ory/model/plugin_env.ex -lib/ory/model/plugin_interface_type.ex -lib/ory/model/plugin_mount.ex -lib/ory/model/plugin_settings.ex -lib/ory/model/previous_consent_session.ex -lib/ory/model/reject_request.ex -lib/ory/model/request_was_handled_response.ex -lib/ory/model/trust_jwt_grant_issuer_body.ex -lib/ory/model/trusted_json_web_key.ex -lib/ory/model/trusted_jwt_grant_issuer.ex -lib/ory/model/userinfo_response.ex +lib/ory/model/o_auth2_client_token_lifespans.ex +lib/ory/model/o_auth2_consent_request.ex +lib/ory/model/o_auth2_consent_request_open_id_connect_context.ex +lib/ory/model/o_auth2_consent_session.ex +lib/ory/model/o_auth2_consent_session_expires_at.ex +lib/ory/model/o_auth2_login_request.ex +lib/ory/model/o_auth2_logout_request.ex +lib/ory/model/o_auth2_redirect_to.ex +lib/ory/model/o_auth2_token_exchange.ex +lib/ory/model/oidc_configuration.ex +lib/ory/model/oidc_user_info.ex +lib/ory/model/pagination.ex +lib/ory/model/pagination_headers.ex +lib/ory/model/reject_o_auth2_request.ex +lib/ory/model/token_pagination.ex +lib/ory/model/token_pagination_headers.ex +lib/ory/model/token_pagination_request_parameters.ex +lib/ory/model/token_pagination_response_headers.ex +lib/ory/model/trust_o_auth2_jwt_grant_issuer.ex +lib/ory/model/trusted_o_auth2_jwt_grant_issuer.ex +lib/ory/model/trusted_o_auth2_jwt_grant_json_web_key.ex lib/ory/model/version.ex -lib/ory/model/volume.ex -lib/ory/model/volume_usage_data.ex -lib/ory/model/well_known.ex lib/ory/request_builder.ex mix.exs test/test_helper.exs diff --git a/clients/hydra/elixir/.openapi-generator/VERSION b/clients/hydra/elixir/.openapi-generator/VERSION index f4965a313a2..6d54bbd7751 100644 --- a/clients/hydra/elixir/.openapi-generator/VERSION +++ b/clients/hydra/elixir/.openapi-generator/VERSION @@ -1 +1 @@ -6.0.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/clients/hydra/elixir/README.md b/clients/hydra/elixir/README.md index 714b7668a96..18deb15c6a9 100644 --- a/clients/hydra/elixir/README.md +++ b/clients/hydra/elixir/README.md @@ -1,6 +1,6 @@ # Ory -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. +Documentation for all of Ory Hydra's APIs. ### Building @@ -30,5 +30,5 @@ be found at [https://hexdocs.pm/ory_hydra](https://hexdocs.pm/ory_hydra). You can override the URL of your server (e.g. if you have a separate development and production server in your configuration files. ```elixir -config :ory_hydra, base_url: "http://localhost" +config :ory_hydra_api, base_url: "http://localhost" ``` \ No newline at end of file diff --git a/clients/hydra/elixir/config/config.exs b/clients/hydra/elixir/config/config.exs index fadbcd352a7..ddb8f41cd48 100644 --- a/clients/hydra/elixir/config/config.exs +++ b/clients/hydra/elixir/config/config.exs @@ -1,32 +1,15 @@ # This file is responsible for configuring your application -# and its dependencies with the aid of the Mix.Config module. -use Mix.Config - -# This configuration is loaded before any dependency and is restricted -# to this project. If another project depends on this project, this -# file won't be loaded nor affect the parent project. For this reason, -# if you want to provide default values for your application for -# 3rd-party users, it should be done in your "mix.exs" file. - -# You can configure for your application as: -# -# config :ory_hydra, key: :value -# -# And access this configuration in your application as: -# -# Application.get_env(:ory_hydra, :key) -# -# Or configure a 3rd-party app: -# -# config :logger, level: :info +# and its dependencies with the aid of the Config module. # +# This configuration file is loaded before any dependency and +# is restricted to this project. + +# General application configuration +import Config -config :ory_hydra, base_url: "http://localhost" +config :ory_hydra_api, base_url: "http://localhost" -# It is also possible to import configuration files, relative to this -# directory. For example, you can emulate configuration per environment -# by uncommenting the line below and defining dev.exs, test.exs and such. -# Configuration from the imported file will override the ones defined -# here (which is why it is important to import them last). +# Import environment specific config. This must remain at the bottom +# of this file so it overrides the configuration defined above. # -# import_config "#{Mix.env}.exs" +# import_config "#{config_env()}.exs" diff --git a/clients/hydra/elixir/config/runtime.exs b/clients/hydra/elixir/config/runtime.exs new file mode 100644 index 00000000000..8287068e1e7 --- /dev/null +++ b/clients/hydra/elixir/config/runtime.exs @@ -0,0 +1,12 @@ +import Config + +# config/runtime.exs is executed for all environments, including +# during releases. It is executed after compilation and before the +# system starts, so it is typically used to load production configuration +# and secrets from environment variables or elsewhere. Do not define +# any compile-time configuration in here, as it won't be applied. +# The block below contains prod specific runtime configuration. + +if env = System.get_env("ORY_HYDRA_API_BASE_URI") do + config :ory_hydra_api, base_url: env +end diff --git a/clients/hydra/elixir/lib/ory/api/admin.ex b/clients/hydra/elixir/lib/ory/api/admin.ex deleted file mode 100644 index 47bd34553b2..00000000000 --- a/clients/hydra/elixir/lib/ory/api/admin.ex +++ /dev/null @@ -1,1079 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Api.Admin do - @moduledoc """ - API calls for all endpoints tagged `Admin`. - """ - - alias Ory.Connection - import Ory.RequestBuilder - - - @doc """ - Accept a Consent Request - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - consent_challenge (String.t): - - opts (KeywordList): [optional] Optional parameters - - :body (AcceptConsentRequest): - ## Returns - - {:ok, Ory.Model.CompletedRequest.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec accept_consent_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.CompletedRequest.t} | {:error, Tesla.Env.t} - def accept_consent_request(connection, consent_challenge, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:put) - |> url("/oauth2/auth/requests/consent/accept") - |> add_param(:query, :"consent_challenge", consent_challenge) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.CompletedRequest{}}, - { 404, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Accept a Login Request - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - login_challenge (String.t): - - opts (KeywordList): [optional] Optional parameters - - :body (AcceptLoginRequest): - ## Returns - - {:ok, Ory.Model.CompletedRequest.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec accept_login_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.CompletedRequest.t} | {:error, Tesla.Env.t} - def accept_login_request(connection, login_challenge, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:put) - |> url("/oauth2/auth/requests/login/accept") - |> add_param(:query, :"login_challenge", login_challenge) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.CompletedRequest{}}, - { 400, %Ory.Model.JsonError{}}, - { 401, %Ory.Model.JsonError{}}, - { 404, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Accept a Logout Request - When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - logout_challenge (String.t): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.CompletedRequest.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec accept_logout_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.CompletedRequest.t} | {:error, Tesla.Env.t} - def accept_logout_request(connection, logout_challenge, _opts \\ []) do - %{} - |> method(:put) - |> url("/oauth2/auth/requests/logout/accept") - |> add_param(:query, :"logout_challenge", logout_challenge) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.CompletedRequest{}}, - { 404, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Generate a New 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - set (String.t): The set - - opts (KeywordList): [optional] Optional parameters - - :body (JsonWebKeySetGeneratorRequest): - ## Returns - - {:ok, Ory.Model.JsonWebKeySet.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec create_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} - def create_json_web_key_set(connection, set, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:post) - |> url("/keys/#{set}") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 201, %Ory.Model.JsonWebKeySet{}}, - { 401, %Ory.Model.JsonError{}}, - { 403, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Create an OAuth 2.0 Client - Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - body (OAuth2Client): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.OAuth2Client.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec create_o_auth2_client(Tesla.Env.client, Ory.Model.OAuth2Client.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} - def create_o_auth2_client(connection, body, _opts \\ []) do - %{} - |> method(:post) - |> url("/clients") - |> add_param(:body, :body, body) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 201, %Ory.Model.OAuth2Client{}}, - { :default, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Delete a 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - kid (String.t): The kid of the desired key - - set (String.t): The set - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec delete_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def delete_json_web_key(connection, kid, set, _opts \\ []) do - %{} - |> method(:delete) - |> url("/keys/#{set}/#{kid}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { 401, %Ory.Model.JsonError{}}, - { 403, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Delete a 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - set (String.t): The set - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec delete_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def delete_json_web_key_set(connection, set, _opts \\ []) do - %{} - |> method(:delete) - |> url("/keys/#{set}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { 401, %Ory.Model.JsonError{}}, - { 403, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Deletes an 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - id (String.t): The id of the OAuth 2.0 Client. - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec delete_o_auth2_client(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def delete_o_auth2_client(connection, id, _opts \\ []) do - %{} - |> method(:delete) - |> url("/clients/#{id}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { :default, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Delete OAuth2 Access Tokens from a Client - This endpoint deletes OAuth2 access tokens issued for a client from the database - - ## Parameters - - - connection (Ory.Connection): Connection to server - - client_id (String.t): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec delete_o_auth2_token(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def delete_o_auth2_token(connection, client_id, _opts \\ []) do - %{} - |> method(:delete) - |> url("/oauth2/tokens") - |> add_param(:query, :"client_id", client_id) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { 401, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Delete a 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - id (String.t): The id of the desired grant - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec delete_trusted_jwt_grant_issuer(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.GenericError.t} | {:error, Tesla.Env.t} - def delete_trusted_jwt_grant_issuer(connection, id, _opts \\ []) do - %{} - |> method(:delete) - |> url("/trust/grants/jwt-bearer/issuers/#{id}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { 404, %Ory.Model.GenericError{}}, - { 500, %Ory.Model.GenericError{}} - ]) - end - - @doc """ - Flush Expired OAuth2 Access Tokens - This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - - :body (FlushInactiveOAuth2TokensRequest): - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec flush_inactive_o_auth2_tokens(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def flush_inactive_o_auth2_tokens(connection, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:post) - |> url("/oauth2/flush") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { 401, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Get Consent Request Information - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - consent_challenge (String.t): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.ConsentRequest.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec get_consent_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.ConsentRequest.t} | {:ok, Ory.Model.RequestWasHandledResponse.t} | {:error, Tesla.Env.t} - def get_consent_request(connection, consent_challenge, _opts \\ []) do - %{} - |> method(:get) - |> url("/oauth2/auth/requests/consent") - |> add_param(:query, :"consent_challenge", consent_challenge) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.ConsentRequest{}}, - { 404, %Ory.Model.JsonError{}}, - { 410, %Ory.Model.RequestWasHandledResponse{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Fetch a JSON Web Key - This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - - ## Parameters - - - connection (Ory.Connection): Connection to server - - kid (String.t): The kid of the desired key - - set (String.t): The set - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.JsonWebKeySet.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec get_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} - def get_json_web_key(connection, kid, set, _opts \\ []) do - %{} - |> method(:get) - |> url("/keys/#{set}/#{kid}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.JsonWebKeySet{}}, - { 404, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - set (String.t): The set - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.JsonWebKeySet.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec get_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} - def get_json_web_key_set(connection, set, _opts \\ []) do - %{} - |> method(:get) - |> url("/keys/#{set}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.JsonWebKeySet{}}, - { 401, %Ory.Model.JsonError{}}, - { 403, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Get a Login Request - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - login_challenge (String.t): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.LoginRequest.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec get_login_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.LoginRequest.t} | {:ok, Ory.Model.RequestWasHandledResponse.t} | {:error, Tesla.Env.t} - def get_login_request(connection, login_challenge, _opts \\ []) do - %{} - |> method(:get) - |> url("/oauth2/auth/requests/login") - |> add_param(:query, :"login_challenge", login_challenge) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.LoginRequest{}}, - { 400, %Ory.Model.JsonError{}}, - { 404, %Ory.Model.JsonError{}}, - { 410, %Ory.Model.RequestWasHandledResponse{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Get a Logout Request - Use this endpoint to fetch a logout request. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - logout_challenge (String.t): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.LogoutRequest.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec get_logout_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.LogoutRequest.t} | {:ok, Ory.Model.RequestWasHandledResponse.t} | {:error, Tesla.Env.t} - def get_logout_request(connection, logout_challenge, _opts \\ []) do - %{} - |> method(:get) - |> url("/oauth2/auth/requests/logout") - |> add_param(:query, :"logout_challenge", logout_challenge) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.LogoutRequest{}}, - { 404, %Ory.Model.JsonError{}}, - { 410, %Ory.Model.RequestWasHandledResponse{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - id (String.t): The id of the OAuth 2.0 Client. - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.OAuth2Client.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec get_o_auth2_client(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} - def get_o_auth2_client(connection, id, _opts \\ []) do - %{} - |> method(:get) - |> url("/clients/#{id}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.OAuth2Client{}}, - { :default, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Get a 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - id (String.t): The id of the desired grant - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.TrustedJwtGrantIssuer.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec get_trusted_jwt_grant_issuer(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.GenericError.t} | {:ok, Ory.Model.TrustedJwtGrantIssuer.t} | {:error, Tesla.Env.t} - def get_trusted_jwt_grant_issuer(connection, id, _opts \\ []) do - %{} - |> method(:get) - |> url("/trust/grants/jwt-bearer/issuers/#{id}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.TrustedJwtGrantIssuer{}}, - { 404, %Ory.Model.GenericError{}}, - { 500, %Ory.Model.GenericError{}} - ]) - end - - @doc """ - Get Service Version - This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.Version.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec get_version(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.Version.t} | {:error, Tesla.Env.t} - def get_version(connection, _opts \\ []) do - %{} - |> method(:get) - |> url("/version") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.Version{}} - ]) - end - - @doc """ - Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - - ## Parameters - - - connection (Ory.Connection): Connection to server - - token (String.t): 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. - - opts (KeywordList): [optional] Optional parameters - - :scope (String.t): 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. - ## Returns - - {:ok, Ory.Model.OAuth2TokenIntrospection.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec introspect_o_auth2_token(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.OAuth2TokenIntrospection.t} | {:error, Tesla.Env.t} - def introspect_o_auth2_token(connection, token, opts \\ []) do - optional_params = %{ - :"scope" => :form - } - %{} - |> method(:post) - |> url("/oauth2/introspect") - |> add_param(:form, :"token", token) - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.OAuth2TokenIntrospection{}}, - { 401, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Check Alive Status - This endpoint returns a 200 status code when the HTTP server is up running. 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.HealthStatus.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec is_instance_alive(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.HealthStatus.t} | {:error, Tesla.Env.t} - def is_instance_alive(connection, _opts \\ []) do - %{} - |> method(:get) - |> url("/health/alive") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.HealthStatus{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - - :limit (integer()): The maximum amount of clients to returned, upper bound is 500 clients. - - :offset (integer()): The offset from where to start looking. - - :client_name (String.t): The name of the clients to filter by. - - :owner (String.t): The owner of the clients to filter by. - ## Returns - - {:ok, [%OAuth2Client{}, ...]} on success - {:error, Tesla.Env.t} on failure - """ - @spec list_o_auth2_clients(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, list(Ory.Model.OAuth2Client.t)} | {:error, Tesla.Env.t} - def list_o_auth2_clients(connection, opts \\ []) do - optional_params = %{ - :"limit" => :query, - :"offset" => :query, - :"client_name" => :query, - :"owner" => :query - } - %{} - |> method(:get) - |> url("/clients") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, [%Ory.Model.OAuth2Client{}]}, - { :default, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - subject (String.t): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, [%PreviousConsentSession{}, ...]} on success - {:error, Tesla.Env.t} on failure - """ - @spec list_subject_consent_sessions(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, list(Ory.Model.PreviousConsentSession.t)} | {:error, Tesla.Env.t} - def list_subject_consent_sessions(connection, subject, _opts \\ []) do - %{} - |> method(:get) - |> url("/oauth2/auth/sessions/consent") - |> add_param(:query, :"subject", subject) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, [%Ory.Model.PreviousConsentSession{}]}, - { 400, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - List Trusted OAuth2 JWT Bearer Grant Type Issuers - Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - - :issuer (String.t): If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - - :limit (integer()): The maximum amount of policies returned, upper bound is 500 policies - - :offset (integer()): The offset from where to start looking. - ## Returns - - {:ok, [%TrustedJwtGrantIssuer{}, ...]} on success - {:error, Tesla.Env.t} on failure - """ - @spec list_trusted_jwt_grant_issuers(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.GenericError.t} | {:ok, list(Ory.Model.TrustedJwtGrantIssuer.t)} | {:error, Tesla.Env.t} - def list_trusted_jwt_grant_issuers(connection, opts \\ []) do - optional_params = %{ - :"issuer" => :query, - :"limit" => :query, - :"offset" => :query - } - %{} - |> method(:get) - |> url("/trust/grants/jwt-bearer/issuers") - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, [%Ory.Model.TrustedJwtGrantIssuer{}]}, - { 500, %Ory.Model.GenericError{}} - ]) - end - - @doc """ - Patch an OAuth 2.0 Client - Patch an existing OAuth 2.0 Client. 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - id (String.t): The id of the OAuth 2.0 Client. - - body ([Ory.Model.PatchDocument.t]): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.OAuth2Client.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec patch_o_auth2_client(Tesla.Env.client, String.t, list(Ory.Model.PatchDocument.t), keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} - def patch_o_auth2_client(connection, id, body, _opts \\ []) do - %{} - |> method(:patch) - |> url("/clients/#{id}") - |> add_param(:body, :body, body) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.OAuth2Client{}}, - { :default, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Reject a Consent Request - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - consent_challenge (String.t): - - opts (KeywordList): [optional] Optional parameters - - :body (RejectRequest): - ## Returns - - {:ok, Ory.Model.CompletedRequest.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec reject_consent_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.CompletedRequest.t} | {:error, Tesla.Env.t} - def reject_consent_request(connection, consent_challenge, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:put) - |> url("/oauth2/auth/requests/consent/reject") - |> add_param(:query, :"consent_challenge", consent_challenge) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.CompletedRequest{}}, - { 404, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Reject a Login Request - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - login_challenge (String.t): - - opts (KeywordList): [optional] Optional parameters - - :body (RejectRequest): - ## Returns - - {:ok, Ory.Model.CompletedRequest.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec reject_login_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.CompletedRequest.t} | {:error, Tesla.Env.t} - def reject_login_request(connection, login_challenge, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:put) - |> url("/oauth2/auth/requests/login/reject") - |> add_param(:query, :"login_challenge", login_challenge) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.CompletedRequest{}}, - { 400, %Ory.Model.JsonError{}}, - { 401, %Ory.Model.JsonError{}}, - { 404, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Reject a Logout Request - When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - logout_challenge (String.t): - - opts (KeywordList): [optional] Optional parameters - - :body (RejectRequest): - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec reject_logout_request(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def reject_logout_request(connection, logout_challenge, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:put) - |> url("/oauth2/auth/requests/logout/reject") - |> add_param(:query, :"logout_challenge", logout_challenge) - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { 404, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - subject (String.t): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec revoke_authentication_session(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def revoke_authentication_session(connection, subject, _opts \\ []) do - %{} - |> method(:delete) - |> url("/oauth2/auth/sessions/login") - |> add_param(:query, :"subject", subject) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { 400, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - subject (String.t): The subject (Subject) who's consent sessions should be deleted. - - opts (KeywordList): [optional] Optional parameters - - :client (String.t): If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - - :all (boolean()): If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec revoke_consent_sessions(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def revoke_consent_sessions(connection, subject, opts \\ []) do - optional_params = %{ - :"client" => :query, - :"all" => :query - } - %{} - |> method(:delete) - |> url("/oauth2/auth/sessions/consent") - |> add_param(:query, :"subject", subject) - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { 400, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Trust an 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). - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - - :body (TrustJwtGrantIssuerBody): - ## Returns - - {:ok, Ory.Model.TrustedJwtGrantIssuer.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec trust_jwt_grant_issuer(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.GenericError.t} | {:ok, Ory.Model.TrustedJwtGrantIssuer.t} | {:error, Tesla.Env.t} - def trust_jwt_grant_issuer(connection, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:post) - |> url("/trust/grants/jwt-bearer/issuers") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 201, %Ory.Model.TrustedJwtGrantIssuer{}}, - { 400, %Ory.Model.GenericError{}}, - { 409, %Ory.Model.GenericError{}}, - { 500, %Ory.Model.GenericError{}} - ]) - end - - @doc """ - Update a 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - kid (String.t): The kid of the desired key - - set (String.t): The set - - opts (KeywordList): [optional] Optional parameters - - :body (JsonWebKey): - ## Returns - - {:ok, Ory.Model.JsonWebKey.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec update_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.JsonWebKey.t} | {:error, Tesla.Env.t} - def update_json_web_key(connection, kid, set, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:put) - |> url("/keys/#{set}/#{kid}") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.JsonWebKey{}}, - { 401, %Ory.Model.JsonError{}}, - { 403, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - set (String.t): The set - - opts (KeywordList): [optional] Optional parameters - - :body (JsonWebKeySet): - ## Returns - - {:ok, Ory.Model.JsonWebKeySet.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec update_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} - def update_json_web_key_set(connection, set, opts \\ []) do - optional_params = %{ - :body => :body - } - %{} - |> method(:put) - |> url("/keys/#{set}") - |> add_optional_params(optional_params, opts) - |> ensure_body() - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.JsonWebKeySet{}}, - { 401, %Ory.Model.JsonError{}}, - { 403, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Update an OAuth 2.0 Client - Update an existing OAuth 2.0 Client. 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - id (String.t): The id of the OAuth 2.0 Client. - - body (OAuth2Client): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.OAuth2Client.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec update_o_auth2_client(Tesla.Env.client, String.t, Ory.Model.OAuth2Client.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} - def update_o_auth2_client(connection, id, body, _opts \\ []) do - %{} - |> method(:put) - |> url("/clients/#{id}") - |> add_param(:body, :body, body) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.OAuth2Client{}}, - { :default, %Ory.Model.JsonError{}} - ]) - end -end diff --git a/clients/hydra/elixir/lib/ory/api/jwk.ex b/clients/hydra/elixir/lib/ory/api/jwk.ex new file mode 100644 index 00000000000..7898017d74a --- /dev/null +++ b/clients/hydra/elixir/lib/ory/api/jwk.ex @@ -0,0 +1,219 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Api.Jwk do + @moduledoc """ + API calls for all endpoints tagged `Jwk`. + """ + + alias Ory.Connection + import Ory.RequestBuilder + + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - set (String.t): The JSON Web Key Set ID + - create_json_web_key_set (CreateJsonWebKeySet): + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.JsonWebKeySet.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec create_json_web_key_set(Tesla.Env.client, String.t, Ory.Model.CreateJsonWebKeySet.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} + def create_json_web_key_set(connection, set, create_json_web_key_set, _opts \\ []) do + %{} + |> method(:post) + |> url("/admin/keys/#{set}") + |> add_param(:body, :body, create_json_web_key_set) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 201, %Ory.Model.JsonWebKeySet{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - set (String.t): The JSON Web Key Set + - kid (String.t): The JSON Web Key ID (kid) + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec delete_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + def delete_json_web_key(connection, set, kid, _opts \\ []) do + %{} + |> method(:delete) + |> url("/admin/keys/#{set}/#{kid}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 204, false}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - set (String.t): The JSON Web Key Set + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec delete_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + def delete_json_web_key_set(connection, set, _opts \\ []) do + %{} + |> method(:delete) + |> url("/admin/keys/#{set}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 204, false}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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). + + ## Parameters + + - connection (Ory.Connection): Connection to server + - set (String.t): JSON Web Key Set ID + - kid (String.t): JSON Web Key ID + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.JsonWebKeySet.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec get_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} + def get_json_web_key(connection, set, kid, _opts \\ []) do + %{} + |> method(:get) + |> url("/admin/keys/#{set}/#{kid}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.JsonWebKeySet{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - set (String.t): JSON Web Key Set ID + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.JsonWebKeySet.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec get_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} + def get_json_web_key_set(connection, set, _opts \\ []) do + %{} + |> method(:get) + |> url("/admin/keys/#{set}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.JsonWebKeySet{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - set (String.t): The JSON Web Key Set ID + - kid (String.t): JSON Web Key ID + - opts (KeywordList): [optional] Optional parameters + - :body (JsonWebKey): + ## Returns + + {:ok, Ory.Model.JsonWebKey.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec set_json_web_key(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKey.t} | {:error, Tesla.Env.t} + def set_json_web_key(connection, set, kid, opts \\ []) do + optional_params = %{ + :body => :body + } + %{} + |> method(:put) + |> url("/admin/keys/#{set}/#{kid}") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.JsonWebKey{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - set (String.t): The JSON Web Key Set ID + - opts (KeywordList): [optional] Optional parameters + - :body (JsonWebKeySet): + ## Returns + + {:ok, Ory.Model.JsonWebKeySet.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec set_json_web_key_set(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} + def set_json_web_key_set(connection, set, opts \\ []) do + optional_params = %{ + :body => :body + } + %{} + |> method(:put) + |> url("/admin/keys/#{set}") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.JsonWebKeySet{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end +end diff --git a/clients/hydra/elixir/lib/ory/api/metadata.ex b/clients/hydra/elixir/lib/ory/api/metadata.ex index 087ce11c613..b429d345505 100644 --- a/clients/hydra/elixir/lib/ory/api/metadata.ex +++ b/clients/hydra/elixir/lib/ory/api/metadata.ex @@ -12,8 +12,8 @@ defmodule Ory.Api.Metadata do @doc """ - Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + 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. ## Parameters @@ -21,18 +21,70 @@ defmodule Ory.Api.Metadata do - opts (KeywordList): [optional] Optional parameters ## Returns - {:ok, nil} on success + {:ok, Ory.Model.GetVersion200Response.t} on success {:error, Tesla.Env.t} on failure """ - @spec prometheus(Tesla.Env.client, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} - def prometheus(connection, _opts \\ []) do + @spec get_version(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.GetVersion200Response.t} | {:error, Tesla.Env.t} + def get_version(connection, _opts \\ []) do %{} |> method(:get) - |> url("/metrics/prometheus") + |> url("/version") |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> evaluate_response([ - { 200, false} + { 200, %Ory.Model.GetVersion200Response{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.HealthStatus.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec is_alive(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.GenericError.t} | {:ok, Ory.Model.HealthStatus.t} | {:error, Tesla.Env.t} + def is_alive(connection, _opts \\ []) do + %{} + |> method(:get) + |> url("/health/alive") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.HealthStatus{}}, + { 500, %Ory.Model.GenericError{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.IsReady200Response.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec is_ready(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.IsReady200Response.t} | {:ok, Ory.Model.IsReady503Response.t} | {:error, Tesla.Env.t} + def is_ready(connection, _opts \\ []) do + %{} + |> method(:get) + |> url("/health/ready") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.IsReady200Response{}}, + { 503, %Ory.Model.IsReady503Response{}} ]) end end diff --git a/clients/hydra/elixir/lib/ory/api/o_auth2.ex b/clients/hydra/elixir/lib/ory/api/o_auth2.ex new file mode 100644 index 00000000000..33e5d5d5501 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/api/o_auth2.ex @@ -0,0 +1,881 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Api.OAuth2 do + @moduledoc """ + API calls for all endpoints tagged `OAuth2`. + """ + + alias Ory.Connection + import Ory.RequestBuilder + + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - consent_challenge (String.t): OAuth 2.0 Consent Request Challenge + - opts (KeywordList): [optional] Optional parameters + - :body (AcceptOAuth2ConsentRequest): + ## Returns + + {:ok, Ory.Model.OAuth2RedirectTo.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec accept_o_auth2_consent_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2RedirectTo.t} | {:error, Tesla.Env.t} + def accept_o_auth2_consent_request(connection, consent_challenge, opts \\ []) do + optional_params = %{ + :body => :body + } + %{} + |> method(:put) + |> url("/admin/oauth2/auth/requests/consent/accept") + |> add_param(:query, :consent_challenge, consent_challenge) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2RedirectTo{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - login_challenge (String.t): OAuth 2.0 Login Request Challenge + - opts (KeywordList): [optional] Optional parameters + - :body (AcceptOAuth2LoginRequest): + ## Returns + + {:ok, Ory.Model.OAuth2RedirectTo.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec accept_o_auth2_login_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2RedirectTo.t} | {:error, Tesla.Env.t} + def accept_o_auth2_login_request(connection, login_challenge, opts \\ []) do + optional_params = %{ + :body => :body + } + %{} + |> method(:put) + |> url("/admin/oauth2/auth/requests/login/accept") + |> add_param(:query, :login_challenge, login_challenge) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2RedirectTo{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - logout_challenge (String.t): OAuth 2.0 Logout Request Challenge + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2RedirectTo.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec accept_o_auth2_logout_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2RedirectTo.t} | {:error, Tesla.Env.t} + def accept_o_auth2_logout_request(connection, logout_challenge, _opts \\ []) do + %{} + |> method(:put) + |> url("/admin/oauth2/auth/requests/logout/accept") + |> add_param(:query, :logout_challenge, logout_challenge) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2RedirectTo{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - o_auth2_client (OAuth2Client): OAuth 2.0 Client Request Body + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2Client.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec create_o_auth2_client(Tesla.Env.client, Ory.Model.OAuth2Client.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} + def create_o_auth2_client(connection, o_auth2_client, _opts \\ []) do + %{} + |> method(:post) + |> url("/admin/clients") + |> add_param(:body, :body, o_auth2_client) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 201, %Ory.Model.OAuth2Client{}}, + { 400, %Ory.Model.ErrorOAuth2{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): The id of the OAuth 2.0 Client. + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec delete_o_auth2_client(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.GenericError.t} | {:error, Tesla.Env.t} + def delete_o_auth2_client(connection, id, _opts \\ []) do + %{} + |> method(:delete) + |> url("/admin/clients/#{id}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 204, false}, + { :default, %Ory.Model.GenericError{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - client_id (String.t): OAuth 2.0 Client ID + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec delete_o_auth2_token(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + def delete_o_auth2_token(connection, client_id, _opts \\ []) do + %{} + |> method(:delete) + |> url("/admin/oauth2/tokens") + |> add_param(:query, :client_id, client_id) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 204, false}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): The id of the desired grant + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec delete_trusted_o_auth2_jwt_grant_issuer(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.GenericError.t} | {:error, Tesla.Env.t} + def delete_trusted_o_auth2_jwt_grant_issuer(connection, id, _opts \\ []) do + %{} + |> method(:delete) + |> url("/admin/trust/grants/jwt-bearer/issuers/#{id}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 204, false}, + { :default, %Ory.Model.GenericError{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): The id of the OAuth 2.0 Client. + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2Client.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec get_o_auth2_client(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} + def get_o_auth2_client(connection, id, _opts \\ []) do + %{} + |> method(:get) + |> url("/admin/clients/#{id}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2Client{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - consent_challenge (String.t): OAuth 2.0 Consent Request Challenge + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2ConsentRequest.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec get_o_auth2_consent_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.OAuth2ConsentRequest.t} | {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2RedirectTo.t} | {:error, Tesla.Env.t} + def get_o_auth2_consent_request(connection, consent_challenge, _opts \\ []) do + %{} + |> method(:get) + |> url("/admin/oauth2/auth/requests/consent") + |> add_param(:query, :consent_challenge, consent_challenge) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2ConsentRequest{}}, + { 410, %Ory.Model.OAuth2RedirectTo{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - login_challenge (String.t): OAuth 2.0 Login Request Challenge + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2LoginRequest.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec get_o_auth2_login_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2LoginRequest.t} | {:ok, Ory.Model.OAuth2RedirectTo.t} | {:error, Tesla.Env.t} + def get_o_auth2_login_request(connection, login_challenge, _opts \\ []) do + %{} + |> method(:get) + |> url("/admin/oauth2/auth/requests/login") + |> add_param(:query, :login_challenge, login_challenge) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2LoginRequest{}}, + { 410, %Ory.Model.OAuth2RedirectTo{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + Get OAuth 2.0 Session Logout Request + Use this endpoint to fetch an Ory OAuth 2.0 logout request. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - logout_challenge (String.t): + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2LogoutRequest.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec get_o_auth2_logout_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2LogoutRequest.t} | {:ok, Ory.Model.OAuth2RedirectTo.t} | {:error, Tesla.Env.t} + def get_o_auth2_logout_request(connection, logout_challenge, _opts \\ []) do + %{} + |> method(:get) + |> url("/admin/oauth2/auth/requests/logout") + |> add_param(:query, :logout_challenge, logout_challenge) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2LogoutRequest{}}, + { 410, %Ory.Model.OAuth2RedirectTo{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): The id of the desired grant + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.TrustedOAuth2JwtGrantIssuer.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec get_trusted_o_auth2_jwt_grant_issuer(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.TrustedOAuth2JwtGrantIssuer.t} | {:ok, Ory.Model.GenericError.t} | {:error, Tesla.Env.t} + def get_trusted_o_auth2_jwt_grant_issuer(connection, id, _opts \\ []) do + %{} + |> method(:get) + |> url("/admin/trust/grants/jwt-bearer/issuers/#{id}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.TrustedOAuth2JwtGrantIssuer{}}, + { :default, %Ory.Model.GenericError{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - token (String.t): 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. + - opts (KeywordList): [optional] Optional parameters + - :scope (String.t): 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. + ## Returns + + {:ok, Ory.Model.IntrospectedOAuth2Token.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec introspect_o_auth2_token(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.IntrospectedOAuth2Token.t} | {:error, Tesla.Env.t} + def introspect_o_auth2_token(connection, token, opts \\ []) do + optional_params = %{ + :scope => :form + } + %{} + |> method(:post) + |> url("/admin/oauth2/introspect") + |> add_param(:form, :token, token) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.IntrospectedOAuth2Token{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + - :page_size (integer()): 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 (String.t): 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). + - :client_name (String.t): The name of the clients to filter by. + - :owner (String.t): The owner of the clients to filter by. + ## Returns + + {: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} + def list_o_auth2_clients(connection, opts \\ []) do + optional_params = %{ + :page_size => :query, + :page_token => :query, + :client_name => :query, + :owner => :query + } + %{} + |> method(:get) + |> url("/admin/clients") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, [%Ory.Model.OAuth2Client{}]}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - subject (String.t): The subject to list the consent sessions for. + - opts (KeywordList): [optional] Optional parameters + - :page_size (integer()): 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 (String.t): 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). + ## Returns + + {: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} + def list_o_auth2_consent_sessions(connection, subject, opts \\ []) do + optional_params = %{ + :page_size => :query, + :page_token => :query + } + %{} + |> method(:get) + |> url("/admin/oauth2/auth/sessions/consent") + |> add_param(:query, :subject, subject) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, [%Ory.Model.OAuth2ConsentSession{}]}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + List Trusted OAuth2 JWT Bearer Grant Type Issuers + Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + - :max_items (integer()): + - :default_items (integer()): + - :issuer (String.t): If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + ## Returns + + {: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} + def list_trusted_o_auth2_jwt_grant_issuers(connection, opts \\ []) do + optional_params = %{ + :MaxItems => :query, + :DefaultItems => :query, + :issuer => :query + } + %{} + |> method(:get) + |> url("/admin/trust/grants/jwt-bearer/issuers") + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, [%Ory.Model.TrustedOAuth2JwtGrantIssuer{}]}, + { :default, %Ory.Model.GenericError{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.ErrorOAuth2.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec o_auth2_authorize(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + def o_auth2_authorize(connection, _opts \\ []) do + %{} + |> method(:get) + |> url("/oauth2/auth") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 302, false}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - grant_type (String.t): + - opts (KeywordList): [optional] Optional parameters + - :client_id (String.t): + - :code (String.t): + - :redirect_uri (String.t): + - :refresh_token (String.t): + ## Returns + + {:ok, Ory.Model.OAuth2TokenExchange.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec oauth2_token_exchange(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2TokenExchange.t} | {:error, Tesla.Env.t} + def oauth2_token_exchange(connection, grant_type, opts \\ []) do + optional_params = %{ + :client_id => :form, + :code => :form, + :redirect_uri => :form, + :refresh_token => :form + } + %{} + |> method(:post) + |> url("/oauth2/token") + |> add_param(:form, :grant_type, grant_type) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2TokenExchange{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): The id of the OAuth 2.0 Client. + - json_patch ([Ory.Model.JsonPatch.t]): OAuth 2.0 Client JSON Patch Body + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2Client.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec patch_o_auth2_client(Tesla.Env.client, String.t, list(Ory.Model.JsonPatch.t), keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} + def patch_o_auth2_client(connection, id, json_patch, _opts \\ []) do + %{} + |> method(:patch) + |> url("/admin/clients/#{id}") + |> add_param(:body, :body, json_patch) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2Client{}}, + { 404, %Ory.Model.ErrorOAuth2{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - consent_challenge (String.t): OAuth 2.0 Consent Request Challenge + - opts (KeywordList): [optional] Optional parameters + - :body (RejectOAuth2Request): + ## Returns + + {:ok, Ory.Model.OAuth2RedirectTo.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec reject_o_auth2_consent_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2RedirectTo.t} | {:error, Tesla.Env.t} + def reject_o_auth2_consent_request(connection, consent_challenge, opts \\ []) do + optional_params = %{ + :body => :body + } + %{} + |> method(:put) + |> url("/admin/oauth2/auth/requests/consent/reject") + |> add_param(:query, :consent_challenge, consent_challenge) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2RedirectTo{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - login_challenge (String.t): OAuth 2.0 Login Request Challenge + - opts (KeywordList): [optional] Optional parameters + - :body (RejectOAuth2Request): + ## Returns + + {:ok, Ory.Model.OAuth2RedirectTo.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec reject_o_auth2_login_request(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2RedirectTo.t} | {:error, Tesla.Env.t} + def reject_o_auth2_login_request(connection, login_challenge, opts \\ []) do + optional_params = %{ + :body => :body + } + %{} + |> method(:put) + |> url("/admin/oauth2/auth/requests/login/reject") + |> add_param(:query, :login_challenge, login_challenge) + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2RedirectTo{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - logout_challenge (String.t): + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec reject_o_auth2_logout_request(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + def reject_o_auth2_logout_request(connection, logout_challenge, _opts \\ []) do + %{} + |> method(:put) + |> url("/admin/oauth2/auth/requests/logout/reject") + |> add_param(:query, :logout_challenge, logout_challenge) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 204, false}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - subject (String.t): OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + - opts (KeywordList): [optional] Optional parameters + - :client (String.t): OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. + - :all (boolean()): Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec revoke_o_auth2_consent_sessions(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + def revoke_o_auth2_consent_sessions(connection, subject, opts \\ []) do + optional_params = %{ + :client => :query, + :all => :query + } + %{} + |> method(:delete) + |> url("/admin/oauth2/auth/sessions/consent") + |> add_param(:query, :subject, subject) + |> add_optional_params(optional_params, opts) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 204, false}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + Revokes All OAuth 2.0 Login Sessions of a Subject + This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - subject (String.t): OAuth 2.0 Subject The subject to revoke authentication sessions for. + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec revoke_o_auth2_login_sessions(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + def revoke_o_auth2_login_sessions(connection, subject, _opts \\ []) do + %{} + |> method(:delete) + |> url("/admin/oauth2/auth/sessions/login") + |> add_param(:query, :subject, subject) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 204, false}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - token (String.t): + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec revoke_o_auth2_token(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + def revoke_o_auth2_token(connection, token, _opts \\ []) do + %{} + |> method(:post) + |> url("/oauth2/revoke") + |> add_param(:form, :token, token) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, false}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): OAuth 2.0 Client ID + - o_auth2_client (OAuth2Client): OAuth 2.0 Client Request Body + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2Client.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec set_o_auth2_client(Tesla.Env.client, String.t, Ory.Model.OAuth2Client.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} + def set_o_auth2_client(connection, id, o_auth2_client, _opts \\ []) do + %{} + |> method(:put) + |> url("/admin/clients/#{id}") + |> add_param(:body, :body, o_auth2_client) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2Client{}}, + { 400, %Ory.Model.ErrorOAuth2{}}, + { 404, %Ory.Model.ErrorOAuth2{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + Set OAuth2 Client Token Lifespans + Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): OAuth 2.0 Client ID + - opts (KeywordList): [optional] Optional parameters + - :body (OAuth2ClientTokenLifespans): + ## Returns + + {:ok, Ory.Model.OAuth2Client.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec set_o_auth2_client_lifespans(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.GenericError.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} + def set_o_auth2_client_lifespans(connection, id, opts \\ []) do + optional_params = %{ + :body => :body + } + %{} + |> method(:put) + |> url("/admin/clients/#{id}/lifespans") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2Client{}}, + { :default, %Ory.Model.GenericError{}} + ]) + end + + @doc """ + 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). + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + - :body (TrustOAuth2JwtGrantIssuer): + ## Returns + + {:ok, Ory.Model.TrustedOAuth2JwtGrantIssuer.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec trust_o_auth2_jwt_grant_issuer(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.TrustedOAuth2JwtGrantIssuer.t} | {:ok, Ory.Model.GenericError.t} | {:error, Tesla.Env.t} + def trust_o_auth2_jwt_grant_issuer(connection, opts \\ []) do + optional_params = %{ + :body => :body + } + %{} + |> method(:post) + |> url("/admin/trust/grants/jwt-bearer/issuers") + |> add_optional_params(optional_params, opts) + |> ensure_body() + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 201, %Ory.Model.TrustedOAuth2JwtGrantIssuer{}}, + { :default, %Ory.Model.GenericError{}} + ]) + end +end diff --git a/clients/hydra/elixir/lib/ory/api/oidc.ex b/clients/hydra/elixir/lib/ory/api/oidc.ex new file mode 100644 index 00000000000..53070058486 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/api/oidc.ex @@ -0,0 +1,203 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Api.Oidc do + @moduledoc """ + API calls for all endpoints tagged `Oidc`. + """ + + alias Ory.Connection + import Ory.RequestBuilder + + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - o_auth2_client (OAuth2Client): Dynamic Client Registration Request Body + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2Client.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec create_oidc_dynamic_client(Tesla.Env.client, Ory.Model.OAuth2Client.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} + def create_oidc_dynamic_client(connection, o_auth2_client, _opts \\ []) do + %{} + |> method(:post) + |> url("/oauth2/register") + |> add_param(:body, :body, o_auth2_client) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 201, %Ory.Model.OAuth2Client{}}, + { 400, %Ory.Model.ErrorOAuth2{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): The id of the OAuth 2.0 Client. + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec delete_oidc_dynamic_client(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.GenericError.t} | {:error, Tesla.Env.t} + def delete_oidc_dynamic_client(connection, id, _opts \\ []) do + %{} + |> method(:delete) + |> url("/oauth2/register/#{id}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 204, false}, + { :default, %Ory.Model.GenericError{}} + ]) + end + + @doc """ + 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/ + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OidcConfiguration.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec discover_oidc_configuration(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.OidcConfiguration.t} | {:ok, Ory.Model.ErrorOAuth2.t} | {:error, Tesla.Env.t} + def discover_oidc_configuration(connection, _opts \\ []) do + %{} + |> method(:get) + |> url("/.well-known/openid-configuration") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OidcConfiguration{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): The id of the OAuth 2.0 Client. + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2Client.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec get_oidc_dynamic_client(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} + def get_oidc_dynamic_client(connection, id, _opts \\ []) do + %{} + |> method(:get) + |> url("/oauth2/register/#{id}") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2Client{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OidcUserInfo.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec get_oidc_user_info(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OidcUserInfo.t} | {:error, Tesla.Env.t} + def get_oidc_user_info(connection, _opts \\ []) do + %{} + |> method(:get) + |> url("/userinfo") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OidcUserInfo{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, nil} on success + {:error, Tesla.Env.t} on failure + """ + @spec revoke_oidc_session(Tesla.Env.client, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} + def revoke_oidc_session(connection, _opts \\ []) do + %{} + |> method(:get) + |> url("/oauth2/sessions/logout") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 302, false} + ]) + end + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - id (String.t): OAuth 2.0 Client ID + - o_auth2_client (OAuth2Client): OAuth 2.0 Client Request Body + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.OAuth2Client.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec set_oidc_dynamic_client(Tesla.Env.client, String.t, Ory.Model.OAuth2Client.t, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} + def set_oidc_dynamic_client(connection, id, o_auth2_client, _opts \\ []) do + %{} + |> method(:put) + |> url("/oauth2/register/#{id}") + |> add_param(:body, :body, o_auth2_client) + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.OAuth2Client{}}, + { 404, %Ory.Model.ErrorOAuth2{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end +end diff --git a/clients/hydra/elixir/lib/ory/api/public.ex b/clients/hydra/elixir/lib/ory/api/public.ex deleted file mode 100644 index 5dd2359f0de..00000000000 --- a/clients/hydra/elixir/lib/ory/api/public.ex +++ /dev/null @@ -1,352 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Api.Public do - @moduledoc """ - API calls for all endpoints tagged `Public`. - """ - - alias Ory.Connection - import Ory.RequestBuilder - - - @doc """ - OpenID Connect Front-Backchannel Enabled Logout - This endpoint initiates and completes user logout at Ory Hydra 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 - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec disconnect_user(Tesla.Env.client, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} - def disconnect_user(connection, _opts \\ []) do - %{} - |> method(:get) - |> url("/oauth2/sessions/logout") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 302, false} - ]) - end - - @doc """ - OpenID Connect Discovery - The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.WellKnown.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec discover_open_id_configuration(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.WellKnown.t} | {:error, Tesla.Env.t} - def discover_open_id_configuration(connection, _opts \\ []) do - %{} - |> method(:get) - |> url("/.well-known/openid-configuration") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.WellKnown{}}, - { 401, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - body (OAuth2Client): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.OAuth2Client.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec dynamic_client_registration_create_o_auth2_client(Tesla.Env.client, Ory.Model.OAuth2Client.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} - def dynamic_client_registration_create_o_auth2_client(connection, body, _opts \\ []) do - %{} - |> method(:post) - |> url("/connect/register") - |> add_param(:body, :body, body) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 201, %Ory.Model.OAuth2Client{}}, - { :default, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - id (String.t): The id of the OAuth 2.0 Client. - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec dynamic_client_registration_delete_o_auth2_client(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def dynamic_client_registration_delete_o_auth2_client(connection, id, _opts \\ []) do - %{} - |> method(:delete) - |> url("/connect/register/#{id}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 204, false}, - { :default, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - 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. 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - id (String.t): The id of the OAuth 2.0 Client. - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.OAuth2Client.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec dynamic_client_registration_get_o_auth2_client(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} - def dynamic_client_registration_get_o_auth2_client(connection, id, _opts \\ []) do - %{} - |> method(:get) - |> url("/connect/register/#{id}") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.OAuth2Client{}}, - { :default, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - id (String.t): The id of the OAuth 2.0 Client. - - body (OAuth2Client): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.OAuth2Client.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec dynamic_client_registration_update_o_auth2_client(Tesla.Env.client, String.t, Ory.Model.OAuth2Client.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.OAuth2Client.t} | {:error, Tesla.Env.t} - def dynamic_client_registration_update_o_auth2_client(connection, id, body, _opts \\ []) do - %{} - |> method(:put) - |> url("/connect/register/#{id}") - |> add_param(:body, :body, body) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.OAuth2Client{}}, - { :default, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Check Readiness Status - This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.HealthStatus.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec is_instance_ready(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.HealthNotReadyStatus.t} | {:ok, Ory.Model.HealthStatus.t} | {:error, Tesla.Env.t} - def is_instance_ready(connection, _opts \\ []) do - %{} - |> method(:get) - |> url("/health/ready") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.HealthStatus{}}, - { 503, %Ory.Model.HealthNotReadyStatus{}} - ]) - end - - @doc """ - The OAuth 2.0 Token Endpoint - The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - - ## Parameters - - - connection (Ory.Connection): Connection to server - - grant_type (String.t): - - opts (KeywordList): [optional] Optional parameters - - :code (String.t): - - :refresh_token (String.t): - - :redirect_uri (String.t): - - :client_id (String.t): - ## Returns - - {:ok, Ory.Model.Oauth2TokenResponse.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec oauth2_token(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.Oauth2TokenResponse.t} | {:error, Tesla.Env.t} - def oauth2_token(connection, grant_type, opts \\ []) do - optional_params = %{ - :"code" => :form, - :"refresh_token" => :form, - :"redirect_uri" => :form, - :"client_id" => :form - } - %{} - |> method(:post) - |> url("/oauth2/token") - |> add_param(:form, :"grant_type", grant_type) - |> add_optional_params(optional_params, opts) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.Oauth2TokenResponse{}}, - { 400, %Ory.Model.JsonError{}}, - { 401, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - The OAuth 2.0 Authorize Endpoint - This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec oauth_auth(Tesla.Env.client, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def oauth_auth(connection, _opts \\ []) do - %{} - |> method(:get) - |> url("/oauth2/auth") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 302, false}, - { 401, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - Revoke OAuth2 Tokens - 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - token (String.t): - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, nil} on success - {:error, Tesla.Env.t} on failure - """ - @spec revoke_o_auth2_token(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def revoke_o_auth2_token(connection, token, _opts \\ []) do - %{} - |> method(:post) - |> url("/oauth2/revoke") - |> add_param(:form, :"token", token) - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, false}, - { 401, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - OpenID Connect Userinfo - This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.UserinfoResponse.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec userinfo(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.UserinfoResponse.t} | {:ok, Ory.Model.JsonError.t} | {:error, Tesla.Env.t} - def userinfo(connection, _opts \\ []) do - %{} - |> method(:get) - |> url("/userinfo") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.UserinfoResponse{}}, - { 401, %Ory.Model.JsonError{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end - - @doc """ - JSON Web Keys Discovery - This endpoint returns JSON Web Keys to be used as public keys for 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. - - ## Parameters - - - connection (Ory.Connection): Connection to server - - opts (KeywordList): [optional] Optional parameters - ## Returns - - {:ok, Ory.Model.JsonWebKeySet.t} on success - {:error, Tesla.Env.t} on failure - """ - @spec well_known(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.JsonError.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} - def well_known(connection, _opts \\ []) do - %{} - |> method(:get) - |> url("/.well-known/jwks.json") - |> Enum.into([]) - |> (&Connection.request(connection, &1)).() - |> evaluate_response([ - { 200, %Ory.Model.JsonWebKeySet{}}, - { 500, %Ory.Model.JsonError{}} - ]) - end -end diff --git a/clients/hydra/elixir/lib/ory/api/wellknown.ex b/clients/hydra/elixir/lib/ory/api/wellknown.ex new file mode 100644 index 00000000000..7914c733c28 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/api/wellknown.ex @@ -0,0 +1,39 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Api.Wellknown do + @moduledoc """ + API calls for all endpoints tagged `Wellknown`. + """ + + alias Ory.Connection + import Ory.RequestBuilder + + + @doc """ + 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. + + ## Parameters + + - connection (Ory.Connection): Connection to server + - opts (KeywordList): [optional] Optional parameters + ## Returns + + {:ok, Ory.Model.JsonWebKeySet.t} on success + {:error, Tesla.Env.t} on failure + """ + @spec discover_json_web_keys(Tesla.Env.client, keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t} | {:ok, Ory.Model.JsonWebKeySet.t} | {:error, Tesla.Env.t} + def discover_json_web_keys(connection, _opts \\ []) do + %{} + |> method(:get) + |> url("/.well-known/jwks.json") + |> Enum.into([]) + |> (&Connection.request(connection, &1)).() + |> evaluate_response([ + { 200, %Ory.Model.JsonWebKeySet{}}, + { :default, %Ory.Model.ErrorOAuth2{}} + ]) + end +end diff --git a/clients/hydra/elixir/lib/ory/connection.ex b/clients/hydra/elixir/lib/ory/connection.ex index 8e4c73da360..fc8937a9b72 100644 --- a/clients/hydra/elixir/lib/ory/connection.ex +++ b/clients/hydra/elixir/lib/ory/connection.ex @@ -10,7 +10,7 @@ defmodule Ory.Connection do use Tesla # Add any middleware here (authentication) - plug Tesla.Middleware.BaseUrl, Application.get_env(:ory_hydra, :base_url, "http://localhost") + plug Tesla.Middleware.BaseUrl, Application.get_env(:ory_hydra_api, :base_url, "http://localhost") plug Tesla.Middleware.Headers, [{"user-agent", "Elixir"}] plug Tesla.Middleware.EncodeJson, engine: Poison @@ -24,6 +24,24 @@ defmodule Ory.Connection do # Returns + Tesla.Env.client + """ + @spec new(String.t, String.t) :: Tesla.Env.client + def new(username, password) do + Tesla.client([ + {Tesla.Middleware.BasicAuth, %{username: username, password: password}} + ]) + end + @doc """ + Configure a client connection using Basic authentication. + + ## Parameters + + - username (String): Username used for authentication + - password (String): Password used for authentication + + # Returns + Tesla.Env.client """ @spec new(String.t, String.t) :: Tesla.Env.client diff --git a/clients/hydra/elixir/lib/ory/model/accept_consent_request.ex b/clients/hydra/elixir/lib/ory/model/accept_consent_request.ex deleted file mode 100644 index 7e7b1b3947b..00000000000 --- a/clients/hydra/elixir/lib/ory/model/accept_consent_request.ex +++ /dev/null @@ -1,37 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.AcceptConsentRequest do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"grant_access_token_audience", - :"grant_scope", - :"handled_at", - :"remember", - :"remember_for", - :"session" - ] - - @type t :: %__MODULE__{ - :"grant_access_token_audience" => [String.t] | nil, - :"grant_scope" => [String.t] | nil, - :"handled_at" => DateTime.t | nil, - :"remember" => boolean() | nil, - :"remember_for" => integer() | nil, - :"session" => Ory.Model.ConsentRequestSession.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.AcceptConsentRequest do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"session", :struct, Ory.Model.ConsentRequestSession, options) - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/accept_login_request.ex b/clients/hydra/elixir/lib/ory/model/accept_login_request.ex deleted file mode 100644 index 6c8b0a8dafa..00000000000 --- a/clients/hydra/elixir/lib/ory/model/accept_login_request.ex +++ /dev/null @@ -1,37 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.AcceptLoginRequest do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"acr", - :"amr", - :"context", - :"force_subject_identifier", - :"remember", - :"remember_for", - :"subject" - ] - - @type t :: %__MODULE__{ - :"acr" => String.t | nil, - :"amr" => [String.t] | nil, - :"context" => map() | nil, - :"force_subject_identifier" => String.t | nil, - :"remember" => boolean() | nil, - :"remember_for" => integer() | nil, - :"subject" => String.t - } -end - -defimpl Poison.Decoder, for: Ory.Model.AcceptLoginRequest do - def decode(value, _options) do - value - end -end - 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 new file mode 100644 index 00000000000..65e39b8f00a --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request.ex @@ -0,0 +1,37 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.AcceptOAuth2ConsentRequest do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :grant_access_token_audience, + :grant_scope, + :handled_at, + :remember, + :remember_for, + :session + ] + + @type t :: %__MODULE__{ + :grant_access_token_audience => [String.t] | nil, + :grant_scope => [String.t] | nil, + :handled_at => DateTime.t | nil, + :remember => boolean() | nil, + :remember_for => integer() | nil, + :session => Ory.Model.AcceptOAuth2ConsentRequestSession.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.AcceptOAuth2ConsentRequest do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:session, :struct, Ory.Model.AcceptOAuth2ConsentRequestSession, options) + end +end + 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 new file mode 100644 index 00000000000..ad8ad087e3a --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/accept_o_auth2_consent_request_session.ex @@ -0,0 +1,30 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.AcceptOAuth2ConsentRequestSession do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :access_token, + :id_token + ] + + @type t :: %__MODULE__{ + :access_token => AnyType | nil, + :id_token => AnyType | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.AcceptOAuth2ConsentRequestSession do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:access_token, :struct, Ory.Model.AnyType, options) + |> deserialize(:id_token, :struct, Ory.Model.AnyType, options) + end +end + 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 new file mode 100644 index 00000000000..66ff548e595 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/accept_o_auth2_login_request.ex @@ -0,0 +1,39 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.AcceptOAuth2LoginRequest do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :acr, + :amr, + :context, + :force_subject_identifier, + :remember, + :remember_for, + :subject + ] + + @type t :: %__MODULE__{ + :acr => String.t | nil, + :amr => [String.t] | nil, + :context => AnyType | nil, + :force_subject_identifier => String.t | nil, + :remember => boolean() | nil, + :remember_for => integer() | nil, + :subject => String.t + } +end + +defimpl Poison.Decoder, for: Ory.Model.AcceptOAuth2LoginRequest do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:context, :struct, Ory.Model.AnyType, options) + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/consent_request.ex b/clients/hydra/elixir/lib/ory/model/consent_request.ex deleted file mode 100644 index 5de276b43df..00000000000 --- a/clients/hydra/elixir/lib/ory/model/consent_request.ex +++ /dev/null @@ -1,52 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.ConsentRequest do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"acr", - :"amr", - :"challenge", - :"client", - :"context", - :"login_challenge", - :"login_session_id", - :"oidc_context", - :"request_url", - :"requested_access_token_audience", - :"requested_scope", - :"skip", - :"subject" - ] - - @type t :: %__MODULE__{ - :"acr" => String.t | nil, - :"amr" => [String.t] | nil, - :"challenge" => String.t, - :"client" => Ory.Model.OAuth2Client.t | nil, - :"context" => map() | nil, - :"login_challenge" => String.t | nil, - :"login_session_id" => String.t | nil, - :"oidc_context" => Ory.Model.OpenIdConnectContext.t | nil, - :"request_url" => String.t | nil, - :"requested_access_token_audience" => [String.t] | nil, - :"requested_scope" => [String.t] | nil, - :"skip" => boolean() | nil, - :"subject" => String.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.ConsentRequest do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"client", :struct, Ory.Model.OAuth2Client, options) - |> deserialize(:"oidc_context", :struct, Ory.Model.OpenIdConnectContext, options) - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/container_wait_ok_body_error.ex b/clients/hydra/elixir/lib/ory/model/create_json_web_key_set.ex similarity index 57% rename from clients/hydra/elixir/lib/ory/model/container_wait_ok_body_error.ex rename to clients/hydra/elixir/lib/ory/model/create_json_web_key_set.ex index dd6db720d5e..b85f6cf9aba 100644 --- a/clients/hydra/elixir/lib/ory/model/container_wait_ok_body_error.ex +++ b/clients/hydra/elixir/lib/ory/model/create_json_web_key_set.ex @@ -2,22 +2,26 @@ # https://openapi-generator.tech # Do not edit the class manually. -defmodule Ory.Model.ContainerWaitOkBodyError do +defmodule Ory.Model.CreateJsonWebKeySet do @moduledoc """ - ContainerWaitOKBodyError container waiting error, if any + Create JSON Web Key Set Request Body """ @derive [Poison.Encoder] defstruct [ - :"Message" + :alg, + :kid, + :use ] @type t :: %__MODULE__{ - :"Message" => String.t | nil + :alg => String.t, + :kid => String.t, + :use => String.t } end -defimpl Poison.Decoder, for: Ory.Model.ContainerWaitOkBodyError do +defimpl Poison.Decoder, for: Ory.Model.CreateJsonWebKeySet do def decode(value, _options) do value end diff --git a/clients/hydra/elixir/lib/ory/model/error_o_auth2.ex b/clients/hydra/elixir/lib/ory/model/error_o_auth2.ex new file mode 100644 index 00000000000..5f13eb6eb46 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/error_o_auth2.ex @@ -0,0 +1,33 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.ErrorOAuth2 do + @moduledoc """ + Error + """ + + @derive [Poison.Encoder] + defstruct [ + :error, + :error_debug, + :error_description, + :error_hint, + :status_code + ] + + @type t :: %__MODULE__{ + :error => String.t | nil, + :error_debug => String.t | nil, + :error_description => String.t | nil, + :error_hint => String.t | nil, + :status_code => integer() | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.ErrorOAuth2 do + def decode(value, _options) do + value + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/generic_error.ex b/clients/hydra/elixir/lib/ory/model/generic_error.ex index 45e702d24b5..703897c8725 100644 --- a/clients/hydra/elixir/lib/ory/model/generic_error.ex +++ b/clients/hydra/elixir/lib/ory/model/generic_error.ex @@ -9,31 +9,33 @@ defmodule Ory.Model.GenericError do @derive [Poison.Encoder] defstruct [ - :"code", - :"debug", - :"details", - :"id", - :"message", - :"reason", - :"request", - :"status" + :code, + :debug, + :details, + :id, + :message, + :reason, + :request, + :status ] @type t :: %__MODULE__{ - :"code" => integer() | nil, - :"debug" => String.t | nil, - :"details" => map() | nil, - :"id" => String.t | nil, - :"message" => String.t, - :"reason" => String.t | nil, - :"request" => String.t | nil, - :"status" => String.t | nil + :code => integer() | nil, + :debug => String.t | nil, + :details => AnyType | nil, + :id => String.t | nil, + :message => String.t, + :reason => String.t | nil, + :request => String.t | nil, + :status => String.t | nil } end defimpl Poison.Decoder, for: Ory.Model.GenericError do - def decode(value, _options) do + import Ory.Deserializer + def decode(value, options) do value + |> deserialize(:details, :struct, Ory.Model.AnyType, options) end end diff --git a/clients/hydra/elixir/lib/ory/model/request_was_handled_response.ex b/clients/hydra/elixir/lib/ory/model/get_version_200_response.ex similarity index 65% rename from clients/hydra/elixir/lib/ory/model/request_was_handled_response.ex rename to clients/hydra/elixir/lib/ory/model/get_version_200_response.ex index e4330b8e391..f31e9e52ff6 100644 --- a/clients/hydra/elixir/lib/ory/model/request_was_handled_response.ex +++ b/clients/hydra/elixir/lib/ory/model/get_version_200_response.ex @@ -2,22 +2,22 @@ # https://openapi-generator.tech # Do not edit the class manually. -defmodule Ory.Model.RequestWasHandledResponse do +defmodule Ory.Model.GetVersion200Response do @moduledoc """ """ @derive [Poison.Encoder] defstruct [ - :"redirect_to" + :version ] @type t :: %__MODULE__{ - :"redirect_to" => String.t + :version => String.t | nil } end -defimpl Poison.Decoder, for: Ory.Model.RequestWasHandledResponse do +defimpl Poison.Decoder, for: Ory.Model.GetVersion200Response do def decode(value, _options) do value end 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 17fe534b9b4..a4d7c57671f 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 @@ -9,11 +9,11 @@ defmodule Ory.Model.HealthNotReadyStatus do @derive [Poison.Encoder] defstruct [ - :"errors" + :errors ] @type t :: %__MODULE__{ - :"errors" => %{optional(String.t) => String.t} | nil + :errors => %{optional(String.t) => String.t} | nil } end diff --git a/clients/hydra/elixir/lib/ory/model/health_status.ex b/clients/hydra/elixir/lib/ory/model/health_status.ex index 47e1643083e..afdb27cb1a0 100644 --- a/clients/hydra/elixir/lib/ory/model/health_status.ex +++ b/clients/hydra/elixir/lib/ory/model/health_status.ex @@ -9,11 +9,11 @@ defmodule Ory.Model.HealthStatus do @derive [Poison.Encoder] defstruct [ - :"status" + :status ] @type t :: %__MODULE__{ - :"status" => String.t | nil + :status => String.t | nil } end 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 new file mode 100644 index 00000000000..06aef4c8783 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/introspected_o_auth2_token.ex @@ -0,0 +1,53 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.IntrospectedOAuth2Token do + @moduledoc """ + Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) + """ + + @derive [Poison.Encoder] + defstruct [ + :active, + :aud, + :client_id, + :exp, + :ext, + :iat, + :iss, + :nbf, + :obfuscated_subject, + :scope, + :sub, + :token_type, + :token_use, + :username + ] + + @type t :: %__MODULE__{ + :active => boolean(), + :aud => [String.t] | nil, + :client_id => String.t | nil, + :exp => integer() | nil, + :ext => %{optional(String.t) => AnyType} | nil, + :iat => integer() | nil, + :iss => String.t | nil, + :nbf => integer() | nil, + :obfuscated_subject => String.t | nil, + :scope => String.t | nil, + :sub => String.t | nil, + :token_type => String.t | nil, + :token_use => String.t | nil, + :username => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.IntrospectedOAuth2Token do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:ext, :map, Ory.Model.AnyType, options) + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/completed_request.ex b/clients/hydra/elixir/lib/ory/model/is_ready_200_response.ex similarity index 68% rename from clients/hydra/elixir/lib/ory/model/completed_request.ex rename to clients/hydra/elixir/lib/ory/model/is_ready_200_response.ex index 9f3ae51bb79..9c8a7927f7d 100644 --- a/clients/hydra/elixir/lib/ory/model/completed_request.ex +++ b/clients/hydra/elixir/lib/ory/model/is_ready_200_response.ex @@ -2,22 +2,22 @@ # https://openapi-generator.tech # Do not edit the class manually. -defmodule Ory.Model.CompletedRequest do +defmodule Ory.Model.IsReady200Response do @moduledoc """ """ @derive [Poison.Encoder] defstruct [ - :"redirect_to" + :status ] @type t :: %__MODULE__{ - :"redirect_to" => String.t + :status => String.t | nil } end -defimpl Poison.Decoder, for: Ory.Model.CompletedRequest do +defimpl Poison.Decoder, for: Ory.Model.IsReady200Response do def decode(value, _options) do value end diff --git a/clients/hydra/elixir/lib/ory/model/flush_inactive_o_auth2_tokens_request.ex b/clients/hydra/elixir/lib/ory/model/is_ready_503_response.ex similarity index 63% rename from clients/hydra/elixir/lib/ory/model/flush_inactive_o_auth2_tokens_request.ex rename to clients/hydra/elixir/lib/ory/model/is_ready_503_response.ex index 1ea7c599ac4..9843392dad7 100644 --- a/clients/hydra/elixir/lib/ory/model/flush_inactive_o_auth2_tokens_request.ex +++ b/clients/hydra/elixir/lib/ory/model/is_ready_503_response.ex @@ -2,22 +2,22 @@ # https://openapi-generator.tech # Do not edit the class manually. -defmodule Ory.Model.FlushInactiveOAuth2TokensRequest do +defmodule Ory.Model.IsReady503Response do @moduledoc """ """ @derive [Poison.Encoder] defstruct [ - :"notAfter" + :errors ] @type t :: %__MODULE__{ - :"notAfter" => DateTime.t | nil + :errors => %{optional(String.t) => String.t} | nil } end -defimpl Poison.Decoder, for: Ory.Model.FlushInactiveOAuth2TokensRequest do +defimpl Poison.Decoder, for: Ory.Model.IsReady503Response do def decode(value, _options) do value end diff --git a/clients/hydra/elixir/lib/ory/model/json_error.ex b/clients/hydra/elixir/lib/ory/model/json_error.ex deleted file mode 100644 index 95ef50e64fd..00000000000 --- a/clients/hydra/elixir/lib/ory/model/json_error.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.JsonError do - @moduledoc """ - Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. - """ - - @derive [Poison.Encoder] - defstruct [ - :"error", - :"error_debug", - :"error_description", - :"status_code" - ] - - @type t :: %__MODULE__{ - :"error" => String.t | nil, - :"error_debug" => String.t | nil, - :"error_description" => String.t | nil, - :"status_code" => integer() | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.JsonError do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/json_patch.ex b/clients/hydra/elixir/lib/ory/model/json_patch.ex new file mode 100644 index 00000000000..5d85daf4390 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/json_patch.ex @@ -0,0 +1,33 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.JsonPatch do + @moduledoc """ + A JSONPatch document as defined by RFC 6902 + """ + + @derive [Poison.Encoder] + defstruct [ + :from, + :op, + :path, + :value + ] + + @type t :: %__MODULE__{ + :from => String.t | nil, + :op => String.t, + :path => String.t, + :value => AnyType | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.JsonPatch do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:value, :struct, Ory.Model.AnyType, options) + end +end + 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 520eb3bef43..2252351cf22 100644 --- a/clients/hydra/elixir/lib/ory/model/json_web_key.ex +++ b/clients/hydra/elixir/lib/ory/model/json_web_key.ex @@ -4,48 +4,48 @@ defmodule Ory.Model.JsonWebKey do @moduledoc """ - It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. + """ @derive [Poison.Encoder] defstruct [ - :"alg", - :"crv", - :"d", - :"dp", - :"dq", - :"e", - :"k", - :"kid", - :"kty", - :"n", - :"p", - :"q", - :"qi", - :"use", - :"x", - :"x5c", - :"y" + :alg, + :crv, + :d, + :dp, + :dq, + :e, + :k, + :kid, + :kty, + :n, + :p, + :q, + :qi, + :use, + :x, + :x5c, + :y ] @type t :: %__MODULE__{ - :"alg" => String.t, - :"crv" => String.t | nil, - :"d" => String.t | nil, - :"dp" => String.t | nil, - :"dq" => String.t | nil, - :"e" => String.t | nil, - :"k" => String.t | nil, - :"kid" => String.t, - :"kty" => String.t, - :"n" => String.t | nil, - :"p" => String.t | nil, - :"q" => String.t | nil, - :"qi" => String.t | nil, - :"use" => String.t, - :"x" => String.t | nil, - :"x5c" => [String.t] | nil, - :"y" => String.t | nil + :alg => String.t, + :crv => String.t | nil, + :d => String.t | nil, + :dp => String.t | nil, + :dq => String.t | nil, + :e => String.t | nil, + :k => String.t | nil, + :kid => String.t, + :kty => String.t, + :n => String.t | nil, + :p => String.t | nil, + :q => String.t | nil, + :qi => String.t | nil, + :use => String.t, + :x => String.t | nil, + :x5c => [String.t] | nil, + :y => String.t | nil } end 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 36b4049fc4f..4c32576fec2 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 @@ -4,16 +4,16 @@ defmodule Ory.Model.JsonWebKeySet do @moduledoc """ - It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. + JSON Web Key Set """ @derive [Poison.Encoder] defstruct [ - :"keys" + :keys ] @type t :: %__MODULE__{ - :"keys" => [Ory.Model.JsonWebKey.t] | nil + :keys => [Ory.Model.JsonWebKey.t] | nil } end @@ -21,7 +21,7 @@ defimpl Poison.Decoder, for: Ory.Model.JsonWebKeySet do import Ory.Deserializer def decode(value, options) do value - |> deserialize(:"keys", :list, Ory.Model.JsonWebKey, options) + |> deserialize(:keys, :list, Ory.Model.JsonWebKey, options) end end diff --git a/clients/hydra/elixir/lib/ory/model/json_web_key_set_generator_request.ex b/clients/hydra/elixir/lib/ory/model/json_web_key_set_generator_request.ex deleted file mode 100644 index 66b16d375ec..00000000000 --- a/clients/hydra/elixir/lib/ory/model/json_web_key_set_generator_request.ex +++ /dev/null @@ -1,29 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.JsonWebKeySetGeneratorRequest do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"alg", - :"kid", - :"use" - ] - - @type t :: %__MODULE__{ - :"alg" => String.t, - :"kid" => String.t, - :"use" => String.t - } -end - -defimpl Poison.Decoder, for: Ory.Model.JsonWebKeySetGeneratorRequest do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/login_request.ex b/clients/hydra/elixir/lib/ory/model/login_request.ex deleted file mode 100644 index 17e3bf7b773..00000000000 --- a/clients/hydra/elixir/lib/ory/model/login_request.ex +++ /dev/null @@ -1,44 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.LoginRequest do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"challenge", - :"client", - :"oidc_context", - :"request_url", - :"requested_access_token_audience", - :"requested_scope", - :"session_id", - :"skip", - :"subject" - ] - - @type t :: %__MODULE__{ - :"challenge" => String.t, - :"client" => Ory.Model.OAuth2Client.t, - :"oidc_context" => Ory.Model.OpenIdConnectContext.t | nil, - :"request_url" => String.t, - :"requested_access_token_audience" => [String.t], - :"requested_scope" => [String.t], - :"session_id" => String.t | nil, - :"skip" => boolean(), - :"subject" => String.t - } -end - -defimpl Poison.Decoder, for: Ory.Model.LoginRequest do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"client", :struct, Ory.Model.OAuth2Client, options) - |> deserialize(:"oidc_context", :struct, Ory.Model.OpenIdConnectContext, options) - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/logout_request.ex b/clients/hydra/elixir/lib/ory/model/logout_request.ex deleted file mode 100644 index bc73650ebb3..00000000000 --- a/clients/hydra/elixir/lib/ory/model/logout_request.ex +++ /dev/null @@ -1,37 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.LogoutRequest do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"challenge", - :"client", - :"request_url", - :"rp_initiated", - :"sid", - :"subject" - ] - - @type t :: %__MODULE__{ - :"challenge" => String.t | nil, - :"client" => Ory.Model.OAuth2Client.t | nil, - :"request_url" => String.t | nil, - :"rp_initiated" => boolean() | nil, - :"sid" => String.t | nil, - :"subject" => String.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.LogoutRequest do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"client", :struct, Ory.Model.OAuth2Client, options) - end -end - 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 3949e107b89..8ebf6f3154f 100644 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_client.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_client.ex @@ -4,90 +4,113 @@ defmodule Ory.Model.OAuth2Client do @moduledoc """ - + 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 [Poison.Encoder] defstruct [ - :"allowed_cors_origins", - :"audience", - :"backchannel_logout_session_required", - :"backchannel_logout_uri", - :"client_id", - :"client_name", - :"client_secret", - :"client_secret_expires_at", - :"client_uri", - :"contacts", - :"created_at", - :"frontchannel_logout_session_required", - :"frontchannel_logout_uri", - :"grant_types", - :"jwks", - :"jwks_uri", - :"logo_uri", - :"metadata", - :"owner", - :"policy_uri", - :"post_logout_redirect_uris", - :"redirect_uris", - :"registration_access_token", - :"registration_client_uri", - :"request_object_signing_alg", - :"request_uris", - :"response_types", - :"scope", - :"sector_identifier_uri", - :"subject_type", - :"token_endpoint_auth_method", - :"token_endpoint_auth_signing_alg", - :"tos_uri", - :"updated_at", - :"userinfo_signed_response_alg" + :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, + :subject_type, + :token_endpoint_auth_method, + :token_endpoint_auth_signing_alg, + :tos_uri, + :updated_at, + :userinfo_signed_response_alg ] @type t :: %__MODULE__{ - :"allowed_cors_origins" => [String.t] | nil, - :"audience" => [String.t] | nil, - :"backchannel_logout_session_required" => boolean() | nil, - :"backchannel_logout_uri" => String.t | nil, - :"client_id" => String.t | nil, - :"client_name" => String.t | nil, - :"client_secret" => String.t | nil, - :"client_secret_expires_at" => integer() | nil, - :"client_uri" => String.t | nil, - :"contacts" => [String.t] | nil, - :"created_at" => DateTime.t | nil, - :"frontchannel_logout_session_required" => boolean() | nil, - :"frontchannel_logout_uri" => String.t | nil, - :"grant_types" => [String.t] | nil, - :"jwks" => map() | nil, - :"jwks_uri" => String.t | nil, - :"logo_uri" => String.t | nil, - :"metadata" => map() | nil, - :"owner" => String.t | nil, - :"policy_uri" => String.t | nil, - :"post_logout_redirect_uris" => [String.t] | nil, - :"redirect_uris" => [String.t] | nil, - :"registration_access_token" => String.t | nil, - :"registration_client_uri" => String.t | nil, - :"request_object_signing_alg" => String.t | nil, - :"request_uris" => [String.t] | nil, - :"response_types" => [String.t] | nil, - :"scope" => String.t | nil, - :"sector_identifier_uri" => String.t | nil, - :"subject_type" => String.t | nil, - :"token_endpoint_auth_method" => String.t | nil, - :"token_endpoint_auth_signing_alg" => String.t | nil, - :"tos_uri" => String.t | nil, - :"updated_at" => DateTime.t | nil, - :"userinfo_signed_response_alg" => String.t | nil + :allowed_cors_origins => [String.t] | nil, + :audience => [String.t] | nil, + :authorization_code_grant_access_token_lifespan => String.t | nil, + :authorization_code_grant_id_token_lifespan => String.t | nil, + :authorization_code_grant_refresh_token_lifespan => String.t | nil, + :backchannel_logout_session_required => boolean() | nil, + :backchannel_logout_uri => String.t | nil, + :client_credentials_grant_access_token_lifespan => String.t | nil, + :client_id => String.t | nil, + :client_name => String.t | nil, + :client_secret => String.t | nil, + :client_secret_expires_at => integer() | nil, + :client_uri => String.t | nil, + :contacts => [String.t] | nil, + :created_at => DateTime.t | nil, + :frontchannel_logout_session_required => boolean() | nil, + :frontchannel_logout_uri => String.t | nil, + :grant_types => [String.t] | nil, + :implicit_grant_access_token_lifespan => String.t | nil, + :implicit_grant_id_token_lifespan => String.t | nil, + :jwks => AnyType | nil, + :jwks_uri => String.t | nil, + :jwt_bearer_grant_access_token_lifespan => String.t | nil, + :logo_uri => String.t | nil, + :metadata => AnyType | nil, + :owner => String.t | nil, + :policy_uri => String.t | nil, + :post_logout_redirect_uris => [String.t] | nil, + :redirect_uris => [String.t] | nil, + :refresh_token_grant_access_token_lifespan => String.t | nil, + :refresh_token_grant_id_token_lifespan => String.t | nil, + :refresh_token_grant_refresh_token_lifespan => String.t | nil, + :registration_access_token => String.t | nil, + :registration_client_uri => String.t | nil, + :request_object_signing_alg => String.t | nil, + :request_uris => [String.t] | nil, + :response_types => [String.t] | nil, + :scope => String.t | nil, + :sector_identifier_uri => String.t | nil, + :subject_type => String.t | nil, + :token_endpoint_auth_method => String.t | nil, + :token_endpoint_auth_signing_alg => String.t | nil, + :tos_uri => String.t | nil, + :updated_at => DateTime.t | nil, + :userinfo_signed_response_alg => String.t | nil } end defimpl Poison.Decoder, for: Ory.Model.OAuth2Client do - def decode(value, _options) do + import Ory.Deserializer + def decode(value, options) do value + |> deserialize(:jwks, :struct, Ory.Model.AnyType, options) + |> deserialize(:metadata, :struct, Ory.Model.AnyType, options) end end 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 new file mode 100644 index 00000000000..e00cbf4deca --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_client_token_lifespans.ex @@ -0,0 +1,43 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OAuth2ClientTokenLifespans do + @moduledoc """ + Lifespans of different token types issued for this OAuth 2.0 Client. + """ + + @derive [Poison.Encoder] + defstruct [ + :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 + ] + + @type t :: %__MODULE__{ + :authorization_code_grant_access_token_lifespan => String.t | nil, + :authorization_code_grant_id_token_lifespan => String.t | nil, + :authorization_code_grant_refresh_token_lifespan => String.t | nil, + :client_credentials_grant_access_token_lifespan => String.t | nil, + :implicit_grant_access_token_lifespan => String.t | nil, + :implicit_grant_id_token_lifespan => String.t | nil, + :jwt_bearer_grant_access_token_lifespan => String.t | nil, + :refresh_token_grant_access_token_lifespan => String.t | nil, + :refresh_token_grant_id_token_lifespan => String.t | nil, + :refresh_token_grant_refresh_token_lifespan => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.OAuth2ClientTokenLifespans do + def decode(value, _options) do + value + end +end + 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 new file mode 100644 index 00000000000..cff740b963c --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request.ex @@ -0,0 +1,53 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OAuth2ConsentRequest do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :acr, + :amr, + :challenge, + :client, + :context, + :login_challenge, + :login_session_id, + :oidc_context, + :request_url, + :requested_access_token_audience, + :requested_scope, + :skip, + :subject + ] + + @type t :: %__MODULE__{ + :acr => String.t | nil, + :amr => [String.t] | nil, + :challenge => String.t, + :client => Ory.Model.OAuth2Client.t | nil, + :context => AnyType | nil, + :login_challenge => String.t | nil, + :login_session_id => String.t | nil, + :oidc_context => Ory.Model.OAuth2ConsentRequestOpenIdConnectContext.t | nil, + :request_url => String.t | nil, + :requested_access_token_audience => [String.t] | nil, + :requested_scope => [String.t] | nil, + :skip => boolean() | nil, + :subject => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.OAuth2ConsentRequest do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:client, :struct, Ory.Model.OAuth2Client, options) + |> deserialize(:context, :struct, Ory.Model.AnyType, options) + |> deserialize(:oidc_context, :struct, Ory.Model.OAuth2ConsentRequestOpenIdConnectContext, options) + end +end + 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 new file mode 100644 index 00000000000..1287b54ae14 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_request_open_id_connect_context.ex @@ -0,0 +1,35 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OAuth2ConsentRequestOpenIdConnectContext do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :acr_values, + :display, + :id_token_hint_claims, + :login_hint, + :ui_locales + ] + + @type t :: %__MODULE__{ + :acr_values => [String.t] | nil, + :display => String.t | nil, + :id_token_hint_claims => %{optional(String.t) => AnyType} | nil, + :login_hint => String.t | nil, + :ui_locales => [String.t] | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.OAuth2ConsentRequestOpenIdConnectContext do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:id_token_hint_claims, :map, Ory.Model.AnyType, options) + end +end + 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 new file mode 100644 index 00000000000..8818a26a0b4 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session.ex @@ -0,0 +1,43 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OAuth2ConsentSession do + @moduledoc """ + A completed OAuth 2.0 Consent Session. + """ + + @derive [Poison.Encoder] + defstruct [ + :consent_request, + :expires_at, + :grant_access_token_audience, + :grant_scope, + :handled_at, + :remember, + :remember_for, + :session + ] + + @type t :: %__MODULE__{ + :consent_request => Ory.Model.OAuth2ConsentRequest.t | nil, + :expires_at => Ory.Model.OAuth2ConsentSessionExpiresAt.t | nil, + :grant_access_token_audience => [String.t] | nil, + :grant_scope => [String.t] | nil, + :handled_at => DateTime.t | nil, + :remember => boolean() | nil, + :remember_for => integer() | nil, + :session => Ory.Model.AcceptOAuth2ConsentRequestSession.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.OAuth2ConsentSession do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:consent_request, :struct, Ory.Model.OAuth2ConsentRequest, options) + |> deserialize(:expires_at, :struct, Ory.Model.OAuth2ConsentSessionExpiresAt, options) + |> deserialize(:session, :struct, Ory.Model.AcceptOAuth2ConsentRequestSession, options) + end +end + 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 new file mode 100644 index 00000000000..0044dbdbd3e --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_consent_session_expires_at.ex @@ -0,0 +1,33 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OAuth2ConsentSessionExpiresAt do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :access_token, + :authorize_code, + :id_token, + :par_context, + :refresh_token + ] + + @type t :: %__MODULE__{ + :access_token => DateTime.t | nil, + :authorize_code => DateTime.t | nil, + :id_token => DateTime.t | nil, + :par_context => DateTime.t | nil, + :refresh_token => DateTime.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.OAuth2ConsentSessionExpiresAt do + def decode(value, _options) do + value + end +end + 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 new file mode 100644 index 00000000000..8108eadb0f3 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_login_request.ex @@ -0,0 +1,44 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OAuth2LoginRequest do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :challenge, + :client, + :oidc_context, + :request_url, + :requested_access_token_audience, + :requested_scope, + :session_id, + :skip, + :subject + ] + + @type t :: %__MODULE__{ + :challenge => String.t, + :client => Ory.Model.OAuth2Client.t, + :oidc_context => Ory.Model.OAuth2ConsentRequestOpenIdConnectContext.t | nil, + :request_url => String.t, + :requested_access_token_audience => [String.t], + :requested_scope => [String.t], + :session_id => String.t | nil, + :skip => boolean(), + :subject => String.t + } +end + +defimpl Poison.Decoder, for: Ory.Model.OAuth2LoginRequest do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:client, :struct, Ory.Model.OAuth2Client, options) + |> deserialize(:oidc_context, :struct, Ory.Model.OAuth2ConsentRequestOpenIdConnectContext, options) + end +end + 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 new file mode 100644 index 00000000000..6408b6b8126 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_logout_request.ex @@ -0,0 +1,37 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OAuth2LogoutRequest do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :challenge, + :client, + :request_url, + :rp_initiated, + :sid, + :subject + ] + + @type t :: %__MODULE__{ + :challenge => String.t | nil, + :client => Ory.Model.OAuth2Client.t | nil, + :request_url => String.t | nil, + :rp_initiated => boolean() | nil, + :sid => String.t | nil, + :subject => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.OAuth2LogoutRequest do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:client, :struct, Ory.Model.OAuth2Client, options) + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/consent_request_session.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_redirect_to.ex similarity index 58% rename from clients/hydra/elixir/lib/ory/model/consent_request_session.ex rename to clients/hydra/elixir/lib/ory/model/o_auth2_redirect_to.ex index f84468ed07a..4fbb53bd911 100644 --- a/clients/hydra/elixir/lib/ory/model/consent_request_session.ex +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_redirect_to.ex @@ -2,24 +2,22 @@ # https://openapi-generator.tech # Do not edit the class manually. -defmodule Ory.Model.ConsentRequestSession do +defmodule Ory.Model.OAuth2RedirectTo do @moduledoc """ - + Contains a redirect URL used to complete a login, consent, or logout request. """ @derive [Poison.Encoder] defstruct [ - :"access_token", - :"id_token" + :redirect_to ] @type t :: %__MODULE__{ - :"access_token" => map() | nil, - :"id_token" => map() | nil + :redirect_to => String.t } end -defimpl Poison.Decoder, for: Ory.Model.ConsentRequestSession do +defimpl Poison.Decoder, for: Ory.Model.OAuth2RedirectTo do def decode(value, _options) do value end 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 new file mode 100644 index 00000000000..bdb6fdcc092 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/o_auth2_token_exchange.ex @@ -0,0 +1,35 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OAuth2TokenExchange do + @moduledoc """ + OAuth2 Token Exchange Result + """ + + @derive [Poison.Encoder] + defstruct [ + :access_token, + :expires_in, + :id_token, + :refresh_token, + :scope, + :token_type + ] + + @type t :: %__MODULE__{ + :access_token => String.t | nil, + :expires_in => integer() | nil, + :id_token => integer() | nil, + :refresh_token => String.t | nil, + :scope => integer() | nil, + :token_type => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.OAuth2TokenExchange do + def decode(value, _options) do + value + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/o_auth2_token_introspection.ex b/clients/hydra/elixir/lib/ory/model/o_auth2_token_introspection.ex deleted file mode 100644 index abd85886d8c..00000000000 --- a/clients/hydra/elixir/lib/ory/model/o_auth2_token_introspection.ex +++ /dev/null @@ -1,51 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.OAuth2TokenIntrospection do - @moduledoc """ - https://tools.ietf.org/html/rfc7662 - """ - - @derive [Poison.Encoder] - defstruct [ - :"active", - :"aud", - :"client_id", - :"exp", - :"ext", - :"iat", - :"iss", - :"nbf", - :"obfuscated_subject", - :"scope", - :"sub", - :"token_type", - :"token_use", - :"username" - ] - - @type t :: %__MODULE__{ - :"active" => boolean(), - :"aud" => [String.t] | nil, - :"client_id" => String.t | nil, - :"exp" => integer() | nil, - :"ext" => map() | nil, - :"iat" => integer() | nil, - :"iss" => String.t | nil, - :"nbf" => integer() | nil, - :"obfuscated_subject" => String.t | nil, - :"scope" => String.t | nil, - :"sub" => String.t | nil, - :"token_type" => String.t | nil, - :"token_use" => String.t | nil, - :"username" => String.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.OAuth2TokenIntrospection do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/oauth2_token_response.ex b/clients/hydra/elixir/lib/ory/model/oauth2_token_response.ex deleted file mode 100644 index e0b68f97726..00000000000 --- a/clients/hydra/elixir/lib/ory/model/oauth2_token_response.ex +++ /dev/null @@ -1,35 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.Oauth2TokenResponse do - @moduledoc """ - The Access Token Response - """ - - @derive [Poison.Encoder] - defstruct [ - :"access_token", - :"expires_in", - :"id_token", - :"refresh_token", - :"scope", - :"token_type" - ] - - @type t :: %__MODULE__{ - :"access_token" => String.t | nil, - :"expires_in" => integer() | nil, - :"id_token" => String.t | nil, - :"refresh_token" => String.t | nil, - :"scope" => String.t | nil, - :"token_type" => String.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.Oauth2TokenResponse do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/oidc_configuration.ex b/clients/hydra/elixir/lib/ory/model/oidc_configuration.ex new file mode 100644 index 00000000000..491b183c150 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/oidc_configuration.ex @@ -0,0 +1,81 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OidcConfiguration do + @moduledoc """ + Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. + """ + + @derive [Poison.Encoder] + defstruct [ + :authorization_endpoint, + :backchannel_logout_session_supported, + :backchannel_logout_supported, + :claims_parameter_supported, + :claims_supported, + :code_challenge_methods_supported, + :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 + ] + + @type t :: %__MODULE__{ + :authorization_endpoint => String.t, + :backchannel_logout_session_supported => boolean() | nil, + :backchannel_logout_supported => boolean() | nil, + :claims_parameter_supported => boolean() | nil, + :claims_supported => [String.t] | nil, + :code_challenge_methods_supported => [String.t] | nil, + :end_session_endpoint => String.t | nil, + :frontchannel_logout_session_supported => boolean() | nil, + :frontchannel_logout_supported => boolean() | nil, + :grant_types_supported => [String.t] | nil, + :id_token_signed_response_alg => [String.t], + :id_token_signing_alg_values_supported => [String.t], + :issuer => String.t, + :jwks_uri => String.t, + :registration_endpoint => String.t | nil, + :request_object_signing_alg_values_supported => [String.t] | nil, + :request_parameter_supported => boolean() | nil, + :request_uri_parameter_supported => boolean() | nil, + :require_request_uri_registration => boolean() | nil, + :response_modes_supported => [String.t] | nil, + :response_types_supported => [String.t], + :revocation_endpoint => String.t | nil, + :scopes_supported => [String.t] | nil, + :subject_types_supported => [String.t], + :token_endpoint => String.t, + :token_endpoint_auth_methods_supported => [String.t] | nil, + :userinfo_endpoint => String.t | nil, + :userinfo_signed_response_alg => [String.t], + :userinfo_signing_alg_values_supported => [String.t] | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.OidcConfiguration do + def decode(value, _options) do + value + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/oidc_user_info.ex b/clients/hydra/elixir/lib/ory/model/oidc_user_info.ex new file mode 100644 index 00000000000..bff7c37d106 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/oidc_user_info.ex @@ -0,0 +1,61 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.OidcUserInfo do + @moduledoc """ + OpenID Connect Userinfo + """ + + @derive [Poison.Encoder] + defstruct [ + :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 + ] + + @type t :: %__MODULE__{ + :birthdate => String.t | nil, + :email => String.t | nil, + :email_verified => boolean() | nil, + :family_name => String.t | nil, + :gender => String.t | nil, + :given_name => String.t | nil, + :locale => String.t | nil, + :middle_name => String.t | nil, + :name => String.t | nil, + :nickname => String.t | nil, + :phone_number => String.t | nil, + :phone_number_verified => boolean() | nil, + :picture => String.t | nil, + :preferred_username => String.t | nil, + :profile => String.t | nil, + :sub => String.t | nil, + :updated_at => integer() | nil, + :website => String.t | nil, + :zoneinfo => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.OidcUserInfo do + def decode(value, _options) do + value + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/open_id_connect_context.ex b/clients/hydra/elixir/lib/ory/model/open_id_connect_context.ex deleted file mode 100644 index 2ade8cf6e75..00000000000 --- a/clients/hydra/elixir/lib/ory/model/open_id_connect_context.ex +++ /dev/null @@ -1,33 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.OpenIdConnectContext do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"acr_values", - :"display", - :"id_token_hint_claims", - :"login_hint", - :"ui_locales" - ] - - @type t :: %__MODULE__{ - :"acr_values" => [String.t] | nil, - :"display" => String.t | nil, - :"id_token_hint_claims" => map() | nil, - :"login_hint" => String.t | nil, - :"ui_locales" => [String.t] | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.OpenIdConnectContext do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/trusted_json_web_key.ex b/clients/hydra/elixir/lib/ory/model/pagination.ex similarity index 63% rename from clients/hydra/elixir/lib/ory/model/trusted_json_web_key.ex rename to clients/hydra/elixir/lib/ory/model/pagination.ex index 2d5f24f77a8..d0c300094eb 100644 --- a/clients/hydra/elixir/lib/ory/model/trusted_json_web_key.ex +++ b/clients/hydra/elixir/lib/ory/model/pagination.ex @@ -2,24 +2,24 @@ # https://openapi-generator.tech # Do not edit the class manually. -defmodule Ory.Model.TrustedJsonWebKey do +defmodule Ory.Model.Pagination do @moduledoc """ """ @derive [Poison.Encoder] defstruct [ - :"kid", - :"set" + :page_size, + :page_token ] @type t :: %__MODULE__{ - :"kid" => String.t | nil, - :"set" => String.t | nil + :page_size => integer() | nil, + :page_token => String.t | nil } end -defimpl Poison.Decoder, for: Ory.Model.TrustedJsonWebKey do +defimpl Poison.Decoder, for: Ory.Model.Pagination do def decode(value, _options) do value end diff --git a/clients/hydra/elixir/lib/ory/model/pagination_headers.ex b/clients/hydra/elixir/lib/ory/model/pagination_headers.ex new file mode 100644 index 00000000000..9ea140268d5 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/pagination_headers.ex @@ -0,0 +1,27 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.PaginationHeaders do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :link, + :"x-total-count" + ] + + @type t :: %__MODULE__{ + :link => String.t | nil, + :"x-total-count" => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.PaginationHeaders do + def decode(value, _options) do + value + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/patch_document.ex b/clients/hydra/elixir/lib/ory/model/patch_document.ex deleted file mode 100644 index 5ded9b8483b..00000000000 --- a/clients/hydra/elixir/lib/ory/model/patch_document.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PatchDocument do - @moduledoc """ - A JSONPatch document as defined by RFC 6902 - """ - - @derive [Poison.Encoder] - defstruct [ - :"from", - :"op", - :"path", - :"value" - ] - - @type t :: %__MODULE__{ - :"from" => String.t | nil, - :"op" => String.t, - :"path" => String.t, - :"value" => map() | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.PatchDocument do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_config.ex b/clients/hydra/elixir/lib/ory/model/plugin_config.ex deleted file mode 100644 index abd2cb2fdcf..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_config.ex +++ /dev/null @@ -1,64 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginConfig do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"Args", - :"Description", - :"DockerVersion", - :"Documentation", - :"Entrypoint", - :"Env", - :"Interface", - :"IpcHost", - :"Linux", - :"Mounts", - :"Network", - :"PidHost", - :"PropagatedMount", - :"User", - :"WorkDir", - :"rootfs" - ] - - @type t :: %__MODULE__{ - :"Args" => Ory.Model.PluginConfigArgs.t, - :"Description" => String.t, - :"DockerVersion" => String.t | nil, - :"Documentation" => String.t, - :"Entrypoint" => [String.t], - :"Env" => [Ory.Model.PluginEnv.t], - :"Interface" => Ory.Model.PluginConfigInterface.t, - :"IpcHost" => boolean(), - :"Linux" => Ory.Model.PluginConfigLinux.t, - :"Mounts" => [Ory.Model.PluginMount.t], - :"Network" => Ory.Model.PluginConfigNetwork.t, - :"PidHost" => boolean(), - :"PropagatedMount" => String.t, - :"User" => Ory.Model.PluginConfigUser.t | nil, - :"WorkDir" => String.t, - :"rootfs" => Ory.Model.PluginConfigRootfs.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginConfig do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"Args", :struct, Ory.Model.PluginConfigArgs, options) - |> deserialize(:"Env", :list, Ory.Model.PluginEnv, options) - |> deserialize(:"Interface", :struct, Ory.Model.PluginConfigInterface, options) - |> deserialize(:"Linux", :struct, Ory.Model.PluginConfigLinux, options) - |> deserialize(:"Mounts", :list, Ory.Model.PluginMount, options) - |> deserialize(:"Network", :struct, Ory.Model.PluginConfigNetwork, options) - |> deserialize(:"User", :struct, Ory.Model.PluginConfigUser, options) - |> deserialize(:"rootfs", :struct, Ory.Model.PluginConfigRootfs, options) - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_config_args.ex b/clients/hydra/elixir/lib/ory/model/plugin_config_args.ex deleted file mode 100644 index ca9c30d3805..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_config_args.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginConfigArgs do - @moduledoc """ - PluginConfigArgs plugin config args - """ - - @derive [Poison.Encoder] - defstruct [ - :"Description", - :"Name", - :"Settable", - :"Value" - ] - - @type t :: %__MODULE__{ - :"Description" => String.t, - :"Name" => String.t, - :"Settable" => [String.t], - :"Value" => [String.t] - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginConfigArgs do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_config_interface.ex b/clients/hydra/elixir/lib/ory/model/plugin_config_interface.ex deleted file mode 100644 index 60b2f12589d..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_config_interface.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginConfigInterface do - @moduledoc """ - PluginConfigInterface The interface between Docker and the plugin - """ - - @derive [Poison.Encoder] - defstruct [ - :"ProtocolScheme", - :"Socket", - :"Types" - ] - - @type t :: %__MODULE__{ - :"ProtocolScheme" => String.t | nil, - :"Socket" => String.t, - :"Types" => [Ory.Model.PluginInterfaceType.t] - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginConfigInterface do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"Types", :list, Ory.Model.PluginInterfaceType, options) - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_config_linux.ex b/clients/hydra/elixir/lib/ory/model/plugin_config_linux.ex deleted file mode 100644 index 2e63c4fdb96..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_config_linux.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginConfigLinux do - @moduledoc """ - PluginConfigLinux plugin config linux - """ - - @derive [Poison.Encoder] - defstruct [ - :"AllowAllDevices", - :"Capabilities", - :"Devices" - ] - - @type t :: %__MODULE__{ - :"AllowAllDevices" => boolean(), - :"Capabilities" => [String.t], - :"Devices" => [Ory.Model.PluginDevice.t] - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginConfigLinux do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"Devices", :list, Ory.Model.PluginDevice, options) - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_config_network.ex b/clients/hydra/elixir/lib/ory/model/plugin_config_network.ex deleted file mode 100644 index 0e64ac8bd8d..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_config_network.ex +++ /dev/null @@ -1,25 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginConfigNetwork do - @moduledoc """ - PluginConfigNetwork plugin config network - """ - - @derive [Poison.Encoder] - defstruct [ - :"Type" - ] - - @type t :: %__MODULE__{ - :"Type" => String.t - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginConfigNetwork do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_config_rootfs.ex b/clients/hydra/elixir/lib/ory/model/plugin_config_rootfs.ex deleted file mode 100644 index 68cebb7590f..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_config_rootfs.ex +++ /dev/null @@ -1,27 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginConfigRootfs do - @moduledoc """ - PluginConfigRootfs plugin config rootfs - """ - - @derive [Poison.Encoder] - defstruct [ - :"diff_ids", - :"type" - ] - - @type t :: %__MODULE__{ - :"diff_ids" => [String.t] | nil, - :"type" => String.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginConfigRootfs do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_config_user.ex b/clients/hydra/elixir/lib/ory/model/plugin_config_user.ex deleted file mode 100644 index efbadab535f..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_config_user.ex +++ /dev/null @@ -1,27 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginConfigUser do - @moduledoc """ - PluginConfigUser plugin config user - """ - - @derive [Poison.Encoder] - defstruct [ - :"GID", - :"UID" - ] - - @type t :: %__MODULE__{ - :"GID" => integer() | nil, - :"UID" => integer() | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginConfigUser do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_device.ex b/clients/hydra/elixir/lib/ory/model/plugin_device.ex deleted file mode 100644 index 7cfd0a1629e..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_device.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginDevice do - @moduledoc """ - PluginDevice plugin device - """ - - @derive [Poison.Encoder] - defstruct [ - :"Description", - :"Name", - :"Path", - :"Settable" - ] - - @type t :: %__MODULE__{ - :"Description" => String.t, - :"Name" => String.t, - :"Path" => String.t, - :"Settable" => [String.t] - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginDevice do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_env.ex b/clients/hydra/elixir/lib/ory/model/plugin_env.ex deleted file mode 100644 index 6a064c2ce43..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_env.ex +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginEnv do - @moduledoc """ - PluginEnv plugin env - """ - - @derive [Poison.Encoder] - defstruct [ - :"Description", - :"Name", - :"Settable", - :"Value" - ] - - @type t :: %__MODULE__{ - :"Description" => String.t, - :"Name" => String.t, - :"Settable" => [String.t], - :"Value" => String.t - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginEnv do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_interface_type.ex b/clients/hydra/elixir/lib/ory/model/plugin_interface_type.ex deleted file mode 100644 index f2337528f7a..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_interface_type.ex +++ /dev/null @@ -1,29 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginInterfaceType do - @moduledoc """ - PluginInterfaceType plugin interface type - """ - - @derive [Poison.Encoder] - defstruct [ - :"Capability", - :"Prefix", - :"Version" - ] - - @type t :: %__MODULE__{ - :"Capability" => String.t, - :"Prefix" => String.t, - :"Version" => String.t - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginInterfaceType do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_mount.ex b/clients/hydra/elixir/lib/ory/model/plugin_mount.ex deleted file mode 100644 index 9e62f9cfed4..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_mount.ex +++ /dev/null @@ -1,37 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginMount do - @moduledoc """ - PluginMount plugin mount - """ - - @derive [Poison.Encoder] - defstruct [ - :"Description", - :"Destination", - :"Name", - :"Options", - :"Settable", - :"Source", - :"Type" - ] - - @type t :: %__MODULE__{ - :"Description" => String.t, - :"Destination" => String.t, - :"Name" => String.t, - :"Options" => [String.t], - :"Settable" => [String.t], - :"Source" => String.t, - :"Type" => String.t - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginMount do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/plugin_settings.ex b/clients/hydra/elixir/lib/ory/model/plugin_settings.ex deleted file mode 100644 index 0c5629075b4..00000000000 --- a/clients/hydra/elixir/lib/ory/model/plugin_settings.ex +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PluginSettings do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"Args", - :"Devices", - :"Env", - :"Mounts" - ] - - @type t :: %__MODULE__{ - :"Args" => [String.t], - :"Devices" => [Ory.Model.PluginDevice.t], - :"Env" => [String.t], - :"Mounts" => [Ory.Model.PluginMount.t] - } -end - -defimpl Poison.Decoder, for: Ory.Model.PluginSettings do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"Devices", :list, Ory.Model.PluginDevice, options) - |> deserialize(:"Mounts", :list, Ory.Model.PluginMount, options) - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/previous_consent_session.ex b/clients/hydra/elixir/lib/ory/model/previous_consent_session.ex deleted file mode 100644 index e7bf6e58f65..00000000000 --- a/clients/hydra/elixir/lib/ory/model/previous_consent_session.ex +++ /dev/null @@ -1,40 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.PreviousConsentSession do - @moduledoc """ - The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - """ - - @derive [Poison.Encoder] - defstruct [ - :"consent_request", - :"grant_access_token_audience", - :"grant_scope", - :"handled_at", - :"remember", - :"remember_for", - :"session" - ] - - @type t :: %__MODULE__{ - :"consent_request" => Ory.Model.ConsentRequest.t | nil, - :"grant_access_token_audience" => [String.t] | nil, - :"grant_scope" => [String.t] | nil, - :"handled_at" => DateTime.t | nil, - :"remember" => boolean() | nil, - :"remember_for" => integer() | nil, - :"session" => Ory.Model.ConsentRequestSession.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.PreviousConsentSession do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"consent_request", :struct, Ory.Model.ConsentRequest, options) - |> deserialize(:"session", :struct, Ory.Model.ConsentRequestSession, options) - end -end - 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 new file mode 100644 index 00000000000..3e1e47ed927 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/reject_o_auth2_request.ex @@ -0,0 +1,33 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.RejectOAuth2Request do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :error, + :error_debug, + :error_description, + :error_hint, + :status_code + ] + + @type t :: %__MODULE__{ + :error => String.t | nil, + :error_debug => String.t | nil, + :error_description => String.t | nil, + :error_hint => String.t | nil, + :status_code => integer() | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.RejectOAuth2Request do + def decode(value, _options) do + value + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/reject_request.ex b/clients/hydra/elixir/lib/ory/model/reject_request.ex deleted file mode 100644 index e85171bb012..00000000000 --- a/clients/hydra/elixir/lib/ory/model/reject_request.ex +++ /dev/null @@ -1,33 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.RejectRequest do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"error", - :"error_debug", - :"error_description", - :"error_hint", - :"status_code" - ] - - @type t :: %__MODULE__{ - :"error" => String.t | nil, - :"error_debug" => String.t | nil, - :"error_description" => String.t | nil, - :"error_hint" => String.t | nil, - :"status_code" => integer() | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.RejectRequest do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/token_pagination.ex b/clients/hydra/elixir/lib/ory/model/token_pagination.ex new file mode 100644 index 00000000000..e3a06af5437 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/token_pagination.ex @@ -0,0 +1,27 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.TokenPagination do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :page_size, + :page_token + ] + + @type t :: %__MODULE__{ + :page_size => integer() | nil, + :page_token => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.TokenPagination do + def decode(value, _options) do + value + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/token_pagination_headers.ex b/clients/hydra/elixir/lib/ory/model/token_pagination_headers.ex new file mode 100644 index 00000000000..ac8c66100a6 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/token_pagination_headers.ex @@ -0,0 +1,27 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.TokenPaginationHeaders do + @moduledoc """ + + """ + + @derive [Poison.Encoder] + defstruct [ + :link, + :"x-total-count" + ] + + @type t :: %__MODULE__{ + :link => String.t | nil, + :"x-total-count" => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.TokenPaginationHeaders do + def decode(value, _options) do + value + end +end + 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 new file mode 100644 index 00000000000..24af9e1a6ab --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/token_pagination_request_parameters.ex @@ -0,0 +1,27 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.TokenPaginationRequestParameters do + @moduledoc """ + 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 [Poison.Encoder] + defstruct [ + :page_size, + :page_token + ] + + @type t :: %__MODULE__{ + :page_size => integer() | nil, + :page_token => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.TokenPaginationRequestParameters do + def decode(value, _options) do + value + end +end + 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 new file mode 100644 index 00000000000..170f1d9fba4 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/token_pagination_response_headers.ex @@ -0,0 +1,27 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.TokenPaginationResponseHeaders do + @moduledoc """ + 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 [Poison.Encoder] + defstruct [ + :link, + :"x-total-count" + ] + + @type t :: %__MODULE__{ + :link => String.t | nil, + :"x-total-count" => integer() | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.TokenPaginationResponseHeaders do + def decode(value, _options) do + value + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/trust_jwt_grant_issuer_body.ex b/clients/hydra/elixir/lib/ory/model/trust_jwt_grant_issuer_body.ex deleted file mode 100644 index 2cb68ec104a..00000000000 --- a/clients/hydra/elixir/lib/ory/model/trust_jwt_grant_issuer_body.ex +++ /dev/null @@ -1,35 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.TrustJwtGrantIssuerBody do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"expires_at", - :"issuer", - :"jwk", - :"scope", - :"subject" - ] - - @type t :: %__MODULE__{ - :"expires_at" => DateTime.t, - :"issuer" => String.t, - :"jwk" => Ory.Model.JsonWebKey.t, - :"scope" => [String.t], - :"subject" => String.t - } -end - -defimpl Poison.Decoder, for: Ory.Model.TrustJwtGrantIssuerBody do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"jwk", :struct, Ory.Model.JsonWebKey, options) - end -end - 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 new file mode 100644 index 00000000000..957e5a3b72a --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/trust_o_auth2_jwt_grant_issuer.ex @@ -0,0 +1,37 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.TrustOAuth2JwtGrantIssuer do + @moduledoc """ + Trust OAuth2 JWT Bearer Grant Type Issuer Request Body + """ + + @derive [Poison.Encoder] + defstruct [ + :allow_any_subject, + :expires_at, + :issuer, + :jwk, + :scope, + :subject + ] + + @type t :: %__MODULE__{ + :allow_any_subject => boolean() | nil, + :expires_at => DateTime.t, + :issuer => String.t, + :jwk => Ory.Model.JsonWebKey.t, + :scope => [String.t], + :subject => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.TrustOAuth2JwtGrantIssuer do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:jwk, :struct, Ory.Model.JsonWebKey, options) + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/trusted_jwt_grant_issuer.ex b/clients/hydra/elixir/lib/ory/model/trusted_jwt_grant_issuer.ex deleted file mode 100644 index 31b9d23cdc3..00000000000 --- a/clients/hydra/elixir/lib/ory/model/trusted_jwt_grant_issuer.ex +++ /dev/null @@ -1,39 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.TrustedJwtGrantIssuer do - @moduledoc """ - - """ - - @derive [Poison.Encoder] - defstruct [ - :"created_at", - :"expires_at", - :"id", - :"issuer", - :"public_key", - :"scope", - :"subject" - ] - - @type t :: %__MODULE__{ - :"created_at" => DateTime.t | nil, - :"expires_at" => DateTime.t | nil, - :"id" => String.t | nil, - :"issuer" => String.t | nil, - :"public_key" => Ory.Model.TrustedJsonWebKey.t | nil, - :"scope" => [String.t] | nil, - :"subject" => String.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.TrustedJwtGrantIssuer do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"public_key", :struct, Ory.Model.TrustedJsonWebKey, options) - end -end - 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 new file mode 100644 index 00000000000..0b64e99262e --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_issuer.ex @@ -0,0 +1,41 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.TrustedOAuth2JwtGrantIssuer do + @moduledoc """ + OAuth2 JWT Bearer Grant Type Issuer Trust Relationship + """ + + @derive [Poison.Encoder] + defstruct [ + :allow_any_subject, + :created_at, + :expires_at, + :id, + :issuer, + :public_key, + :scope, + :subject + ] + + @type t :: %__MODULE__{ + :allow_any_subject => boolean() | nil, + :created_at => DateTime.t | nil, + :expires_at => DateTime.t | nil, + :id => String.t | nil, + :issuer => String.t | nil, + :public_key => Ory.Model.TrustedOAuth2JwtGrantJsonWebKey.t | nil, + :scope => [String.t] | nil, + :subject => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.TrustedOAuth2JwtGrantIssuer do + import Ory.Deserializer + def decode(value, options) do + value + |> deserialize(:public_key, :struct, Ory.Model.TrustedOAuth2JwtGrantJsonWebKey, options) + end +end + 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 new file mode 100644 index 00000000000..3e49e43e762 --- /dev/null +++ b/clients/hydra/elixir/lib/ory/model/trusted_o_auth2_jwt_grant_json_web_key.ex @@ -0,0 +1,27 @@ +# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +# https://openapi-generator.tech +# Do not edit the class manually. + +defmodule Ory.Model.TrustedOAuth2JwtGrantJsonWebKey do + @moduledoc """ + OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key + """ + + @derive [Poison.Encoder] + defstruct [ + :kid, + :set + ] + + @type t :: %__MODULE__{ + :kid => String.t | nil, + :set => String.t | nil + } +end + +defimpl Poison.Decoder, for: Ory.Model.TrustedOAuth2JwtGrantJsonWebKey do + def decode(value, _options) do + value + end +end + diff --git a/clients/hydra/elixir/lib/ory/model/userinfo_response.ex b/clients/hydra/elixir/lib/ory/model/userinfo_response.ex deleted file mode 100644 index 35470d04e52..00000000000 --- a/clients/hydra/elixir/lib/ory/model/userinfo_response.ex +++ /dev/null @@ -1,61 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.UserinfoResponse do - @moduledoc """ - The userinfo response - """ - - @derive [Poison.Encoder] - defstruct [ - :"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" - ] - - @type t :: %__MODULE__{ - :"birthdate" => String.t | nil, - :"email" => String.t | nil, - :"email_verified" => boolean() | nil, - :"family_name" => String.t | nil, - :"gender" => String.t | nil, - :"given_name" => String.t | nil, - :"locale" => String.t | nil, - :"middle_name" => String.t | nil, - :"name" => String.t | nil, - :"nickname" => String.t | nil, - :"phone_number" => String.t | nil, - :"phone_number_verified" => boolean() | nil, - :"picture" => String.t | nil, - :"preferred_username" => String.t | nil, - :"profile" => String.t | nil, - :"sub" => String.t | nil, - :"updated_at" => integer() | nil, - :"website" => String.t | nil, - :"zoneinfo" => String.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.UserinfoResponse do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/version.ex b/clients/hydra/elixir/lib/ory/model/version.ex index b97245f81b3..f3926a4a510 100644 --- a/clients/hydra/elixir/lib/ory/model/version.ex +++ b/clients/hydra/elixir/lib/ory/model/version.ex @@ -9,11 +9,11 @@ defmodule Ory.Model.Version do @derive [Poison.Encoder] defstruct [ - :"version" + :version ] @type t :: %__MODULE__{ - :"version" => String.t | nil + :version => String.t | nil } end diff --git a/clients/hydra/elixir/lib/ory/model/volume.ex b/clients/hydra/elixir/lib/ory/model/volume.ex deleted file mode 100644 index ddffea37006..00000000000 --- a/clients/hydra/elixir/lib/ory/model/volume.ex +++ /dev/null @@ -1,43 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.Volume do - @moduledoc """ - Volume volume - """ - - @derive [Poison.Encoder] - defstruct [ - :"CreatedAt", - :"Driver", - :"Labels", - :"Mountpoint", - :"Name", - :"Options", - :"Scope", - :"Status", - :"UsageData" - ] - - @type t :: %__MODULE__{ - :"CreatedAt" => String.t | nil, - :"Driver" => String.t, - :"Labels" => %{optional(String.t) => String.t}, - :"Mountpoint" => String.t, - :"Name" => String.t, - :"Options" => %{optional(String.t) => String.t}, - :"Scope" => String.t, - :"Status" => map() | nil, - :"UsageData" => Ory.Model.VolumeUsageData.t | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.Volume do - import Ory.Deserializer - def decode(value, options) do - value - |> deserialize(:"UsageData", :struct, Ory.Model.VolumeUsageData, options) - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/volume_usage_data.ex b/clients/hydra/elixir/lib/ory/model/volume_usage_data.ex deleted file mode 100644 index 0c9be6fef1e..00000000000 --- a/clients/hydra/elixir/lib/ory/model/volume_usage_data.ex +++ /dev/null @@ -1,27 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.VolumeUsageData do - @moduledoc """ - VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - """ - - @derive [Poison.Encoder] - defstruct [ - :"RefCount", - :"Size" - ] - - @type t :: %__MODULE__{ - :"RefCount" => integer(), - :"Size" => integer() - } -end - -defimpl Poison.Decoder, for: Ory.Model.VolumeUsageData do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/lib/ory/model/well_known.ex b/clients/hydra/elixir/lib/ory/model/well_known.ex deleted file mode 100644 index 353a127820b..00000000000 --- a/clients/hydra/elixir/lib/ory/model/well_known.ex +++ /dev/null @@ -1,77 +0,0 @@ -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -defmodule Ory.Model.WellKnown do - @moduledoc """ - It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. - """ - - @derive [Poison.Encoder] - defstruct [ - :"authorization_endpoint", - :"backchannel_logout_session_supported", - :"backchannel_logout_supported", - :"claims_parameter_supported", - :"claims_supported", - :"code_challenge_methods_supported", - :"end_session_endpoint", - :"frontchannel_logout_session_supported", - :"frontchannel_logout_supported", - :"grant_types_supported", - :"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_signing_alg_values_supported" - ] - - @type t :: %__MODULE__{ - :"authorization_endpoint" => String.t, - :"backchannel_logout_session_supported" => boolean() | nil, - :"backchannel_logout_supported" => boolean() | nil, - :"claims_parameter_supported" => boolean() | nil, - :"claims_supported" => [String.t] | nil, - :"code_challenge_methods_supported" => [String.t] | nil, - :"end_session_endpoint" => String.t | nil, - :"frontchannel_logout_session_supported" => boolean() | nil, - :"frontchannel_logout_supported" => boolean() | nil, - :"grant_types_supported" => [String.t] | nil, - :"id_token_signing_alg_values_supported" => [String.t], - :"issuer" => String.t, - :"jwks_uri" => String.t, - :"registration_endpoint" => String.t | nil, - :"request_object_signing_alg_values_supported" => [String.t] | nil, - :"request_parameter_supported" => boolean() | nil, - :"request_uri_parameter_supported" => boolean() | nil, - :"require_request_uri_registration" => boolean() | nil, - :"response_modes_supported" => [String.t] | nil, - :"response_types_supported" => [String.t], - :"revocation_endpoint" => String.t | nil, - :"scopes_supported" => [String.t] | nil, - :"subject_types_supported" => [String.t], - :"token_endpoint" => String.t, - :"token_endpoint_auth_methods_supported" => [String.t] | nil, - :"userinfo_endpoint" => String.t | nil, - :"userinfo_signing_alg_values_supported" => [String.t] | nil - } -end - -defimpl Poison.Decoder, for: Ory.Model.WellKnown do - def decode(value, _options) do - value - end -end - diff --git a/clients/hydra/elixir/mix.exs b/clients/hydra/elixir/mix.exs index cb7092807b6..e3469bf468f 100644 --- a/clients/hydra/elixir/mix.exs +++ b/clients/hydra/elixir/mix.exs @@ -3,12 +3,12 @@ defmodule Ory.Mixfile do def project do [app: :ory_hydra, - version: "1.11.0", - elixir: "~> 1.6", + version: "2.0.1", + elixir: "~> 1.10", build_embedded: Mix.env == :prod, start_permanent: Mix.env == :prod, package: package(), - description: "Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.", + description: "Documentation for all of Ory Hydra's APIs. ", deps: deps()] end @@ -31,17 +31,23 @@ defmodule Ory.Mixfile do # Type "mix help deps" for more examples and options defp deps do [ - {:tesla, "~> 1.2"}, - {:poison, "~> 3.0"} + {:tesla, "~> 1.4"}, + {:poison, "~> 3.0"}, + {:ex_doc, "~> 0.28", only: :dev, runtime: false} ] end defp package() do [ name: "ory_hydra", - files: ~w(lib mix.exs README* LICENSE*), - licenses: [""], - links: %{"GitHub" => "https://github.com/ory/sdk"} + files: ~w(.formatter.exs config lib mix.exs README* LICENSE*), + licenses: ["Apache-2.0"], + links: %{ + "GitHub" => "https://github.com/ory/sdk", + "Website" => "https://www.ory.sh", + "Documentation" => "https://www.ory.sh/docs", + "Product" => "https://console.ory.sh" + } ] end end diff --git a/clients/hydra/elixir/mix.lock b/clients/hydra/elixir/mix.lock index 7dd39680433..a3baaae3e67 100644 --- a/clients/hydra/elixir/mix.lock +++ b/clients/hydra/elixir/mix.lock @@ -1,5 +1,11 @@ %{ - "mime": {:hex, :mime, "2.0.2", "0b9e1a4c840eafb68d820b0e2158ef5c49385d17fb36855ac6e7e087d4b1dcc5", [:mix], [], "hexpm", "e6a3f76b4c277739e36c2e21a2c640778ba4c3846189d5ab19f97f126df5f9b7"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.29", "149d50dcb3a93d9f3d6f3ecf18c918fb5a2d3c001b5d3305c926cddfbd33355b", [:mix], [], "hexpm", "4902af1b3eb139016aed210888748db8070b8125c2342ce3dcae4f38dcc63503"}, + "ex_doc": {:hex, :ex_doc, "0.29.0", "4a1cb903ce746aceef9c1f9ae8a6c12b742a5461e6959b9d3b24d813ffbea146", [:mix], [{:earmark_parser, "~> 1.4.19", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "f096adb8bbca677d35d278223361c7792d496b3fc0d0224c9d4bc2f651af5db1"}, + "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.16.0", "f8c570a0d33f8039513fbccaf7108c5d750f47d8defd44088371191b76492b0b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "28b2cbdc13960a46ae9a8858c4bebdec3c9a6d7b4b9e7f4ed1502f8159f338e7"}, + "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, + "mime": {:hex, :mime, "2.0.3", "3676436d3d1f7b81b5a2d2bd8405f412c677558c81b1c92be58c00562bb59095", [:mix], [], "hexpm", "27a30bf0db44d25eecba73755acf4068cbfe26a4372f9eb3e4ea3a45956bff6b"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.2.3", "244836e6e3f1200c7f30cb56733fd808744eca61fd182f731eac4af635cc6d0b", [:mix], [], "hexpm", "c8d789e39b9131acf7b99291e93dae60ab48ef14a7ee9d58c6964f59efb570b0"}, "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm", "fec8660eb7733ee4117b85f55799fd3833eb769a6df71ccf8903e8dc5447cfce"}, "tesla": {:hex, :tesla, "1.4.4", "bb89aa0c9745190930366f6a2ac612cdf2d0e4d7fff449861baa7875afd797b2", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.3", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, "~> 1.3", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [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]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "d5503a49f9dec1b287567ea8712d085947e247cb11b06bc54adb05bfde466457"}, } diff --git a/clients/hydra/go/.openapi-generator/FILES b/clients/hydra/go/.openapi-generator/FILES index 57dec208773..c83b13fa739 100644 --- a/clients/hydra/go/.openapi-generator/FILES +++ b/clients/hydra/go/.openapi-generator/FILES @@ -3,104 +3,96 @@ .travis.yml README.md api/openapi.yaml -api_admin.go +api_jwk.go api_metadata.go -api_public.go +api_o_auth2.go +api_oidc.go +api_wellknown.go client.go configuration.go -docs/AcceptConsentRequest.md -docs/AcceptLoginRequest.md -docs/AdminApi.md -docs/CompletedRequest.md -docs/ConsentRequest.md -docs/ConsentRequestSession.md -docs/ContainerWaitOKBodyError.md -docs/FlushInactiveOAuth2TokensRequest.md +docs/AcceptOAuth2ConsentRequest.md +docs/AcceptOAuth2ConsentRequestSession.md +docs/AcceptOAuth2LoginRequest.md +docs/CreateJsonWebKeySet.md +docs/ErrorOAuth2.md docs/GenericError.md +docs/GetVersion200Response.md docs/HealthNotReadyStatus.md docs/HealthStatus.md -docs/JSONWebKey.md -docs/JSONWebKeySet.md -docs/JsonError.md -docs/JsonWebKeySetGeneratorRequest.md -docs/LoginRequest.md -docs/LogoutRequest.md +docs/IntrospectedOAuth2Token.md +docs/IsReady200Response.md +docs/IsReady503Response.md +docs/JsonPatch.md +docs/JsonWebKey.md +docs/JsonWebKeySet.md +docs/JwkApi.md docs/MetadataApi.md +docs/OAuth2Api.md docs/OAuth2Client.md -docs/OAuth2TokenIntrospection.md -docs/Oauth2TokenResponse.md -docs/OpenIDConnectContext.md -docs/PatchDocument.md -docs/PluginConfig.md -docs/PluginConfigArgs.md -docs/PluginConfigInterface.md -docs/PluginConfigLinux.md -docs/PluginConfigNetwork.md -docs/PluginConfigRootfs.md -docs/PluginConfigUser.md -docs/PluginDevice.md -docs/PluginEnv.md -docs/PluginInterfaceType.md -docs/PluginMount.md -docs/PluginSettings.md -docs/PreviousConsentSession.md -docs/PublicApi.md -docs/RejectRequest.md -docs/RequestWasHandledResponse.md -docs/TrustJwtGrantIssuerBody.md -docs/TrustedJsonWebKey.md -docs/TrustedJwtGrantIssuer.md -docs/UserinfoResponse.md +docs/OAuth2ClientTokenLifespans.md +docs/OAuth2ConsentRequest.md +docs/OAuth2ConsentRequestOpenIDConnectContext.md +docs/OAuth2ConsentSession.md +docs/OAuth2ConsentSessionExpiresAt.md +docs/OAuth2LoginRequest.md +docs/OAuth2LogoutRequest.md +docs/OAuth2RedirectTo.md +docs/OAuth2TokenExchange.md +docs/OidcApi.md +docs/OidcConfiguration.md +docs/OidcUserInfo.md +docs/Pagination.md +docs/PaginationHeaders.md +docs/RejectOAuth2Request.md +docs/TokenPagination.md +docs/TokenPaginationHeaders.md +docs/TokenPaginationRequestParameters.md +docs/TokenPaginationResponseHeaders.md +docs/TrustOAuth2JwtGrantIssuer.md +docs/TrustedOAuth2JwtGrantIssuer.md +docs/TrustedOAuth2JwtGrantJsonWebKey.md docs/Version.md -docs/Volume.md -docs/VolumeUsageData.md -docs/WellKnown.md +docs/WellknownApi.md git_push.sh go.mod go.sum -model_accept_consent_request.go -model_accept_login_request.go -model_completed_request.go -model_consent_request.go -model_consent_request_session.go -model_container_wait_ok_body_error.go -model_flush_inactive_o_auth2_tokens_request.go +model_accept_o_auth2_consent_request.go +model_accept_o_auth2_consent_request_session.go +model_accept_o_auth2_login_request.go +model_create_json_web_key_set.go +model_error_o_auth2.go model_generic_error.go +model_get_version_200_response.go model_health_not_ready_status.go model_health_status.go -model_json_error.go +model_introspected_o_auth2_token.go +model_is_ready_200_response.go +model_is_ready_503_response.go +model_json_patch.go model_json_web_key.go model_json_web_key_set.go -model_json_web_key_set_generator_request.go -model_login_request.go -model_logout_request.go model_o_auth2_client.go -model_o_auth2_token_introspection.go -model_oauth2_token_response.go -model_open_id_connect_context.go -model_patch_document.go -model_plugin_config.go -model_plugin_config_args.go -model_plugin_config_interface.go -model_plugin_config_linux_.go -model_plugin_config_network.go -model_plugin_config_rootfs.go -model_plugin_config_user.go -model_plugin_device.go -model_plugin_env.go -model_plugin_interface_type.go -model_plugin_mount.go -model_plugin_settings.go -model_previous_consent_session.go -model_reject_request.go -model_request_was_handled_response.go -model_trust_jwt_grant_issuer_body.go -model_trusted_json_web_key.go -model_trusted_jwt_grant_issuer.go -model_userinfo_response.go +model_o_auth2_client_token_lifespans.go +model_o_auth2_consent_request.go +model_o_auth2_consent_request_open_id_connect_context.go +model_o_auth2_consent_session.go +model_o_auth2_consent_session_expires_at.go +model_o_auth2_login_request.go +model_o_auth2_logout_request.go +model_o_auth2_redirect_to.go +model_o_auth2_token_exchange.go +model_oidc_configuration.go +model_oidc_user_info.go +model_pagination.go +model_pagination_headers.go +model_reject_o_auth2_request.go +model_token_pagination.go +model_token_pagination_headers.go +model_token_pagination_request_parameters.go +model_token_pagination_response_headers.go +model_trust_o_auth2_jwt_grant_issuer.go +model_trusted_o_auth2_jwt_grant_issuer.go +model_trusted_o_auth2_jwt_grant_json_web_key.go model_version.go -model_volume.go -model_volume_usage_data.go -model_well_known.go response.go utils.go diff --git a/clients/hydra/go/.openapi-generator/VERSION b/clients/hydra/go/.openapi-generator/VERSION index 1e20ec35c64..6d54bbd7751 100644 --- a/clients/hydra/go/.openapi-generator/VERSION +++ b/clients/hydra/go/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/clients/hydra/go/README.md b/clients/hydra/go/README.md index be013014c05..bb998cf0c29 100644 --- a/clients/hydra/go/README.md +++ b/clients/hydra/go/README.md @@ -1,11 +1,12 @@ # Go API client for client -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. +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: v1.11.0 +- API version: v2.0.1 - Package version: 1.0.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen @@ -58,7 +59,7 @@ Note, enum values are always validated and all unused variables are silently ign ### URLs Configuration per Operation Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. -An operation is uniquely identifield by `"{classname}Service.{nickname}"` string. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. ``` @@ -78,101 +79,94 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdminApi* | [**AcceptConsentRequest**](docs/AdminApi.md#acceptconsentrequest) | **Put** /oauth2/auth/requests/consent/accept | Accept a Consent Request -*AdminApi* | [**AcceptLoginRequest**](docs/AdminApi.md#acceptloginrequest) | **Put** /oauth2/auth/requests/login/accept | Accept a Login Request -*AdminApi* | [**AcceptLogoutRequest**](docs/AdminApi.md#acceptlogoutrequest) | **Put** /oauth2/auth/requests/logout/accept | Accept a Logout Request -*AdminApi* | [**CreateJsonWebKeySet**](docs/AdminApi.md#createjsonwebkeyset) | **Post** /keys/{set} | Generate a New JSON Web Key -*AdminApi* | [**CreateOAuth2Client**](docs/AdminApi.md#createoauth2client) | **Post** /clients | Create an OAuth 2.0 Client -*AdminApi* | [**DeleteJsonWebKey**](docs/AdminApi.md#deletejsonwebkey) | **Delete** /keys/{set}/{kid} | Delete a JSON Web Key -*AdminApi* | [**DeleteJsonWebKeySet**](docs/AdminApi.md#deletejsonwebkeyset) | **Delete** /keys/{set} | Delete a JSON Web Key Set -*AdminApi* | [**DeleteOAuth2Client**](docs/AdminApi.md#deleteoauth2client) | **Delete** /clients/{id} | Deletes an OAuth 2.0 Client -*AdminApi* | [**DeleteOAuth2Token**](docs/AdminApi.md#deleteoauth2token) | **Delete** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -*AdminApi* | [**DeleteTrustedJwtGrantIssuer**](docs/AdminApi.md#deletetrustedjwtgrantissuer) | **Delete** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**FlushInactiveOAuth2Tokens**](docs/AdminApi.md#flushinactiveoauth2tokens) | **Post** /oauth2/flush | Flush Expired OAuth2 Access Tokens -*AdminApi* | [**GetConsentRequest**](docs/AdminApi.md#getconsentrequest) | **Get** /oauth2/auth/requests/consent | Get Consent Request Information -*AdminApi* | [**GetJsonWebKey**](docs/AdminApi.md#getjsonwebkey) | **Get** /keys/{set}/{kid} | Fetch a JSON Web Key -*AdminApi* | [**GetJsonWebKeySet**](docs/AdminApi.md#getjsonwebkeyset) | **Get** /keys/{set} | Retrieve a JSON Web Key Set -*AdminApi* | [**GetLoginRequest**](docs/AdminApi.md#getloginrequest) | **Get** /oauth2/auth/requests/login | Get a Login Request -*AdminApi* | [**GetLogoutRequest**](docs/AdminApi.md#getlogoutrequest) | **Get** /oauth2/auth/requests/logout | Get a Logout Request -*AdminApi* | [**GetOAuth2Client**](docs/AdminApi.md#getoauth2client) | **Get** /clients/{id} | Get an OAuth 2.0 Client -*AdminApi* | [**GetTrustedJwtGrantIssuer**](docs/AdminApi.md#gettrustedjwtgrantissuer) | **Get** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**GetVersion**](docs/AdminApi.md#getversion) | **Get** /version | Get Service Version -*AdminApi* | [**IntrospectOAuth2Token**](docs/AdminApi.md#introspectoauth2token) | **Post** /oauth2/introspect | Introspect OAuth2 Tokens -*AdminApi* | [**IsInstanceAlive**](docs/AdminApi.md#isinstancealive) | **Get** /health/alive | Check Alive Status -*AdminApi* | [**ListOAuth2Clients**](docs/AdminApi.md#listoauth2clients) | **Get** /clients | List OAuth 2.0 Clients -*AdminApi* | [**ListSubjectConsentSessions**](docs/AdminApi.md#listsubjectconsentsessions) | **Get** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -*AdminApi* | [**ListTrustedJwtGrantIssuers**](docs/AdminApi.md#listtrustedjwtgrantissuers) | **Get** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -*AdminApi* | [**PatchOAuth2Client**](docs/AdminApi.md#patchoauth2client) | **Patch** /clients/{id} | Patch an OAuth 2.0 Client -*AdminApi* | [**RejectConsentRequest**](docs/AdminApi.md#rejectconsentrequest) | **Put** /oauth2/auth/requests/consent/reject | Reject a Consent Request -*AdminApi* | [**RejectLoginRequest**](docs/AdminApi.md#rejectloginrequest) | **Put** /oauth2/auth/requests/login/reject | Reject a Login Request -*AdminApi* | [**RejectLogoutRequest**](docs/AdminApi.md#rejectlogoutrequest) | **Put** /oauth2/auth/requests/logout/reject | Reject a Logout Request -*AdminApi* | [**RevokeAuthenticationSession**](docs/AdminApi.md#revokeauthenticationsession) | **Delete** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -*AdminApi* | [**RevokeConsentSessions**](docs/AdminApi.md#revokeconsentsessions) | **Delete** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -*AdminApi* | [**TrustJwtGrantIssuer**](docs/AdminApi.md#trustjwtgrantissuer) | **Post** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**UpdateJsonWebKey**](docs/AdminApi.md#updatejsonwebkey) | **Put** /keys/{set}/{kid} | Update a JSON Web Key -*AdminApi* | [**UpdateJsonWebKeySet**](docs/AdminApi.md#updatejsonwebkeyset) | **Put** /keys/{set} | Update a JSON Web Key Set -*AdminApi* | [**UpdateOAuth2Client**](docs/AdminApi.md#updateoauth2client) | **Put** /clients/{id} | Update an OAuth 2.0 Client -*MetadataApi* | [**Prometheus**](docs/MetadataApi.md#prometheus) | **Get** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: -*PublicApi* | [**DisconnectUser**](docs/PublicApi.md#disconnectuser) | **Get** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -*PublicApi* | [**DiscoverOpenIDConfiguration**](docs/PublicApi.md#discoveropenidconfiguration) | **Get** /.well-known/openid-configuration | OpenID Connect Discovery -*PublicApi* | [**DynamicClientRegistrationCreateOAuth2Client**](docs/PublicApi.md#dynamicclientregistrationcreateoauth2client) | **Post** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**DynamicClientRegistrationDeleteOAuth2Client**](docs/PublicApi.md#dynamicclientregistrationdeleteoauth2client) | **Delete** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**DynamicClientRegistrationGetOAuth2Client**](docs/PublicApi.md#dynamicclientregistrationgetoauth2client) | **Get** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**DynamicClientRegistrationUpdateOAuth2Client**](docs/PublicApi.md#dynamicclientregistrationupdateoauth2client) | **Put** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**IsInstanceReady**](docs/PublicApi.md#isinstanceready) | **Get** /health/ready | Check Readiness Status -*PublicApi* | [**Oauth2Token**](docs/PublicApi.md#oauth2token) | **Post** /oauth2/token | The OAuth 2.0 Token Endpoint -*PublicApi* | [**OauthAuth**](docs/PublicApi.md#oauthauth) | **Get** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -*PublicApi* | [**RevokeOAuth2Token**](docs/PublicApi.md#revokeoauth2token) | **Post** /oauth2/revoke | Revoke OAuth2 Tokens -*PublicApi* | [**Userinfo**](docs/PublicApi.md#userinfo) | **Get** /userinfo | OpenID Connect Userinfo -*PublicApi* | [**WellKnown**](docs/PublicApi.md#wellknown) | **Get** /.well-known/jwks.json | JSON Web Keys Discovery +*JwkApi* | [**CreateJsonWebKeySet**](docs/JwkApi.md#createjsonwebkeyset) | **Post** /admin/keys/{set} | Create JSON Web Key +*JwkApi* | [**DeleteJsonWebKey**](docs/JwkApi.md#deletejsonwebkey) | **Delete** /admin/keys/{set}/{kid} | Delete JSON Web Key +*JwkApi* | [**DeleteJsonWebKeySet**](docs/JwkApi.md#deletejsonwebkeyset) | **Delete** /admin/keys/{set} | Delete JSON Web Key Set +*JwkApi* | [**GetJsonWebKey**](docs/JwkApi.md#getjsonwebkey) | **Get** /admin/keys/{set}/{kid} | Get JSON Web Key +*JwkApi* | [**GetJsonWebKeySet**](docs/JwkApi.md#getjsonwebkeyset) | **Get** /admin/keys/{set} | Retrieve a JSON Web Key Set +*JwkApi* | [**SetJsonWebKey**](docs/JwkApi.md#setjsonwebkey) | **Put** /admin/keys/{set}/{kid} | Set JSON Web Key +*JwkApi* | [**SetJsonWebKeySet**](docs/JwkApi.md#setjsonwebkeyset) | **Put** /admin/keys/{set} | Update a JSON Web Key Set +*MetadataApi* | [**GetVersion**](docs/MetadataApi.md#getversion) | **Get** /version | Return Running Software Version. +*MetadataApi* | [**IsAlive**](docs/MetadataApi.md#isalive) | **Get** /health/alive | Check HTTP Server Status +*MetadataApi* | [**IsReady**](docs/MetadataApi.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status +*OAuth2Api* | [**AcceptOAuth2ConsentRequest**](docs/OAuth2Api.md#acceptoauth2consentrequest) | **Put** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +*OAuth2Api* | [**AcceptOAuth2LoginRequest**](docs/OAuth2Api.md#acceptoauth2loginrequest) | **Put** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +*OAuth2Api* | [**AcceptOAuth2LogoutRequest**](docs/OAuth2Api.md#acceptoauth2logoutrequest) | **Put** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +*OAuth2Api* | [**CreateOAuth2Client**](docs/OAuth2Api.md#createoauth2client) | **Post** /admin/clients | Create OAuth 2.0 Client +*OAuth2Api* | [**DeleteOAuth2Client**](docs/OAuth2Api.md#deleteoauth2client) | **Delete** /admin/clients/{id} | Delete OAuth 2.0 Client +*OAuth2Api* | [**DeleteOAuth2Token**](docs/OAuth2Api.md#deleteoauth2token) | **Delete** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +*OAuth2Api* | [**DeleteTrustedOAuth2JwtGrantIssuer**](docs/OAuth2Api.md#deletetrustedoauth2jwtgrantissuer) | **Delete** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**GetOAuth2Client**](docs/OAuth2Api.md#getoauth2client) | **Get** /admin/clients/{id} | Get an OAuth 2.0 Client +*OAuth2Api* | [**GetOAuth2ConsentRequest**](docs/OAuth2Api.md#getoauth2consentrequest) | **Get** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +*OAuth2Api* | [**GetOAuth2LoginRequest**](docs/OAuth2Api.md#getoauth2loginrequest) | **Get** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +*OAuth2Api* | [**GetOAuth2LogoutRequest**](docs/OAuth2Api.md#getoauth2logoutrequest) | **Get** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +*OAuth2Api* | [**GetTrustedOAuth2JwtGrantIssuer**](docs/OAuth2Api.md#gettrustedoauth2jwtgrantissuer) | **Get** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**IntrospectOAuth2Token**](docs/OAuth2Api.md#introspectoauth2token) | **Post** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +*OAuth2Api* | [**ListOAuth2Clients**](docs/OAuth2Api.md#listoauth2clients) | **Get** /admin/clients | List OAuth 2.0 Clients +*OAuth2Api* | [**ListOAuth2ConsentSessions**](docs/OAuth2Api.md#listoauth2consentsessions) | **Get** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**ListTrustedOAuth2JwtGrantIssuers**](docs/OAuth2Api.md#listtrustedoauth2jwtgrantissuers) | **Get** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +*OAuth2Api* | [**OAuth2Authorize**](docs/OAuth2Api.md#oauth2authorize) | **Get** /oauth2/auth | OAuth 2.0 Authorize Endpoint +*OAuth2Api* | [**Oauth2TokenExchange**](docs/OAuth2Api.md#oauth2tokenexchange) | **Post** /oauth2/token | The OAuth 2.0 Token Endpoint +*OAuth2Api* | [**PatchOAuth2Client**](docs/OAuth2Api.md#patchoauth2client) | **Patch** /admin/clients/{id} | Patch OAuth 2.0 Client +*OAuth2Api* | [**RejectOAuth2ConsentRequest**](docs/OAuth2Api.md#rejectoauth2consentrequest) | **Put** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +*OAuth2Api* | [**RejectOAuth2LoginRequest**](docs/OAuth2Api.md#rejectoauth2loginrequest) | **Put** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +*OAuth2Api* | [**RejectOAuth2LogoutRequest**](docs/OAuth2Api.md#rejectoauth2logoutrequest) | **Put** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +*OAuth2Api* | [**RevokeOAuth2ConsentSessions**](docs/OAuth2Api.md#revokeoauth2consentsessions) | **Delete** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**RevokeOAuth2LoginSessions**](docs/OAuth2Api.md#revokeoauth2loginsessions) | **Delete** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +*OAuth2Api* | [**RevokeOAuth2Token**](docs/OAuth2Api.md#revokeoauth2token) | **Post** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +*OAuth2Api* | [**SetOAuth2Client**](docs/OAuth2Api.md#setoauth2client) | **Put** /admin/clients/{id} | Set OAuth 2.0 Client +*OAuth2Api* | [**SetOAuth2ClientLifespans**](docs/OAuth2Api.md#setoauth2clientlifespans) | **Put** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +*OAuth2Api* | [**TrustOAuth2JwtGrantIssuer**](docs/OAuth2Api.md#trustoauth2jwtgrantissuer) | **Post** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer +*OidcApi* | [**CreateOidcDynamicClient**](docs/OidcApi.md#createoidcdynamicclient) | **Post** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**DeleteOidcDynamicClient**](docs/OidcApi.md#deleteoidcdynamicclient) | **Delete** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +*OidcApi* | [**DiscoverOidcConfiguration**](docs/OidcApi.md#discoveroidcconfiguration) | **Get** /.well-known/openid-configuration | OpenID Connect Discovery +*OidcApi* | [**GetOidcDynamicClient**](docs/OidcApi.md#getoidcdynamicclient) | **Get** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**GetOidcUserInfo**](docs/OidcApi.md#getoidcuserinfo) | **Get** /userinfo | OpenID Connect Userinfo +*OidcApi* | [**RevokeOidcSession**](docs/OidcApi.md#revokeoidcsession) | **Get** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +*OidcApi* | [**SetOidcDynamicClient**](docs/OidcApi.md#setoidcdynamicclient) | **Put** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration +*WellknownApi* | [**DiscoverJsonWebKeys**](docs/WellknownApi.md#discoverjsonwebkeys) | **Get** /.well-known/jwks.json | Discover Well-Known JSON Web Keys ## Documentation For Models - - [AcceptConsentRequest](docs/AcceptConsentRequest.md) - - [AcceptLoginRequest](docs/AcceptLoginRequest.md) - - [CompletedRequest](docs/CompletedRequest.md) - - [ConsentRequest](docs/ConsentRequest.md) - - [ConsentRequestSession](docs/ConsentRequestSession.md) - - [ContainerWaitOKBodyError](docs/ContainerWaitOKBodyError.md) - - [FlushInactiveOAuth2TokensRequest](docs/FlushInactiveOAuth2TokensRequest.md) + - [AcceptOAuth2ConsentRequest](docs/AcceptOAuth2ConsentRequest.md) + - [AcceptOAuth2ConsentRequestSession](docs/AcceptOAuth2ConsentRequestSession.md) + - [AcceptOAuth2LoginRequest](docs/AcceptOAuth2LoginRequest.md) + - [CreateJsonWebKeySet](docs/CreateJsonWebKeySet.md) + - [ErrorOAuth2](docs/ErrorOAuth2.md) - [GenericError](docs/GenericError.md) + - [GetVersion200Response](docs/GetVersion200Response.md) - [HealthNotReadyStatus](docs/HealthNotReadyStatus.md) - [HealthStatus](docs/HealthStatus.md) - - [JSONWebKey](docs/JSONWebKey.md) - - [JSONWebKeySet](docs/JSONWebKeySet.md) - - [JsonError](docs/JsonError.md) - - [JsonWebKeySetGeneratorRequest](docs/JsonWebKeySetGeneratorRequest.md) - - [LoginRequest](docs/LoginRequest.md) - - [LogoutRequest](docs/LogoutRequest.md) + - [IntrospectedOAuth2Token](docs/IntrospectedOAuth2Token.md) + - [IsReady200Response](docs/IsReady200Response.md) + - [IsReady503Response](docs/IsReady503Response.md) + - [JsonPatch](docs/JsonPatch.md) + - [JsonWebKey](docs/JsonWebKey.md) + - [JsonWebKeySet](docs/JsonWebKeySet.md) - [OAuth2Client](docs/OAuth2Client.md) - - [OAuth2TokenIntrospection](docs/OAuth2TokenIntrospection.md) - - [Oauth2TokenResponse](docs/Oauth2TokenResponse.md) - - [OpenIDConnectContext](docs/OpenIDConnectContext.md) - - [PatchDocument](docs/PatchDocument.md) - - [PluginConfig](docs/PluginConfig.md) - - [PluginConfigArgs](docs/PluginConfigArgs.md) - - [PluginConfigInterface](docs/PluginConfigInterface.md) - - [PluginConfigLinux](docs/PluginConfigLinux.md) - - [PluginConfigNetwork](docs/PluginConfigNetwork.md) - - [PluginConfigRootfs](docs/PluginConfigRootfs.md) - - [PluginConfigUser](docs/PluginConfigUser.md) - - [PluginDevice](docs/PluginDevice.md) - - [PluginEnv](docs/PluginEnv.md) - - [PluginInterfaceType](docs/PluginInterfaceType.md) - - [PluginMount](docs/PluginMount.md) - - [PluginSettings](docs/PluginSettings.md) - - [PreviousConsentSession](docs/PreviousConsentSession.md) - - [RejectRequest](docs/RejectRequest.md) - - [RequestWasHandledResponse](docs/RequestWasHandledResponse.md) - - [TrustJwtGrantIssuerBody](docs/TrustJwtGrantIssuerBody.md) - - [TrustedJsonWebKey](docs/TrustedJsonWebKey.md) - - [TrustedJwtGrantIssuer](docs/TrustedJwtGrantIssuer.md) - - [UserinfoResponse](docs/UserinfoResponse.md) + - [OAuth2ClientTokenLifespans](docs/OAuth2ClientTokenLifespans.md) + - [OAuth2ConsentRequest](docs/OAuth2ConsentRequest.md) + - [OAuth2ConsentRequestOpenIDConnectContext](docs/OAuth2ConsentRequestOpenIDConnectContext.md) + - [OAuth2ConsentSession](docs/OAuth2ConsentSession.md) + - [OAuth2ConsentSessionExpiresAt](docs/OAuth2ConsentSessionExpiresAt.md) + - [OAuth2LoginRequest](docs/OAuth2LoginRequest.md) + - [OAuth2LogoutRequest](docs/OAuth2LogoutRequest.md) + - [OAuth2RedirectTo](docs/OAuth2RedirectTo.md) + - [OAuth2TokenExchange](docs/OAuth2TokenExchange.md) + - [OidcConfiguration](docs/OidcConfiguration.md) + - [OidcUserInfo](docs/OidcUserInfo.md) + - [Pagination](docs/Pagination.md) + - [PaginationHeaders](docs/PaginationHeaders.md) + - [RejectOAuth2Request](docs/RejectOAuth2Request.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) + - [TrustedOAuth2JwtGrantJsonWebKey](docs/TrustedOAuth2JwtGrantJsonWebKey.md) - [Version](docs/Version.md) - - [Volume](docs/Volume.md) - - [VolumeUsageData](docs/VolumeUsageData.md) - - [WellKnown](docs/WellKnown.md) ## Documentation For Authorization @@ -194,6 +188,18 @@ r, err := client.Service.Operation(auth, args) ``` +### bearer + +- **Type**: HTTP Bearer token authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + + ### oauth2 @@ -243,5 +249,5 @@ Each of these functions takes a value of the given basic type and returns a poin ## Author - +hi@ory.sh diff --git a/clients/hydra/go/api/openapi.yaml b/clients/hydra/go/api/openapi.yaml index c54829ea053..a2f89466055 100644 --- a/clients/hydra/go/api/openapi.yaml +++ b/clients/hydra/go/api/openapi.yaml @@ -1,104 +1,118 @@ -openapi: 3.0.1 +openapi: 3.0.3 info: - description: Welcome to the ORY Hydra HTTP API documentation. You will find documentation - for all HTTP APIs here. - title: ORY Hydra - version: v1.11.0 + 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.0.1 servers: - url: / +tags: +- description: OAuth 2.0 + name: oauth2 +- description: OpenID Connect + name: oidc +- description: JSON Web Keys + name: jwk +- description: OAuth 2.0 Consent + name: consent paths: /.well-known/jwks.json: get: - description: |- - This endpoint returns JSON Web Keys to be used as public keys for 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: wellKnown + 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 - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: JSON Web Keys Discovery + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Discover Well-Known JSON Web Keys tags: - - public + - wellknown /.well-known/openid-configuration: get: - description: |- - The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll - your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this - flow at https://openid.net/specs/openid-connect-discovery-1_0.html . - - 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: discoverOpenIDConfiguration + 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/wellKnown' - description: wellKnown - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oidcConfiguration' + description: oidcConfiguration + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 summary: OpenID Connect Discovery tags: - - public - /clients: + - 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. The `limit` parameter can be used to retrieve more clients, - but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. - - 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. - - The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. - Multiple links can be included in this header, and will be separated by a comma. + 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: The maximum amount of clients to returned, upper bound is 500 - clients. + - description: "Items per Page\n\nThis is the number of items per page to return.\n\ + 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: limit + name: page_size + required: false schema: + default: 250 format: int64 + maximum: 500 + minimum: 1 type: integer - - description: The offset from where to start looking. + style: form + - 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)." + explode: true in: query - name: offset + name: page_token + required: false schema: - format: int64 - type: integer + 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: @@ -107,31 +121,29 @@ paths: items: $ref: '#/components/schemas/oAuth2Client' type: array - description: A list of clients. + description: Paginated OAuth2 Client List Response default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response summary: List OAuth 2.0 Clients tags: - - admin + - oAuth2 post: - description: |- - Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret - will be generated. The 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 somwhere 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. + 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: @@ -139,62 +151,66 @@ paths: 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/jsonError' - description: jsonError - summary: Create an OAuth 2.0 Client + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Create OAuth 2.0 Client tags: - - admin - x-codegen-request-body-name: Body - /clients/{id}: + - 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. + 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. + explode: false in: path name: id required: true schema: type: string + style: simple responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Deletes an OAuth 2.0 Client + $ref: '#/components/schemas/genericError' + description: genericError + summary: Delete OAuth 2.0 Client tags: - - admin + - 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. + 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. + explode: false in: path name: id required: true schema: type: string + style: simple responses: "200": content: @@ -206,33 +222,37 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response summary: Get an OAuth 2.0 Client tags: - - admin + - oAuth2 patch: - description: |- - Patch an existing OAuth 2.0 Client. 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. + 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. + explode: false in: path name: id required: true schema: type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/patchRequest' + $ref: '#/components/schemas/jsonPatchDocument' + description: OAuth 2.0 Client JSON Patch Body required: true + x-originalParamName: Body responses: "200": content: @@ -240,37 +260,47 @@ paths: 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/jsonError' - description: jsonError - summary: Patch an OAuth 2.0 Client + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Patch OAuth 2.0 Client tags: - - admin - x-codegen-request-body-name: Body + - oAuth2 put: - description: |- - Update an existing OAuth 2.0 Client. 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: updateOAuth2Client + 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: The id of the OAuth 2.0 Client. + - 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: @@ -278,161 +308,47 @@ paths: schema: $ref: '#/components/schemas/oAuth2Client' description: oAuth2Client - default: - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Update an OAuth 2.0 Client - tags: - - admin - x-codegen-request-body-name: Body - /connect/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: dynamicClientRegistrationCreateOAuth2Client - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/oAuth2Client' - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/oAuth2Client' - description: oAuth2Client - default: - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client - Registration Management Protocol - tags: - - public - x-codegen-request-body-name: Body - /connect/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: dynamicClientRegistrationDeleteOAuth2Client - parameters: - - description: The id of the OAuth 2.0 Client. - in: path - name: id - required: true - schema: - type: string - responses: - "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - default: + "400": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client - Registration Management Protocol - tags: - - public - 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. 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: dynamicClientRegistrationGetOAuth2Client - parameters: - - description: The id of the OAuth 2.0 Client. - in: path - name: id - required: true - schema: - type: string - responses: - "200": + $ref: '#/components/schemas/errorOAuth2' + description: Bad Request Error Response + "404": content: application/json: schema: - $ref: '#/components/schemas/oAuth2Client' - description: oAuth2Client + $ref: '#/components/schemas/errorOAuth2' + description: Not Found Error Response default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration - Management Protocol + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Set OAuth 2.0 Client tags: - - public + - oAuth2 + /admin/clients/{id}/lifespans: put: - description: |- - This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. - - 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. - - 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: dynamicClientRegistrationUpdateOAuth2Client + description: Set lifespans of different token types issued for this OAuth 2.0 + client. Does not modify other fields. + operationId: setOAuth2ClientLifespans parameters: - - description: The id of the OAuth 2.0 Client. + - 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' - required: true + $ref: '#/components/schemas/oAuth2ClientTokenLifespans' + x-originalParamName: Body responses: "200": content: @@ -444,1474 +360,1791 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client - Registration Management Protocol - tags: - - public - x-codegen-request-body-name: Body - /health/alive: - get: - description: |- - This endpoint returns a 200 status code when the HTTP server is up running. - 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: isInstanceAlive - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/healthStatus' - description: healthStatus - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Check Alive Status - tags: - - admin - /health/ready: - get: - description: |- - This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never - refer to the cluster state, only to a single instance. - operationId: isInstanceReady - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/healthStatus' - description: healthStatus - "503": - content: - application/json: - schema: - $ref: '#/components/schemas/healthNotReadyStatus' - description: healthNotReadyStatus - summary: Check Readiness Status + $ref: '#/components/schemas/genericError' + description: genericError + summary: Set OAuth2 Client Token Lifespans tags: - - public - /keys/{set}: + - 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. + 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 set + - description: The JSON Web Key Set + explode: false in: path name: set required: true schema: type: string + style: simple responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Delete a JSON Web Key Set + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Delete JSON Web Key Set tags: - - admin + - 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. + 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: The set + - 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 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 summary: Retrieve a JSON Web Key Set tags: - - admin + - 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. + 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 set + - 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/jsonWebKeySetGeneratorRequest' - required: false + $ref: '#/components/schemas/createJsonWebKeySet' + required: true + x-originalParamName: Body responses: "201": content: application/json: schema: - $ref: '#/components/schemas/JSONWebKeySet' - description: JSONWebKeySet - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Generate a New JSON Web Key + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Create JSON Web Key tags: - - admin - x-codegen-request-body-name: Body + - 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: updateJsonWebKeySet + 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 set + - 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' - required: false + $ref: '#/components/schemas/jsonWebKeySet' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/JSONWebKeySet' - description: JSONWebKeySet - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 summary: Update a JSON Web Key Set tags: - - admin - x-codegen-request-body-name: Body - /keys/{set}/{kid}: + - 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. + 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 kid of the desired key + - description: The JSON Web Key Set + explode: false in: path - name: kid + name: set required: true schema: type: string - - description: The set + style: simple + - description: The JSON Web Key ID (kid) + explode: false in: path - name: set + name: kid required: true schema: type: string + style: simple responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Delete a JSON Web Key + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Delete JSON Web Key tags: - - admin + - jwk get: - description: This endpoint returns a singular JSON Web Key, identified by the - set and the specific key ID (kid). + 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: The kid of the desired key + - description: JSON Web Key Set ID + explode: false in: path - name: kid + name: set required: true schema: type: string - - description: The set + style: simple + - description: JSON Web Key ID + explode: false in: path - name: set + name: kid required: true schema: type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/JSONWebKeySet' - description: JSONWebKeySet - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Fetch a JSON Web Key + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get JSON Web Key tags: - - admin + - 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: updateJsonWebKey + 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 kid of the desired key + - description: The JSON Web Key Set ID + explode: false in: path - name: kid + name: set required: true schema: type: string - - description: The set + style: simple + - description: JSON Web Key ID + explode: false in: path - name: set + name: kid required: true schema: type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/JSONWebKey' - required: false + $ref: '#/components/schemas/jsonWebKey' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/JSONWebKey' - description: JSONWebKey - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/jsonWebKey' + description: jsonWebKey + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Update a JSON Web Key + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Set JSON Web Key tags: - - admin - x-codegen-request-body-name: Body - /metrics/prometheus: + - jwk + /admin/oauth2/auth/requests/consent: get: - description: |- - ``` - metadata: - annotations: - prometheus.io/port: "4434" - prometheus.io/path: "/metrics/prometheus" - ``` - operationId: prometheus - responses: - "200": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - summary: |- - Get snapshot metrics from the service. If you're using k8s, you can then add annotations to - your deployment like so: - tags: - - metadata - /oauth2/auth: - get: - description: |- - This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. - OAuth2 is a very popular protocol and a library for your programming language will exists. - - To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - operationId: oauthAuth - responses: - "302": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: The OAuth 2.0 Authorize Endpoint - tags: - - public - /oauth2/auth/requests/consent: - get: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to - grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - - 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 Hydra if the subject accepted - or rejected the request. - operationId: getConsentRequest + 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: - - in: query + - 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/consentRequest' - description: consentRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/oAuth2ConsentRequest' + description: oAuth2ConsentRequest "410": content: application/json: schema: - $ref: '#/components/schemas/requestWasHandledResponse' - description: requestWasHandledResponse - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Get Consent Request Information + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get OAuth 2.0 Consent Request tags: - - admin - /oauth2/auth/requests/consent/accept: + - oAuth2 + /admin/oauth2/auth/requests/consent/accept: put: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to - grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - - 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 Hydra if the subject accepted - or rejected the request. - - This endpoint tells ORY Hydra 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. - operationId: acceptConsentRequest + 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.\n\ + The 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: - - in: query + - 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/acceptConsentRequest' - required: false + $ref: '#/components/schemas/acceptOAuth2ConsentRequest' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/completedRequest' - description: completedRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Accept a Consent Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Accept OAuth 2.0 Consent Request tags: - - admin - x-codegen-request-body-name: Body - /oauth2/auth/requests/consent/reject: + - oAuth2 + /admin/oauth2/auth/requests/consent/reject: put: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to - grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - - 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 Hydra if the subject accepted - or rejected the request. - - This endpoint tells ORY Hydra 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. - operationId: rejectConsentRequest + 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.\n\ + The 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\n\ + head over to the OAuth 2.0 documentation." + operationId: rejectOAuth2ConsentRequest parameters: - - in: query + - 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/rejectRequest' - required: false + $ref: '#/components/schemas/rejectOAuth2Request' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/completedRequest' - description: completedRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Reject a Consent Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Reject OAuth 2.0 Consent Request tags: - - admin - x-codegen-request-body-name: Body - /oauth2/auth/requests/login: + - oAuth2 + /admin/oauth2/auth/requests/login: get: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login - provider is an 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: getLoginRequest + 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: - - in: query + - 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/loginRequest' - description: loginRequest - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/oAuth2LoginRequest' + description: oAuth2LoginRequest "410": content: application/json: schema: - $ref: '#/components/schemas/requestWasHandledResponse' - description: requestWasHandledResponse - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Get a Login Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get OAuth 2.0 Login Request tags: - - admin - /oauth2/auth/requests/login/accept: + - oAuth2 + /admin/oauth2/auth/requests/login/accept: put: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login - provider is an 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. - - This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as - the subject's ID and if ORY Hydra 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: acceptLoginRequest + 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\n\ + the 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: - - in: query + - 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/acceptLoginRequest' - required: false + $ref: '#/components/schemas/acceptOAuth2LoginRequest' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/completedRequest' - description: completedRequest - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Accept a Login Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Accept OAuth 2.0 Login Request tags: - - admin - x-codegen-request-body-name: Body - /oauth2/auth/requests/login/reject: + - oAuth2 + /admin/oauth2/auth/requests/login/reject: put: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login - provider is an 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. - - This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication - was be denied. - - The response contains a redirect URL which the login provider should redirect the user-agent to. - operationId: rejectLoginRequest + 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: - - in: query + - 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/rejectRequest' - required: false + $ref: '#/components/schemas/rejectOAuth2Request' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/completedRequest' - description: completedRequest - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Reject a Login Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Reject OAuth 2.0 Login Request tags: - - admin - x-codegen-request-body-name: Body - /oauth2/auth/requests/logout: + - oAuth2 + /admin/oauth2/auth/requests/logout: get: - description: Use this endpoint to fetch a logout request. - operationId: getLogoutRequest + description: Use this endpoint to fetch an Ory OAuth 2.0 logout request. + operationId: getOAuth2LogoutRequest parameters: - - in: query + - explode: true + in: query name: logout_challenge required: true schema: type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/logoutRequest' - description: logoutRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/oAuth2LogoutRequest' + description: oAuth2LogoutRequest "410": content: application/json: schema: - $ref: '#/components/schemas/requestWasHandledResponse' - description: requestWasHandledResponse - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Get a Logout Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get OAuth 2.0 Session Logout Request tags: - - admin - /oauth2/auth/requests/logout/accept: + - oAuth2 + /admin/oauth2/auth/requests/logout/accept: put: - description: |- - When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. - No body is required. - - The response contains a redirect URL which the consent provider should redirect the user-agent to. - operationId: acceptLogoutRequest + 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: - - in: query + - 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/completedRequest' - description: completedRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Accept a Logout Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Accept OAuth 2.0 Session Logout Request tags: - - admin - /oauth2/auth/requests/logout/reject: + - oAuth2 + /admin/oauth2/auth/requests/logout/reject: put: - description: |- - When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. - No body is required. - - The response is empty as the logout provider has to chose what action to perform next. - operationId: rejectLogoutRequest + 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 + - explode: true + in: query name: logout_challenge required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/rejectRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/rejectRequest' - required: false + style: form responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Reject a Logout Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Reject OAuth 2.0 Session Logout Request tags: - - admin - x-codegen-request-body-name: Body - /oauth2/auth/sessions/consent: + - oAuth2 + /admin/oauth2/auth/sessions/consent: delete: description: |- - This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all - associated OAuth 2.0 Access Tokens. - operationId: revokeConsentSessions + 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: The subject (Subject) who's consent sessions should be deleted. + - 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 - - description: If set, deletes only those consent sessions by the Subject that - have been granted to the specified OAuth 2.0 Client ID + style: form + - 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." + explode: true in: query name: client + required: false schema: type: string - - description: If set to `?all=true`, deletes all consent sessions by the Subject - that have been granted. + 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": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Revoke OAuth 2.0 Consent Sessions of a Subject tags: - - admin + - 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. - - - The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. - Multiple links can be included in this header, and will be separated by a comma. - operationId: listSubjectConsentSessions + 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: - - in: query + - description: "Items per Page\n\nThis is the number of items per page to return.\n\ + 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\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)." + 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 responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/PreviousConsentSession' - type: array - description: A list of used consent requests. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2ConsentSessions' + description: oAuth2ConsentSessions + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Lists All Consent Sessions of a Subject + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: List OAuth 2.0 Consent Sessions of a Subject tags: - - admin - /oauth2/auth/sessions/login: + - oAuth2 + /admin/oauth2/auth/sessions/login: delete: - description: |- - This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject - has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect - Front- or Back-channel logout. - operationId: revokeAuthenticationSession + description: "This endpoint invalidates a subject's authentication session.\ + \ After revoking the authentication session, the subject\nhas to re-authenticate\ + \ at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens\ + \ and\ndoes not work with OpenID Connect Front- or Back-channel logout." + operationId: revokeOAuth2LoginSessions parameters: - - in: query + - description: |- + OAuth 2.0 Subject + + The subject to revoke authentication sessions for. + explode: true + in: query name: subject required: true schema: type: string + style: form responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: |- - Invalidates All Login Sessions of a Certain User - Invalidates a Subject's Authentication Session + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Revokes All OAuth 2.0 Login Sessions of a Subject tags: - - admin - /oauth2/flush: + - oAuth2 + /admin/oauth2/introspect: post: - description: |- - This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be - not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted - automatically when performing the refresh flow. - operationId: flushInactiveOAuth2Tokens + 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/json: + application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/flushInactiveOAuth2TokensRequest' - required: false + $ref: '#/components/schemas/introspectOAuth2Token_request' responses: - "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": + "200": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/introspectedOAuth2Token' + description: introspectedOAuth2Token + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Flush Expired OAuth2 Access Tokens + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Introspect OAuth2 Access and Refresh Tokens tags: - - admin - x-codegen-request-body-name: Body - /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 `accessTokenExtra` during the consent flow. - - For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - operationId: introspectOAuth2Token - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - 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. - type: string - 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 - required: - - token + - 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: - "200": + "204": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/oAuth2TokenIntrospection' - description: oAuth2TokenIntrospection - "401": + $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/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuers' + description: trustedOAuth2JwtGrantIssuers + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Introspect OAuth2 Tokens + $ref: '#/components/schemas/genericError' + description: genericError + summary: List Trusted OAuth2 JWT Bearer Grant Type Issuers tags: - - admin - /oauth2/revoke: + - oAuth2 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 + 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\n\ + and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523)." + operationId: trustOAuth2JwtGrantIssuer requestBody: content: - application/x-www-form-urlencoded: + application/json: schema: - properties: - token: - type: string - required: - - token - required: true + $ref: '#/components/schemas/trustOAuth2JwtGrantIssuer' + x-originalParamName: Body responses: - "200": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": + "201": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuer' + description: trustedOAuth2JwtGrantIssuer + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - security: - - basic: [] - - oauth2: [] - summary: Revoke OAuth2 Tokens + $ref: '#/components/schemas/genericError' + description: genericError + summary: Trust OAuth2 JWT Bearer Grant Type Issuer tags: - - public - /oauth2/sessions/logout: - get: - description: |- - This endpoint initiates and completes user logout at Ory Hydra 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 - operationId: disconnectUser + - 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\n\ + Once 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 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple responses: - "302": - content: {} - 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-Backchannel Enabled Logout + "204": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Delete Trusted OAuth2 JWT Bearer Grant Type Issuer tags: - - public - /oauth2/token: - post: + - oAuth2 + get: description: |- - The client makes a request to the token endpoint by sending the - following parameters using the "application/x-www-form-urlencoded" HTTP - request entity-body. - - > Do not implement a client for this endpoint yourself. Use a library. There are many libraries - > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ - > - > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - operationId: oauth2Token - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - grant_type: - type: string - code: - type: string - refresh_token: - type: string - redirect_uri: - type: string - client_id: - type: string - required: - - grant_type + 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/oauth2TokenResponse' - description: oauth2TokenResponse - "400": + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuer' + description: trustedOAuth2JwtGrantIssuer + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "401": + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get Trusted OAuth2 JWT Bearer Grant Type Issuer + tags: + - oAuth2 + /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/jsonError' - description: jsonError + $ref: '#/components/schemas/healthStatus' + description: Ory Hydra is ready to accept connections. "500": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - security: - - basic: [] - - oauth2: [] - summary: The OAuth 2.0 Token Endpoint + $ref: '#/components/schemas/genericError' + description: genericError + summary: Check HTTP Server Status tags: - - public - /oauth2/tokens: - delete: - description: This endpoint deletes OAuth2 access tokens issued for a client - from the database - operationId: deleteOAuth2Token - parameters: - - in: query - name: client_id - required: true - schema: - type: string + - 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: - "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": + "200": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/isReady_200_response' + description: Ory Hydra is ready to accept requests. + "503": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Delete OAuth2 Access Tokens from a Client + $ref: '#/components/schemas/isReady_503_response' + description: Ory Kratos is not yet ready to accept requests. + summary: Check HTTP Server and Database Status tags: - - admin - /trust/grants/jwt-bearer/issuers: + - metadata + /oauth2/auth: get: - description: Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - operationId: listTrustedJwtGrantIssuers - parameters: - - description: If optional "issuer" is supplied, only jwt-bearer grants with - this issuer will be returned. - in: query - name: issuer - schema: - type: string - - description: The maximum amount of policies returned, upper bound is 500 policies - in: query - name: limit - schema: - format: int64 - type: integer - - description: The offset from where to start looking. - in: query - name: offset - schema: - format: int64 - type: integer + 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: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/trustedJwtGrantIssuers' - description: trustedJwtGrantIssuers - "500": + "302": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: List Trusted OAuth2 JWT Bearer Grant Type Issuers + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: OAuth 2.0 Authorize Endpoint tags: - - admin + - oAuth2 + /oauth2/register: 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: trustJwtGrantIssuer + 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/trustJwtGrantIssuerBody' - required: false + $ref: '#/components/schemas/oAuth2Client' + description: Dynamic Client Registration Request Body + required: true + x-originalParamName: Body responses: "201": content: application/json: schema: - $ref: '#/components/schemas/trustedJwtGrantIssuer' - description: trustedJwtGrantIssuer + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client "400": content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - "409": + $ref: '#/components/schemas/errorOAuth2' + description: Bad Request Error Response + default: content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - "500": + $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\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\n\ + is 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. + 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\ntypically 201." + default: content: application/json: schema: $ref: '#/components/schemas/genericError' description: genericError - summary: Trust an OAuth2 JWT Bearer Grant Type Issuer + security: + - bearer: [] + summary: Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration + Management Protocol tags: - - admin - x-codegen-request-body-name: Body - /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: deleteTrustedJwtGrantIssuer + - 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 desired grant + - description: The id of the OAuth 2.0 Client. + explode: false in: path name: id required: true schema: type: string + style: simple responses: - "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "404": + "200": content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - "500": + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + default: content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + security: + - bearer: [] + summary: Get OAuth2 Client using OpenID Dynamic Client Registration tags: - - admin - 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: getTrustedJwtGrantIssuer + - 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: The id of the desired grant + - 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/trustedJwtGrantIssuer' - description: trustedJwtGrantIssuer + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client "404": content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - "500": + $ref: '#/components/schemas/errorOAuth2' + description: Not Found Error Response + default: content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get a Trusted OAuth2 JWT Bearer Grant Type Issuer + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + security: + - bearer: [] + summary: Set OAuth2 Client using OpenID Dynamic Client Registration tags: - - admin - /userinfo: + - 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: + $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\ntypically 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 returns the payload of the ID Token, including the idTokenExtra values, of - the provided OAuth 2.0 Access Token. + 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 - For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). + 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\ntypically 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/ - 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: userinfo + 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/userinfoResponse' - description: userinfoResponse - "401": + $ref: '#/components/schemas/oAuth2TokenExchange' + description: oAuth2TokenExchange + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $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)\n\ + 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/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 security: - oauth2: [] summary: OpenID Connect Userinfo tags: - - public + - oidc /version: get: - description: |- - This endpoint returns the service version typically notated using semantic versioning. - - If the service supports TLS Edge Termination, this endpoint does not require the - `X-Forwarded-Proto` header to be set. + 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: - $ref: '#/components/schemas/version' - description: version - summary: Get Service Version + $ref: '#/components/schemas/getVersion_200_response' + description: Returns the Ory Hydra version. + summary: Return Running Software Version. tags: - - admin + - metadata 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: - ContainerWaitOKBodyError: - description: ContainerWaitOKBodyError container waiting error, if any + 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 + 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 + acceptOAuth2ConsentRequest: properties: - Message: - description: Details of an error + 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\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 - JSONRawMessage: - title: JSONRawMessage represents a json.RawMessage that works well with JSON, - SQL, and Swagger. - type: object - JSONWebKey: - description: |- - It is important that this model object is named JSONWebKey for - "swagger generate spec" to generate only on definition of a - JSONWebKey. + 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\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 + 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\nto 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." + 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\n\ + configuration).\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 + 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 + + 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 + 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: + 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\n[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\nis currently active. The specifics of a token's \"active\" state\n\ + will 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 + requested 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\n\ + 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\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. + 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].\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 + 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.\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: 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 @@ -1924,22 +2157,21 @@ components: 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 + "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 + "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. + 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\n\ + established by [JWA] or be a value that contains a Collision-\nResistant\ + \ Name." example: RS256 type: string crv: @@ -1961,28 +2193,26 @@ components: 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. + 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\n\ + keys 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\n\ + equivalent alternatives by the application using them.) The \"kid\"\n\ + 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. + 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-\n\ + Resistant Name. The \"kty\" value is a case-sensitive string." example: RSA type: string - n: + "n": example: vTqrxUyQPl_20aqf5kXHwDZrel-KovIp8s7ewJod2EXHl8tWlRB3_Rem34KwBfqlKQGp1nqah-51H4Jzruqe0cFP58hPEIt6WqrvnmJCXxnNuIB53iX_uUUXXHDHBeaPCSRoNJzNysjoJ30TIUsKBiirhBa7f235PXbKiHducLevV6PcKxJ5cY8zO286qJLBWSPm-OIevwqsIsSIH44Qtm9sioFikhkbLwoqwWORGAY0nl6XvVOlhADdLjBSqSAeT1FPuCDCnXwzCDR8N9IFB_IjdStFkC-rVt2K5BYfPd0c3yFp_vHR15eRd0zJ8XQ7woBC8Vnsac6Et1pKS59pX6256DPWu8UDdEOolKAPgcd_g2NpA76cAaF_jcT80j9KrEzw8Tv0nJBGesuCjPNjGs_KzdkWTUXt23Hn9QJsdc1MZuaW0iqXBepHYfYoqNelzVte117t4BwVp0kUM6we0IqyXClaZgOI8S-WDBw2_Ovdm8e5NmhYAblEVoygcX8Y46oH6bKiaCQfKCFDMcRgChme7AoE1yZZYsPbaG_3IjPrC4LBMHQw8rM9dWjJ8ImjicvZ1pAm0dx-KHCP3y5PVKrxBDf1zSOsBRkOSjB8TPODnJMz6-jd5hTtZxpZPwPoIdCanTZ3ZD6uRBpTmDwtpRGm63UQs1m5FWPwb0T2IF0 type: string p: @@ -2006,18 +2236,16 @@ components: 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. + 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.\n\ + The PKIX certificate containing the key value MUST be the first\ncertificate." items: type: string type: array - y: + "y": example: x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0 type: string required: @@ -2026,13 +2254,8 @@ components: - kty - use type: object - JSONWebKeySet: - description: |- - It is important that this model object is named JSONWebKeySet for - "swagger generate spec" to generate only on definition of a - JSONWebKeySet. Since one with the same name is previously defined as - client.Client.JSONWebKeys and this one is last, this one will be - effectively written in the swagger spec. + 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 @@ -2046,13 +2269,13 @@ components: 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 + "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 + "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 @@ -2065,630 +2288,467 @@ components: 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 + "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 + "y": x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0 alg: RS256 properties: keys: - description: |- - The value of the "keys" parameter is an array of 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. + 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' + $ref: '#/components/schemas/jsonWebKey' type: array type: object - JoseJSONWebKeySet: - type: object - PluginConfig: - properties: - Args: - $ref: '#/components/schemas/PluginConfigArgs' - Description: - description: description - type: string - DockerVersion: - description: Docker Version used to create the plugin - type: string - Documentation: - description: documentation - type: string - Entrypoint: - description: entrypoint - items: - type: string - type: array - Env: - description: env - items: - $ref: '#/components/schemas/PluginEnv' - type: array - Interface: - $ref: '#/components/schemas/PluginConfigInterface' - IpcHost: - description: ipc host - type: boolean - Linux: - $ref: '#/components/schemas/PluginConfigLinux' - Mounts: - description: mounts - items: - $ref: '#/components/schemas/PluginMount' - type: array - Network: - $ref: '#/components/schemas/PluginConfigNetwork' - PidHost: - description: pid host - type: boolean - PropagatedMount: - description: propagated mount - type: string - User: - $ref: '#/components/schemas/PluginConfigUser' - WorkDir: - description: work dir - type: string - rootfs: - $ref: '#/components/schemas/PluginConfigRootfs' - required: - - Args - - Description - - Documentation - - Entrypoint - - Env - - Interface - - IpcHost - - Linux - - Mounts - - Network - - PidHost - - PropagatedMount - - WorkDir - title: PluginConfig The config of a plugin. - type: object - PluginConfigArgs: - description: PluginConfigArgs plugin config args - properties: - Description: - description: description - type: string - Name: - description: name - type: string - Settable: - description: settable - items: - type: string - type: array - Value: - description: value - items: - type: string - type: array - required: - - Description - - Name - - Settable - - Value - type: object - PluginConfigInterface: - description: PluginConfigInterface The interface between Docker and the plugin - properties: - ProtocolScheme: - description: Protocol to use for clients connecting to the plugin. - type: string - Socket: - description: socket - type: string - Types: - description: types - items: - $ref: '#/components/schemas/PluginInterfaceType' - type: array - required: - - Socket - - Types - type: object - PluginConfigLinux: - description: PluginConfigLinux plugin config linux + 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." + 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: token_endpoint_auth_method + 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 + 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 + 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 + 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: - AllowAllDevices: - description: allow all devices - type: boolean - Capabilities: - description: capabilities + allowed_cors_origins: items: type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - Devices: - description: devices - items: - $ref: '#/components/schemas/PluginDevice' - type: array - required: - - AllowAllDevices - - Capabilities - - Devices - type: object - PluginConfigNetwork: - description: PluginConfigNetwork plugin config network - properties: - Type: - description: type - type: string - required: - - Type - type: object - PluginConfigRootfs: - description: PluginConfigRootfs plugin config rootfs - properties: - diff_ids: - description: diff ids + audience: items: type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - type: - description: type + 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 - type: object - PluginConfigUser: - description: PluginConfigUser plugin config user - properties: - GID: - description: g ID - format: uint32 - type: integer - UID: - description: UID - format: uint32 - type: integer - type: object - PluginDevice: - description: PluginDevice plugin device - properties: - Description: - description: description + 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 + + 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 autogenerated and immutable. + 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 - Name: - description: name + 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 - Path: - description: path + 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\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 - Settable: - description: settable + contacts: items: type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - required: - - Description - - Name - - Path - - Settable - type: object - PluginEnv: - description: PluginEnv plugin env - properties: - Description: - description: description + created_at: + description: |- + OAuth 2.0 Client Creation Date + + CreatedAt returns the timestamp of the client's creation. + format: date-time type: string - Name: - description: name + 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 - Settable: - description: settable + grant_types: items: type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - Value: - description: value - type: string - required: - - Description - - Name - - Settable - - Value - type: object - PluginInterfaceType: - description: PluginInterfaceType plugin interface type - properties: - Capability: - description: capability - type: string - Prefix: - description: prefix + 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 - Version: - description: version + 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\n\ + can 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\n\ + JWK 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: + description: "Specify a time duration in milliseconds, seconds, minutes,\ + \ hours." + pattern: "^([0-9]+(ns|us|ms|s|m|h))*$" + title: Time duration type: string - required: - - Capability - - Prefix - - Version - type: object - PluginMount: - description: PluginMount plugin mount - properties: - Description: - description: description + logo_uri: + description: |- + OAuth 2.0 Client Logo URI + + A URL string referencing the client's logo. type: string - Destination: - description: destination + 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 - Name: - description: name + 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 - Options: - description: options + post_logout_redirect_uris: items: type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - Settable: - description: settable + redirect_uris: items: type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - Source: - description: source + 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 - Type: - description: type + registration_access_token: + description: "OpenID Connect Dynamic Client Registration Access Token\n\n\ + RegistrationAccessToken can be used to update, get, or delete the OAuth2\ + \ Client. It is sent when creating a client\nusing Dynamic Client Registration." type: string - required: - - Description - - Destination - - Name - - Options - - Settable - - Source - - Type - type: object - PluginSettings: - properties: - Args: - description: args - items: - type: string - type: array - Devices: - description: devices - items: - $ref: '#/components/schemas/PluginDevice' - type: array - Env: - description: env - items: - type: string - type: array - Mounts: - description: mounts - items: - $ref: '#/components/schemas/PluginMount' - type: array - required: - - Args - - Devices - - Env - - Mounts - title: PluginSettings Settings that can be modified by users. - type: object - PreviousConsentSession: - description: |- - The response used to return used consent requests - same as HandledLoginRequest, just with consent_request exposed as json - 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: '{}' - 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 - 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 - registration_access_token: registration_access_token - client_id: client_id - token_endpoint_auth_method: token_endpoint_auth_method - userinfo_signed_response_alg: userinfo_signed_response_alg - updated_at: 2000-01-23T04:56:07.000+00:00 - scope: scope - 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 - audience: - - audience - - audience - post_logout_redirect_uris: - - post_logout_redirect_uris - - post_logout_redirect_uris - grant_types: - - grant_types - - grant_types - subject_type: subject_type - redirect_uris: - - redirect_uris - - redirect_uris - sector_identifier_uri: sector_identifier_uri - frontchannel_logout_session_required: true - frontchannel_logout_uri: frontchannel_logout_uri - client_secret_expires_at: 0 - 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 - session: - access_token: '{}' - id_token: '{}' - 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/consentRequest' - grant_access_token_audience: + 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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - grant_scope: + response_types: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - 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. + 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 - 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: + sector_identifier_uri: 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/consentRequestSession' - type: object - StringSlicePipeDelimiter: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL string. - type: array - Volume: - description: Volume volume - properties: - CreatedAt: - description: Date/Time the volume was created. - type: string - Driver: - description: Name of the volume driver used by the volume. - type: string - Labels: - additionalProperties: - type: string - description: User-defined key/value metadata. - type: object - Mountpoint: - description: Mount path of the volume on the host. - type: string - Name: - description: Name of the volume. - type: string - Options: - additionalProperties: - type: string - description: The driver specific options used when creating the volume. - type: object - Scope: - description: The level at which the volume exists. Either `global` for cluster-wide, - or `local` for machine level. + 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 - Status: + subject_type: description: |- - Low-level details about the volume, provided by the volume driver. - Details are returned as a map with key/value pairs: - `{"key":"value","key2":"value2"}`. + OpenID Connect Subject Type - The `Status` field is optional, and is omitted if the volume driver - does not support this feature. - properties: {} - type: object - UsageData: - $ref: '#/components/schemas/VolumeUsageData' - required: - - Driver - - Labels - - Mountpoint - - Name - - Options - - Scope - type: object - VolumeUsageData: - description: |- - VolumeUsageData Usage details about the volume. This information is used by the - `GET /system/df` endpoint, and omitted in other endpoints. - properties: - RefCount: - description: |- - The number of containers referencing this volume. This field - is set to `-1` if the reference-count is not available. - format: int64 - type: integer - Size: - description: |- - Amount of disk space used by the volume (in bytes). This information - is only available for volumes created with the `"local"` volume - driver. For volumes created with other volume drivers, this field - is set to `-1` ("not available") - format: int64 - type: integer - required: - - RefCount - - Size - type: object - acceptConsentRequest: - properties: - grant_access_token_audience: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. - type: array - grant_scope: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. - type: array - handled_at: - format: date-time - title: NullTime implements sql.NullTime functionality. + 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 - 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/consentRequestSession' - title: The request payload used to accept a consent request. - type: object - acceptLoginRequest: - 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. + token_endpoint_auth_method: + description: "OAuth 2.0 Token Endpoint Authentication Method\n\nRequested\ + \ Client Authentication method for the Token Endpoint. The options are:\n\ + \n`client_secret_post`: (default) Send `client_id` and `client_secret`\ + \ as `application/x-www-form-urlencoded` in the HTTP body.\n`client_secret_basic`:\ + \ Send `client_id` and `client_secret` as `application/x-www-form-urlencoded`\ + \ encoded in the HTTP Authorization header.\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 - amr: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. - type: array - context: - title: JSONRawMessage represents a json.RawMessage that works well with - JSON, SQL, and Swagger. - type: object - force_subject_identifier: + token_endpoint_auth_signing_alg: 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. + OAuth 2.0 Token Endpoint Signing Algorithm - 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. + Requested Client Authentication signing algorithm for the Token Endpoint. type: string - remember: + tos_uri: 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: + 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: |- - 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. + OAuth 2.0 Client Last Update Date + + UpdatedAt returns the timestamp of the last update. + format: date-time type: string - required: - - subject - title: HandledLoginRequest is the request payload used to accept a login request. + 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 - completedRequest: - example: - redirect_to: redirect_to + oAuth2ClientTokenLifespans: + description: Lifespans of different token types issued for this OAuth 2.0 Client. properties: - redirect_to: - description: RedirectURL is the URL which you should redirect the user to - once the authentication process is completed. - type: string - required: - - redirect_to - title: The response payload sent when accepting or rejecting a login or consent - request. + 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 - consentRequest: + oAuth2ConsentRequest: example: requested_access_token_audience: - requested_access_token_audience @@ -2703,7 +2763,8 @@ components: ui_locales: - ui_locales - ui_locales - id_token_hint_claims: '{}' + id_token_hint_claims: + key: "" acr_values: - acr_values - acr_values @@ -2711,25 +2772,30 @@ components: skip: true request_url: request_url acr: acr - context: '{}' + context: "" challenge: challenge client: - metadata: '{}' + metadata: "" token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg client_uri: client_uri - jwks: '{}' + 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: token_endpoint_auth_method 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: scope + scope: scope1 scope-2 scope.3 scope:4 request_uris: - request_uris - request_uris @@ -2742,6 +2808,7 @@ components: 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 @@ -2749,13 +2816,17 @@ components: - 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 + 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 jwks_uri: jwks_uri request_object_signing_alg: request_object_signing_alg tos_uri: tos_uri @@ -2771,15 +2842,15 @@ components: - 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. + 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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array challenge: description: |- @@ -2789,9 +2860,8 @@ components: client: $ref: '#/components/schemas/oAuth2Client' context: - title: JSONRawMessage represents a json.RawMessage that works well with - JSON, SQL, and Swagger. - type: object + 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 @@ -2805,185 +2875,267 @@ components: 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/openIDConnectContext' + $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. + 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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array requested_scope: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - 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. + 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 - requested by the OAuth 2.0 client. + 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 - consentRequestSession: + oAuth2ConsentRequestOpenIDConnectContext: example: - access_token: '{}' - id_token: '{}' + login_hint: login_hint + ui_locales: + - ui_locales + - ui_locales + id_token_hint_claims: + key: "" + acr_values: + - acr_values + - acr_values + display: display properties: - access_token: + 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: |- - 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! - properties: {} + 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 - id_token: + login_hint: 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! - properties: {} - type: object - title: Used to pass session data to a consent request. + 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\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 - flushInactiveOAuth2TokensRequest: + 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: token_endpoint_auth_method + 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 + 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 + 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 + 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: "" + 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: - notAfter: - description: |- - NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history - of recently issued tokens for auditing. + consent_request: + $ref: '#/components/schemas/oAuth2ConsentRequest' + 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 - type: object - genericError: - properties: - code: - description: The status code - example: 404 + 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\n\ + authorization will be remembered indefinitely." 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 - properties: {} - type: object - 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 - jsonError: - description: Error responses are sent when an error (e.g. unauthorized, bad - request, ...) occurred. - properties: - error: - description: Name is the error name. - example: The requested resource could not be found - type: string - error_debug: - description: Debug contains debug information. This is usually not available - and has to be enabled. - example: The database adapter was unable to find the element - type: string - error_description: - description: Description contains further information on the nature of the - error. - example: Object with ID 12345 does not exist - type: string - status_code: - description: Code represents the error status code (404, 403, 401, ...). - example: 404 - format: int64 - type: integer - title: Generic Error Response - type: object - jsonWebKeySetGeneratorRequest: - properties: - alg: - description: The algorithm to be used for creating the key. Supports "RS256", - "ES256", "ES512", "HS512", and "HS256" - type: string - kid: - description: The kid of the key to be created - type: string - use: - description: |- - 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 + session: + $ref: '#/components/schemas/acceptOAuth2ConsentRequestSession' + title: OAuth 2.0 Consent Session type: object - loginRequest: + 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 @@ -2994,29 +3146,35 @@ components: ui_locales: - ui_locales - ui_locales - id_token_hint_claims: '{}' + id_token_hint_claims: + key: "" acr_values: - acr_values - acr_values display: display challenge: challenge client: - metadata: '{}' + metadata: "" token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg client_uri: client_uri - jwks: '{}' + 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: token_endpoint_auth_method 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: scope + scope: scope1 scope-2 scope.3 scope:4 request_uris: - request_uris - request_uris @@ -3029,6 +3187,7 @@ components: 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 @@ -3036,13 +3195,17 @@ components: - 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 + 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 jwks_uri: jwks_uri request_object_signing_alg: request_object_signing_alg tos_uri: tos_uri @@ -3067,24 +3230,25 @@ components: client: $ref: '#/components/schemas/oAuth2Client' oidc_context: - $ref: '#/components/schemas/openIDConnectContext' + $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. + 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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array requested_scope: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array session_id: description: |- @@ -3094,17 +3258,18 @@ components: 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. + 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 - 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. + 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 @@ -3116,27 +3281,32 @@ components: - subject title: Contains information on an ongoing login request. type: object - logoutRequest: + oAuth2LogoutRequest: example: subject: subject challenge: challenge client: - metadata: '{}' + metadata: "" token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg client_uri: client_uri - jwks: '{}' + 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: token_endpoint_auth_method 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: scope + scope: scope1 scope-2 scope.3 scope:4 request_uris: - request_uris - request_uris @@ -3149,6 +3319,7 @@ components: 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 @@ -3156,13 +3327,17 @@ components: - 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 + 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 jwks_uri: jwks_uri request_object_signing_alg: request_object_signing_alg tos_uri: tos_uri @@ -3187,8 +3362,8 @@ components: 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. + 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 @@ -3199,479 +3374,509 @@ components: type: string title: Contains information about an ongoing logout request. type: object - nullTime: - format: date-time - title: NullTime implements sql.NullTime functionality. - type: string - oAuth2Client: + oAuth2RedirectTo: + description: "Contains a redirect URL used to complete a login, consent, or\ + \ logout request." example: - metadata: '{}' - token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg - client_uri: client_uri - 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 - registration_access_token: registration_access_token - client_id: client_id - token_endpoint_auth_method: token_endpoint_auth_method - userinfo_signed_response_alg: userinfo_signed_response_alg - updated_at: 2000-01-23T04:56:07.000+00:00 - scope: scope - 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 - audience: - - audience - - audience - post_logout_redirect_uris: - - post_logout_redirect_uris - - post_logout_redirect_uris - grant_types: - - grant_types - - grant_types - subject_type: subject_type - redirect_uris: - - redirect_uris - - redirect_uris - sector_identifier_uri: sector_identifier_uri - frontchannel_logout_session_required: true - frontchannel_logout_uri: frontchannel_logout_uri - client_secret_expires_at: 0 - 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 + redirect_to: redirect_to properties: - allowed_cors_origins: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. - type: array - audience: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. - type: array - backchannel_logout_session_required: - description: |- - 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: RP URL that will cause the RP to log itself out when sent a - Logout Token by the OP. - type: string - client_id: - description: ID is the id for this client. + redirect_to: + description: RedirectURL is the URL which you should redirect the user's + browser to once the authentication process is completed. type: string - client_name: - description: |- - Name is the human-readable string name of the client to be presented to the - end-user during authorization. + 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: 1 + id_token: 6 + token_type: token_type + expires_in: 0 + properties: + access_token: + description: The access token issued by the authorization server. type: string - client_secret: - description: |- - Secret is the client's secret. The secret will be included in the create request as cleartext, and then - never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users - that they need to write the secret down as it will not be made available again. + 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. + format: int64 + type: integer + 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 - client_secret_expires_at: - description: |- - SecretExpiresAt is an integer holding the time at which the client - secret will expire or 0 if it will not expire. The time is - represented as the number of seconds from 1970-01-01T00:00:00Z as - measured in UTC until the date/time of expiration. - - This feature is currently not supported and it's value will always - be set to 0. + scope: + description: The scope of the access token format: int64 type: integer - client_uri: - description: |- - ClientURI is an 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. + token_type: + description: The type of the token issued type: string - contacts: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. - type: array - created_at: - description: CreatedAt returns the timestamp of the client's creation. - format: date-time + 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 + frontchannel_logout_session_supported: true + jwks_uri: "https://{slug}.projects.oryapis.com/.well-known/jwks.json" + 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 - frontchannel_logout_session_required: - description: |- - 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. + 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 - frontchannel_logout_uri: - description: |- - 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: + 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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - jwks: - type: object - jwks_uri: + 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 + end_session_endpoint: description: |- - 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 - logo_uri: - description: LogoURI is an URL string that references a logo for the client. - type: string - metadata: - title: JSONRawMessage represents a json.RawMessage that works well with - JSON, SQL, and Swagger. - type: object - owner: - description: Owner is a string identifying the owner of the OAuth 2.0 Client. + 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 - policy_uri: + 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\n\ + included 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: |- - 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: + 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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - redirect_uris: + id_token_signed_response_alg: + description: |- + OpenID Connect Default ID Token Signing Algorithms + + Algorithm used to sign OpenID Connect ID Tokens. items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - registration_access_token: - description: RegistrationAccessToken can be used to update, get, or delete - the OAuth2 Client. - type: string - registration_client_uri: - description: RegistrationClientURI is the URL used to update, get, or delete - the OAuth2 Client. - type: string - request_object_signing_alg: + id_token_signing_alg_values_supported: description: |- - 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: + 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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - response_types: + 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\n\ + 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\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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - scope: + 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: |- - 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. - pattern: ([a-zA-Z0-9\.\*]+\s?)+ - type: string - sector_identifier_uri: + 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: |- - 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 - subject_type: + 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\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: |- - SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a - list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + OAuth 2.0 Token Revocation URL + + URL of the authorization server's OAuth 2.0 revocation endpoint. type: string - token_endpoint_auth_method: + 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: |- - Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, - client_secret_basic, private_key_jwt, and none. - type: string - token_endpoint_auth_signing_alg: - description: Requested Client Authentication signing algorithm for the Token - Endpoint. + 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 - tos_uri: + 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: |- - TermsOfServiceURI is a URL string that points 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: UpdatedAt returns the timestamp of the last update. - format: date-time + OpenID Connect Userinfo URL + + URL of the OP's UserInfo Endpoint. type: string userinfo_signed_response_alg: description: |- - 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: Client represents an OAuth 2.0 Client. + 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\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: + - 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 - oAuth2TokenIntrospection: - description: https://tools.ietf.org/html/rfc7662 + oidcUserInfo: + description: OpenID Connect Userinfo example: - ext: '{}' 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 + 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: - 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). + 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 - 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. + 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 - 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: - description: Extra is arbitrary data set by the session. - properties: {} - 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 + 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 - 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. + 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 - scope: - description: |- - Scope is a JSON string containing a space-separated list of - scopes associated with this token. + 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 - sub: - description: |- - Subject of the token, as defined in JWT [RFC7519]. - Usually a machine-readable identifier of the resource owner who - authorized this token. + 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 - token_type: - description: TokenType is the introspected token's type, typically `Bearer`. + 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 - token_use: - description: TokenUse is the introspected token's use, for example `access_token` - or `refresh_token`. + 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 - username: - description: |- - Username is a human-readable identifier for the resource owner who - authorized this token. + 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 - required: - - active - title: 'Introspection contains an access token''s session data as specified - by IETF RFC 7662, see:' - type: object - oauth2TokenResponse: - description: The Access Token Response - 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: + 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 - expires_in: - format: int64 - type: integer - id_token: + 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 - refresh_token: + profile: + description: URL of the End-User's profile page. The contents of this Web + page SHOULD be about the End-User. type: string - scope: + sub: + description: Subject - Identifier for the End-User at the IssuerURL. type: string - token_type: + 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 - openIDConnectContext: - example: - login_hint: login_hint - ui_locales: - - ui_locales - - ui_locales - id_token_hint_claims: '{}' - acr_values: - - acr_values - - acr_values - display: display + pagination: 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: - 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. - properties: {} - 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. + 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 - 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 - patchDocument: - description: A JSONPatch document as defined by RFC 6902 + paginationHeaders: properties: - from: - description: A JSON-pointer + 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 - op: - description: The operation to be performed - example: '"replace"' + x-total-count: + description: "The total number of clients.\n\nin: header" type: string - path: - description: A JSON-pointer - example: '"/name"' - type: string - value: - description: The value to be used within the operations - properties: {} - type: object - required: - - op - - path type: object - patchRequest: - description: A JSONPatch request - items: - $ref: '#/components/schemas/patchDocument' - type: array - rejectRequest: + rejectOAuth2Request: properties: error: - description: |- - The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). - - Defaults to `request_denied`. + 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: |- @@ -3693,22 +3898,93 @@ components: type: integer title: The request payload used to accept a login or consent request. type: object - requestWasHandledResponse: + tokenPagination: properties: - redirect_to: - description: Original request URL to which you should redirect the user - if request was already handled. + 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 - required: - - redirect_to - title: The response payload sent when there is an attempt to access already - handled request. type: object - trustJwtGrantIssuerBody: + 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.\n\ + next: The next page of results.\nprev: The previous page of results.\n\ + last: 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 + + 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". + description: "The \"expires_at\" indicates, when grant will expire, so we\ + \ will reject assertion from \"issuer\" targeting \"subject\"." format: date-time type: string issuer: @@ -3717,10 +3993,10 @@ components: example: https://jwt-idp.example.com type: string jwk: - $ref: '#/components/schemas/JSONWebKey' + $ref: '#/components/schemas/jsonWebKey' scope: - description: The "scope" contains list of scope values (as described in - Section 3.3 of OAuth 2.0 [RFC6749]) + description: "The \"scope\" contains list of scope values (as described\ + \ in Section 3.3 of OAuth 2.0 [RFC6749])" example: - openid - offline @@ -3737,25 +4013,9 @@ components: - issuer - jwk - scope - - subject - type: object - trustedJsonWebKey: - 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 - trustedJwtGrantIssuer: + trustedOAuth2JwtGrantIssuer: + description: OAuth2 JWT Bearer Grant Type Issuer Trust Relationship example: public_key: set: https://jwt-idp.example.com @@ -3767,15 +4027,20 @@ components: - 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. + 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". + description: "The \"expires_at\" indicates, when grant will expire, so we\ + \ will reject assertion from \"issuer\" targeting \"subject\"." format: date-time type: string id: @@ -3787,10 +4052,10 @@ components: example: https://jwt-idp.example.com type: string public_key: - $ref: '#/components/schemas/trustedJsonWebKey' + $ref: '#/components/schemas/trustedOAuth2JwtGrantJsonWebKey' scope: - description: The "scope" contains list of scope values (as described in - Section 3.3 of OAuth 2.0 [RFC6749]) + description: "The \"scope\" contains list of scope values (as described\ + \ in Section 3.3 of OAuth 2.0 [RFC6749])" example: - openid - offline @@ -3803,376 +4068,142 @@ components: example: mike@example.com type: string type: object - trustedJwtGrantIssuers: + trustedOAuth2JwtGrantIssuers: + description: OAuth2 JWT Bearer Grant Type Issuer Trust Relationships items: - $ref: '#/components/schemas/trustedJwtGrantIssuer' + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuer' type: array - userinfoResponse: - description: The userinfo response + trustedOAuth2JwtGrantJsonWebKey: + description: OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key 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 + set: https://jwt-idp.example.com + kid: 123e4567-e89b-12d3-a456-426655440000 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. + kid: + description: The "key_id" is key unique identifier (same as kid header in + jws/jwt). + example: 123e4567-e89b-12d3-a456-426655440000 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. + 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 - 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: object + version: + properties: + version: + description: Version is the service's version. 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: object + introspectOAuth2Token_request: + 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 + isReady_200_response: + example: + status: status + properties: + status: + description: Always "ok". 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: object + isReady_503_response: + 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: + token: + required: + - token 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. + x-formData-name: token + required: + - token + type: object + oauth2TokenExchange_request: + properties: + client_id: type: string - profile: - description: URL of the End-User's profile page. The contents of this Web - page SHOULD be about the End-User. + x-formData-name: client_id + code: type: string - sub: - description: Subject - Identifier for the End-User at the IssuerURL. + x-formData-name: code + grant_type: + required: + - grant_type 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. + x-formData-name: grant_type + redirect_uri: 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. + x-formData-name: redirect_uri + refresh_token: type: string + x-formData-name: refresh_token + required: + - grant_type type: object - version: + getVersion_200_response: example: version: version properties: version: - description: Version is the service's version. + description: The version of Ory Hydra. type: string type: object - wellKnown: - description: |- - It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms - among others. + oAuth2ConsentSession_expires_at: 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/ - 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 - 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 - frontchannel_logout_session_supported: true - jwks_uri: https://playground.ory.sh/ory-hydra/public/.well-known/jwks.json - 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 + 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: - authorization_endpoint: - description: URL of the OP's OAuth 2.0 Authorization Endpoint. - example: https://playground.ory.sh/ory-hydra/public/oauth2/auth - type: string - backchannel_logout_session_supported: - description: |- - 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: Boolean value specifying whether the OP supports back-channel - logout, with true indicating support. - type: boolean - claims_parameter_supported: - description: Boolean value specifying whether the OP supports use of the - claims parameter, with true indicating support. - type: boolean - claims_supported: - description: |- - 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: |- - 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 - end_session_endpoint: - description: 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: |- - 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: Boolean value specifying whether the OP supports HTTP-based - logout, with true indicating support. - type: boolean - grant_types_supported: - description: JSON array containing a list of the OAuth 2.0 Grant Type values - that this OP supports. - items: - type: string - type: array - id_token_signing_alg_values_supported: - description: |- - 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: |- - 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: |- - 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://playground.ory.sh/ory-hydra/public/.well-known/jwks.json + access_token: + format: date-time type: string - registration_endpoint: - description: URL of the OP's Dynamic Client Registration Endpoint. - example: https://playground.ory.sh/ory-hydra/admin/client + authorize_code: + format: date-time type: string - request_object_signing_alg_values_supported: - description: |- - 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: Boolean value specifying whether the OP supports use of the - request parameter, with true indicating support. - type: boolean - request_uri_parameter_supported: - description: Boolean value specifying whether the OP supports use of the - request_uri parameter, with true indicating support. - type: boolean - require_request_uri_registration: - description: |- - 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: 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: |- - 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: URL of the authorization server's OAuth 2.0 revocation endpoint. + id_token: + format: date-time type: string - scopes_supported: - description: |- - SON 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: |- - 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: URL of the OP's OAuth 2.0 Token Endpoint - example: https://playground.ory.sh/ory-hydra/public/oauth2/token + par_context: + format: date-time type: string - token_endpoint_auth_methods_supported: - description: |- - 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: URL of the OP's UserInfo Endpoint. + refresh_token: + format: date-time type: string - userinfo_signing_alg_values_supported: - description: 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_signing_alg_values_supported - - issuer - - jwks_uri - - response_types_supported - - subject_types_supported - - token_endpoint - title: WellKnown represents important OpenID Connect discovery metadata type: object securitySchemes: basic: scheme: basic type: http + bearer: + scheme: bearer + type: http oauth2: flows: authorizationCode: @@ -4185,4 +4216,3 @@ components: type: oauth2 x-forwarded-proto: string x-request-id: string -x-original-swagger-version: "2.0" diff --git a/clients/hydra/go/api_admin.go b/clients/hydra/go/api_admin.go deleted file mode 100644 index 2482e9fe25b..00000000000 --- a/clients/hydra/go/api_admin.go +++ /dev/null @@ -1,5232 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - -// Linger please -var ( - _ context.Context -) - -type AdminApi interface { - - /* - * AcceptConsentRequest Accept a Consent Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to -grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - -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 Hydra if the subject accepted -or rejected the request. - -This endpoint tells ORY Hydra 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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiAcceptConsentRequestRequest - */ - AcceptConsentRequest(ctx context.Context) AdminApiApiAcceptConsentRequestRequest - - /* - * AcceptConsentRequestExecute executes the request - * @return CompletedRequest - */ - AcceptConsentRequestExecute(r AdminApiApiAcceptConsentRequestRequest) (*CompletedRequest, *http.Response, error) - - /* - * AcceptLoginRequest Accept a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -(sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login -provider is an 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. - -This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as -the subject's ID and if ORY Hydra 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiAcceptLoginRequestRequest - */ - AcceptLoginRequest(ctx context.Context) AdminApiApiAcceptLoginRequestRequest - - /* - * AcceptLoginRequestExecute executes the request - * @return CompletedRequest - */ - AcceptLoginRequestExecute(r AdminApiApiAcceptLoginRequestRequest) (*CompletedRequest, *http.Response, error) - - /* - * AcceptLogoutRequest Accept a Logout Request - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. -No body is required. - -The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiAcceptLogoutRequestRequest - */ - AcceptLogoutRequest(ctx context.Context) AdminApiApiAcceptLogoutRequestRequest - - /* - * AcceptLogoutRequestExecute executes the request - * @return CompletedRequest - */ - AcceptLogoutRequestExecute(r AdminApiApiAcceptLogoutRequestRequest) (*CompletedRequest, *http.Response, error) - - /* - * CreateJsonWebKeySet Generate a New 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param set The set - * @return AdminApiApiCreateJsonWebKeySetRequest - */ - CreateJsonWebKeySet(ctx context.Context, set string) AdminApiApiCreateJsonWebKeySetRequest - - /* - * CreateJsonWebKeySetExecute executes the request - * @return JSONWebKeySet - */ - CreateJsonWebKeySetExecute(r AdminApiApiCreateJsonWebKeySetRequest) (*JSONWebKeySet, *http.Response, error) - - /* - * CreateOAuth2Client Create an OAuth 2.0 Client - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret -will be generated. The 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 somwhere 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiCreateOAuth2ClientRequest - */ - CreateOAuth2Client(ctx context.Context) AdminApiApiCreateOAuth2ClientRequest - - /* - * CreateOAuth2ClientExecute executes the request - * @return OAuth2Client - */ - CreateOAuth2ClientExecute(r AdminApiApiCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) - - /* - * DeleteJsonWebKey Delete a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param kid The kid of the desired key - * @param set The set - * @return AdminApiApiDeleteJsonWebKeyRequest - */ - DeleteJsonWebKey(ctx context.Context, kid string, set string) AdminApiApiDeleteJsonWebKeyRequest - - /* - * DeleteJsonWebKeyExecute executes the request - */ - DeleteJsonWebKeyExecute(r AdminApiApiDeleteJsonWebKeyRequest) (*http.Response, error) - - /* - * DeleteJsonWebKeySet Delete a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param set The set - * @return AdminApiApiDeleteJsonWebKeySetRequest - */ - DeleteJsonWebKeySet(ctx context.Context, set string) AdminApiApiDeleteJsonWebKeySetRequest - - /* - * DeleteJsonWebKeySetExecute executes the request - */ - DeleteJsonWebKeySetExecute(r AdminApiApiDeleteJsonWebKeySetRequest) (*http.Response, error) - - /* - * DeleteOAuth2Client Deletes an 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return AdminApiApiDeleteOAuth2ClientRequest - */ - DeleteOAuth2Client(ctx context.Context, id string) AdminApiApiDeleteOAuth2ClientRequest - - /* - * DeleteOAuth2ClientExecute executes the request - */ - DeleteOAuth2ClientExecute(r AdminApiApiDeleteOAuth2ClientRequest) (*http.Response, error) - - /* - * DeleteOAuth2Token Delete OAuth2 Access Tokens from a Client - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiDeleteOAuth2TokenRequest - */ - DeleteOAuth2Token(ctx context.Context) AdminApiApiDeleteOAuth2TokenRequest - - /* - * DeleteOAuth2TokenExecute executes the request - */ - DeleteOAuth2TokenExecute(r AdminApiApiDeleteOAuth2TokenRequest) (*http.Response, error) - - /* - * DeleteTrustedJwtGrantIssuer Delete a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the desired grant - * @return AdminApiApiDeleteTrustedJwtGrantIssuerRequest - */ - DeleteTrustedJwtGrantIssuer(ctx context.Context, id string) AdminApiApiDeleteTrustedJwtGrantIssuerRequest - - /* - * DeleteTrustedJwtGrantIssuerExecute executes the request - */ - DeleteTrustedJwtGrantIssuerExecute(r AdminApiApiDeleteTrustedJwtGrantIssuerRequest) (*http.Response, error) - - /* - * FlushInactiveOAuth2Tokens Flush Expired OAuth2 Access Tokens - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be -not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted -automatically when performing the refresh flow. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiFlushInactiveOAuth2TokensRequest - */ - FlushInactiveOAuth2Tokens(ctx context.Context) AdminApiApiFlushInactiveOAuth2TokensRequest - - /* - * FlushInactiveOAuth2TokensExecute executes the request - */ - FlushInactiveOAuth2TokensExecute(r AdminApiApiFlushInactiveOAuth2TokensRequest) (*http.Response, error) - - /* - * GetConsentRequest Get Consent Request Information - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to -grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - -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 Hydra if the subject accepted -or rejected the request. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiGetConsentRequestRequest - */ - GetConsentRequest(ctx context.Context) AdminApiApiGetConsentRequestRequest - - /* - * GetConsentRequestExecute executes the request - * @return ConsentRequest - */ - GetConsentRequestExecute(r AdminApiApiGetConsentRequestRequest) (*ConsentRequest, *http.Response, error) - - /* - * GetJsonWebKey Fetch a JSON Web Key - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param kid The kid of the desired key - * @param set The set - * @return AdminApiApiGetJsonWebKeyRequest - */ - GetJsonWebKey(ctx context.Context, kid string, set string) AdminApiApiGetJsonWebKeyRequest - - /* - * GetJsonWebKeyExecute executes the request - * @return JSONWebKeySet - */ - GetJsonWebKeyExecute(r AdminApiApiGetJsonWebKeyRequest) (*JSONWebKeySet, *http.Response, error) - - /* - * GetJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param set The set - * @return AdminApiApiGetJsonWebKeySetRequest - */ - GetJsonWebKeySet(ctx context.Context, set string) AdminApiApiGetJsonWebKeySetRequest - - /* - * GetJsonWebKeySetExecute executes the request - * @return JSONWebKeySet - */ - GetJsonWebKeySetExecute(r AdminApiApiGetJsonWebKeySetRequest) (*JSONWebKeySet, *http.Response, error) - - /* - * GetLoginRequest Get a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -(sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login -provider is an 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiGetLoginRequestRequest - */ - GetLoginRequest(ctx context.Context) AdminApiApiGetLoginRequestRequest - - /* - * GetLoginRequestExecute executes the request - * @return LoginRequest - */ - GetLoginRequestExecute(r AdminApiApiGetLoginRequestRequest) (*LoginRequest, *http.Response, error) - - /* - * GetLogoutRequest Get a Logout Request - * Use this endpoint to fetch a logout request. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiGetLogoutRequestRequest - */ - GetLogoutRequest(ctx context.Context) AdminApiApiGetLogoutRequestRequest - - /* - * GetLogoutRequestExecute executes the request - * @return LogoutRequest - */ - GetLogoutRequestExecute(r AdminApiApiGetLogoutRequestRequest) (*LogoutRequest, *http.Response, error) - - /* - * GetOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return AdminApiApiGetOAuth2ClientRequest - */ - GetOAuth2Client(ctx context.Context, id string) AdminApiApiGetOAuth2ClientRequest - - /* - * GetOAuth2ClientExecute executes the request - * @return OAuth2Client - */ - GetOAuth2ClientExecute(r AdminApiApiGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) - - /* - * GetTrustedJwtGrantIssuer Get a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the desired grant - * @return AdminApiApiGetTrustedJwtGrantIssuerRequest - */ - GetTrustedJwtGrantIssuer(ctx context.Context, id string) AdminApiApiGetTrustedJwtGrantIssuerRequest - - /* - * GetTrustedJwtGrantIssuerExecute executes the request - * @return TrustedJwtGrantIssuer - */ - GetTrustedJwtGrantIssuerExecute(r AdminApiApiGetTrustedJwtGrantIssuerRequest) (*TrustedJwtGrantIssuer, *http.Response, error) - - /* - * GetVersion Get Service Version - * This endpoint returns the service version typically notated using semantic versioning. - -If the service supports TLS Edge Termination, this endpoint does not require the -`X-Forwarded-Proto` header to be set. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiGetVersionRequest - */ - GetVersion(ctx context.Context) AdminApiApiGetVersionRequest - - /* - * GetVersionExecute executes the request - * @return Version - */ - GetVersionExecute(r AdminApiApiGetVersionRequest) (*Version, *http.Response, error) - - /* - * IntrospectOAuth2Token Introspect OAuth2 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 `accessTokenExtra` during the consent flow. - -For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiIntrospectOAuth2TokenRequest - */ - IntrospectOAuth2Token(ctx context.Context) AdminApiApiIntrospectOAuth2TokenRequest - - /* - * IntrospectOAuth2TokenExecute executes the request - * @return OAuth2TokenIntrospection - */ - IntrospectOAuth2TokenExecute(r AdminApiApiIntrospectOAuth2TokenRequest) (*OAuth2TokenIntrospection, *http.Response, error) - - /* - * IsInstanceAlive Check Alive Status - * This endpoint returns a 200 status code when the HTTP server is up running. -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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiIsInstanceAliveRequest - */ - IsInstanceAlive(ctx context.Context) AdminApiApiIsInstanceAliveRequest - - /* - * IsInstanceAliveExecute executes the request - * @return HealthStatus - */ - IsInstanceAliveExecute(r AdminApiApiIsInstanceAliveRequest) (*HealthStatus, *http.Response, error) - - /* - * ListOAuth2Clients 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. The `limit` parameter can be used to retrieve more clients, -but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. - -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. - -The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. -Multiple links can be included in this header, and will be separated by a comma. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiListOAuth2ClientsRequest - */ - ListOAuth2Clients(ctx context.Context) AdminApiApiListOAuth2ClientsRequest - - /* - * ListOAuth2ClientsExecute executes the request - * @return []OAuth2Client - */ - ListOAuth2ClientsExecute(r AdminApiApiListOAuth2ClientsRequest) ([]OAuth2Client, *http.Response, error) - - /* - * ListSubjectConsentSessions Lists All 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. - - -The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. -Multiple links can be included in this header, and will be separated by a comma. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiListSubjectConsentSessionsRequest - */ - ListSubjectConsentSessions(ctx context.Context) AdminApiApiListSubjectConsentSessionsRequest - - /* - * ListSubjectConsentSessionsExecute executes the request - * @return []PreviousConsentSession - */ - ListSubjectConsentSessionsExecute(r AdminApiApiListSubjectConsentSessionsRequest) ([]PreviousConsentSession, *http.Response, error) - - /* - * ListTrustedJwtGrantIssuers List Trusted OAuth2 JWT Bearer Grant Type Issuers - * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiListTrustedJwtGrantIssuersRequest - */ - ListTrustedJwtGrantIssuers(ctx context.Context) AdminApiApiListTrustedJwtGrantIssuersRequest - - /* - * ListTrustedJwtGrantIssuersExecute executes the request - * @return []TrustedJwtGrantIssuer - */ - ListTrustedJwtGrantIssuersExecute(r AdminApiApiListTrustedJwtGrantIssuersRequest) ([]TrustedJwtGrantIssuer, *http.Response, error) - - /* - * PatchOAuth2Client Patch an OAuth 2.0 Client - * Patch an existing OAuth 2.0 Client. 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return AdminApiApiPatchOAuth2ClientRequest - */ - PatchOAuth2Client(ctx context.Context, id string) AdminApiApiPatchOAuth2ClientRequest - - /* - * PatchOAuth2ClientExecute executes the request - * @return OAuth2Client - */ - PatchOAuth2ClientExecute(r AdminApiApiPatchOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) - - /* - * RejectConsentRequest Reject a Consent Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to -grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - -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 Hydra if the subject accepted -or rejected the request. - -This endpoint tells ORY Hydra 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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRejectConsentRequestRequest - */ - RejectConsentRequest(ctx context.Context) AdminApiApiRejectConsentRequestRequest - - /* - * RejectConsentRequestExecute executes the request - * @return CompletedRequest - */ - RejectConsentRequestExecute(r AdminApiApiRejectConsentRequestRequest) (*CompletedRequest, *http.Response, error) - - /* - * RejectLoginRequest Reject a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -(sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login -provider is an 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. - -This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication -was be denied. - -The response contains a redirect URL which the login provider should redirect the user-agent to. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRejectLoginRequestRequest - */ - RejectLoginRequest(ctx context.Context) AdminApiApiRejectLoginRequestRequest - - /* - * RejectLoginRequestExecute executes the request - * @return CompletedRequest - */ - RejectLoginRequestExecute(r AdminApiApiRejectLoginRequestRequest) (*CompletedRequest, *http.Response, error) - - /* - * RejectLogoutRequest Reject a Logout Request - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. -No body is required. - -The response is empty as the logout provider has to chose what action to perform next. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRejectLogoutRequestRequest - */ - RejectLogoutRequest(ctx context.Context) AdminApiApiRejectLogoutRequestRequest - - /* - * RejectLogoutRequestExecute executes the request - */ - RejectLogoutRequestExecute(r AdminApiApiRejectLogoutRequestRequest) (*http.Response, error) - - /* - * RevokeAuthenticationSession Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject -has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect -Front- or Back-channel logout. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRevokeAuthenticationSessionRequest - */ - RevokeAuthenticationSession(ctx context.Context) AdminApiApiRevokeAuthenticationSessionRequest - - /* - * RevokeAuthenticationSessionExecute executes the request - */ - RevokeAuthenticationSessionExecute(r AdminApiApiRevokeAuthenticationSessionRequest) (*http.Response, error) - - /* - * RevokeConsentSessions Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all -associated OAuth 2.0 Access Tokens. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRevokeConsentSessionsRequest - */ - RevokeConsentSessions(ctx context.Context) AdminApiApiRevokeConsentSessionsRequest - - /* - * RevokeConsentSessionsExecute executes the request - */ - RevokeConsentSessionsExecute(r AdminApiApiRevokeConsentSessionsRequest) (*http.Response, error) - - /* - * TrustJwtGrantIssuer Trust an 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiTrustJwtGrantIssuerRequest - */ - TrustJwtGrantIssuer(ctx context.Context) AdminApiApiTrustJwtGrantIssuerRequest - - /* - * TrustJwtGrantIssuerExecute executes the request - * @return TrustedJwtGrantIssuer - */ - TrustJwtGrantIssuerExecute(r AdminApiApiTrustJwtGrantIssuerRequest) (*TrustedJwtGrantIssuer, *http.Response, error) - - /* - * UpdateJsonWebKey Update a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param kid The kid of the desired key - * @param set The set - * @return AdminApiApiUpdateJsonWebKeyRequest - */ - UpdateJsonWebKey(ctx context.Context, kid string, set string) AdminApiApiUpdateJsonWebKeyRequest - - /* - * UpdateJsonWebKeyExecute executes the request - * @return JSONWebKey - */ - UpdateJsonWebKeyExecute(r AdminApiApiUpdateJsonWebKeyRequest) (*JSONWebKey, *http.Response, error) - - /* - * UpdateJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param set The set - * @return AdminApiApiUpdateJsonWebKeySetRequest - */ - UpdateJsonWebKeySet(ctx context.Context, set string) AdminApiApiUpdateJsonWebKeySetRequest - - /* - * UpdateJsonWebKeySetExecute executes the request - * @return JSONWebKeySet - */ - UpdateJsonWebKeySetExecute(r AdminApiApiUpdateJsonWebKeySetRequest) (*JSONWebKeySet, *http.Response, error) - - /* - * UpdateOAuth2Client Update an OAuth 2.0 Client - * Update an existing OAuth 2.0 Client. 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return AdminApiApiUpdateOAuth2ClientRequest - */ - UpdateOAuth2Client(ctx context.Context, id string) AdminApiApiUpdateOAuth2ClientRequest - - /* - * UpdateOAuth2ClientExecute executes the request - * @return OAuth2Client - */ - UpdateOAuth2ClientExecute(r AdminApiApiUpdateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) -} - -// AdminApiService AdminApi service -type AdminApiService service - -type AdminApiApiAcceptConsentRequestRequest struct { - ctx context.Context - ApiService AdminApi - consentChallenge *string - body *AcceptConsentRequest -} - -func (r AdminApiApiAcceptConsentRequestRequest) ConsentChallenge(consentChallenge string) AdminApiApiAcceptConsentRequestRequest { - r.consentChallenge = &consentChallenge - return r -} -func (r AdminApiApiAcceptConsentRequestRequest) Body(body AcceptConsentRequest) AdminApiApiAcceptConsentRequestRequest { - r.body = &body - return r -} - -func (r AdminApiApiAcceptConsentRequestRequest) Execute() (*CompletedRequest, *http.Response, error) { - return r.ApiService.AcceptConsentRequestExecute(r) -} - -/* - * AcceptConsentRequest Accept a Consent Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to -grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - -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 Hydra if the subject accepted -or rejected the request. - -This endpoint tells ORY Hydra 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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiAcceptConsentRequestRequest - */ -func (a *AdminApiService) AcceptConsentRequest(ctx context.Context) AdminApiApiAcceptConsentRequestRequest { - return AdminApiApiAcceptConsentRequestRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return CompletedRequest - */ -func (a *AdminApiService) AcceptConsentRequestExecute(r AdminApiApiAcceptConsentRequestRequest) (*CompletedRequest, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *CompletedRequest - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.AcceptConsentRequest") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/requests/consent/accept" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.consentChallenge == nil { - return localVarReturnValue, nil, reportError("consentChallenge is required and must be specified") - } - - localVarQueryParams.Add("consent_challenge", parameterToString(*r.consentChallenge, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiAcceptLoginRequestRequest struct { - ctx context.Context - ApiService AdminApi - loginChallenge *string - body *AcceptLoginRequest -} - -func (r AdminApiApiAcceptLoginRequestRequest) LoginChallenge(loginChallenge string) AdminApiApiAcceptLoginRequestRequest { - r.loginChallenge = &loginChallenge - return r -} -func (r AdminApiApiAcceptLoginRequestRequest) Body(body AcceptLoginRequest) AdminApiApiAcceptLoginRequestRequest { - r.body = &body - return r -} - -func (r AdminApiApiAcceptLoginRequestRequest) Execute() (*CompletedRequest, *http.Response, error) { - return r.ApiService.AcceptLoginRequestExecute(r) -} - -/* - * AcceptLoginRequest Accept a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -(sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login -provider is an 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. - -This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as -the subject's ID and if ORY Hydra 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiAcceptLoginRequestRequest - */ -func (a *AdminApiService) AcceptLoginRequest(ctx context.Context) AdminApiApiAcceptLoginRequestRequest { - return AdminApiApiAcceptLoginRequestRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return CompletedRequest - */ -func (a *AdminApiService) AcceptLoginRequestExecute(r AdminApiApiAcceptLoginRequestRequest) (*CompletedRequest, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *CompletedRequest - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.AcceptLoginRequest") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/requests/login/accept" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.loginChallenge == nil { - return localVarReturnValue, nil, reportError("loginChallenge is required and must be specified") - } - - localVarQueryParams.Add("login_challenge", parameterToString(*r.loginChallenge, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiAcceptLogoutRequestRequest struct { - ctx context.Context - ApiService AdminApi - logoutChallenge *string -} - -func (r AdminApiApiAcceptLogoutRequestRequest) LogoutChallenge(logoutChallenge string) AdminApiApiAcceptLogoutRequestRequest { - r.logoutChallenge = &logoutChallenge - return r -} - -func (r AdminApiApiAcceptLogoutRequestRequest) Execute() (*CompletedRequest, *http.Response, error) { - return r.ApiService.AcceptLogoutRequestExecute(r) -} - -/* - * AcceptLogoutRequest Accept a Logout Request - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. -No body is required. - -The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiAcceptLogoutRequestRequest - */ -func (a *AdminApiService) AcceptLogoutRequest(ctx context.Context) AdminApiApiAcceptLogoutRequestRequest { - return AdminApiApiAcceptLogoutRequestRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return CompletedRequest - */ -func (a *AdminApiService) AcceptLogoutRequestExecute(r AdminApiApiAcceptLogoutRequestRequest) (*CompletedRequest, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *CompletedRequest - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.AcceptLogoutRequest") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/requests/logout/accept" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.logoutChallenge == nil { - return localVarReturnValue, nil, reportError("logoutChallenge is required and must be specified") - } - - localVarQueryParams.Add("logout_challenge", parameterToString(*r.logoutChallenge, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiCreateJsonWebKeySetRequest struct { - ctx context.Context - ApiService AdminApi - set string - body *JsonWebKeySetGeneratorRequest -} - -func (r AdminApiApiCreateJsonWebKeySetRequest) Body(body JsonWebKeySetGeneratorRequest) AdminApiApiCreateJsonWebKeySetRequest { - r.body = &body - return r -} - -func (r AdminApiApiCreateJsonWebKeySetRequest) Execute() (*JSONWebKeySet, *http.Response, error) { - return r.ApiService.CreateJsonWebKeySetExecute(r) -} - -/* - * CreateJsonWebKeySet Generate a New 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param set The set - * @return AdminApiApiCreateJsonWebKeySetRequest - */ -func (a *AdminApiService) CreateJsonWebKeySet(ctx context.Context, set string) AdminApiApiCreateJsonWebKeySetRequest { - return AdminApiApiCreateJsonWebKeySetRequest{ - ApiService: a, - ctx: ctx, - set: set, - } -} - -/* - * Execute executes the request - * @return JSONWebKeySet - */ -func (a *AdminApiService) CreateJsonWebKeySetExecute(r AdminApiApiCreateJsonWebKeySetRequest) (*JSONWebKeySet, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *JSONWebKeySet - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.CreateJsonWebKeySet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/keys/{set}" - localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiCreateOAuth2ClientRequest struct { - ctx context.Context - ApiService AdminApi - body *OAuth2Client -} - -func (r AdminApiApiCreateOAuth2ClientRequest) Body(body OAuth2Client) AdminApiApiCreateOAuth2ClientRequest { - r.body = &body - return r -} - -func (r AdminApiApiCreateOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { - return r.ApiService.CreateOAuth2ClientExecute(r) -} - -/* - * CreateOAuth2Client Create an OAuth 2.0 Client - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret -will be generated. The 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 somwhere 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiCreateOAuth2ClientRequest - */ -func (a *AdminApiService) CreateOAuth2Client(ctx context.Context) AdminApiApiCreateOAuth2ClientRequest { - return AdminApiApiCreateOAuth2ClientRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return OAuth2Client - */ -func (a *AdminApiService) CreateOAuth2ClientExecute(r AdminApiApiCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *OAuth2Client - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.CreateOAuth2Client") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/clients" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiDeleteJsonWebKeyRequest struct { - ctx context.Context - ApiService AdminApi - kid string - set string -} - - -func (r AdminApiApiDeleteJsonWebKeyRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteJsonWebKeyExecute(r) -} - -/* - * DeleteJsonWebKey Delete a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param kid The kid of the desired key - * @param set The set - * @return AdminApiApiDeleteJsonWebKeyRequest - */ -func (a *AdminApiService) DeleteJsonWebKey(ctx context.Context, kid string, set string) AdminApiApiDeleteJsonWebKeyRequest { - return AdminApiApiDeleteJsonWebKeyRequest{ - ApiService: a, - ctx: ctx, - kid: kid, - set: set, - } -} - -/* - * Execute executes the request - */ -func (a *AdminApiService) DeleteJsonWebKeyExecute(r AdminApiApiDeleteJsonWebKeyRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.DeleteJsonWebKey") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/keys/{set}/{kid}" - localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterToString(r.kid, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type AdminApiApiDeleteJsonWebKeySetRequest struct { - ctx context.Context - ApiService AdminApi - set string -} - - -func (r AdminApiApiDeleteJsonWebKeySetRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteJsonWebKeySetExecute(r) -} - -/* - * DeleteJsonWebKeySet Delete a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param set The set - * @return AdminApiApiDeleteJsonWebKeySetRequest - */ -func (a *AdminApiService) DeleteJsonWebKeySet(ctx context.Context, set string) AdminApiApiDeleteJsonWebKeySetRequest { - return AdminApiApiDeleteJsonWebKeySetRequest{ - ApiService: a, - ctx: ctx, - set: set, - } -} - -/* - * Execute executes the request - */ -func (a *AdminApiService) DeleteJsonWebKeySetExecute(r AdminApiApiDeleteJsonWebKeySetRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.DeleteJsonWebKeySet") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/keys/{set}" - localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type AdminApiApiDeleteOAuth2ClientRequest struct { - ctx context.Context - ApiService AdminApi - id string -} - - -func (r AdminApiApiDeleteOAuth2ClientRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteOAuth2ClientExecute(r) -} - -/* - * DeleteOAuth2Client Deletes an 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return AdminApiApiDeleteOAuth2ClientRequest - */ -func (a *AdminApiService) DeleteOAuth2Client(ctx context.Context, id string) AdminApiApiDeleteOAuth2ClientRequest { - return AdminApiApiDeleteOAuth2ClientRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -/* - * Execute executes the request - */ -func (a *AdminApiService) DeleteOAuth2ClientExecute(r AdminApiApiDeleteOAuth2ClientRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.DeleteOAuth2Client") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/clients/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type AdminApiApiDeleteOAuth2TokenRequest struct { - ctx context.Context - ApiService AdminApi - clientId *string -} - -func (r AdminApiApiDeleteOAuth2TokenRequest) ClientId(clientId string) AdminApiApiDeleteOAuth2TokenRequest { - r.clientId = &clientId - return r -} - -func (r AdminApiApiDeleteOAuth2TokenRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteOAuth2TokenExecute(r) -} - -/* - * DeleteOAuth2Token Delete OAuth2 Access Tokens from a Client - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiDeleteOAuth2TokenRequest - */ -func (a *AdminApiService) DeleteOAuth2Token(ctx context.Context) AdminApiApiDeleteOAuth2TokenRequest { - return AdminApiApiDeleteOAuth2TokenRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - */ -func (a *AdminApiService) DeleteOAuth2TokenExecute(r AdminApiApiDeleteOAuth2TokenRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.DeleteOAuth2Token") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/tokens" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.clientId == nil { - return nil, reportError("clientId is required and must be specified") - } - - localVarQueryParams.Add("client_id", parameterToString(*r.clientId, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type AdminApiApiDeleteTrustedJwtGrantIssuerRequest struct { - ctx context.Context - ApiService AdminApi - id string -} - - -func (r AdminApiApiDeleteTrustedJwtGrantIssuerRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteTrustedJwtGrantIssuerExecute(r) -} - -/* - * DeleteTrustedJwtGrantIssuer Delete a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the desired grant - * @return AdminApiApiDeleteTrustedJwtGrantIssuerRequest - */ -func (a *AdminApiService) DeleteTrustedJwtGrantIssuer(ctx context.Context, id string) AdminApiApiDeleteTrustedJwtGrantIssuerRequest { - return AdminApiApiDeleteTrustedJwtGrantIssuerRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -/* - * Execute executes the request - */ -func (a *AdminApiService) DeleteTrustedJwtGrantIssuerExecute(r AdminApiApiDeleteTrustedJwtGrantIssuerRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.DeleteTrustedJwtGrantIssuer") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/trust/grants/jwt-bearer/issuers/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type AdminApiApiFlushInactiveOAuth2TokensRequest struct { - ctx context.Context - ApiService AdminApi - body *FlushInactiveOAuth2TokensRequest -} - -func (r AdminApiApiFlushInactiveOAuth2TokensRequest) Body(body FlushInactiveOAuth2TokensRequest) AdminApiApiFlushInactiveOAuth2TokensRequest { - r.body = &body - return r -} - -func (r AdminApiApiFlushInactiveOAuth2TokensRequest) Execute() (*http.Response, error) { - return r.ApiService.FlushInactiveOAuth2TokensExecute(r) -} - -/* - * FlushInactiveOAuth2Tokens Flush Expired OAuth2 Access Tokens - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be -not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted -automatically when performing the refresh flow. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiFlushInactiveOAuth2TokensRequest - */ -func (a *AdminApiService) FlushInactiveOAuth2Tokens(ctx context.Context) AdminApiApiFlushInactiveOAuth2TokensRequest { - return AdminApiApiFlushInactiveOAuth2TokensRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - */ -func (a *AdminApiService) FlushInactiveOAuth2TokensExecute(r AdminApiApiFlushInactiveOAuth2TokensRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.FlushInactiveOAuth2Tokens") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/flush" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type AdminApiApiGetConsentRequestRequest struct { - ctx context.Context - ApiService AdminApi - consentChallenge *string -} - -func (r AdminApiApiGetConsentRequestRequest) ConsentChallenge(consentChallenge string) AdminApiApiGetConsentRequestRequest { - r.consentChallenge = &consentChallenge - return r -} - -func (r AdminApiApiGetConsentRequestRequest) Execute() (*ConsentRequest, *http.Response, error) { - return r.ApiService.GetConsentRequestExecute(r) -} - -/* - * GetConsentRequest Get Consent Request Information - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to -grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - -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 Hydra if the subject accepted -or rejected the request. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiGetConsentRequestRequest - */ -func (a *AdminApiService) GetConsentRequest(ctx context.Context) AdminApiApiGetConsentRequestRequest { - return AdminApiApiGetConsentRequestRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return ConsentRequest - */ -func (a *AdminApiService) GetConsentRequestExecute(r AdminApiApiGetConsentRequestRequest) (*ConsentRequest, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *ConsentRequest - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetConsentRequest") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/requests/consent" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.consentChallenge == nil { - return localVarReturnValue, nil, reportError("consentChallenge is required and must be specified") - } - - localVarQueryParams.Add("consent_challenge", parameterToString(*r.consentChallenge, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 410 { - var v RequestWasHandledResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiGetJsonWebKeyRequest struct { - ctx context.Context - ApiService AdminApi - kid string - set string -} - - -func (r AdminApiApiGetJsonWebKeyRequest) Execute() (*JSONWebKeySet, *http.Response, error) { - return r.ApiService.GetJsonWebKeyExecute(r) -} - -/* - * GetJsonWebKey Fetch a JSON Web Key - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param kid The kid of the desired key - * @param set The set - * @return AdminApiApiGetJsonWebKeyRequest - */ -func (a *AdminApiService) GetJsonWebKey(ctx context.Context, kid string, set string) AdminApiApiGetJsonWebKeyRequest { - return AdminApiApiGetJsonWebKeyRequest{ - ApiService: a, - ctx: ctx, - kid: kid, - set: set, - } -} - -/* - * Execute executes the request - * @return JSONWebKeySet - */ -func (a *AdminApiService) GetJsonWebKeyExecute(r AdminApiApiGetJsonWebKeyRequest) (*JSONWebKeySet, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *JSONWebKeySet - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetJsonWebKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/keys/{set}/{kid}" - localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterToString(r.kid, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiGetJsonWebKeySetRequest struct { - ctx context.Context - ApiService AdminApi - set string -} - - -func (r AdminApiApiGetJsonWebKeySetRequest) Execute() (*JSONWebKeySet, *http.Response, error) { - return r.ApiService.GetJsonWebKeySetExecute(r) -} - -/* - * GetJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param set The set - * @return AdminApiApiGetJsonWebKeySetRequest - */ -func (a *AdminApiService) GetJsonWebKeySet(ctx context.Context, set string) AdminApiApiGetJsonWebKeySetRequest { - return AdminApiApiGetJsonWebKeySetRequest{ - ApiService: a, - ctx: ctx, - set: set, - } -} - -/* - * Execute executes the request - * @return JSONWebKeySet - */ -func (a *AdminApiService) GetJsonWebKeySetExecute(r AdminApiApiGetJsonWebKeySetRequest) (*JSONWebKeySet, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *JSONWebKeySet - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetJsonWebKeySet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/keys/{set}" - localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiGetLoginRequestRequest struct { - ctx context.Context - ApiService AdminApi - loginChallenge *string -} - -func (r AdminApiApiGetLoginRequestRequest) LoginChallenge(loginChallenge string) AdminApiApiGetLoginRequestRequest { - r.loginChallenge = &loginChallenge - return r -} - -func (r AdminApiApiGetLoginRequestRequest) Execute() (*LoginRequest, *http.Response, error) { - return r.ApiService.GetLoginRequestExecute(r) -} - -/* - * GetLoginRequest Get a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -(sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login -provider is an 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiGetLoginRequestRequest - */ -func (a *AdminApiService) GetLoginRequest(ctx context.Context) AdminApiApiGetLoginRequestRequest { - return AdminApiApiGetLoginRequestRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return LoginRequest - */ -func (a *AdminApiService) GetLoginRequestExecute(r AdminApiApiGetLoginRequestRequest) (*LoginRequest, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *LoginRequest - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetLoginRequest") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/requests/login" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.loginChallenge == nil { - return localVarReturnValue, nil, reportError("loginChallenge is required and must be specified") - } - - localVarQueryParams.Add("login_challenge", parameterToString(*r.loginChallenge, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 410 { - var v RequestWasHandledResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiGetLogoutRequestRequest struct { - ctx context.Context - ApiService AdminApi - logoutChallenge *string -} - -func (r AdminApiApiGetLogoutRequestRequest) LogoutChallenge(logoutChallenge string) AdminApiApiGetLogoutRequestRequest { - r.logoutChallenge = &logoutChallenge - return r -} - -func (r AdminApiApiGetLogoutRequestRequest) Execute() (*LogoutRequest, *http.Response, error) { - return r.ApiService.GetLogoutRequestExecute(r) -} - -/* - * GetLogoutRequest Get a Logout Request - * Use this endpoint to fetch a logout request. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiGetLogoutRequestRequest - */ -func (a *AdminApiService) GetLogoutRequest(ctx context.Context) AdminApiApiGetLogoutRequestRequest { - return AdminApiApiGetLogoutRequestRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return LogoutRequest - */ -func (a *AdminApiService) GetLogoutRequestExecute(r AdminApiApiGetLogoutRequestRequest) (*LogoutRequest, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *LogoutRequest - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetLogoutRequest") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/requests/logout" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.logoutChallenge == nil { - return localVarReturnValue, nil, reportError("logoutChallenge is required and must be specified") - } - - localVarQueryParams.Add("logout_challenge", parameterToString(*r.logoutChallenge, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 410 { - var v RequestWasHandledResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiGetOAuth2ClientRequest struct { - ctx context.Context - ApiService AdminApi - id string -} - - -func (r AdminApiApiGetOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { - return r.ApiService.GetOAuth2ClientExecute(r) -} - -/* - * GetOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return AdminApiApiGetOAuth2ClientRequest - */ -func (a *AdminApiService) GetOAuth2Client(ctx context.Context, id string) AdminApiApiGetOAuth2ClientRequest { - return AdminApiApiGetOAuth2ClientRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -/* - * Execute executes the request - * @return OAuth2Client - */ -func (a *AdminApiService) GetOAuth2ClientExecute(r AdminApiApiGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *OAuth2Client - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetOAuth2Client") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/clients/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiGetTrustedJwtGrantIssuerRequest struct { - ctx context.Context - ApiService AdminApi - id string -} - - -func (r AdminApiApiGetTrustedJwtGrantIssuerRequest) Execute() (*TrustedJwtGrantIssuer, *http.Response, error) { - return r.ApiService.GetTrustedJwtGrantIssuerExecute(r) -} - -/* - * GetTrustedJwtGrantIssuer Get a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the desired grant - * @return AdminApiApiGetTrustedJwtGrantIssuerRequest - */ -func (a *AdminApiService) GetTrustedJwtGrantIssuer(ctx context.Context, id string) AdminApiApiGetTrustedJwtGrantIssuerRequest { - return AdminApiApiGetTrustedJwtGrantIssuerRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -/* - * Execute executes the request - * @return TrustedJwtGrantIssuer - */ -func (a *AdminApiService) GetTrustedJwtGrantIssuerExecute(r AdminApiApiGetTrustedJwtGrantIssuerRequest) (*TrustedJwtGrantIssuer, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *TrustedJwtGrantIssuer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetTrustedJwtGrantIssuer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/trust/grants/jwt-bearer/issuers/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiGetVersionRequest struct { - ctx context.Context - ApiService AdminApi -} - - -func (r AdminApiApiGetVersionRequest) Execute() (*Version, *http.Response, error) { - return r.ApiService.GetVersionExecute(r) -} - -/* - * GetVersion Get Service Version - * This endpoint returns the service version typically notated using semantic versioning. - -If the service supports TLS Edge Termination, this endpoint does not require the -`X-Forwarded-Proto` header to be set. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiGetVersionRequest - */ -func (a *AdminApiService) GetVersion(ctx context.Context) AdminApiApiGetVersionRequest { - return AdminApiApiGetVersionRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return Version - */ -func (a *AdminApiService) GetVersionExecute(r AdminApiApiGetVersionRequest) (*Version, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *Version - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.GetVersion") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/version" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiIntrospectOAuth2TokenRequest struct { - ctx context.Context - ApiService AdminApi - token *string - scope *string -} - -func (r AdminApiApiIntrospectOAuth2TokenRequest) Token(token string) AdminApiApiIntrospectOAuth2TokenRequest { - r.token = &token - return r -} -func (r AdminApiApiIntrospectOAuth2TokenRequest) Scope(scope string) AdminApiApiIntrospectOAuth2TokenRequest { - r.scope = &scope - return r -} - -func (r AdminApiApiIntrospectOAuth2TokenRequest) Execute() (*OAuth2TokenIntrospection, *http.Response, error) { - return r.ApiService.IntrospectOAuth2TokenExecute(r) -} - -/* - * IntrospectOAuth2Token Introspect OAuth2 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 `accessTokenExtra` during the consent flow. - -For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiIntrospectOAuth2TokenRequest - */ -func (a *AdminApiService) IntrospectOAuth2Token(ctx context.Context) AdminApiApiIntrospectOAuth2TokenRequest { - return AdminApiApiIntrospectOAuth2TokenRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return OAuth2TokenIntrospection - */ -func (a *AdminApiService) IntrospectOAuth2TokenExecute(r AdminApiApiIntrospectOAuth2TokenRequest) (*OAuth2TokenIntrospection, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *OAuth2TokenIntrospection - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.IntrospectOAuth2Token") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/introspect" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.token == nil { - return localVarReturnValue, nil, reportError("token is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarFormParams.Add("token", parameterToString(*r.token, "")) - if r.scope != nil { - localVarFormParams.Add("scope", parameterToString(*r.scope, "")) - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiIsInstanceAliveRequest struct { - ctx context.Context - ApiService AdminApi -} - - -func (r AdminApiApiIsInstanceAliveRequest) Execute() (*HealthStatus, *http.Response, error) { - return r.ApiService.IsInstanceAliveExecute(r) -} - -/* - * IsInstanceAlive Check Alive Status - * This endpoint returns a 200 status code when the HTTP server is up running. -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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiIsInstanceAliveRequest - */ -func (a *AdminApiService) IsInstanceAlive(ctx context.Context) AdminApiApiIsInstanceAliveRequest { - return AdminApiApiIsInstanceAliveRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return HealthStatus - */ -func (a *AdminApiService) IsInstanceAliveExecute(r AdminApiApiIsInstanceAliveRequest) (*HealthStatus, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *HealthStatus - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.IsInstanceAlive") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/health/alive" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiListOAuth2ClientsRequest struct { - ctx context.Context - ApiService AdminApi - limit *int64 - offset *int64 - clientName *string - owner *string -} - -func (r AdminApiApiListOAuth2ClientsRequest) Limit(limit int64) AdminApiApiListOAuth2ClientsRequest { - r.limit = &limit - return r -} -func (r AdminApiApiListOAuth2ClientsRequest) Offset(offset int64) AdminApiApiListOAuth2ClientsRequest { - r.offset = &offset - return r -} -func (r AdminApiApiListOAuth2ClientsRequest) ClientName(clientName string) AdminApiApiListOAuth2ClientsRequest { - r.clientName = &clientName - return r -} -func (r AdminApiApiListOAuth2ClientsRequest) Owner(owner string) AdminApiApiListOAuth2ClientsRequest { - r.owner = &owner - return r -} - -func (r AdminApiApiListOAuth2ClientsRequest) Execute() ([]OAuth2Client, *http.Response, error) { - return r.ApiService.ListOAuth2ClientsExecute(r) -} - -/* - * ListOAuth2Clients 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. The `limit` parameter can be used to retrieve more clients, -but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. - -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. - -The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. -Multiple links can be included in this header, and will be separated by a comma. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiListOAuth2ClientsRequest - */ -func (a *AdminApiService) ListOAuth2Clients(ctx context.Context) AdminApiApiListOAuth2ClientsRequest { - return AdminApiApiListOAuth2ClientsRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return []OAuth2Client - */ -func (a *AdminApiService) ListOAuth2ClientsExecute(r AdminApiApiListOAuth2ClientsRequest) ([]OAuth2Client, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []OAuth2Client - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.ListOAuth2Clients") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/clients" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.offset != nil { - localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) - } - if r.clientName != nil { - localVarQueryParams.Add("client_name", parameterToString(*r.clientName, "")) - } - if r.owner != nil { - localVarQueryParams.Add("owner", parameterToString(*r.owner, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiListSubjectConsentSessionsRequest struct { - ctx context.Context - ApiService AdminApi - subject *string -} - -func (r AdminApiApiListSubjectConsentSessionsRequest) Subject(subject string) AdminApiApiListSubjectConsentSessionsRequest { - r.subject = &subject - return r -} - -func (r AdminApiApiListSubjectConsentSessionsRequest) Execute() ([]PreviousConsentSession, *http.Response, error) { - return r.ApiService.ListSubjectConsentSessionsExecute(r) -} - -/* - * ListSubjectConsentSessions Lists All 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. - - -The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. -Multiple links can be included in this header, and will be separated by a comma. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiListSubjectConsentSessionsRequest - */ -func (a *AdminApiService) ListSubjectConsentSessions(ctx context.Context) AdminApiApiListSubjectConsentSessionsRequest { - return AdminApiApiListSubjectConsentSessionsRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return []PreviousConsentSession - */ -func (a *AdminApiService) ListSubjectConsentSessionsExecute(r AdminApiApiListSubjectConsentSessionsRequest) ([]PreviousConsentSession, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []PreviousConsentSession - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.ListSubjectConsentSessions") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/sessions/consent" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.subject == nil { - return localVarReturnValue, nil, reportError("subject is required and must be specified") - } - - localVarQueryParams.Add("subject", parameterToString(*r.subject, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiListTrustedJwtGrantIssuersRequest struct { - ctx context.Context - ApiService AdminApi - issuer *string - limit *int64 - offset *int64 -} - -func (r AdminApiApiListTrustedJwtGrantIssuersRequest) Issuer(issuer string) AdminApiApiListTrustedJwtGrantIssuersRequest { - r.issuer = &issuer - return r -} -func (r AdminApiApiListTrustedJwtGrantIssuersRequest) Limit(limit int64) AdminApiApiListTrustedJwtGrantIssuersRequest { - r.limit = &limit - return r -} -func (r AdminApiApiListTrustedJwtGrantIssuersRequest) Offset(offset int64) AdminApiApiListTrustedJwtGrantIssuersRequest { - r.offset = &offset - return r -} - -func (r AdminApiApiListTrustedJwtGrantIssuersRequest) Execute() ([]TrustedJwtGrantIssuer, *http.Response, error) { - return r.ApiService.ListTrustedJwtGrantIssuersExecute(r) -} - -/* - * ListTrustedJwtGrantIssuers List Trusted OAuth2 JWT Bearer Grant Type Issuers - * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiListTrustedJwtGrantIssuersRequest - */ -func (a *AdminApiService) ListTrustedJwtGrantIssuers(ctx context.Context) AdminApiApiListTrustedJwtGrantIssuersRequest { - return AdminApiApiListTrustedJwtGrantIssuersRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return []TrustedJwtGrantIssuer - */ -func (a *AdminApiService) ListTrustedJwtGrantIssuersExecute(r AdminApiApiListTrustedJwtGrantIssuersRequest) ([]TrustedJwtGrantIssuer, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue []TrustedJwtGrantIssuer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.ListTrustedJwtGrantIssuers") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/trust/grants/jwt-bearer/issuers" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.issuer != nil { - localVarQueryParams.Add("issuer", parameterToString(*r.issuer, "")) - } - if r.limit != nil { - localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) - } - if r.offset != nil { - localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiPatchOAuth2ClientRequest struct { - ctx context.Context - ApiService AdminApi - id string - body *[]PatchDocument -} - -func (r AdminApiApiPatchOAuth2ClientRequest) Body(body []PatchDocument) AdminApiApiPatchOAuth2ClientRequest { - r.body = &body - return r -} - -func (r AdminApiApiPatchOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { - return r.ApiService.PatchOAuth2ClientExecute(r) -} - -/* - * PatchOAuth2Client Patch an OAuth 2.0 Client - * Patch an existing OAuth 2.0 Client. 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return AdminApiApiPatchOAuth2ClientRequest - */ -func (a *AdminApiService) PatchOAuth2Client(ctx context.Context, id string) AdminApiApiPatchOAuth2ClientRequest { - return AdminApiApiPatchOAuth2ClientRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -/* - * Execute executes the request - * @return OAuth2Client - */ -func (a *AdminApiService) PatchOAuth2ClientExecute(r AdminApiApiPatchOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *OAuth2Client - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.PatchOAuth2Client") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/clients/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiRejectConsentRequestRequest struct { - ctx context.Context - ApiService AdminApi - consentChallenge *string - body *RejectRequest -} - -func (r AdminApiApiRejectConsentRequestRequest) ConsentChallenge(consentChallenge string) AdminApiApiRejectConsentRequestRequest { - r.consentChallenge = &consentChallenge - return r -} -func (r AdminApiApiRejectConsentRequestRequest) Body(body RejectRequest) AdminApiApiRejectConsentRequestRequest { - r.body = &body - return r -} - -func (r AdminApiApiRejectConsentRequestRequest) Execute() (*CompletedRequest, *http.Response, error) { - return r.ApiService.RejectConsentRequestExecute(r) -} - -/* - * RejectConsentRequest Reject a Consent Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to -grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - -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 Hydra if the subject accepted -or rejected the request. - -This endpoint tells ORY Hydra 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. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRejectConsentRequestRequest - */ -func (a *AdminApiService) RejectConsentRequest(ctx context.Context) AdminApiApiRejectConsentRequestRequest { - return AdminApiApiRejectConsentRequestRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return CompletedRequest - */ -func (a *AdminApiService) RejectConsentRequestExecute(r AdminApiApiRejectConsentRequestRequest) (*CompletedRequest, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *CompletedRequest - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.RejectConsentRequest") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/requests/consent/reject" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.consentChallenge == nil { - return localVarReturnValue, nil, reportError("consentChallenge is required and must be specified") - } - - localVarQueryParams.Add("consent_challenge", parameterToString(*r.consentChallenge, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiRejectLoginRequestRequest struct { - ctx context.Context - ApiService AdminApi - loginChallenge *string - body *RejectRequest -} - -func (r AdminApiApiRejectLoginRequestRequest) LoginChallenge(loginChallenge string) AdminApiApiRejectLoginRequestRequest { - r.loginChallenge = &loginChallenge - return r -} -func (r AdminApiApiRejectLoginRequestRequest) Body(body RejectRequest) AdminApiApiRejectLoginRequestRequest { - r.body = &body - return r -} - -func (r AdminApiApiRejectLoginRequestRequest) Execute() (*CompletedRequest, *http.Response, error) { - return r.ApiService.RejectLoginRequestExecute(r) -} - -/* - * RejectLoginRequest Reject a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider -(sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login -provider is an 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. - -This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication -was be denied. - -The response contains a redirect URL which the login provider should redirect the user-agent to. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRejectLoginRequestRequest - */ -func (a *AdminApiService) RejectLoginRequest(ctx context.Context) AdminApiApiRejectLoginRequestRequest { - return AdminApiApiRejectLoginRequestRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return CompletedRequest - */ -func (a *AdminApiService) RejectLoginRequestExecute(r AdminApiApiRejectLoginRequestRequest) (*CompletedRequest, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *CompletedRequest - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.RejectLoginRequest") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/requests/login/reject" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.loginChallenge == nil { - return localVarReturnValue, nil, reportError("loginChallenge is required and must be specified") - } - - localVarQueryParams.Add("login_challenge", parameterToString(*r.loginChallenge, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiRejectLogoutRequestRequest struct { - ctx context.Context - ApiService AdminApi - logoutChallenge *string - body *RejectRequest -} - -func (r AdminApiApiRejectLogoutRequestRequest) LogoutChallenge(logoutChallenge string) AdminApiApiRejectLogoutRequestRequest { - r.logoutChallenge = &logoutChallenge - return r -} -func (r AdminApiApiRejectLogoutRequestRequest) Body(body RejectRequest) AdminApiApiRejectLogoutRequestRequest { - r.body = &body - return r -} - -func (r AdminApiApiRejectLogoutRequestRequest) Execute() (*http.Response, error) { - return r.ApiService.RejectLogoutRequestExecute(r) -} - -/* - * RejectLogoutRequest Reject a Logout Request - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. -No body is required. - -The response is empty as the logout provider has to chose what action to perform next. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRejectLogoutRequestRequest - */ -func (a *AdminApiService) RejectLogoutRequest(ctx context.Context) AdminApiApiRejectLogoutRequestRequest { - return AdminApiApiRejectLogoutRequestRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - */ -func (a *AdminApiService) RejectLogoutRequestExecute(r AdminApiApiRejectLogoutRequestRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.RejectLogoutRequest") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/requests/logout/reject" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.logoutChallenge == nil { - return nil, reportError("logoutChallenge is required and must be specified") - } - - localVarQueryParams.Add("logout_challenge", parameterToString(*r.logoutChallenge, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type AdminApiApiRevokeAuthenticationSessionRequest struct { - ctx context.Context - ApiService AdminApi - subject *string -} - -func (r AdminApiApiRevokeAuthenticationSessionRequest) Subject(subject string) AdminApiApiRevokeAuthenticationSessionRequest { - r.subject = &subject - return r -} - -func (r AdminApiApiRevokeAuthenticationSessionRequest) Execute() (*http.Response, error) { - return r.ApiService.RevokeAuthenticationSessionExecute(r) -} - -/* - * RevokeAuthenticationSession Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject -has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect -Front- or Back-channel logout. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRevokeAuthenticationSessionRequest - */ -func (a *AdminApiService) RevokeAuthenticationSession(ctx context.Context) AdminApiApiRevokeAuthenticationSessionRequest { - return AdminApiApiRevokeAuthenticationSessionRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - */ -func (a *AdminApiService) RevokeAuthenticationSessionExecute(r AdminApiApiRevokeAuthenticationSessionRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.RevokeAuthenticationSession") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/sessions/login" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.subject == nil { - return nil, reportError("subject is required and must be specified") - } - - localVarQueryParams.Add("subject", parameterToString(*r.subject, "")) - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type AdminApiApiRevokeConsentSessionsRequest struct { - ctx context.Context - ApiService AdminApi - subject *string - client *string - all *bool -} - -func (r AdminApiApiRevokeConsentSessionsRequest) Subject(subject string) AdminApiApiRevokeConsentSessionsRequest { - r.subject = &subject - return r -} -func (r AdminApiApiRevokeConsentSessionsRequest) Client(client string) AdminApiApiRevokeConsentSessionsRequest { - r.client = &client - return r -} -func (r AdminApiApiRevokeConsentSessionsRequest) All(all bool) AdminApiApiRevokeConsentSessionsRequest { - r.all = &all - return r -} - -func (r AdminApiApiRevokeConsentSessionsRequest) Execute() (*http.Response, error) { - return r.ApiService.RevokeConsentSessionsExecute(r) -} - -/* - * RevokeConsentSessions Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all -associated OAuth 2.0 Access Tokens. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiRevokeConsentSessionsRequest - */ -func (a *AdminApiService) RevokeConsentSessions(ctx context.Context) AdminApiApiRevokeConsentSessionsRequest { - return AdminApiApiRevokeConsentSessionsRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - */ -func (a *AdminApiService) RevokeConsentSessionsExecute(r AdminApiApiRevokeConsentSessionsRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.RevokeConsentSessions") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth/sessions/consent" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.subject == nil { - return nil, reportError("subject is required and must be specified") - } - - localVarQueryParams.Add("subject", parameterToString(*r.subject, "")) - if r.client != nil { - localVarQueryParams.Add("client", parameterToString(*r.client, "")) - } - if r.all != nil { - localVarQueryParams.Add("all", parameterToString(*r.all, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type AdminApiApiTrustJwtGrantIssuerRequest struct { - ctx context.Context - ApiService AdminApi - body *TrustJwtGrantIssuerBody -} - -func (r AdminApiApiTrustJwtGrantIssuerRequest) Body(body TrustJwtGrantIssuerBody) AdminApiApiTrustJwtGrantIssuerRequest { - r.body = &body - return r -} - -func (r AdminApiApiTrustJwtGrantIssuerRequest) Execute() (*TrustedJwtGrantIssuer, *http.Response, error) { - return r.ApiService.TrustJwtGrantIssuerExecute(r) -} - -/* - * TrustJwtGrantIssuer Trust an 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return AdminApiApiTrustJwtGrantIssuerRequest - */ -func (a *AdminApiService) TrustJwtGrantIssuer(ctx context.Context) AdminApiApiTrustJwtGrantIssuerRequest { - return AdminApiApiTrustJwtGrantIssuerRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return TrustedJwtGrantIssuer - */ -func (a *AdminApiService) TrustJwtGrantIssuerExecute(r AdminApiApiTrustJwtGrantIssuerRequest) (*TrustedJwtGrantIssuer, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *TrustedJwtGrantIssuer - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.TrustJwtGrantIssuer") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/trust/grants/jwt-bearer/issuers" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiUpdateJsonWebKeyRequest struct { - ctx context.Context - ApiService AdminApi - kid string - set string - body *JSONWebKey -} - -func (r AdminApiApiUpdateJsonWebKeyRequest) Body(body JSONWebKey) AdminApiApiUpdateJsonWebKeyRequest { - r.body = &body - return r -} - -func (r AdminApiApiUpdateJsonWebKeyRequest) Execute() (*JSONWebKey, *http.Response, error) { - return r.ApiService.UpdateJsonWebKeyExecute(r) -} - -/* - * UpdateJsonWebKey Update a 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param kid The kid of the desired key - * @param set The set - * @return AdminApiApiUpdateJsonWebKeyRequest - */ -func (a *AdminApiService) UpdateJsonWebKey(ctx context.Context, kid string, set string) AdminApiApiUpdateJsonWebKeyRequest { - return AdminApiApiUpdateJsonWebKeyRequest{ - ApiService: a, - ctx: ctx, - kid: kid, - set: set, - } -} - -/* - * Execute executes the request - * @return JSONWebKey - */ -func (a *AdminApiService) UpdateJsonWebKeyExecute(r AdminApiApiUpdateJsonWebKeyRequest) (*JSONWebKey, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *JSONWebKey - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.UpdateJsonWebKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/keys/{set}/{kid}" - localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterToString(r.kid, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiUpdateJsonWebKeySetRequest struct { - ctx context.Context - ApiService AdminApi - set string - body *JSONWebKeySet -} - -func (r AdminApiApiUpdateJsonWebKeySetRequest) Body(body JSONWebKeySet) AdminApiApiUpdateJsonWebKeySetRequest { - r.body = &body - return r -} - -func (r AdminApiApiUpdateJsonWebKeySetRequest) Execute() (*JSONWebKeySet, *http.Response, error) { - return r.ApiService.UpdateJsonWebKeySetExecute(r) -} - -/* - * UpdateJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param set The set - * @return AdminApiApiUpdateJsonWebKeySetRequest - */ -func (a *AdminApiService) UpdateJsonWebKeySet(ctx context.Context, set string) AdminApiApiUpdateJsonWebKeySetRequest { - return AdminApiApiUpdateJsonWebKeySetRequest{ - ApiService: a, - ctx: ctx, - set: set, - } -} - -/* - * Execute executes the request - * @return JSONWebKeySet - */ -func (a *AdminApiService) UpdateJsonWebKeySetExecute(r AdminApiApiUpdateJsonWebKeySetRequest) (*JSONWebKeySet, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *JSONWebKeySet - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.UpdateJsonWebKeySet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/keys/{set}" - localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type AdminApiApiUpdateOAuth2ClientRequest struct { - ctx context.Context - ApiService AdminApi - id string - body *OAuth2Client -} - -func (r AdminApiApiUpdateOAuth2ClientRequest) Body(body OAuth2Client) AdminApiApiUpdateOAuth2ClientRequest { - r.body = &body - return r -} - -func (r AdminApiApiUpdateOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { - return r.ApiService.UpdateOAuth2ClientExecute(r) -} - -/* - * UpdateOAuth2Client Update an OAuth 2.0 Client - * Update an existing OAuth 2.0 Client. 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return AdminApiApiUpdateOAuth2ClientRequest - */ -func (a *AdminApiService) UpdateOAuth2Client(ctx context.Context, id string) AdminApiApiUpdateOAuth2ClientRequest { - return AdminApiApiUpdateOAuth2ClientRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -/* - * Execute executes the request - * @return OAuth2Client - */ -func (a *AdminApiService) UpdateOAuth2ClientExecute(r AdminApiApiUpdateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *OAuth2Client - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AdminApiService.UpdateOAuth2Client") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/clients/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/clients/hydra/go/api_jwk.go b/clients/hydra/go/api_jwk.go new file mode 100644 index 00000000000..436e3d49f59 --- /dev/null +++ b/clients/hydra/go/api_jwk.go @@ -0,0 +1,951 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +type JwkApi interface { + + /* + CreateJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set ID + @return JwkApiCreateJsonWebKeySetRequest + */ + CreateJsonWebKeySet(ctx context.Context, set string) JwkApiCreateJsonWebKeySetRequest + + // CreateJsonWebKeySetExecute executes the request + // @return JsonWebKeySet + CreateJsonWebKeySetExecute(r JwkApiCreateJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) + + /* + DeleteJsonWebKey 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set + @param kid The JSON Web Key ID (kid) + @return JwkApiDeleteJsonWebKeyRequest + */ + DeleteJsonWebKey(ctx context.Context, set string, kid string) JwkApiDeleteJsonWebKeyRequest + + // DeleteJsonWebKeyExecute executes the request + DeleteJsonWebKeyExecute(r JwkApiDeleteJsonWebKeyRequest) (*http.Response, error) + + /* + DeleteJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set + @return JwkApiDeleteJsonWebKeySetRequest + */ + DeleteJsonWebKeySet(ctx context.Context, set string) JwkApiDeleteJsonWebKeySetRequest + + // DeleteJsonWebKeySetExecute executes the request + DeleteJsonWebKeySetExecute(r JwkApiDeleteJsonWebKeySetRequest) (*http.Response, error) + + /* + GetJsonWebKey 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set JSON Web Key Set ID + @param kid JSON Web Key ID + @return JwkApiGetJsonWebKeyRequest + */ + GetJsonWebKey(ctx context.Context, set string, kid string) JwkApiGetJsonWebKeyRequest + + // GetJsonWebKeyExecute executes the request + // @return JsonWebKeySet + GetJsonWebKeyExecute(r JwkApiGetJsonWebKeyRequest) (*JsonWebKeySet, *http.Response, error) + + /* + GetJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set JSON Web Key Set ID + @return JwkApiGetJsonWebKeySetRequest + */ + GetJsonWebKeySet(ctx context.Context, set string) JwkApiGetJsonWebKeySetRequest + + // GetJsonWebKeySetExecute executes the request + // @return JsonWebKeySet + GetJsonWebKeySetExecute(r JwkApiGetJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) + + /* + SetJsonWebKey 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set ID + @param kid JSON Web Key ID + @return JwkApiSetJsonWebKeyRequest + */ + SetJsonWebKey(ctx context.Context, set string, kid string) JwkApiSetJsonWebKeyRequest + + // SetJsonWebKeyExecute executes the request + // @return JsonWebKey + SetJsonWebKeyExecute(r JwkApiSetJsonWebKeyRequest) (*JsonWebKey, *http.Response, error) + + /* + SetJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set ID + @return JwkApiSetJsonWebKeySetRequest + */ + SetJsonWebKeySet(ctx context.Context, set string) JwkApiSetJsonWebKeySetRequest + + // SetJsonWebKeySetExecute executes the request + // @return JsonWebKeySet + SetJsonWebKeySetExecute(r JwkApiSetJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) +} + +// JwkApiService JwkApi service +type JwkApiService service + +type JwkApiCreateJsonWebKeySetRequest struct { + ctx context.Context + ApiService JwkApi + set string + createJsonWebKeySet *CreateJsonWebKeySet +} + +func (r JwkApiCreateJsonWebKeySetRequest) CreateJsonWebKeySet(createJsonWebKeySet CreateJsonWebKeySet) JwkApiCreateJsonWebKeySetRequest { + r.createJsonWebKeySet = &createJsonWebKeySet + return r +} + +func (r JwkApiCreateJsonWebKeySetRequest) Execute() (*JsonWebKeySet, *http.Response, error) { + return r.ApiService.CreateJsonWebKeySetExecute(r) +} + +/* +CreateJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set ID + @return JwkApiCreateJsonWebKeySetRequest +*/ +func (a *JwkApiService) CreateJsonWebKeySet(ctx context.Context, set string) JwkApiCreateJsonWebKeySetRequest { + return JwkApiCreateJsonWebKeySetRequest{ + ApiService: a, + ctx: ctx, + set: set, + } +} + +// Execute executes the request +// @return JsonWebKeySet +func (a *JwkApiService) CreateJsonWebKeySetExecute(r JwkApiCreateJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *JsonWebKeySet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JwkApiService.CreateJsonWebKeySet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/keys/{set}" + localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createJsonWebKeySet == nil { + return localVarReturnValue, nil, reportError("createJsonWebKeySet is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createJsonWebKeySet + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type JwkApiDeleteJsonWebKeyRequest struct { + ctx context.Context + ApiService JwkApi + set string + kid string +} + +func (r JwkApiDeleteJsonWebKeyRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteJsonWebKeyExecute(r) +} + +/* +DeleteJsonWebKey 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set + @param kid The JSON Web Key ID (kid) + @return JwkApiDeleteJsonWebKeyRequest +*/ +func (a *JwkApiService) DeleteJsonWebKey(ctx context.Context, set string, kid string) JwkApiDeleteJsonWebKeyRequest { + return JwkApiDeleteJsonWebKeyRequest{ + ApiService: a, + ctx: ctx, + set: set, + kid: kid, + } +} + +// Execute executes the request +func (a *JwkApiService) DeleteJsonWebKeyExecute(r JwkApiDeleteJsonWebKeyRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JwkApiService.DeleteJsonWebKey") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/keys/{set}/{kid}" + localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterToString(r.kid, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type JwkApiDeleteJsonWebKeySetRequest struct { + ctx context.Context + ApiService JwkApi + set string +} + +func (r JwkApiDeleteJsonWebKeySetRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteJsonWebKeySetExecute(r) +} + +/* +DeleteJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set + @return JwkApiDeleteJsonWebKeySetRequest +*/ +func (a *JwkApiService) DeleteJsonWebKeySet(ctx context.Context, set string) JwkApiDeleteJsonWebKeySetRequest { + return JwkApiDeleteJsonWebKeySetRequest{ + ApiService: a, + ctx: ctx, + set: set, + } +} + +// Execute executes the request +func (a *JwkApiService) DeleteJsonWebKeySetExecute(r JwkApiDeleteJsonWebKeySetRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JwkApiService.DeleteJsonWebKeySet") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/keys/{set}" + localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type JwkApiGetJsonWebKeyRequest struct { + ctx context.Context + ApiService JwkApi + set string + kid string +} + +func (r JwkApiGetJsonWebKeyRequest) Execute() (*JsonWebKeySet, *http.Response, error) { + return r.ApiService.GetJsonWebKeyExecute(r) +} + +/* +GetJsonWebKey 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set JSON Web Key Set ID + @param kid JSON Web Key ID + @return JwkApiGetJsonWebKeyRequest +*/ +func (a *JwkApiService) GetJsonWebKey(ctx context.Context, set string, kid string) JwkApiGetJsonWebKeyRequest { + return JwkApiGetJsonWebKeyRequest{ + ApiService: a, + ctx: ctx, + set: set, + kid: kid, + } +} + +// Execute executes the request +// @return JsonWebKeySet +func (a *JwkApiService) GetJsonWebKeyExecute(r JwkApiGetJsonWebKeyRequest) (*JsonWebKeySet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *JsonWebKeySet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JwkApiService.GetJsonWebKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/keys/{set}/{kid}" + localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterToString(r.kid, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type JwkApiGetJsonWebKeySetRequest struct { + ctx context.Context + ApiService JwkApi + set string +} + +func (r JwkApiGetJsonWebKeySetRequest) Execute() (*JsonWebKeySet, *http.Response, error) { + return r.ApiService.GetJsonWebKeySetExecute(r) +} + +/* +GetJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set JSON Web Key Set ID + @return JwkApiGetJsonWebKeySetRequest +*/ +func (a *JwkApiService) GetJsonWebKeySet(ctx context.Context, set string) JwkApiGetJsonWebKeySetRequest { + return JwkApiGetJsonWebKeySetRequest{ + ApiService: a, + ctx: ctx, + set: set, + } +} + +// Execute executes the request +// @return JsonWebKeySet +func (a *JwkApiService) GetJsonWebKeySetExecute(r JwkApiGetJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *JsonWebKeySet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JwkApiService.GetJsonWebKeySet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/keys/{set}" + localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type JwkApiSetJsonWebKeyRequest struct { + ctx context.Context + ApiService JwkApi + set string + kid string + jsonWebKey *JsonWebKey +} + +func (r JwkApiSetJsonWebKeyRequest) JsonWebKey(jsonWebKey JsonWebKey) JwkApiSetJsonWebKeyRequest { + r.jsonWebKey = &jsonWebKey + return r +} + +func (r JwkApiSetJsonWebKeyRequest) Execute() (*JsonWebKey, *http.Response, error) { + return r.ApiService.SetJsonWebKeyExecute(r) +} + +/* +SetJsonWebKey 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set ID + @param kid JSON Web Key ID + @return JwkApiSetJsonWebKeyRequest +*/ +func (a *JwkApiService) SetJsonWebKey(ctx context.Context, set string, kid string) JwkApiSetJsonWebKeyRequest { + return JwkApiSetJsonWebKeyRequest{ + ApiService: a, + ctx: ctx, + set: set, + kid: kid, + } +} + +// Execute executes the request +// @return JsonWebKey +func (a *JwkApiService) SetJsonWebKeyExecute(r JwkApiSetJsonWebKeyRequest) (*JsonWebKey, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *JsonWebKey + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JwkApiService.SetJsonWebKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/keys/{set}/{kid}" + localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kid"+"}", url.PathEscape(parameterToString(r.kid, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.jsonWebKey + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type JwkApiSetJsonWebKeySetRequest struct { + ctx context.Context + ApiService JwkApi + set string + jsonWebKeySet *JsonWebKeySet +} + +func (r JwkApiSetJsonWebKeySetRequest) JsonWebKeySet(jsonWebKeySet JsonWebKeySet) JwkApiSetJsonWebKeySetRequest { + r.jsonWebKeySet = &jsonWebKeySet + return r +} + +func (r JwkApiSetJsonWebKeySetRequest) Execute() (*JsonWebKeySet, *http.Response, error) { + return r.ApiService.SetJsonWebKeySetExecute(r) +} + +/* +SetJsonWebKeySet 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param set The JSON Web Key Set ID + @return JwkApiSetJsonWebKeySetRequest +*/ +func (a *JwkApiService) SetJsonWebKeySet(ctx context.Context, set string) JwkApiSetJsonWebKeySetRequest { + return JwkApiSetJsonWebKeySetRequest{ + ApiService: a, + ctx: ctx, + set: set, + } +} + +// Execute executes the request +// @return JsonWebKeySet +func (a *JwkApiService) SetJsonWebKeySetExecute(r JwkApiSetJsonWebKeySetRequest) (*JsonWebKeySet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *JsonWebKeySet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "JwkApiService.SetJsonWebKeySet") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/keys/{set}" + localVarPath = strings.Replace(localVarPath, "{"+"set"+"}", url.PathEscape(parameterToString(r.set, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.jsonWebKeySet + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/clients/hydra/go/api_metadata.go b/clients/hydra/go/api_metadata.go index 1a0649af2e5..b644c50efcb 100644 --- a/clients/hydra/go/api_metadata.go +++ b/clients/hydra/go/api_metadata.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -18,81 +19,342 @@ import ( "net/url" ) -// Linger please -var ( - _ context.Context -) type MetadataApi interface { /* - * Prometheus Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - * ``` -metadata: -annotations: -prometheus.io/port: "4434" -prometheus.io/path: "/metrics/prometheus" -``` - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return MetadataApiApiPrometheusRequest - */ - Prometheus(ctx context.Context) MetadataApiApiPrometheusRequest + 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return MetadataApiGetVersionRequest + */ + GetVersion(ctx context.Context) MetadataApiGetVersionRequest + + // GetVersionExecute executes the request + // @return GetVersion200Response + GetVersionExecute(r MetadataApiGetVersionRequest) (*GetVersion200Response, *http.Response, error) + + /* + 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return MetadataApiIsAliveRequest + */ + IsAlive(ctx context.Context) MetadataApiIsAliveRequest + + // IsAliveExecute executes the request + // @return HealthStatus + IsAliveExecute(r MetadataApiIsAliveRequest) (*HealthStatus, *http.Response, error) /* - * PrometheusExecute executes the request - */ - PrometheusExecute(r MetadataApiApiPrometheusRequest) (*http.Response, error) + 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return MetadataApiIsReadyRequest + */ + IsReady(ctx context.Context) MetadataApiIsReadyRequest + + // IsReadyExecute executes the request + // @return IsReady200Response + IsReadyExecute(r MetadataApiIsReadyRequest) (*IsReady200Response, *http.Response, error) } // MetadataApiService MetadataApi service type MetadataApiService service -type MetadataApiApiPrometheusRequest struct { +type MetadataApiGetVersionRequest struct { ctx context.Context ApiService MetadataApi } +func (r MetadataApiGetVersionRequest) Execute() (*GetVersion200Response, *http.Response, error) { + return r.ApiService.GetVersionExecute(r) +} + +/* +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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return MetadataApiGetVersionRequest +*/ +func (a *MetadataApiService) GetVersion(ctx context.Context) MetadataApiGetVersionRequest { + return MetadataApiGetVersionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return GetVersion200Response +func (a *MetadataApiService) GetVersionExecute(r MetadataApiGetVersionRequest) (*GetVersion200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetVersion200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.GetVersion") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/version" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type MetadataApiIsAliveRequest struct { + ctx context.Context + ApiService MetadataApi +} -func (r MetadataApiApiPrometheusRequest) Execute() (*http.Response, error) { - return r.ApiService.PrometheusExecute(r) +func (r MetadataApiIsAliveRequest) Execute() (*HealthStatus, *http.Response, error) { + return r.ApiService.IsAliveExecute(r) } /* - * Prometheus Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - * ``` -metadata: -annotations: -prometheus.io/port: "4434" -prometheus.io/path: "/metrics/prometheus" -``` - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return MetadataApiApiPrometheusRequest - */ -func (a *MetadataApiService) Prometheus(ctx context.Context) MetadataApiApiPrometheusRequest { - return MetadataApiApiPrometheusRequest{ +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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return MetadataApiIsAliveRequest +*/ +func (a *MetadataApiService) IsAlive(ctx context.Context) MetadataApiIsAliveRequest { + return MetadataApiIsAliveRequest{ ApiService: a, ctx: ctx, } } +// Execute executes the request +// @return HealthStatus +func (a *MetadataApiService) IsAliveExecute(r MetadataApiIsAliveRequest) (*HealthStatus, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HealthStatus + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.IsAlive") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/health/alive" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type MetadataApiIsReadyRequest struct { + ctx context.Context + ApiService MetadataApi +} + +func (r MetadataApiIsReadyRequest) Execute() (*IsReady200Response, *http.Response, error) { + return r.ApiService.IsReadyExecute(r) +} + /* - * Execute executes the request - */ -func (a *MetadataApiService) PrometheusExecute(r MetadataApiApiPrometheusRequest) (*http.Response, error) { +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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return MetadataApiIsReadyRequest +*/ +func (a *MetadataApiService) IsReady(ctx context.Context) MetadataApiIsReadyRequest { + return MetadataApiIsReadyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return IsReady200Response +func (a *MetadataApiService) IsReadyExecute(r MetadataApiIsReadyRequest) (*IsReady200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte + formFiles []formFile + localVarReturnValue *IsReady200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.Prometheus") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.IsReady") if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/metrics/prometheus" + localVarPath := localBasePath + "/health/ready" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -108,28 +370,28 @@ func (a *MetadataApiService) PrometheusExecute(r MetadataApiApiPrometheusRequest } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -137,8 +399,26 @@ func (a *MetadataApiService) PrometheusExecute(r MetadataApiApiPrometheusRequest body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 503 { + var v IsReady503Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + return localVarReturnValue, localVarHTTPResponse, nil } diff --git a/clients/hydra/go/api_o_auth2.go b/clients/hydra/go/api_o_auth2.go new file mode 100644 index 00000000000..bc922fb1d85 --- /dev/null +++ b/clients/hydra/go/api_o_auth2.go @@ -0,0 +1,4047 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +type OAuth2Api interface { + + /* + AcceptOAuth2ConsentRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiAcceptOAuth2ConsentRequestRequest + */ + AcceptOAuth2ConsentRequest(ctx context.Context) OAuth2ApiAcceptOAuth2ConsentRequestRequest + + // AcceptOAuth2ConsentRequestExecute executes the request + // @return OAuth2RedirectTo + AcceptOAuth2ConsentRequestExecute(r OAuth2ApiAcceptOAuth2ConsentRequestRequest) (*OAuth2RedirectTo, *http.Response, error) + + /* + AcceptOAuth2LoginRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiAcceptOAuth2LoginRequestRequest + */ + AcceptOAuth2LoginRequest(ctx context.Context) OAuth2ApiAcceptOAuth2LoginRequestRequest + + // AcceptOAuth2LoginRequestExecute executes the request + // @return OAuth2RedirectTo + AcceptOAuth2LoginRequestExecute(r OAuth2ApiAcceptOAuth2LoginRequestRequest) (*OAuth2RedirectTo, *http.Response, error) + + /* + AcceptOAuth2LogoutRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiAcceptOAuth2LogoutRequestRequest + */ + AcceptOAuth2LogoutRequest(ctx context.Context) OAuth2ApiAcceptOAuth2LogoutRequestRequest + + // AcceptOAuth2LogoutRequestExecute executes the request + // @return OAuth2RedirectTo + AcceptOAuth2LogoutRequestExecute(r OAuth2ApiAcceptOAuth2LogoutRequestRequest) (*OAuth2RedirectTo, *http.Response, error) + + /* + CreateOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiCreateOAuth2ClientRequest + */ + CreateOAuth2Client(ctx context.Context) OAuth2ApiCreateOAuth2ClientRequest + + // CreateOAuth2ClientExecute executes the request + // @return OAuth2Client + CreateOAuth2ClientExecute(r OAuth2ApiCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) + + /* + DeleteOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OAuth2ApiDeleteOAuth2ClientRequest + */ + DeleteOAuth2Client(ctx context.Context, id string) OAuth2ApiDeleteOAuth2ClientRequest + + // DeleteOAuth2ClientExecute executes the request + DeleteOAuth2ClientExecute(r OAuth2ApiDeleteOAuth2ClientRequest) (*http.Response, error) + + /* + DeleteOAuth2Token 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiDeleteOAuth2TokenRequest + */ + DeleteOAuth2Token(ctx context.Context) OAuth2ApiDeleteOAuth2TokenRequest + + // DeleteOAuth2TokenExecute executes the request + DeleteOAuth2TokenExecute(r OAuth2ApiDeleteOAuth2TokenRequest) (*http.Response, error) + + /* + DeleteTrustedOAuth2JwtGrantIssuer 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the desired grant + @return OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest + */ + DeleteTrustedOAuth2JwtGrantIssuer(ctx context.Context, id string) OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest + + // DeleteTrustedOAuth2JwtGrantIssuerExecute executes the request + DeleteTrustedOAuth2JwtGrantIssuerExecute(r OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest) (*http.Response, error) + + /* + GetOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OAuth2ApiGetOAuth2ClientRequest + */ + GetOAuth2Client(ctx context.Context, id string) OAuth2ApiGetOAuth2ClientRequest + + // GetOAuth2ClientExecute executes the request + // @return OAuth2Client + GetOAuth2ClientExecute(r OAuth2ApiGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) + + /* + GetOAuth2ConsentRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiGetOAuth2ConsentRequestRequest + */ + GetOAuth2ConsentRequest(ctx context.Context) OAuth2ApiGetOAuth2ConsentRequestRequest + + // GetOAuth2ConsentRequestExecute executes the request + // @return OAuth2ConsentRequest + GetOAuth2ConsentRequestExecute(r OAuth2ApiGetOAuth2ConsentRequestRequest) (*OAuth2ConsentRequest, *http.Response, error) + + /* + GetOAuth2LoginRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiGetOAuth2LoginRequestRequest + */ + GetOAuth2LoginRequest(ctx context.Context) OAuth2ApiGetOAuth2LoginRequestRequest + + // GetOAuth2LoginRequestExecute executes the request + // @return OAuth2LoginRequest + GetOAuth2LoginRequestExecute(r OAuth2ApiGetOAuth2LoginRequestRequest) (*OAuth2LoginRequest, *http.Response, error) + + /* + GetOAuth2LogoutRequest Get OAuth 2.0 Session Logout Request + + Use this endpoint to fetch an Ory OAuth 2.0 logout request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiGetOAuth2LogoutRequestRequest + */ + GetOAuth2LogoutRequest(ctx context.Context) OAuth2ApiGetOAuth2LogoutRequestRequest + + // GetOAuth2LogoutRequestExecute executes the request + // @return OAuth2LogoutRequest + GetOAuth2LogoutRequestExecute(r OAuth2ApiGetOAuth2LogoutRequestRequest) (*OAuth2LogoutRequest, *http.Response, error) + + /* + GetTrustedOAuth2JwtGrantIssuer 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the desired grant + @return OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest + */ + GetTrustedOAuth2JwtGrantIssuer(ctx context.Context, id string) OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest + + // GetTrustedOAuth2JwtGrantIssuerExecute executes the request + // @return TrustedOAuth2JwtGrantIssuer + GetTrustedOAuth2JwtGrantIssuerExecute(r OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) + + /* + IntrospectOAuth2Token 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiIntrospectOAuth2TokenRequest + */ + IntrospectOAuth2Token(ctx context.Context) OAuth2ApiIntrospectOAuth2TokenRequest + + // IntrospectOAuth2TokenExecute executes the request + // @return IntrospectedOAuth2Token + IntrospectOAuth2TokenExecute(r OAuth2ApiIntrospectOAuth2TokenRequest) (*IntrospectedOAuth2Token, *http.Response, error) + + /* + ListOAuth2Clients 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiListOAuth2ClientsRequest + */ + ListOAuth2Clients(ctx context.Context) OAuth2ApiListOAuth2ClientsRequest + + // ListOAuth2ClientsExecute executes the request + // @return []OAuth2Client + ListOAuth2ClientsExecute(r OAuth2ApiListOAuth2ClientsRequest) ([]OAuth2Client, *http.Response, error) + + /* + ListOAuth2ConsentSessions 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiListOAuth2ConsentSessionsRequest + */ + ListOAuth2ConsentSessions(ctx context.Context) OAuth2ApiListOAuth2ConsentSessionsRequest + + // ListOAuth2ConsentSessionsExecute executes the request + // @return []OAuth2ConsentSession + ListOAuth2ConsentSessionsExecute(r OAuth2ApiListOAuth2ConsentSessionsRequest) ([]OAuth2ConsentSession, *http.Response, error) + + /* + ListTrustedOAuth2JwtGrantIssuers List Trusted OAuth2 JWT Bearer Grant Type Issuers + + Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest + */ + ListTrustedOAuth2JwtGrantIssuers(ctx context.Context) OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest + + // ListTrustedOAuth2JwtGrantIssuersExecute executes the request + // @return []TrustedOAuth2JwtGrantIssuer + ListTrustedOAuth2JwtGrantIssuersExecute(r OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest) ([]TrustedOAuth2JwtGrantIssuer, *http.Response, error) + + /* + 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiOAuth2AuthorizeRequest + */ + OAuth2Authorize(ctx context.Context) OAuth2ApiOAuth2AuthorizeRequest + + // OAuth2AuthorizeExecute executes the request + // @return ErrorOAuth2 + OAuth2AuthorizeExecute(r OAuth2ApiOAuth2AuthorizeRequest) (*ErrorOAuth2, *http.Response, error) + + /* + 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiOauth2TokenExchangeRequest + */ + Oauth2TokenExchange(ctx context.Context) OAuth2ApiOauth2TokenExchangeRequest + + // Oauth2TokenExchangeExecute executes the request + // @return OAuth2TokenExchange + Oauth2TokenExchangeExecute(r OAuth2ApiOauth2TokenExchangeRequest) (*OAuth2TokenExchange, *http.Response, error) + + /* + PatchOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OAuth2ApiPatchOAuth2ClientRequest + */ + PatchOAuth2Client(ctx context.Context, id string) OAuth2ApiPatchOAuth2ClientRequest + + // PatchOAuth2ClientExecute executes the request + // @return OAuth2Client + PatchOAuth2ClientExecute(r OAuth2ApiPatchOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) + + /* + RejectOAuth2ConsentRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRejectOAuth2ConsentRequestRequest + */ + RejectOAuth2ConsentRequest(ctx context.Context) OAuth2ApiRejectOAuth2ConsentRequestRequest + + // RejectOAuth2ConsentRequestExecute executes the request + // @return OAuth2RedirectTo + RejectOAuth2ConsentRequestExecute(r OAuth2ApiRejectOAuth2ConsentRequestRequest) (*OAuth2RedirectTo, *http.Response, error) + + /* + RejectOAuth2LoginRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRejectOAuth2LoginRequestRequest + */ + RejectOAuth2LoginRequest(ctx context.Context) OAuth2ApiRejectOAuth2LoginRequestRequest + + // RejectOAuth2LoginRequestExecute executes the request + // @return OAuth2RedirectTo + RejectOAuth2LoginRequestExecute(r OAuth2ApiRejectOAuth2LoginRequestRequest) (*OAuth2RedirectTo, *http.Response, error) + + /* + RejectOAuth2LogoutRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRejectOAuth2LogoutRequestRequest + */ + RejectOAuth2LogoutRequest(ctx context.Context) OAuth2ApiRejectOAuth2LogoutRequestRequest + + // RejectOAuth2LogoutRequestExecute executes the request + RejectOAuth2LogoutRequestExecute(r OAuth2ApiRejectOAuth2LogoutRequestRequest) (*http.Response, error) + + /* + RevokeOAuth2ConsentSessions 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRevokeOAuth2ConsentSessionsRequest + */ + RevokeOAuth2ConsentSessions(ctx context.Context) OAuth2ApiRevokeOAuth2ConsentSessionsRequest + + // RevokeOAuth2ConsentSessionsExecute executes the request + RevokeOAuth2ConsentSessionsExecute(r OAuth2ApiRevokeOAuth2ConsentSessionsRequest) (*http.Response, error) + + /* + RevokeOAuth2LoginSessions Revokes All OAuth 2.0 Login Sessions of a Subject + + This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject +has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and +does not work with OpenID Connect Front- or Back-channel logout. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRevokeOAuth2LoginSessionsRequest + */ + RevokeOAuth2LoginSessions(ctx context.Context) OAuth2ApiRevokeOAuth2LoginSessionsRequest + + // RevokeOAuth2LoginSessionsExecute executes the request + RevokeOAuth2LoginSessionsExecute(r OAuth2ApiRevokeOAuth2LoginSessionsRequest) (*http.Response, error) + + /* + RevokeOAuth2Token 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRevokeOAuth2TokenRequest + */ + RevokeOAuth2Token(ctx context.Context) OAuth2ApiRevokeOAuth2TokenRequest + + // RevokeOAuth2TokenExecute executes the request + RevokeOAuth2TokenExecute(r OAuth2ApiRevokeOAuth2TokenRequest) (*http.Response, error) + + /* + SetOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OAuth 2.0 Client ID + @return OAuth2ApiSetOAuth2ClientRequest + */ + SetOAuth2Client(ctx context.Context, id string) OAuth2ApiSetOAuth2ClientRequest + + // SetOAuth2ClientExecute executes the request + // @return OAuth2Client + SetOAuth2ClientExecute(r OAuth2ApiSetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) + + /* + SetOAuth2ClientLifespans Set OAuth2 Client Token Lifespans + + Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OAuth 2.0 Client ID + @return OAuth2ApiSetOAuth2ClientLifespansRequest + */ + SetOAuth2ClientLifespans(ctx context.Context, id string) OAuth2ApiSetOAuth2ClientLifespansRequest + + // SetOAuth2ClientLifespansExecute executes the request + // @return OAuth2Client + SetOAuth2ClientLifespansExecute(r OAuth2ApiSetOAuth2ClientLifespansRequest) (*OAuth2Client, *http.Response, error) + + /* + TrustOAuth2JwtGrantIssuer 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiTrustOAuth2JwtGrantIssuerRequest + */ + TrustOAuth2JwtGrantIssuer(ctx context.Context) OAuth2ApiTrustOAuth2JwtGrantIssuerRequest + + // TrustOAuth2JwtGrantIssuerExecute executes the request + // @return TrustedOAuth2JwtGrantIssuer + TrustOAuth2JwtGrantIssuerExecute(r OAuth2ApiTrustOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) +} + +// OAuth2ApiService OAuth2Api service +type OAuth2ApiService service + +type OAuth2ApiAcceptOAuth2ConsentRequestRequest struct { + ctx context.Context + ApiService OAuth2Api + consentChallenge *string + acceptOAuth2ConsentRequest *AcceptOAuth2ConsentRequest +} + +// OAuth 2.0 Consent Request Challenge +func (r OAuth2ApiAcceptOAuth2ConsentRequestRequest) ConsentChallenge(consentChallenge string) OAuth2ApiAcceptOAuth2ConsentRequestRequest { + r.consentChallenge = &consentChallenge + return r +} + +func (r OAuth2ApiAcceptOAuth2ConsentRequestRequest) AcceptOAuth2ConsentRequest(acceptOAuth2ConsentRequest AcceptOAuth2ConsentRequest) OAuth2ApiAcceptOAuth2ConsentRequestRequest { + r.acceptOAuth2ConsentRequest = &acceptOAuth2ConsentRequest + return r +} + +func (r OAuth2ApiAcceptOAuth2ConsentRequestRequest) Execute() (*OAuth2RedirectTo, *http.Response, error) { + return r.ApiService.AcceptOAuth2ConsentRequestExecute(r) +} + +/* +AcceptOAuth2ConsentRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiAcceptOAuth2ConsentRequestRequest +*/ +func (a *OAuth2ApiService) AcceptOAuth2ConsentRequest(ctx context.Context) OAuth2ApiAcceptOAuth2ConsentRequestRequest { + return OAuth2ApiAcceptOAuth2ConsentRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2RedirectTo +func (a *OAuth2ApiService) AcceptOAuth2ConsentRequestExecute(r OAuth2ApiAcceptOAuth2ConsentRequestRequest) (*OAuth2RedirectTo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2RedirectTo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.AcceptOAuth2ConsentRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/requests/consent/accept" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.consentChallenge == nil { + return localVarReturnValue, nil, reportError("consentChallenge is required and must be specified") + } + + localVarQueryParams.Add("consent_challenge", parameterToString(*r.consentChallenge, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.acceptOAuth2ConsentRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiAcceptOAuth2LoginRequestRequest struct { + ctx context.Context + ApiService OAuth2Api + loginChallenge *string + acceptOAuth2LoginRequest *AcceptOAuth2LoginRequest +} + +// OAuth 2.0 Login Request Challenge +func (r OAuth2ApiAcceptOAuth2LoginRequestRequest) LoginChallenge(loginChallenge string) OAuth2ApiAcceptOAuth2LoginRequestRequest { + r.loginChallenge = &loginChallenge + return r +} + +func (r OAuth2ApiAcceptOAuth2LoginRequestRequest) AcceptOAuth2LoginRequest(acceptOAuth2LoginRequest AcceptOAuth2LoginRequest) OAuth2ApiAcceptOAuth2LoginRequestRequest { + r.acceptOAuth2LoginRequest = &acceptOAuth2LoginRequest + return r +} + +func (r OAuth2ApiAcceptOAuth2LoginRequestRequest) Execute() (*OAuth2RedirectTo, *http.Response, error) { + return r.ApiService.AcceptOAuth2LoginRequestExecute(r) +} + +/* +AcceptOAuth2LoginRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiAcceptOAuth2LoginRequestRequest +*/ +func (a *OAuth2ApiService) AcceptOAuth2LoginRequest(ctx context.Context) OAuth2ApiAcceptOAuth2LoginRequestRequest { + return OAuth2ApiAcceptOAuth2LoginRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2RedirectTo +func (a *OAuth2ApiService) AcceptOAuth2LoginRequestExecute(r OAuth2ApiAcceptOAuth2LoginRequestRequest) (*OAuth2RedirectTo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2RedirectTo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.AcceptOAuth2LoginRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/requests/login/accept" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.loginChallenge == nil { + return localVarReturnValue, nil, reportError("loginChallenge is required and must be specified") + } + + localVarQueryParams.Add("login_challenge", parameterToString(*r.loginChallenge, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.acceptOAuth2LoginRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiAcceptOAuth2LogoutRequestRequest struct { + ctx context.Context + ApiService OAuth2Api + logoutChallenge *string +} + +// OAuth 2.0 Logout Request Challenge +func (r OAuth2ApiAcceptOAuth2LogoutRequestRequest) LogoutChallenge(logoutChallenge string) OAuth2ApiAcceptOAuth2LogoutRequestRequest { + r.logoutChallenge = &logoutChallenge + return r +} + +func (r OAuth2ApiAcceptOAuth2LogoutRequestRequest) Execute() (*OAuth2RedirectTo, *http.Response, error) { + return r.ApiService.AcceptOAuth2LogoutRequestExecute(r) +} + +/* +AcceptOAuth2LogoutRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiAcceptOAuth2LogoutRequestRequest +*/ +func (a *OAuth2ApiService) AcceptOAuth2LogoutRequest(ctx context.Context) OAuth2ApiAcceptOAuth2LogoutRequestRequest { + return OAuth2ApiAcceptOAuth2LogoutRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2RedirectTo +func (a *OAuth2ApiService) AcceptOAuth2LogoutRequestExecute(r OAuth2ApiAcceptOAuth2LogoutRequestRequest) (*OAuth2RedirectTo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2RedirectTo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.AcceptOAuth2LogoutRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/requests/logout/accept" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.logoutChallenge == nil { + return localVarReturnValue, nil, reportError("logoutChallenge is required and must be specified") + } + + localVarQueryParams.Add("logout_challenge", parameterToString(*r.logoutChallenge, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiCreateOAuth2ClientRequest struct { + ctx context.Context + ApiService OAuth2Api + oAuth2Client *OAuth2Client +} + +// OAuth 2.0 Client Request Body +func (r OAuth2ApiCreateOAuth2ClientRequest) OAuth2Client(oAuth2Client OAuth2Client) OAuth2ApiCreateOAuth2ClientRequest { + r.oAuth2Client = &oAuth2Client + return r +} + +func (r OAuth2ApiCreateOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { + return r.ApiService.CreateOAuth2ClientExecute(r) +} + +/* +CreateOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiCreateOAuth2ClientRequest +*/ +func (a *OAuth2ApiService) CreateOAuth2Client(ctx context.Context) OAuth2ApiCreateOAuth2ClientRequest { + return OAuth2ApiCreateOAuth2ClientRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2Client +func (a *OAuth2ApiService) CreateOAuth2ClientExecute(r OAuth2ApiCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2Client + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.CreateOAuth2Client") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/clients" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oAuth2Client == nil { + return localVarReturnValue, nil, reportError("oAuth2Client is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.oAuth2Client + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiDeleteOAuth2ClientRequest struct { + ctx context.Context + ApiService OAuth2Api + id string +} + +func (r OAuth2ApiDeleteOAuth2ClientRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOAuth2ClientExecute(r) +} + +/* +DeleteOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OAuth2ApiDeleteOAuth2ClientRequest +*/ +func (a *OAuth2ApiService) DeleteOAuth2Client(ctx context.Context, id string) OAuth2ApiDeleteOAuth2ClientRequest { + return OAuth2ApiDeleteOAuth2ClientRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *OAuth2ApiService) DeleteOAuth2ClientExecute(r OAuth2ApiDeleteOAuth2ClientRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.DeleteOAuth2Client") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/clients/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OAuth2ApiDeleteOAuth2TokenRequest struct { + ctx context.Context + ApiService OAuth2Api + clientId *string +} + +// OAuth 2.0 Client ID +func (r OAuth2ApiDeleteOAuth2TokenRequest) ClientId(clientId string) OAuth2ApiDeleteOAuth2TokenRequest { + r.clientId = &clientId + return r +} + +func (r OAuth2ApiDeleteOAuth2TokenRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOAuth2TokenExecute(r) +} + +/* +DeleteOAuth2Token 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiDeleteOAuth2TokenRequest +*/ +func (a *OAuth2ApiService) DeleteOAuth2Token(ctx context.Context) OAuth2ApiDeleteOAuth2TokenRequest { + return OAuth2ApiDeleteOAuth2TokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *OAuth2ApiService) DeleteOAuth2TokenExecute(r OAuth2ApiDeleteOAuth2TokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.DeleteOAuth2Token") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/tokens" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.clientId == nil { + return nil, reportError("clientId is required and must be specified") + } + + localVarQueryParams.Add("client_id", parameterToString(*r.clientId, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest struct { + ctx context.Context + ApiService OAuth2Api + id string +} + +func (r OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteTrustedOAuth2JwtGrantIssuerExecute(r) +} + +/* +DeleteTrustedOAuth2JwtGrantIssuer 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the desired grant + @return OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest +*/ +func (a *OAuth2ApiService) DeleteTrustedOAuth2JwtGrantIssuer(ctx context.Context, id string) OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest { + return OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *OAuth2ApiService) DeleteTrustedOAuth2JwtGrantIssuerExecute(r OAuth2ApiDeleteTrustedOAuth2JwtGrantIssuerRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.DeleteTrustedOAuth2JwtGrantIssuer") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/trust/grants/jwt-bearer/issuers/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OAuth2ApiGetOAuth2ClientRequest struct { + ctx context.Context + ApiService OAuth2Api + id string +} + +func (r OAuth2ApiGetOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { + return r.ApiService.GetOAuth2ClientExecute(r) +} + +/* +GetOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OAuth2ApiGetOAuth2ClientRequest +*/ +func (a *OAuth2ApiService) GetOAuth2Client(ctx context.Context, id string) OAuth2ApiGetOAuth2ClientRequest { + return OAuth2ApiGetOAuth2ClientRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return OAuth2Client +func (a *OAuth2ApiService) GetOAuth2ClientExecute(r OAuth2ApiGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2Client + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.GetOAuth2Client") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/clients/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiGetOAuth2ConsentRequestRequest struct { + ctx context.Context + ApiService OAuth2Api + consentChallenge *string +} + +// OAuth 2.0 Consent Request Challenge +func (r OAuth2ApiGetOAuth2ConsentRequestRequest) ConsentChallenge(consentChallenge string) OAuth2ApiGetOAuth2ConsentRequestRequest { + r.consentChallenge = &consentChallenge + return r +} + +func (r OAuth2ApiGetOAuth2ConsentRequestRequest) Execute() (*OAuth2ConsentRequest, *http.Response, error) { + return r.ApiService.GetOAuth2ConsentRequestExecute(r) +} + +/* +GetOAuth2ConsentRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiGetOAuth2ConsentRequestRequest +*/ +func (a *OAuth2ApiService) GetOAuth2ConsentRequest(ctx context.Context) OAuth2ApiGetOAuth2ConsentRequestRequest { + return OAuth2ApiGetOAuth2ConsentRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2ConsentRequest +func (a *OAuth2ApiService) GetOAuth2ConsentRequestExecute(r OAuth2ApiGetOAuth2ConsentRequestRequest) (*OAuth2ConsentRequest, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2ConsentRequest + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.GetOAuth2ConsentRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/requests/consent" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.consentChallenge == nil { + return localVarReturnValue, nil, reportError("consentChallenge is required and must be specified") + } + + localVarQueryParams.Add("consent_challenge", parameterToString(*r.consentChallenge, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 410 { + var v OAuth2RedirectTo + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiGetOAuth2LoginRequestRequest struct { + ctx context.Context + ApiService OAuth2Api + loginChallenge *string +} + +// OAuth 2.0 Login Request Challenge +func (r OAuth2ApiGetOAuth2LoginRequestRequest) LoginChallenge(loginChallenge string) OAuth2ApiGetOAuth2LoginRequestRequest { + r.loginChallenge = &loginChallenge + return r +} + +func (r OAuth2ApiGetOAuth2LoginRequestRequest) Execute() (*OAuth2LoginRequest, *http.Response, error) { + return r.ApiService.GetOAuth2LoginRequestExecute(r) +} + +/* +GetOAuth2LoginRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiGetOAuth2LoginRequestRequest +*/ +func (a *OAuth2ApiService) GetOAuth2LoginRequest(ctx context.Context) OAuth2ApiGetOAuth2LoginRequestRequest { + return OAuth2ApiGetOAuth2LoginRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2LoginRequest +func (a *OAuth2ApiService) GetOAuth2LoginRequestExecute(r OAuth2ApiGetOAuth2LoginRequestRequest) (*OAuth2LoginRequest, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2LoginRequest + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.GetOAuth2LoginRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/requests/login" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.loginChallenge == nil { + return localVarReturnValue, nil, reportError("loginChallenge is required and must be specified") + } + + localVarQueryParams.Add("login_challenge", parameterToString(*r.loginChallenge, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 410 { + var v OAuth2RedirectTo + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiGetOAuth2LogoutRequestRequest struct { + ctx context.Context + ApiService OAuth2Api + logoutChallenge *string +} + +func (r OAuth2ApiGetOAuth2LogoutRequestRequest) LogoutChallenge(logoutChallenge string) OAuth2ApiGetOAuth2LogoutRequestRequest { + r.logoutChallenge = &logoutChallenge + return r +} + +func (r OAuth2ApiGetOAuth2LogoutRequestRequest) Execute() (*OAuth2LogoutRequest, *http.Response, error) { + return r.ApiService.GetOAuth2LogoutRequestExecute(r) +} + +/* +GetOAuth2LogoutRequest Get OAuth 2.0 Session Logout Request + +Use this endpoint to fetch an Ory OAuth 2.0 logout request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiGetOAuth2LogoutRequestRequest +*/ +func (a *OAuth2ApiService) GetOAuth2LogoutRequest(ctx context.Context) OAuth2ApiGetOAuth2LogoutRequestRequest { + return OAuth2ApiGetOAuth2LogoutRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2LogoutRequest +func (a *OAuth2ApiService) GetOAuth2LogoutRequestExecute(r OAuth2ApiGetOAuth2LogoutRequestRequest) (*OAuth2LogoutRequest, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2LogoutRequest + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.GetOAuth2LogoutRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/requests/logout" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.logoutChallenge == nil { + return localVarReturnValue, nil, reportError("logoutChallenge is required and must be specified") + } + + localVarQueryParams.Add("logout_challenge", parameterToString(*r.logoutChallenge, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 410 { + var v OAuth2RedirectTo + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest struct { + ctx context.Context + ApiService OAuth2Api + id string +} + +func (r OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest) Execute() (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) { + return r.ApiService.GetTrustedOAuth2JwtGrantIssuerExecute(r) +} + +/* +GetTrustedOAuth2JwtGrantIssuer 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the desired grant + @return OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest +*/ +func (a *OAuth2ApiService) GetTrustedOAuth2JwtGrantIssuer(ctx context.Context, id string) OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest { + return OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return TrustedOAuth2JwtGrantIssuer +func (a *OAuth2ApiService) GetTrustedOAuth2JwtGrantIssuerExecute(r OAuth2ApiGetTrustedOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TrustedOAuth2JwtGrantIssuer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.GetTrustedOAuth2JwtGrantIssuer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/trust/grants/jwt-bearer/issuers/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiIntrospectOAuth2TokenRequest struct { + ctx context.Context + ApiService OAuth2Api + token *string + scope *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. +func (r OAuth2ApiIntrospectOAuth2TokenRequest) Token(token string) OAuth2ApiIntrospectOAuth2TokenRequest { + r.token = &token + return r +} + +// 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. +func (r OAuth2ApiIntrospectOAuth2TokenRequest) Scope(scope string) OAuth2ApiIntrospectOAuth2TokenRequest { + r.scope = &scope + return r +} + +func (r OAuth2ApiIntrospectOAuth2TokenRequest) Execute() (*IntrospectedOAuth2Token, *http.Response, error) { + return r.ApiService.IntrospectOAuth2TokenExecute(r) +} + +/* +IntrospectOAuth2Token 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiIntrospectOAuth2TokenRequest +*/ +func (a *OAuth2ApiService) IntrospectOAuth2Token(ctx context.Context) OAuth2ApiIntrospectOAuth2TokenRequest { + return OAuth2ApiIntrospectOAuth2TokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return IntrospectedOAuth2Token +func (a *OAuth2ApiService) IntrospectOAuth2TokenExecute(r OAuth2ApiIntrospectOAuth2TokenRequest) (*IntrospectedOAuth2Token, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *IntrospectedOAuth2Token + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.IntrospectOAuth2Token") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/introspect" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.token == nil { + return localVarReturnValue, nil, reportError("token is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.scope != nil { + localVarFormParams.Add("scope", parameterToString(*r.scope, "")) + } + localVarFormParams.Add("token", parameterToString(*r.token, "")) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiListOAuth2ClientsRequest struct { + ctx context.Context + ApiService OAuth2Api + pageSize *int64 + pageToken *string + clientName *string + owner *string +} + +// 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). +func (r OAuth2ApiListOAuth2ClientsRequest) PageSize(pageSize int64) OAuth2ApiListOAuth2ClientsRequest { + r.pageSize = &pageSize + return r +} + +// 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). +func (r OAuth2ApiListOAuth2ClientsRequest) PageToken(pageToken string) OAuth2ApiListOAuth2ClientsRequest { + r.pageToken = &pageToken + return r +} + +// The name of the clients to filter by. +func (r OAuth2ApiListOAuth2ClientsRequest) ClientName(clientName string) OAuth2ApiListOAuth2ClientsRequest { + r.clientName = &clientName + return r +} + +// The owner of the clients to filter by. +func (r OAuth2ApiListOAuth2ClientsRequest) Owner(owner string) OAuth2ApiListOAuth2ClientsRequest { + r.owner = &owner + return r +} + +func (r OAuth2ApiListOAuth2ClientsRequest) Execute() ([]OAuth2Client, *http.Response, error) { + return r.ApiService.ListOAuth2ClientsExecute(r) +} + +/* +ListOAuth2Clients 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiListOAuth2ClientsRequest +*/ +func (a *OAuth2ApiService) ListOAuth2Clients(ctx context.Context) OAuth2ApiListOAuth2ClientsRequest { + return OAuth2ApiListOAuth2ClientsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []OAuth2Client +func (a *OAuth2ApiService) ListOAuth2ClientsExecute(r OAuth2ApiListOAuth2ClientsRequest) ([]OAuth2Client, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []OAuth2Client + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.ListOAuth2Clients") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/clients" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.pageSize != nil { + localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + } + if r.pageToken != nil { + localVarQueryParams.Add("page_token", parameterToString(*r.pageToken, "")) + } + if r.clientName != nil { + localVarQueryParams.Add("client_name", parameterToString(*r.clientName, "")) + } + if r.owner != nil { + localVarQueryParams.Add("owner", parameterToString(*r.owner, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiListOAuth2ConsentSessionsRequest struct { + ctx context.Context + ApiService OAuth2Api + subject *string + pageSize *int64 + pageToken *string +} + +// The subject to list the consent sessions for. +func (r OAuth2ApiListOAuth2ConsentSessionsRequest) Subject(subject string) OAuth2ApiListOAuth2ConsentSessionsRequest { + r.subject = &subject + return r +} + +// 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). +func (r OAuth2ApiListOAuth2ConsentSessionsRequest) PageSize(pageSize int64) OAuth2ApiListOAuth2ConsentSessionsRequest { + r.pageSize = &pageSize + return r +} + +// 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). +func (r OAuth2ApiListOAuth2ConsentSessionsRequest) PageToken(pageToken string) OAuth2ApiListOAuth2ConsentSessionsRequest { + r.pageToken = &pageToken + return r +} + +func (r OAuth2ApiListOAuth2ConsentSessionsRequest) Execute() ([]OAuth2ConsentSession, *http.Response, error) { + return r.ApiService.ListOAuth2ConsentSessionsExecute(r) +} + +/* +ListOAuth2ConsentSessions 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiListOAuth2ConsentSessionsRequest +*/ +func (a *OAuth2ApiService) ListOAuth2ConsentSessions(ctx context.Context) OAuth2ApiListOAuth2ConsentSessionsRequest { + return OAuth2ApiListOAuth2ConsentSessionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []OAuth2ConsentSession +func (a *OAuth2ApiService) ListOAuth2ConsentSessionsExecute(r OAuth2ApiListOAuth2ConsentSessionsRequest) ([]OAuth2ConsentSession, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []OAuth2ConsentSession + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.ListOAuth2ConsentSessions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/sessions/consent" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.subject == nil { + return localVarReturnValue, nil, reportError("subject is required and must be specified") + } + + if r.pageSize != nil { + localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) + } + if r.pageToken != nil { + localVarQueryParams.Add("page_token", parameterToString(*r.pageToken, "")) + } + localVarQueryParams.Add("subject", parameterToString(*r.subject, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest struct { + ctx context.Context + ApiService OAuth2Api + maxItems *int64 + defaultItems *int64 + issuer *string +} + +func (r OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest) MaxItems(maxItems int64) OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest { + r.maxItems = &maxItems + return r +} + +func (r OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest) DefaultItems(defaultItems int64) OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest { + r.defaultItems = &defaultItems + return r +} + +// If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. +func (r OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest) Issuer(issuer string) OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest { + r.issuer = &issuer + return r +} + +func (r OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest) Execute() ([]TrustedOAuth2JwtGrantIssuer, *http.Response, error) { + return r.ApiService.ListTrustedOAuth2JwtGrantIssuersExecute(r) +} + +/* +ListTrustedOAuth2JwtGrantIssuers List Trusted OAuth2 JWT Bearer Grant Type Issuers + +Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest +*/ +func (a *OAuth2ApiService) ListTrustedOAuth2JwtGrantIssuers(ctx context.Context) OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest { + return OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return []TrustedOAuth2JwtGrantIssuer +func (a *OAuth2ApiService) ListTrustedOAuth2JwtGrantIssuersExecute(r OAuth2ApiListTrustedOAuth2JwtGrantIssuersRequest) ([]TrustedOAuth2JwtGrantIssuer, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue []TrustedOAuth2JwtGrantIssuer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.ListTrustedOAuth2JwtGrantIssuers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/trust/grants/jwt-bearer/issuers" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.maxItems != nil { + localVarQueryParams.Add("MaxItems", parameterToString(*r.maxItems, "")) + } + if r.defaultItems != nil { + localVarQueryParams.Add("DefaultItems", parameterToString(*r.defaultItems, "")) + } + if r.issuer != nil { + localVarQueryParams.Add("issuer", parameterToString(*r.issuer, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiOAuth2AuthorizeRequest struct { + ctx context.Context + ApiService OAuth2Api +} + +func (r OAuth2ApiOAuth2AuthorizeRequest) Execute() (*ErrorOAuth2, *http.Response, error) { + return r.ApiService.OAuth2AuthorizeExecute(r) +} + +/* +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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiOAuth2AuthorizeRequest +*/ +func (a *OAuth2ApiService) OAuth2Authorize(ctx context.Context) OAuth2ApiOAuth2AuthorizeRequest { + return OAuth2ApiOAuth2AuthorizeRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ErrorOAuth2 +func (a *OAuth2ApiService) OAuth2AuthorizeExecute(r OAuth2ApiOAuth2AuthorizeRequest) (*ErrorOAuth2, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ErrorOAuth2 + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.OAuth2Authorize") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/oauth2/auth" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiOauth2TokenExchangeRequest struct { + ctx context.Context + ApiService OAuth2Api + grantType *string + clientId *string + code *string + redirectUri *string + refreshToken *string +} + +func (r OAuth2ApiOauth2TokenExchangeRequest) GrantType(grantType string) OAuth2ApiOauth2TokenExchangeRequest { + r.grantType = &grantType + return r +} + +func (r OAuth2ApiOauth2TokenExchangeRequest) ClientId(clientId string) OAuth2ApiOauth2TokenExchangeRequest { + r.clientId = &clientId + return r +} + +func (r OAuth2ApiOauth2TokenExchangeRequest) Code(code string) OAuth2ApiOauth2TokenExchangeRequest { + r.code = &code + return r +} + +func (r OAuth2ApiOauth2TokenExchangeRequest) RedirectUri(redirectUri string) OAuth2ApiOauth2TokenExchangeRequest { + r.redirectUri = &redirectUri + return r +} + +func (r OAuth2ApiOauth2TokenExchangeRequest) RefreshToken(refreshToken string) OAuth2ApiOauth2TokenExchangeRequest { + r.refreshToken = &refreshToken + return r +} + +func (r OAuth2ApiOauth2TokenExchangeRequest) Execute() (*OAuth2TokenExchange, *http.Response, error) { + return r.ApiService.Oauth2TokenExchangeExecute(r) +} + +/* +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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiOauth2TokenExchangeRequest +*/ +func (a *OAuth2ApiService) Oauth2TokenExchange(ctx context.Context) OAuth2ApiOauth2TokenExchangeRequest { + return OAuth2ApiOauth2TokenExchangeRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2TokenExchange +func (a *OAuth2ApiService) Oauth2TokenExchangeExecute(r OAuth2ApiOauth2TokenExchangeRequest) (*OAuth2TokenExchange, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2TokenExchange + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.Oauth2TokenExchange") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/oauth2/token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.grantType == nil { + return localVarReturnValue, nil, reportError("grantType is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.clientId != nil { + localVarFormParams.Add("client_id", parameterToString(*r.clientId, "")) + } + if r.code != nil { + localVarFormParams.Add("code", parameterToString(*r.code, "")) + } + localVarFormParams.Add("grant_type", parameterToString(*r.grantType, "")) + if r.redirectUri != nil { + localVarFormParams.Add("redirect_uri", parameterToString(*r.redirectUri, "")) + } + if r.refreshToken != nil { + localVarFormParams.Add("refresh_token", parameterToString(*r.refreshToken, "")) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiPatchOAuth2ClientRequest struct { + ctx context.Context + ApiService OAuth2Api + id string + jsonPatch *[]JsonPatch +} + +// OAuth 2.0 Client JSON Patch Body +func (r OAuth2ApiPatchOAuth2ClientRequest) JsonPatch(jsonPatch []JsonPatch) OAuth2ApiPatchOAuth2ClientRequest { + r.jsonPatch = &jsonPatch + return r +} + +func (r OAuth2ApiPatchOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { + return r.ApiService.PatchOAuth2ClientExecute(r) +} + +/* +PatchOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OAuth2ApiPatchOAuth2ClientRequest +*/ +func (a *OAuth2ApiService) PatchOAuth2Client(ctx context.Context, id string) OAuth2ApiPatchOAuth2ClientRequest { + return OAuth2ApiPatchOAuth2ClientRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return OAuth2Client +func (a *OAuth2ApiService) PatchOAuth2ClientExecute(r OAuth2ApiPatchOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2Client + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.PatchOAuth2Client") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/clients/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.jsonPatch == nil { + return localVarReturnValue, nil, reportError("jsonPatch is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.jsonPatch + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiRejectOAuth2ConsentRequestRequest struct { + ctx context.Context + ApiService OAuth2Api + consentChallenge *string + rejectOAuth2Request *RejectOAuth2Request +} + +// OAuth 2.0 Consent Request Challenge +func (r OAuth2ApiRejectOAuth2ConsentRequestRequest) ConsentChallenge(consentChallenge string) OAuth2ApiRejectOAuth2ConsentRequestRequest { + r.consentChallenge = &consentChallenge + return r +} + +func (r OAuth2ApiRejectOAuth2ConsentRequestRequest) RejectOAuth2Request(rejectOAuth2Request RejectOAuth2Request) OAuth2ApiRejectOAuth2ConsentRequestRequest { + r.rejectOAuth2Request = &rejectOAuth2Request + return r +} + +func (r OAuth2ApiRejectOAuth2ConsentRequestRequest) Execute() (*OAuth2RedirectTo, *http.Response, error) { + return r.ApiService.RejectOAuth2ConsentRequestExecute(r) +} + +/* +RejectOAuth2ConsentRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRejectOAuth2ConsentRequestRequest +*/ +func (a *OAuth2ApiService) RejectOAuth2ConsentRequest(ctx context.Context) OAuth2ApiRejectOAuth2ConsentRequestRequest { + return OAuth2ApiRejectOAuth2ConsentRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2RedirectTo +func (a *OAuth2ApiService) RejectOAuth2ConsentRequestExecute(r OAuth2ApiRejectOAuth2ConsentRequestRequest) (*OAuth2RedirectTo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2RedirectTo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.RejectOAuth2ConsentRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/requests/consent/reject" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.consentChallenge == nil { + return localVarReturnValue, nil, reportError("consentChallenge is required and must be specified") + } + + localVarQueryParams.Add("consent_challenge", parameterToString(*r.consentChallenge, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rejectOAuth2Request + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiRejectOAuth2LoginRequestRequest struct { + ctx context.Context + ApiService OAuth2Api + loginChallenge *string + rejectOAuth2Request *RejectOAuth2Request +} + +// OAuth 2.0 Login Request Challenge +func (r OAuth2ApiRejectOAuth2LoginRequestRequest) LoginChallenge(loginChallenge string) OAuth2ApiRejectOAuth2LoginRequestRequest { + r.loginChallenge = &loginChallenge + return r +} + +func (r OAuth2ApiRejectOAuth2LoginRequestRequest) RejectOAuth2Request(rejectOAuth2Request RejectOAuth2Request) OAuth2ApiRejectOAuth2LoginRequestRequest { + r.rejectOAuth2Request = &rejectOAuth2Request + return r +} + +func (r OAuth2ApiRejectOAuth2LoginRequestRequest) Execute() (*OAuth2RedirectTo, *http.Response, error) { + return r.ApiService.RejectOAuth2LoginRequestExecute(r) +} + +/* +RejectOAuth2LoginRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRejectOAuth2LoginRequestRequest +*/ +func (a *OAuth2ApiService) RejectOAuth2LoginRequest(ctx context.Context) OAuth2ApiRejectOAuth2LoginRequestRequest { + return OAuth2ApiRejectOAuth2LoginRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2RedirectTo +func (a *OAuth2ApiService) RejectOAuth2LoginRequestExecute(r OAuth2ApiRejectOAuth2LoginRequestRequest) (*OAuth2RedirectTo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2RedirectTo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.RejectOAuth2LoginRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/requests/login/reject" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.loginChallenge == nil { + return localVarReturnValue, nil, reportError("loginChallenge is required and must be specified") + } + + localVarQueryParams.Add("login_challenge", parameterToString(*r.loginChallenge, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rejectOAuth2Request + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiRejectOAuth2LogoutRequestRequest struct { + ctx context.Context + ApiService OAuth2Api + logoutChallenge *string +} + +func (r OAuth2ApiRejectOAuth2LogoutRequestRequest) LogoutChallenge(logoutChallenge string) OAuth2ApiRejectOAuth2LogoutRequestRequest { + r.logoutChallenge = &logoutChallenge + return r +} + +func (r OAuth2ApiRejectOAuth2LogoutRequestRequest) Execute() (*http.Response, error) { + return r.ApiService.RejectOAuth2LogoutRequestExecute(r) +} + +/* +RejectOAuth2LogoutRequest 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRejectOAuth2LogoutRequestRequest +*/ +func (a *OAuth2ApiService) RejectOAuth2LogoutRequest(ctx context.Context) OAuth2ApiRejectOAuth2LogoutRequestRequest { + return OAuth2ApiRejectOAuth2LogoutRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *OAuth2ApiService) RejectOAuth2LogoutRequestExecute(r OAuth2ApiRejectOAuth2LogoutRequestRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.RejectOAuth2LogoutRequest") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/requests/logout/reject" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.logoutChallenge == nil { + return nil, reportError("logoutChallenge is required and must be specified") + } + + localVarQueryParams.Add("logout_challenge", parameterToString(*r.logoutChallenge, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OAuth2ApiRevokeOAuth2ConsentSessionsRequest struct { + ctx context.Context + ApiService OAuth2Api + subject *string + client *string + all *bool +} + +// OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. +func (r OAuth2ApiRevokeOAuth2ConsentSessionsRequest) Subject(subject string) OAuth2ApiRevokeOAuth2ConsentSessionsRequest { + r.subject = &subject + return r +} + +// OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID. +func (r OAuth2ApiRevokeOAuth2ConsentSessionsRequest) Client(client string) OAuth2ApiRevokeOAuth2ConsentSessionsRequest { + r.client = &client + return r +} + +// Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. +func (r OAuth2ApiRevokeOAuth2ConsentSessionsRequest) All(all bool) OAuth2ApiRevokeOAuth2ConsentSessionsRequest { + r.all = &all + return r +} + +func (r OAuth2ApiRevokeOAuth2ConsentSessionsRequest) Execute() (*http.Response, error) { + return r.ApiService.RevokeOAuth2ConsentSessionsExecute(r) +} + +/* +RevokeOAuth2ConsentSessions 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRevokeOAuth2ConsentSessionsRequest +*/ +func (a *OAuth2ApiService) RevokeOAuth2ConsentSessions(ctx context.Context) OAuth2ApiRevokeOAuth2ConsentSessionsRequest { + return OAuth2ApiRevokeOAuth2ConsentSessionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *OAuth2ApiService) RevokeOAuth2ConsentSessionsExecute(r OAuth2ApiRevokeOAuth2ConsentSessionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.RevokeOAuth2ConsentSessions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/sessions/consent" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.subject == nil { + return nil, reportError("subject is required and must be specified") + } + + localVarQueryParams.Add("subject", parameterToString(*r.subject, "")) + if r.client != nil { + localVarQueryParams.Add("client", parameterToString(*r.client, "")) + } + if r.all != nil { + localVarQueryParams.Add("all", parameterToString(*r.all, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OAuth2ApiRevokeOAuth2LoginSessionsRequest struct { + ctx context.Context + ApiService OAuth2Api + subject *string +} + +// OAuth 2.0 Subject The subject to revoke authentication sessions for. +func (r OAuth2ApiRevokeOAuth2LoginSessionsRequest) Subject(subject string) OAuth2ApiRevokeOAuth2LoginSessionsRequest { + r.subject = &subject + return r +} + +func (r OAuth2ApiRevokeOAuth2LoginSessionsRequest) Execute() (*http.Response, error) { + return r.ApiService.RevokeOAuth2LoginSessionsExecute(r) +} + +/* +RevokeOAuth2LoginSessions Revokes All OAuth 2.0 Login Sessions of a Subject + +This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject +has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and +does not work with OpenID Connect Front- or Back-channel logout. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRevokeOAuth2LoginSessionsRequest +*/ +func (a *OAuth2ApiService) RevokeOAuth2LoginSessions(ctx context.Context) OAuth2ApiRevokeOAuth2LoginSessionsRequest { + return OAuth2ApiRevokeOAuth2LoginSessionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *OAuth2ApiService) RevokeOAuth2LoginSessionsExecute(r OAuth2ApiRevokeOAuth2LoginSessionsRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.RevokeOAuth2LoginSessions") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/oauth2/auth/sessions/login" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.subject == nil { + return nil, reportError("subject is required and must be specified") + } + + localVarQueryParams.Add("subject", parameterToString(*r.subject, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OAuth2ApiRevokeOAuth2TokenRequest struct { + ctx context.Context + ApiService OAuth2Api + token *string +} + +func (r OAuth2ApiRevokeOAuth2TokenRequest) Token(token string) OAuth2ApiRevokeOAuth2TokenRequest { + r.token = &token + return r +} + +func (r OAuth2ApiRevokeOAuth2TokenRequest) Execute() (*http.Response, error) { + return r.ApiService.RevokeOAuth2TokenExecute(r) +} + +/* +RevokeOAuth2Token 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiRevokeOAuth2TokenRequest +*/ +func (a *OAuth2ApiService) RevokeOAuth2Token(ctx context.Context) OAuth2ApiRevokeOAuth2TokenRequest { + return OAuth2ApiRevokeOAuth2TokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *OAuth2ApiService) RevokeOAuth2TokenExecute(r OAuth2ApiRevokeOAuth2TokenRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.RevokeOAuth2Token") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/oauth2/revoke" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.token == nil { + return nil, reportError("token is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + localVarFormParams.Add("token", parameterToString(*r.token, "")) + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OAuth2ApiSetOAuth2ClientRequest struct { + ctx context.Context + ApiService OAuth2Api + id string + oAuth2Client *OAuth2Client +} + +// OAuth 2.0 Client Request Body +func (r OAuth2ApiSetOAuth2ClientRequest) OAuth2Client(oAuth2Client OAuth2Client) OAuth2ApiSetOAuth2ClientRequest { + r.oAuth2Client = &oAuth2Client + return r +} + +func (r OAuth2ApiSetOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { + return r.ApiService.SetOAuth2ClientExecute(r) +} + +/* +SetOAuth2Client 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OAuth 2.0 Client ID + @return OAuth2ApiSetOAuth2ClientRequest +*/ +func (a *OAuth2ApiService) SetOAuth2Client(ctx context.Context, id string) OAuth2ApiSetOAuth2ClientRequest { + return OAuth2ApiSetOAuth2ClientRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return OAuth2Client +func (a *OAuth2ApiService) SetOAuth2ClientExecute(r OAuth2ApiSetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2Client + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.SetOAuth2Client") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/clients/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oAuth2Client == nil { + return localVarReturnValue, nil, reportError("oAuth2Client is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.oAuth2Client + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiSetOAuth2ClientLifespansRequest struct { + ctx context.Context + ApiService OAuth2Api + id string + oAuth2ClientTokenLifespans *OAuth2ClientTokenLifespans +} + +func (r OAuth2ApiSetOAuth2ClientLifespansRequest) OAuth2ClientTokenLifespans(oAuth2ClientTokenLifespans OAuth2ClientTokenLifespans) OAuth2ApiSetOAuth2ClientLifespansRequest { + r.oAuth2ClientTokenLifespans = &oAuth2ClientTokenLifespans + return r +} + +func (r OAuth2ApiSetOAuth2ClientLifespansRequest) Execute() (*OAuth2Client, *http.Response, error) { + return r.ApiService.SetOAuth2ClientLifespansExecute(r) +} + +/* +SetOAuth2ClientLifespans Set OAuth2 Client Token Lifespans + +Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OAuth 2.0 Client ID + @return OAuth2ApiSetOAuth2ClientLifespansRequest +*/ +func (a *OAuth2ApiService) SetOAuth2ClientLifespans(ctx context.Context, id string) OAuth2ApiSetOAuth2ClientLifespansRequest { + return OAuth2ApiSetOAuth2ClientLifespansRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return OAuth2Client +func (a *OAuth2ApiService) SetOAuth2ClientLifespansExecute(r OAuth2ApiSetOAuth2ClientLifespansRequest) (*OAuth2Client, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2Client + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.SetOAuth2ClientLifespans") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/clients/{id}/lifespans" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.oAuth2ClientTokenLifespans + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OAuth2ApiTrustOAuth2JwtGrantIssuerRequest struct { + ctx context.Context + ApiService OAuth2Api + trustOAuth2JwtGrantIssuer *TrustOAuth2JwtGrantIssuer +} + +func (r OAuth2ApiTrustOAuth2JwtGrantIssuerRequest) TrustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer) OAuth2ApiTrustOAuth2JwtGrantIssuerRequest { + r.trustOAuth2JwtGrantIssuer = &trustOAuth2JwtGrantIssuer + return r +} + +func (r OAuth2ApiTrustOAuth2JwtGrantIssuerRequest) Execute() (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) { + return r.ApiService.TrustOAuth2JwtGrantIssuerExecute(r) +} + +/* +TrustOAuth2JwtGrantIssuer 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OAuth2ApiTrustOAuth2JwtGrantIssuerRequest +*/ +func (a *OAuth2ApiService) TrustOAuth2JwtGrantIssuer(ctx context.Context) OAuth2ApiTrustOAuth2JwtGrantIssuerRequest { + return OAuth2ApiTrustOAuth2JwtGrantIssuerRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return TrustedOAuth2JwtGrantIssuer +func (a *OAuth2ApiService) TrustOAuth2JwtGrantIssuerExecute(r OAuth2ApiTrustOAuth2JwtGrantIssuerRequest) (*TrustedOAuth2JwtGrantIssuer, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TrustedOAuth2JwtGrantIssuer + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OAuth2ApiService.TrustOAuth2JwtGrantIssuer") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/admin/trust/grants/jwt-bearer/issuers" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.trustOAuth2JwtGrantIssuer + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/clients/hydra/go/api_oidc.go b/clients/hydra/go/api_oidc.go new file mode 100644 index 00000000000..a3dab4e883a --- /dev/null +++ b/clients/hydra/go/api_oidc.go @@ -0,0 +1,1002 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + + +type OidcApi interface { + + /* + CreateOidcDynamicClient 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OidcApiCreateOidcDynamicClientRequest + */ + CreateOidcDynamicClient(ctx context.Context) OidcApiCreateOidcDynamicClientRequest + + // CreateOidcDynamicClientExecute executes the request + // @return OAuth2Client + CreateOidcDynamicClientExecute(r OidcApiCreateOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) + + /* + DeleteOidcDynamicClient 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OidcApiDeleteOidcDynamicClientRequest + */ + DeleteOidcDynamicClient(ctx context.Context, id string) OidcApiDeleteOidcDynamicClientRequest + + // DeleteOidcDynamicClientExecute executes the request + DeleteOidcDynamicClientExecute(r OidcApiDeleteOidcDynamicClientRequest) (*http.Response, error) + + /* + 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/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OidcApiDiscoverOidcConfigurationRequest + */ + DiscoverOidcConfiguration(ctx context.Context) OidcApiDiscoverOidcConfigurationRequest + + // DiscoverOidcConfigurationExecute executes the request + // @return OidcConfiguration + DiscoverOidcConfigurationExecute(r OidcApiDiscoverOidcConfigurationRequest) (*OidcConfiguration, *http.Response, error) + + /* + GetOidcDynamicClient 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OidcApiGetOidcDynamicClientRequest + */ + GetOidcDynamicClient(ctx context.Context, id string) OidcApiGetOidcDynamicClientRequest + + // GetOidcDynamicClientExecute executes the request + // @return OAuth2Client + GetOidcDynamicClientExecute(r OidcApiGetOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) + + /* + 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OidcApiGetOidcUserInfoRequest + */ + GetOidcUserInfo(ctx context.Context) OidcApiGetOidcUserInfoRequest + + // GetOidcUserInfoExecute executes the request + // @return OidcUserInfo + GetOidcUserInfoExecute(r OidcApiGetOidcUserInfoRequest) (*OidcUserInfo, *http.Response, error) + + /* + 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OidcApiRevokeOidcSessionRequest + */ + RevokeOidcSession(ctx context.Context) OidcApiRevokeOidcSessionRequest + + // RevokeOidcSessionExecute executes the request + RevokeOidcSessionExecute(r OidcApiRevokeOidcSessionRequest) (*http.Response, error) + + /* + SetOidcDynamicClient 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OAuth 2.0 Client ID + @return OidcApiSetOidcDynamicClientRequest + */ + SetOidcDynamicClient(ctx context.Context, id string) OidcApiSetOidcDynamicClientRequest + + // SetOidcDynamicClientExecute executes the request + // @return OAuth2Client + SetOidcDynamicClientExecute(r OidcApiSetOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) +} + +// OidcApiService OidcApi service +type OidcApiService service + +type OidcApiCreateOidcDynamicClientRequest struct { + ctx context.Context + ApiService OidcApi + oAuth2Client *OAuth2Client +} + +// Dynamic Client Registration Request Body +func (r OidcApiCreateOidcDynamicClientRequest) OAuth2Client(oAuth2Client OAuth2Client) OidcApiCreateOidcDynamicClientRequest { + r.oAuth2Client = &oAuth2Client + return r +} + +func (r OidcApiCreateOidcDynamicClientRequest) Execute() (*OAuth2Client, *http.Response, error) { + return r.ApiService.CreateOidcDynamicClientExecute(r) +} + +/* +CreateOidcDynamicClient 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OidcApiCreateOidcDynamicClientRequest +*/ +func (a *OidcApiService) CreateOidcDynamicClient(ctx context.Context) OidcApiCreateOidcDynamicClientRequest { + return OidcApiCreateOidcDynamicClientRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OAuth2Client +func (a *OidcApiService) CreateOidcDynamicClientExecute(r OidcApiCreateOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2Client + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OidcApiService.CreateOidcDynamicClient") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/oauth2/register" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oAuth2Client == nil { + return localVarReturnValue, nil, reportError("oAuth2Client is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.oAuth2Client + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OidcApiDeleteOidcDynamicClientRequest struct { + ctx context.Context + ApiService OidcApi + id string +} + +func (r OidcApiDeleteOidcDynamicClientRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteOidcDynamicClientExecute(r) +} + +/* +DeleteOidcDynamicClient 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OidcApiDeleteOidcDynamicClientRequest +*/ +func (a *OidcApiService) DeleteOidcDynamicClient(ctx context.Context, id string) OidcApiDeleteOidcDynamicClientRequest { + return OidcApiDeleteOidcDynamicClientRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +func (a *OidcApiService) DeleteOidcDynamicClientExecute(r OidcApiDeleteOidcDynamicClientRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OidcApiService.DeleteOidcDynamicClient") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/oauth2/register/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v GenericError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OidcApiDiscoverOidcConfigurationRequest struct { + ctx context.Context + ApiService OidcApi +} + +func (r OidcApiDiscoverOidcConfigurationRequest) Execute() (*OidcConfiguration, *http.Response, error) { + return r.ApiService.DiscoverOidcConfigurationExecute(r) +} + +/* +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/ + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OidcApiDiscoverOidcConfigurationRequest +*/ +func (a *OidcApiService) DiscoverOidcConfiguration(ctx context.Context) OidcApiDiscoverOidcConfigurationRequest { + return OidcApiDiscoverOidcConfigurationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OidcConfiguration +func (a *OidcApiService) DiscoverOidcConfigurationExecute(r OidcApiDiscoverOidcConfigurationRequest) (*OidcConfiguration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OidcConfiguration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OidcApiService.DiscoverOidcConfiguration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/.well-known/openid-configuration" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OidcApiGetOidcDynamicClientRequest struct { + ctx context.Context + ApiService OidcApi + id string +} + +func (r OidcApiGetOidcDynamicClientRequest) Execute() (*OAuth2Client, *http.Response, error) { + return r.ApiService.GetOidcDynamicClientExecute(r) +} + +/* +GetOidcDynamicClient 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The id of the OAuth 2.0 Client. + @return OidcApiGetOidcDynamicClientRequest +*/ +func (a *OidcApiService) GetOidcDynamicClient(ctx context.Context, id string) OidcApiGetOidcDynamicClientRequest { + return OidcApiGetOidcDynamicClientRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return OAuth2Client +func (a *OidcApiService) GetOidcDynamicClientExecute(r OidcApiGetOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2Client + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OidcApiService.GetOidcDynamicClient") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/oauth2/register/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OidcApiGetOidcUserInfoRequest struct { + ctx context.Context + ApiService OidcApi +} + +func (r OidcApiGetOidcUserInfoRequest) Execute() (*OidcUserInfo, *http.Response, error) { + return r.ApiService.GetOidcUserInfoExecute(r) +} + +/* +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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OidcApiGetOidcUserInfoRequest +*/ +func (a *OidcApiService) GetOidcUserInfo(ctx context.Context) OidcApiGetOidcUserInfoRequest { + return OidcApiGetOidcUserInfoRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return OidcUserInfo +func (a *OidcApiService) GetOidcUserInfoExecute(r OidcApiGetOidcUserInfoRequest) (*OidcUserInfo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OidcUserInfo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OidcApiService.GetOidcUserInfo") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/userinfo" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type OidcApiRevokeOidcSessionRequest struct { + ctx context.Context + ApiService OidcApi +} + +func (r OidcApiRevokeOidcSessionRequest) Execute() (*http.Response, error) { + return r.ApiService.RevokeOidcSessionExecute(r) +} + +/* +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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return OidcApiRevokeOidcSessionRequest +*/ +func (a *OidcApiService) RevokeOidcSession(ctx context.Context) OidcApiRevokeOidcSessionRequest { + return OidcApiRevokeOidcSessionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *OidcApiService) RevokeOidcSessionExecute(r OidcApiRevokeOidcSessionRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OidcApiService.RevokeOidcSession") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/oauth2/sessions/logout" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type OidcApiSetOidcDynamicClientRequest struct { + ctx context.Context + ApiService OidcApi + id string + oAuth2Client *OAuth2Client +} + +// OAuth 2.0 Client Request Body +func (r OidcApiSetOidcDynamicClientRequest) OAuth2Client(oAuth2Client OAuth2Client) OidcApiSetOidcDynamicClientRequest { + r.oAuth2Client = &oAuth2Client + return r +} + +func (r OidcApiSetOidcDynamicClientRequest) Execute() (*OAuth2Client, *http.Response, error) { + return r.ApiService.SetOidcDynamicClientExecute(r) +} + +/* +SetOidcDynamicClient 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id OAuth 2.0 Client ID + @return OidcApiSetOidcDynamicClientRequest +*/ +func (a *OidcApiService) SetOidcDynamicClient(ctx context.Context, id string) OidcApiSetOidcDynamicClientRequest { + return OidcApiSetOidcDynamicClientRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return OAuth2Client +func (a *OidcApiService) SetOidcDynamicClientExecute(r OidcApiSetOidcDynamicClientRequest) (*OAuth2Client, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *OAuth2Client + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OidcApiService.SetOidcDynamicClient") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/oauth2/register/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.oAuth2Client == nil { + return localVarReturnValue, nil, reportError("oAuth2Client is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.oAuth2Client + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/clients/hydra/go/api_public.go b/clients/hydra/go/api_public.go deleted file mode 100644 index a6468f8d04d..00000000000 --- a/clients/hydra/go/api_public.go +++ /dev/null @@ -1,1771 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - -// Linger please -var ( - _ context.Context -) - -type PublicApi interface { - - /* - * DisconnectUser OpenID Connect Front-Backchannel Enabled Logout - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiDisconnectUserRequest - */ - DisconnectUser(ctx context.Context) PublicApiApiDisconnectUserRequest - - /* - * DisconnectUserExecute executes the request - */ - DisconnectUserExecute(r PublicApiApiDisconnectUserRequest) (*http.Response, error) - - /* - * DiscoverOpenIDConfiguration OpenID Connect Discovery - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll -your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this -flow at https://openid.net/specs/openid-connect-discovery-1_0.html . - -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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiDiscoverOpenIDConfigurationRequest - */ - DiscoverOpenIDConfiguration(ctx context.Context) PublicApiApiDiscoverOpenIDConfigurationRequest - - /* - * DiscoverOpenIDConfigurationExecute executes the request - * @return WellKnown - */ - DiscoverOpenIDConfigurationExecute(r PublicApiApiDiscoverOpenIDConfigurationRequest) (*WellKnown, *http.Response, error) - - /* - * DynamicClientRegistrationCreateOAuth2Client Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest - */ - DynamicClientRegistrationCreateOAuth2Client(ctx context.Context) PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest - - /* - * DynamicClientRegistrationCreateOAuth2ClientExecute executes the request - * @return OAuth2Client - */ - DynamicClientRegistrationCreateOAuth2ClientExecute(r PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) - - /* - * DynamicClientRegistrationDeleteOAuth2Client Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return PublicApiApiDynamicClientRegistrationDeleteOAuth2ClientRequest - */ - DynamicClientRegistrationDeleteOAuth2Client(ctx context.Context, id string) PublicApiApiDynamicClientRegistrationDeleteOAuth2ClientRequest - - /* - * DynamicClientRegistrationDeleteOAuth2ClientExecute executes the request - */ - DynamicClientRegistrationDeleteOAuth2ClientExecute(r PublicApiApiDynamicClientRegistrationDeleteOAuth2ClientRequest) (*http.Response, error) - - /* - * DynamicClientRegistrationGetOAuth2Client Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * 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. 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return PublicApiApiDynamicClientRegistrationGetOAuth2ClientRequest - */ - DynamicClientRegistrationGetOAuth2Client(ctx context.Context, id string) PublicApiApiDynamicClientRegistrationGetOAuth2ClientRequest - - /* - * DynamicClientRegistrationGetOAuth2ClientExecute executes the request - * @return OAuth2Client - */ - DynamicClientRegistrationGetOAuth2ClientExecute(r PublicApiApiDynamicClientRegistrationGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) - - /* - * DynamicClientRegistrationUpdateOAuth2Client Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. - -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. - -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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest - */ - DynamicClientRegistrationUpdateOAuth2Client(ctx context.Context, id string) PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest - - /* - * DynamicClientRegistrationUpdateOAuth2ClientExecute executes the request - * @return OAuth2Client - */ - DynamicClientRegistrationUpdateOAuth2ClientExecute(r PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) - - /* - * IsInstanceReady Check Readiness Status - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never -refer to the cluster state, only to a single instance. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiIsInstanceReadyRequest - */ - IsInstanceReady(ctx context.Context) PublicApiApiIsInstanceReadyRequest - - /* - * IsInstanceReadyExecute executes the request - * @return HealthStatus - */ - IsInstanceReadyExecute(r PublicApiApiIsInstanceReadyRequest) (*HealthStatus, *http.Response, error) - - /* - * Oauth2Token The OAuth 2.0 Token Endpoint - * The client makes a request to the token endpoint by sending the -following parameters using the "application/x-www-form-urlencoded" HTTP -request entity-body. - -> Do not implement a client for this endpoint yourself. Use a library. There are many libraries -> available for any programming language. You can find a list of libraries here: https://oauth.net/code/ -> -> Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiOauth2TokenRequest - */ - Oauth2Token(ctx context.Context) PublicApiApiOauth2TokenRequest - - /* - * Oauth2TokenExecute executes the request - * @return Oauth2TokenResponse - */ - Oauth2TokenExecute(r PublicApiApiOauth2TokenRequest) (*Oauth2TokenResponse, *http.Response, error) - - /* - * OauthAuth The OAuth 2.0 Authorize Endpoint - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. -OAuth2 is a very popular protocol and a library for your programming language will exists. - -To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiOauthAuthRequest - */ - OauthAuth(ctx context.Context) PublicApiApiOauthAuthRequest - - /* - * OauthAuthExecute executes the request - */ - OauthAuthExecute(r PublicApiApiOauthAuthRequest) (*http.Response, error) - - /* - * RevokeOAuth2Token Revoke OAuth2 Tokens - * 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiRevokeOAuth2TokenRequest - */ - RevokeOAuth2Token(ctx context.Context) PublicApiApiRevokeOAuth2TokenRequest - - /* - * RevokeOAuth2TokenExecute executes the request - */ - RevokeOAuth2TokenExecute(r PublicApiApiRevokeOAuth2TokenRequest) (*http.Response, error) - - /* - * Userinfo OpenID Connect Userinfo - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of -the provided OAuth 2.0 Access Token. - -For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). - -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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiUserinfoRequest - */ - Userinfo(ctx context.Context) PublicApiApiUserinfoRequest - - /* - * UserinfoExecute executes the request - * @return UserinfoResponse - */ - UserinfoExecute(r PublicApiApiUserinfoRequest) (*UserinfoResponse, *http.Response, error) - - /* - * WellKnown JSON Web Keys Discovery - * This endpoint returns JSON Web Keys to be used as public keys for 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiWellKnownRequest - */ - WellKnown(ctx context.Context) PublicApiApiWellKnownRequest - - /* - * WellKnownExecute executes the request - * @return JSONWebKeySet - */ - WellKnownExecute(r PublicApiApiWellKnownRequest) (*JSONWebKeySet, *http.Response, error) -} - -// PublicApiService PublicApi service -type PublicApiService service - -type PublicApiApiDisconnectUserRequest struct { - ctx context.Context - ApiService PublicApi -} - - -func (r PublicApiApiDisconnectUserRequest) Execute() (*http.Response, error) { - return r.ApiService.DisconnectUserExecute(r) -} - -/* - * DisconnectUser OpenID Connect Front-Backchannel Enabled Logout - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiDisconnectUserRequest - */ -func (a *PublicApiService) DisconnectUser(ctx context.Context) PublicApiApiDisconnectUserRequest { - return PublicApiApiDisconnectUserRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - */ -func (a *PublicApiService) DisconnectUserExecute(r PublicApiApiDisconnectUserRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.DisconnectUser") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/sessions/logout" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type PublicApiApiDiscoverOpenIDConfigurationRequest struct { - ctx context.Context - ApiService PublicApi -} - - -func (r PublicApiApiDiscoverOpenIDConfigurationRequest) Execute() (*WellKnown, *http.Response, error) { - return r.ApiService.DiscoverOpenIDConfigurationExecute(r) -} - -/* - * DiscoverOpenIDConfiguration OpenID Connect Discovery - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll -your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this -flow at https://openid.net/specs/openid-connect-discovery-1_0.html . - -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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiDiscoverOpenIDConfigurationRequest - */ -func (a *PublicApiService) DiscoverOpenIDConfiguration(ctx context.Context) PublicApiApiDiscoverOpenIDConfigurationRequest { - return PublicApiApiDiscoverOpenIDConfigurationRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return WellKnown - */ -func (a *PublicApiService) DiscoverOpenIDConfigurationExecute(r PublicApiApiDiscoverOpenIDConfigurationRequest) (*WellKnown, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *WellKnown - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.DiscoverOpenIDConfiguration") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/.well-known/openid-configuration" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest struct { - ctx context.Context - ApiService PublicApi - body *OAuth2Client -} - -func (r PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest) Body(body OAuth2Client) PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest { - r.body = &body - return r -} - -func (r PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { - return r.ApiService.DynamicClientRegistrationCreateOAuth2ClientExecute(r) -} - -/* - * DynamicClientRegistrationCreateOAuth2Client Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest - */ -func (a *PublicApiService) DynamicClientRegistrationCreateOAuth2Client(ctx context.Context) PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest { - return PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return OAuth2Client - */ -func (a *PublicApiService) DynamicClientRegistrationCreateOAuth2ClientExecute(r PublicApiApiDynamicClientRegistrationCreateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *OAuth2Client - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.DynamicClientRegistrationCreateOAuth2Client") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/connect/register" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type PublicApiApiDynamicClientRegistrationDeleteOAuth2ClientRequest struct { - ctx context.Context - ApiService PublicApi - id string -} - - -func (r PublicApiApiDynamicClientRegistrationDeleteOAuth2ClientRequest) Execute() (*http.Response, error) { - return r.ApiService.DynamicClientRegistrationDeleteOAuth2ClientExecute(r) -} - -/* - * DynamicClientRegistrationDeleteOAuth2Client Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return PublicApiApiDynamicClientRegistrationDeleteOAuth2ClientRequest - */ -func (a *PublicApiService) DynamicClientRegistrationDeleteOAuth2Client(ctx context.Context, id string) PublicApiApiDynamicClientRegistrationDeleteOAuth2ClientRequest { - return PublicApiApiDynamicClientRegistrationDeleteOAuth2ClientRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -/* - * Execute executes the request - */ -func (a *PublicApiService) DynamicClientRegistrationDeleteOAuth2ClientExecute(r PublicApiApiDynamicClientRegistrationDeleteOAuth2ClientRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.DynamicClientRegistrationDeleteOAuth2Client") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/connect/register/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type PublicApiApiDynamicClientRegistrationGetOAuth2ClientRequest struct { - ctx context.Context - ApiService PublicApi - id string -} - - -func (r PublicApiApiDynamicClientRegistrationGetOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { - return r.ApiService.DynamicClientRegistrationGetOAuth2ClientExecute(r) -} - -/* - * DynamicClientRegistrationGetOAuth2Client Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * 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. 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return PublicApiApiDynamicClientRegistrationGetOAuth2ClientRequest - */ -func (a *PublicApiService) DynamicClientRegistrationGetOAuth2Client(ctx context.Context, id string) PublicApiApiDynamicClientRegistrationGetOAuth2ClientRequest { - return PublicApiApiDynamicClientRegistrationGetOAuth2ClientRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -/* - * Execute executes the request - * @return OAuth2Client - */ -func (a *PublicApiService) DynamicClientRegistrationGetOAuth2ClientExecute(r PublicApiApiDynamicClientRegistrationGetOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *OAuth2Client - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.DynamicClientRegistrationGetOAuth2Client") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/connect/register/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest struct { - ctx context.Context - ApiService PublicApi - id string - body *OAuth2Client -} - -func (r PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest) Body(body OAuth2Client) PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest { - r.body = &body - return r -} - -func (r PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest) Execute() (*OAuth2Client, *http.Response, error) { - return r.ApiService.DynamicClientRegistrationUpdateOAuth2ClientExecute(r) -} - -/* - * DynamicClientRegistrationUpdateOAuth2Client Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. - -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. - -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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param id The id of the OAuth 2.0 Client. - * @return PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest - */ -func (a *PublicApiService) DynamicClientRegistrationUpdateOAuth2Client(ctx context.Context, id string) PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest { - return PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest{ - ApiService: a, - ctx: ctx, - id: id, - } -} - -/* - * Execute executes the request - * @return OAuth2Client - */ -func (a *PublicApiService) DynamicClientRegistrationUpdateOAuth2ClientExecute(r PublicApiApiDynamicClientRegistrationUpdateOAuth2ClientRequest) (*OAuth2Client, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *OAuth2Client - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.DynamicClientRegistrationUpdateOAuth2Client") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/connect/register/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterToString(r.id, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.body - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type PublicApiApiIsInstanceReadyRequest struct { - ctx context.Context - ApiService PublicApi -} - - -func (r PublicApiApiIsInstanceReadyRequest) Execute() (*HealthStatus, *http.Response, error) { - return r.ApiService.IsInstanceReadyExecute(r) -} - -/* - * IsInstanceReady Check Readiness Status - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never -refer to the cluster state, only to a single instance. - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiIsInstanceReadyRequest - */ -func (a *PublicApiService) IsInstanceReady(ctx context.Context) PublicApiApiIsInstanceReadyRequest { - return PublicApiApiIsInstanceReadyRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return HealthStatus - */ -func (a *PublicApiService) IsInstanceReadyExecute(r PublicApiApiIsInstanceReadyRequest) (*HealthStatus, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *HealthStatus - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.IsInstanceReady") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/health/ready" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 503 { - var v HealthNotReadyStatus - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type PublicApiApiOauth2TokenRequest struct { - ctx context.Context - ApiService PublicApi - grantType *string - code *string - refreshToken *string - redirectUri *string - clientId *string -} - -func (r PublicApiApiOauth2TokenRequest) GrantType(grantType string) PublicApiApiOauth2TokenRequest { - r.grantType = &grantType - return r -} -func (r PublicApiApiOauth2TokenRequest) Code(code string) PublicApiApiOauth2TokenRequest { - r.code = &code - return r -} -func (r PublicApiApiOauth2TokenRequest) RefreshToken(refreshToken string) PublicApiApiOauth2TokenRequest { - r.refreshToken = &refreshToken - return r -} -func (r PublicApiApiOauth2TokenRequest) RedirectUri(redirectUri string) PublicApiApiOauth2TokenRequest { - r.redirectUri = &redirectUri - return r -} -func (r PublicApiApiOauth2TokenRequest) ClientId(clientId string) PublicApiApiOauth2TokenRequest { - r.clientId = &clientId - return r -} - -func (r PublicApiApiOauth2TokenRequest) Execute() (*Oauth2TokenResponse, *http.Response, error) { - return r.ApiService.Oauth2TokenExecute(r) -} - -/* - * Oauth2Token The OAuth 2.0 Token Endpoint - * The client makes a request to the token endpoint by sending the -following parameters using the "application/x-www-form-urlencoded" HTTP -request entity-body. - -> Do not implement a client for this endpoint yourself. Use a library. There are many libraries -> available for any programming language. You can find a list of libraries here: https://oauth.net/code/ -> -> Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiOauth2TokenRequest - */ -func (a *PublicApiService) Oauth2Token(ctx context.Context) PublicApiApiOauth2TokenRequest { - return PublicApiApiOauth2TokenRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return Oauth2TokenResponse - */ -func (a *PublicApiService) Oauth2TokenExecute(r PublicApiApiOauth2TokenRequest) (*Oauth2TokenResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *Oauth2TokenResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.Oauth2Token") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/token" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.grantType == nil { - return localVarReturnValue, nil, reportError("grantType is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarFormParams.Add("grant_type", parameterToString(*r.grantType, "")) - if r.code != nil { - localVarFormParams.Add("code", parameterToString(*r.code, "")) - } - if r.refreshToken != nil { - localVarFormParams.Add("refresh_token", parameterToString(*r.refreshToken, "")) - } - if r.redirectUri != nil { - localVarFormParams.Add("redirect_uri", parameterToString(*r.redirectUri, "")) - } - if r.clientId != nil { - localVarFormParams.Add("client_id", parameterToString(*r.clientId, "")) - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type PublicApiApiOauthAuthRequest struct { - ctx context.Context - ApiService PublicApi -} - - -func (r PublicApiApiOauthAuthRequest) Execute() (*http.Response, error) { - return r.ApiService.OauthAuthExecute(r) -} - -/* - * OauthAuth The OAuth 2.0 Authorize Endpoint - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. -OAuth2 is a very popular protocol and a library for your programming language will exists. - -To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiOauthAuthRequest - */ -func (a *PublicApiService) OauthAuth(ctx context.Context) PublicApiApiOauthAuthRequest { - return PublicApiApiOauthAuthRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - */ -func (a *PublicApiService) OauthAuthExecute(r PublicApiApiOauthAuthRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.OauthAuth") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/auth" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type PublicApiApiRevokeOAuth2TokenRequest struct { - ctx context.Context - ApiService PublicApi - token *string -} - -func (r PublicApiApiRevokeOAuth2TokenRequest) Token(token string) PublicApiApiRevokeOAuth2TokenRequest { - r.token = &token - return r -} - -func (r PublicApiApiRevokeOAuth2TokenRequest) Execute() (*http.Response, error) { - return r.ApiService.RevokeOAuth2TokenExecute(r) -} - -/* - * RevokeOAuth2Token Revoke OAuth2 Tokens - * 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiRevokeOAuth2TokenRequest - */ -func (a *PublicApiService) RevokeOAuth2Token(ctx context.Context) PublicApiApiRevokeOAuth2TokenRequest { - return PublicApiApiRevokeOAuth2TokenRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - */ -func (a *PublicApiService) RevokeOAuth2TokenExecute(r PublicApiApiRevokeOAuth2TokenRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.RevokeOAuth2Token") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/revoke" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.token == nil { - return nil, reportError("token is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - localVarFormParams.Add("token", parameterToString(*r.token, "")) - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type PublicApiApiUserinfoRequest struct { - ctx context.Context - ApiService PublicApi -} - - -func (r PublicApiApiUserinfoRequest) Execute() (*UserinfoResponse, *http.Response, error) { - return r.ApiService.UserinfoExecute(r) -} - -/* - * Userinfo OpenID Connect Userinfo - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of -the provided OAuth 2.0 Access Token. - -For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). - -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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiUserinfoRequest - */ -func (a *PublicApiService) Userinfo(ctx context.Context) PublicApiApiUserinfoRequest { - return PublicApiApiUserinfoRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return UserinfoResponse - */ -func (a *PublicApiService) UserinfoExecute(r PublicApiApiUserinfoRequest) (*UserinfoResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *UserinfoResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.Userinfo") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/userinfo" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type PublicApiApiWellKnownRequest struct { - ctx context.Context - ApiService PublicApi -} - - -func (r PublicApiApiWellKnownRequest) Execute() (*JSONWebKeySet, *http.Response, error) { - return r.ApiService.WellKnownExecute(r) -} - -/* - * WellKnown JSON Web Keys Discovery - * This endpoint returns JSON Web Keys to be used as public keys for 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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @return PublicApiApiWellKnownRequest - */ -func (a *PublicApiService) WellKnown(ctx context.Context) PublicApiApiWellKnownRequest { - return PublicApiApiWellKnownRequest{ - ApiService: a, - ctx: ctx, - } -} - -/* - * Execute executes the request - * @return JSONWebKeySet - */ -func (a *PublicApiService) WellKnownExecute(r PublicApiApiWellKnownRequest) (*JSONWebKeySet, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue *JSONWebKeySet - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicApiService.WellKnown") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/.well-known/jwks.json" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v JsonError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/clients/hydra/go/api_wellknown.go b/clients/hydra/go/api_wellknown.go new file mode 100644 index 00000000000..45df21d20c6 --- /dev/null +++ b/clients/hydra/go/api_wellknown.go @@ -0,0 +1,151 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" +) + + +type WellknownApi interface { + + /* + 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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return WellknownApiDiscoverJsonWebKeysRequest + */ + DiscoverJsonWebKeys(ctx context.Context) WellknownApiDiscoverJsonWebKeysRequest + + // DiscoverJsonWebKeysExecute executes the request + // @return JsonWebKeySet + DiscoverJsonWebKeysExecute(r WellknownApiDiscoverJsonWebKeysRequest) (*JsonWebKeySet, *http.Response, error) +} + +// WellknownApiService WellknownApi service +type WellknownApiService service + +type WellknownApiDiscoverJsonWebKeysRequest struct { + ctx context.Context + ApiService WellknownApi +} + +func (r WellknownApiDiscoverJsonWebKeysRequest) Execute() (*JsonWebKeySet, *http.Response, error) { + return r.ApiService.DiscoverJsonWebKeysExecute(r) +} + +/* +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. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return WellknownApiDiscoverJsonWebKeysRequest +*/ +func (a *WellknownApiService) DiscoverJsonWebKeys(ctx context.Context) WellknownApiDiscoverJsonWebKeysRequest { + return WellknownApiDiscoverJsonWebKeysRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return JsonWebKeySet +func (a *WellknownApiService) DiscoverJsonWebKeysExecute(r WellknownApiDiscoverJsonWebKeysRequest) (*JsonWebKeySet, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *JsonWebKeySet + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WellknownApiService.DiscoverJsonWebKeys") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/.well-known/jwks.json" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + var v ErrorOAuth2 + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/clients/hydra/go/client.go b/clients/hydra/go/client.go index bb92750e562..35f4116f3f0 100644 --- a/clients/hydra/go/client.go +++ b/clients/hydra/go/client.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -18,6 +19,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" "log" "mime/multipart" "net/http" @@ -40,7 +42,7 @@ var ( xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) ) -// APIClient manages communication with the ORY Hydra API vv1.11.0 +// APIClient manages communication with the Ory Hydra API API vv2.0.1 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -48,11 +50,15 @@ type APIClient struct { // API Services - AdminApi AdminApi + JwkApi JwkApi MetadataApi MetadataApi - PublicApi PublicApi + OAuth2Api OAuth2Api + + OidcApi OidcApi + + WellknownApi WellknownApi } type service struct { @@ -71,9 +77,11 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.AdminApi = (*AdminApiService)(&c.common) + c.JwkApi = (*JwkApiService)(&c.common) c.MetadataApi = (*MetadataApiService)(&c.common) - c.PublicApi = (*PublicApiService)(&c.common) + c.OAuth2Api = (*OAuth2ApiService)(&c.common) + c.OidcApi = (*OidcApiService)(&c.common) + c.WellknownApi = (*WellknownApiService)(&c.common) return c } @@ -106,10 +114,10 @@ func selectHeaderAccept(accepts []string) string { return strings.Join(accepts, ",") } -// contains is a case insenstive match, finding needle in a haystack +// contains is a case insensitive match, finding needle in a haystack func contains(haystack []string, needle string) bool { for _, a := range haystack { - if strings.ToLower(a) == strings.ToLower(needle) { + if strings.EqualFold(a, needle) { return true } } @@ -194,6 +202,12 @@ func (c *APIClient) GetConfig() *Configuration { return c.cfg } +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + // prepareRequest build the request func (c *APIClient) prepareRequest( ctx context.Context, @@ -202,9 +216,7 @@ func (c *APIClient) prepareRequest( headerParams map[string]string, queryParams url.Values, formParams url.Values, - formFileName string, - fileName string, - fileBytes []byte) (localVarRequest *http.Request, err error) { + formFiles []formFile) (localVarRequest *http.Request, err error) { var body *bytes.Buffer @@ -223,7 +235,7 @@ func (c *APIClient) prepareRequest( } // add form parameters and file if available. - if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { if body != nil { return nil, errors.New("Cannot specify postBody and multipart form at the same time.") } @@ -242,16 +254,17 @@ func (c *APIClient) prepareRequest( } } } - if len(fileBytes) > 0 && fileName != "" { - w.Boundary() - //_, fileNm := filepath.Split(fileName) - part, err := w.CreateFormFile(formFileName, filepath.Base(fileName)) - if err != nil { - return nil, err - } - _, err = part.Write(fileBytes) - if err != nil { - return nil, err + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } } } @@ -314,7 +327,7 @@ func (c *APIClient) prepareRequest( if len(headerParams) > 0 { headers := http.Header{} for h, v := range headerParams { - headers.Set(h, v) + headers[h] = []string{v} } localVarRequest.Header = headers } @@ -365,6 +378,18 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if f, ok := v.(**os.File); ok { + *f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } if xmlCheck.MatchString(contentType) { if err = xml.Unmarshal(b, v); err != nil { return err @@ -390,11 +415,14 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err // Add a file to the multipart request func addFile(w *multipart.Writer, fieldName, path string) error { - file, err := os.Open(path) + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() if err != nil { return err } - defer file.Close() part, err := w.CreateFormFile(fieldName, filepath.Base(path)) if err != nil { diff --git a/clients/hydra/go/configuration.go b/clients/hydra/go/configuration.go index 9f8381857b6..03d1424c998 100644 --- a/clients/hydra/go/configuration.go +++ b/clients/hydra/go/configuration.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/clients/hydra/go/docs/AcceptConsentRequest.md b/clients/hydra/go/docs/AcceptOAuth2ConsentRequest.md similarity index 64% rename from clients/hydra/go/docs/AcceptConsentRequest.md rename to clients/hydra/go/docs/AcceptOAuth2ConsentRequest.md index 2f21725a69d..ec518b5d77d 100644 --- a/clients/hydra/go/docs/AcceptConsentRequest.md +++ b/clients/hydra/go/docs/AcceptOAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# AcceptConsentRequest +# AcceptOAuth2ConsentRequest ## Properties @@ -9,174 +9,174 @@ Name | Type | Description | Notes **HandledAt** | Pointer to **time.Time** | | [optional] **Remember** | Pointer to **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] **RememberFor** | Pointer to **int64** | 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** | Pointer to [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] +**Session** | Pointer to [**AcceptOAuth2ConsentRequestSession**](AcceptOAuth2ConsentRequestSession.md) | | [optional] ## Methods -### NewAcceptConsentRequest +### NewAcceptOAuth2ConsentRequest -`func NewAcceptConsentRequest() *AcceptConsentRequest` +`func NewAcceptOAuth2ConsentRequest() *AcceptOAuth2ConsentRequest` -NewAcceptConsentRequest instantiates a new AcceptConsentRequest object +NewAcceptOAuth2ConsentRequest instantiates a new AcceptOAuth2ConsentRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewAcceptConsentRequestWithDefaults +### NewAcceptOAuth2ConsentRequestWithDefaults -`func NewAcceptConsentRequestWithDefaults() *AcceptConsentRequest` +`func NewAcceptOAuth2ConsentRequestWithDefaults() *AcceptOAuth2ConsentRequest` -NewAcceptConsentRequestWithDefaults instantiates a new AcceptConsentRequest object +NewAcceptOAuth2ConsentRequestWithDefaults instantiates a new AcceptOAuth2ConsentRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetGrantAccessTokenAudience -`func (o *AcceptConsentRequest) GetGrantAccessTokenAudience() []string` +`func (o *AcceptOAuth2ConsentRequest) GetGrantAccessTokenAudience() []string` GetGrantAccessTokenAudience returns the GrantAccessTokenAudience field if non-nil, zero value otherwise. ### GetGrantAccessTokenAudienceOk -`func (o *AcceptConsentRequest) GetGrantAccessTokenAudienceOk() (*[]string, bool)` +`func (o *AcceptOAuth2ConsentRequest) GetGrantAccessTokenAudienceOk() (*[]string, bool)` GetGrantAccessTokenAudienceOk returns a tuple with the GrantAccessTokenAudience field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGrantAccessTokenAudience -`func (o *AcceptConsentRequest) SetGrantAccessTokenAudience(v []string)` +`func (o *AcceptOAuth2ConsentRequest) SetGrantAccessTokenAudience(v []string)` SetGrantAccessTokenAudience sets GrantAccessTokenAudience field to given value. ### HasGrantAccessTokenAudience -`func (o *AcceptConsentRequest) HasGrantAccessTokenAudience() bool` +`func (o *AcceptOAuth2ConsentRequest) HasGrantAccessTokenAudience() bool` HasGrantAccessTokenAudience returns a boolean if a field has been set. ### GetGrantScope -`func (o *AcceptConsentRequest) GetGrantScope() []string` +`func (o *AcceptOAuth2ConsentRequest) GetGrantScope() []string` GetGrantScope returns the GrantScope field if non-nil, zero value otherwise. ### GetGrantScopeOk -`func (o *AcceptConsentRequest) GetGrantScopeOk() (*[]string, bool)` +`func (o *AcceptOAuth2ConsentRequest) GetGrantScopeOk() (*[]string, bool)` GetGrantScopeOk returns a tuple with the GrantScope field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGrantScope -`func (o *AcceptConsentRequest) SetGrantScope(v []string)` +`func (o *AcceptOAuth2ConsentRequest) SetGrantScope(v []string)` SetGrantScope sets GrantScope field to given value. ### HasGrantScope -`func (o *AcceptConsentRequest) HasGrantScope() bool` +`func (o *AcceptOAuth2ConsentRequest) HasGrantScope() bool` HasGrantScope returns a boolean if a field has been set. ### GetHandledAt -`func (o *AcceptConsentRequest) GetHandledAt() time.Time` +`func (o *AcceptOAuth2ConsentRequest) GetHandledAt() time.Time` GetHandledAt returns the HandledAt field if non-nil, zero value otherwise. ### GetHandledAtOk -`func (o *AcceptConsentRequest) GetHandledAtOk() (*time.Time, bool)` +`func (o *AcceptOAuth2ConsentRequest) GetHandledAtOk() (*time.Time, bool)` GetHandledAtOk returns a tuple with the HandledAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHandledAt -`func (o *AcceptConsentRequest) SetHandledAt(v time.Time)` +`func (o *AcceptOAuth2ConsentRequest) SetHandledAt(v time.Time)` SetHandledAt sets HandledAt field to given value. ### HasHandledAt -`func (o *AcceptConsentRequest) HasHandledAt() bool` +`func (o *AcceptOAuth2ConsentRequest) HasHandledAt() bool` HasHandledAt returns a boolean if a field has been set. ### GetRemember -`func (o *AcceptConsentRequest) GetRemember() bool` +`func (o *AcceptOAuth2ConsentRequest) GetRemember() bool` GetRemember returns the Remember field if non-nil, zero value otherwise. ### GetRememberOk -`func (o *AcceptConsentRequest) GetRememberOk() (*bool, bool)` +`func (o *AcceptOAuth2ConsentRequest) GetRememberOk() (*bool, bool)` GetRememberOk returns a tuple with the Remember field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRemember -`func (o *AcceptConsentRequest) SetRemember(v bool)` +`func (o *AcceptOAuth2ConsentRequest) SetRemember(v bool)` SetRemember sets Remember field to given value. ### HasRemember -`func (o *AcceptConsentRequest) HasRemember() bool` +`func (o *AcceptOAuth2ConsentRequest) HasRemember() bool` HasRemember returns a boolean if a field has been set. ### GetRememberFor -`func (o *AcceptConsentRequest) GetRememberFor() int64` +`func (o *AcceptOAuth2ConsentRequest) GetRememberFor() int64` GetRememberFor returns the RememberFor field if non-nil, zero value otherwise. ### GetRememberForOk -`func (o *AcceptConsentRequest) GetRememberForOk() (*int64, bool)` +`func (o *AcceptOAuth2ConsentRequest) GetRememberForOk() (*int64, bool)` GetRememberForOk returns a tuple with the RememberFor field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRememberFor -`func (o *AcceptConsentRequest) SetRememberFor(v int64)` +`func (o *AcceptOAuth2ConsentRequest) SetRememberFor(v int64)` SetRememberFor sets RememberFor field to given value. ### HasRememberFor -`func (o *AcceptConsentRequest) HasRememberFor() bool` +`func (o *AcceptOAuth2ConsentRequest) HasRememberFor() bool` HasRememberFor returns a boolean if a field has been set. ### GetSession -`func (o *AcceptConsentRequest) GetSession() ConsentRequestSession` +`func (o *AcceptOAuth2ConsentRequest) GetSession() AcceptOAuth2ConsentRequestSession` GetSession returns the Session field if non-nil, zero value otherwise. ### GetSessionOk -`func (o *AcceptConsentRequest) GetSessionOk() (*ConsentRequestSession, bool)` +`func (o *AcceptOAuth2ConsentRequest) GetSessionOk() (*AcceptOAuth2ConsentRequestSession, bool)` GetSessionOk returns a tuple with the Session field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSession -`func (o *AcceptConsentRequest) SetSession(v ConsentRequestSession)` +`func (o *AcceptOAuth2ConsentRequest) SetSession(v AcceptOAuth2ConsentRequestSession)` SetSession sets Session field to given value. ### HasSession -`func (o *AcceptConsentRequest) HasSession() bool` +`func (o *AcceptOAuth2ConsentRequest) HasSession() bool` HasSession returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/AcceptOAuth2ConsentRequestSession.md b/clients/hydra/go/docs/AcceptOAuth2ConsentRequestSession.md new file mode 100644 index 00000000000..4e888d48baf --- /dev/null +++ b/clients/hydra/go/docs/AcceptOAuth2ConsentRequestSession.md @@ -0,0 +1,102 @@ +# AcceptOAuth2ConsentRequestSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | Pointer to **interface{}** | 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] +**IdToken** | Pointer to **interface{}** | 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] + +## Methods + +### NewAcceptOAuth2ConsentRequestSession + +`func NewAcceptOAuth2ConsentRequestSession() *AcceptOAuth2ConsentRequestSession` + +NewAcceptOAuth2ConsentRequestSession instantiates a new AcceptOAuth2ConsentRequestSession object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAcceptOAuth2ConsentRequestSessionWithDefaults + +`func NewAcceptOAuth2ConsentRequestSessionWithDefaults() *AcceptOAuth2ConsentRequestSession` + +NewAcceptOAuth2ConsentRequestSessionWithDefaults instantiates a new AcceptOAuth2ConsentRequestSession object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessToken + +`func (o *AcceptOAuth2ConsentRequestSession) GetAccessToken() interface{}` + +GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. + +### GetAccessTokenOk + +`func (o *AcceptOAuth2ConsentRequestSession) GetAccessTokenOk() (*interface{}, bool)` + +GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessToken + +`func (o *AcceptOAuth2ConsentRequestSession) SetAccessToken(v interface{})` + +SetAccessToken sets AccessToken field to given value. + +### HasAccessToken + +`func (o *AcceptOAuth2ConsentRequestSession) HasAccessToken() bool` + +HasAccessToken returns a boolean if a field has been set. + +### SetAccessTokenNil + +`func (o *AcceptOAuth2ConsentRequestSession) SetAccessTokenNil(b bool)` + + SetAccessTokenNil sets the value for AccessToken to be an explicit nil + +### UnsetAccessToken +`func (o *AcceptOAuth2ConsentRequestSession) UnsetAccessToken()` + +UnsetAccessToken ensures that no value is present for AccessToken, not even an explicit nil +### GetIdToken + +`func (o *AcceptOAuth2ConsentRequestSession) GetIdToken() interface{}` + +GetIdToken returns the IdToken field if non-nil, zero value otherwise. + +### GetIdTokenOk + +`func (o *AcceptOAuth2ConsentRequestSession) GetIdTokenOk() (*interface{}, bool)` + +GetIdTokenOk returns a tuple with the IdToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdToken + +`func (o *AcceptOAuth2ConsentRequestSession) SetIdToken(v interface{})` + +SetIdToken sets IdToken field to given value. + +### HasIdToken + +`func (o *AcceptOAuth2ConsentRequestSession) HasIdToken() bool` + +HasIdToken returns a boolean if a field has been set. + +### SetIdTokenNil + +`func (o *AcceptOAuth2ConsentRequestSession) SetIdTokenNil(b bool)` + + SetIdTokenNil sets the value for IdToken to be an explicit nil + +### UnsetIdToken +`func (o *AcceptOAuth2ConsentRequestSession) UnsetIdToken()` + +UnsetIdToken ensures that no value is present for IdToken, not even an explicit nil + +[[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/go/docs/AcceptLoginRequest.md b/clients/hydra/go/docs/AcceptOAuth2LoginRequest.md similarity index 70% rename from clients/hydra/go/docs/AcceptLoginRequest.md rename to clients/hydra/go/docs/AcceptOAuth2LoginRequest.md index f5187ada471..80bf2c5ef5e 100644 --- a/clients/hydra/go/docs/AcceptLoginRequest.md +++ b/clients/hydra/go/docs/AcceptOAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# AcceptLoginRequest +# AcceptOAuth2LoginRequest ## Properties @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Acr** | Pointer to **string** | 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** | Pointer to **[]string** | | [optional] -**Context** | Pointer to **map[string]interface{}** | | [optional] +**Context** | Pointer to **interface{}** | | [optional] **ForceSubjectIdentifier** | Pointer to **string** | 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] **Remember** | Pointer to **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] **RememberFor** | Pointer to **int64** | 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] @@ -14,189 +14,199 @@ Name | Type | Description | Notes ## Methods -### NewAcceptLoginRequest +### NewAcceptOAuth2LoginRequest -`func NewAcceptLoginRequest(subject string, ) *AcceptLoginRequest` +`func NewAcceptOAuth2LoginRequest(subject string, ) *AcceptOAuth2LoginRequest` -NewAcceptLoginRequest instantiates a new AcceptLoginRequest object +NewAcceptOAuth2LoginRequest instantiates a new AcceptOAuth2LoginRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewAcceptLoginRequestWithDefaults +### NewAcceptOAuth2LoginRequestWithDefaults -`func NewAcceptLoginRequestWithDefaults() *AcceptLoginRequest` +`func NewAcceptOAuth2LoginRequestWithDefaults() *AcceptOAuth2LoginRequest` -NewAcceptLoginRequestWithDefaults instantiates a new AcceptLoginRequest object +NewAcceptOAuth2LoginRequestWithDefaults instantiates a new AcceptOAuth2LoginRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetAcr -`func (o *AcceptLoginRequest) GetAcr() string` +`func (o *AcceptOAuth2LoginRequest) GetAcr() string` GetAcr returns the Acr field if non-nil, zero value otherwise. ### GetAcrOk -`func (o *AcceptLoginRequest) GetAcrOk() (*string, bool)` +`func (o *AcceptOAuth2LoginRequest) GetAcrOk() (*string, bool)` GetAcrOk returns a tuple with the Acr field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAcr -`func (o *AcceptLoginRequest) SetAcr(v string)` +`func (o *AcceptOAuth2LoginRequest) SetAcr(v string)` SetAcr sets Acr field to given value. ### HasAcr -`func (o *AcceptLoginRequest) HasAcr() bool` +`func (o *AcceptOAuth2LoginRequest) HasAcr() bool` HasAcr returns a boolean if a field has been set. ### GetAmr -`func (o *AcceptLoginRequest) GetAmr() []string` +`func (o *AcceptOAuth2LoginRequest) GetAmr() []string` GetAmr returns the Amr field if non-nil, zero value otherwise. ### GetAmrOk -`func (o *AcceptLoginRequest) GetAmrOk() (*[]string, bool)` +`func (o *AcceptOAuth2LoginRequest) GetAmrOk() (*[]string, bool)` GetAmrOk returns a tuple with the Amr field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAmr -`func (o *AcceptLoginRequest) SetAmr(v []string)` +`func (o *AcceptOAuth2LoginRequest) SetAmr(v []string)` SetAmr sets Amr field to given value. ### HasAmr -`func (o *AcceptLoginRequest) HasAmr() bool` +`func (o *AcceptOAuth2LoginRequest) HasAmr() bool` HasAmr returns a boolean if a field has been set. ### GetContext -`func (o *AcceptLoginRequest) GetContext() map[string]interface{}` +`func (o *AcceptOAuth2LoginRequest) GetContext() interface{}` GetContext returns the Context field if non-nil, zero value otherwise. ### GetContextOk -`func (o *AcceptLoginRequest) GetContextOk() (*map[string]interface{}, bool)` +`func (o *AcceptOAuth2LoginRequest) GetContextOk() (*interface{}, bool)` GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetContext -`func (o *AcceptLoginRequest) SetContext(v map[string]interface{})` +`func (o *AcceptOAuth2LoginRequest) SetContext(v interface{})` SetContext sets Context field to given value. ### HasContext -`func (o *AcceptLoginRequest) HasContext() bool` +`func (o *AcceptOAuth2LoginRequest) HasContext() bool` HasContext returns a boolean if a field has been set. +### SetContextNil + +`func (o *AcceptOAuth2LoginRequest) SetContextNil(b bool)` + + SetContextNil sets the value for Context to be an explicit nil + +### UnsetContext +`func (o *AcceptOAuth2LoginRequest) UnsetContext()` + +UnsetContext ensures that no value is present for Context, not even an explicit nil ### GetForceSubjectIdentifier -`func (o *AcceptLoginRequest) GetForceSubjectIdentifier() string` +`func (o *AcceptOAuth2LoginRequest) GetForceSubjectIdentifier() string` GetForceSubjectIdentifier returns the ForceSubjectIdentifier field if non-nil, zero value otherwise. ### GetForceSubjectIdentifierOk -`func (o *AcceptLoginRequest) GetForceSubjectIdentifierOk() (*string, bool)` +`func (o *AcceptOAuth2LoginRequest) GetForceSubjectIdentifierOk() (*string, bool)` GetForceSubjectIdentifierOk returns a tuple with the ForceSubjectIdentifier field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetForceSubjectIdentifier -`func (o *AcceptLoginRequest) SetForceSubjectIdentifier(v string)` +`func (o *AcceptOAuth2LoginRequest) SetForceSubjectIdentifier(v string)` SetForceSubjectIdentifier sets ForceSubjectIdentifier field to given value. ### HasForceSubjectIdentifier -`func (o *AcceptLoginRequest) HasForceSubjectIdentifier() bool` +`func (o *AcceptOAuth2LoginRequest) HasForceSubjectIdentifier() bool` HasForceSubjectIdentifier returns a boolean if a field has been set. ### GetRemember -`func (o *AcceptLoginRequest) GetRemember() bool` +`func (o *AcceptOAuth2LoginRequest) GetRemember() bool` GetRemember returns the Remember field if non-nil, zero value otherwise. ### GetRememberOk -`func (o *AcceptLoginRequest) GetRememberOk() (*bool, bool)` +`func (o *AcceptOAuth2LoginRequest) GetRememberOk() (*bool, bool)` GetRememberOk returns a tuple with the Remember field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRemember -`func (o *AcceptLoginRequest) SetRemember(v bool)` +`func (o *AcceptOAuth2LoginRequest) SetRemember(v bool)` SetRemember sets Remember field to given value. ### HasRemember -`func (o *AcceptLoginRequest) HasRemember() bool` +`func (o *AcceptOAuth2LoginRequest) HasRemember() bool` HasRemember returns a boolean if a field has been set. ### GetRememberFor -`func (o *AcceptLoginRequest) GetRememberFor() int64` +`func (o *AcceptOAuth2LoginRequest) GetRememberFor() int64` GetRememberFor returns the RememberFor field if non-nil, zero value otherwise. ### GetRememberForOk -`func (o *AcceptLoginRequest) GetRememberForOk() (*int64, bool)` +`func (o *AcceptOAuth2LoginRequest) GetRememberForOk() (*int64, bool)` GetRememberForOk returns a tuple with the RememberFor field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRememberFor -`func (o *AcceptLoginRequest) SetRememberFor(v int64)` +`func (o *AcceptOAuth2LoginRequest) SetRememberFor(v int64)` SetRememberFor sets RememberFor field to given value. ### HasRememberFor -`func (o *AcceptLoginRequest) HasRememberFor() bool` +`func (o *AcceptOAuth2LoginRequest) HasRememberFor() bool` HasRememberFor returns a boolean if a field has been set. ### GetSubject -`func (o *AcceptLoginRequest) GetSubject() string` +`func (o *AcceptOAuth2LoginRequest) GetSubject() string` GetSubject returns the Subject field if non-nil, zero value otherwise. ### GetSubjectOk -`func (o *AcceptLoginRequest) GetSubjectOk() (*string, bool)` +`func (o *AcceptOAuth2LoginRequest) GetSubjectOk() (*string, bool)` GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubject -`func (o *AcceptLoginRequest) SetSubject(v string)` +`func (o *AcceptOAuth2LoginRequest) SetSubject(v string)` SetSubject sets Subject field to given value. diff --git a/clients/hydra/go/docs/AdminApi.md b/clients/hydra/go/docs/AdminApi.md deleted file mode 100644 index dcb242c32ba..00000000000 --- a/clients/hydra/go/docs/AdminApi.md +++ /dev/null @@ -1,2356 +0,0 @@ -# \AdminApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AcceptConsentRequest**](AdminApi.md#AcceptConsentRequest) | **Put** /oauth2/auth/requests/consent/accept | Accept a Consent Request -[**AcceptLoginRequest**](AdminApi.md#AcceptLoginRequest) | **Put** /oauth2/auth/requests/login/accept | Accept a Login Request -[**AcceptLogoutRequest**](AdminApi.md#AcceptLogoutRequest) | **Put** /oauth2/auth/requests/logout/accept | Accept a Logout Request -[**CreateJsonWebKeySet**](AdminApi.md#CreateJsonWebKeySet) | **Post** /keys/{set} | Generate a New JSON Web Key -[**CreateOAuth2Client**](AdminApi.md#CreateOAuth2Client) | **Post** /clients | Create an OAuth 2.0 Client -[**DeleteJsonWebKey**](AdminApi.md#DeleteJsonWebKey) | **Delete** /keys/{set}/{kid} | Delete a JSON Web Key -[**DeleteJsonWebKeySet**](AdminApi.md#DeleteJsonWebKeySet) | **Delete** /keys/{set} | Delete a JSON Web Key Set -[**DeleteOAuth2Client**](AdminApi.md#DeleteOAuth2Client) | **Delete** /clients/{id} | Deletes an OAuth 2.0 Client -[**DeleteOAuth2Token**](AdminApi.md#DeleteOAuth2Token) | **Delete** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -[**DeleteTrustedJwtGrantIssuer**](AdminApi.md#DeleteTrustedJwtGrantIssuer) | **Delete** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**FlushInactiveOAuth2Tokens**](AdminApi.md#FlushInactiveOAuth2Tokens) | **Post** /oauth2/flush | Flush Expired OAuth2 Access Tokens -[**GetConsentRequest**](AdminApi.md#GetConsentRequest) | **Get** /oauth2/auth/requests/consent | Get Consent Request Information -[**GetJsonWebKey**](AdminApi.md#GetJsonWebKey) | **Get** /keys/{set}/{kid} | Fetch a JSON Web Key -[**GetJsonWebKeySet**](AdminApi.md#GetJsonWebKeySet) | **Get** /keys/{set} | Retrieve a JSON Web Key Set -[**GetLoginRequest**](AdminApi.md#GetLoginRequest) | **Get** /oauth2/auth/requests/login | Get a Login Request -[**GetLogoutRequest**](AdminApi.md#GetLogoutRequest) | **Get** /oauth2/auth/requests/logout | Get a Logout Request -[**GetOAuth2Client**](AdminApi.md#GetOAuth2Client) | **Get** /clients/{id} | Get an OAuth 2.0 Client -[**GetTrustedJwtGrantIssuer**](AdminApi.md#GetTrustedJwtGrantIssuer) | **Get** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**GetVersion**](AdminApi.md#GetVersion) | **Get** /version | Get Service Version -[**IntrospectOAuth2Token**](AdminApi.md#IntrospectOAuth2Token) | **Post** /oauth2/introspect | Introspect OAuth2 Tokens -[**IsInstanceAlive**](AdminApi.md#IsInstanceAlive) | **Get** /health/alive | Check Alive Status -[**ListOAuth2Clients**](AdminApi.md#ListOAuth2Clients) | **Get** /clients | List OAuth 2.0 Clients -[**ListSubjectConsentSessions**](AdminApi.md#ListSubjectConsentSessions) | **Get** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -[**ListTrustedJwtGrantIssuers**](AdminApi.md#ListTrustedJwtGrantIssuers) | **Get** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -[**PatchOAuth2Client**](AdminApi.md#PatchOAuth2Client) | **Patch** /clients/{id} | Patch an OAuth 2.0 Client -[**RejectConsentRequest**](AdminApi.md#RejectConsentRequest) | **Put** /oauth2/auth/requests/consent/reject | Reject a Consent Request -[**RejectLoginRequest**](AdminApi.md#RejectLoginRequest) | **Put** /oauth2/auth/requests/login/reject | Reject a Login Request -[**RejectLogoutRequest**](AdminApi.md#RejectLogoutRequest) | **Put** /oauth2/auth/requests/logout/reject | Reject a Logout Request -[**RevokeAuthenticationSession**](AdminApi.md#RevokeAuthenticationSession) | **Delete** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -[**RevokeConsentSessions**](AdminApi.md#RevokeConsentSessions) | **Delete** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -[**TrustJwtGrantIssuer**](AdminApi.md#TrustJwtGrantIssuer) | **Post** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -[**UpdateJsonWebKey**](AdminApi.md#UpdateJsonWebKey) | **Put** /keys/{set}/{kid} | Update a JSON Web Key -[**UpdateJsonWebKeySet**](AdminApi.md#UpdateJsonWebKeySet) | **Put** /keys/{set} | Update a JSON Web Key Set -[**UpdateOAuth2Client**](AdminApi.md#UpdateOAuth2Client) | **Put** /clients/{id} | Update an OAuth 2.0 Client - - - -## AcceptConsentRequest - -> CompletedRequest AcceptConsentRequest(ctx).ConsentChallenge(consentChallenge).Body(body).Execute() - -Accept a Consent Request - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - consentChallenge := "consentChallenge_example" // string | - body := *openapiclient.NewAcceptConsentRequest() // AcceptConsentRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.AcceptConsentRequest(context.Background()).ConsentChallenge(consentChallenge).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.AcceptConsentRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AcceptConsentRequest`: CompletedRequest - fmt.Fprintf(os.Stdout, "Response from `AdminApi.AcceptConsentRequest`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAcceptConsentRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string** | | - **body** | [**AcceptConsentRequest**](AcceptConsentRequest.md) | | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## AcceptLoginRequest - -> CompletedRequest AcceptLoginRequest(ctx).LoginChallenge(loginChallenge).Body(body).Execute() - -Accept a Login Request - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - loginChallenge := "loginChallenge_example" // string | - body := *openapiclient.NewAcceptLoginRequest("Subject_example") // AcceptLoginRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.AcceptLoginRequest(context.Background()).LoginChallenge(loginChallenge).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.AcceptLoginRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AcceptLoginRequest`: CompletedRequest - fmt.Fprintf(os.Stdout, "Response from `AdminApi.AcceptLoginRequest`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAcceptLoginRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string** | | - **body** | [**AcceptLoginRequest**](AcceptLoginRequest.md) | | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## AcceptLogoutRequest - -> CompletedRequest AcceptLogoutRequest(ctx).LogoutChallenge(logoutChallenge).Execute() - -Accept a Logout Request - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - logoutChallenge := "logoutChallenge_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.AcceptLogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.AcceptLogoutRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AcceptLogoutRequest`: CompletedRequest - fmt.Fprintf(os.Stdout, "Response from `AdminApi.AcceptLogoutRequest`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAcceptLogoutRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string** | | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## CreateJsonWebKeySet - -> JSONWebKeySet CreateJsonWebKeySet(ctx, set).Body(body).Execute() - -Generate a New JSON Web Key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - set := "set_example" // string | The set - body := *openapiclient.NewJsonWebKeySetGeneratorRequest("Alg_example", "Kid_example", "Use_example") // JsonWebKeySetGeneratorRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.CreateJsonWebKeySet(context.Background(), set).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.CreateJsonWebKeySet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateJsonWebKeySet`: JSONWebKeySet - fmt.Fprintf(os.Stdout, "Response from `AdminApi.CreateJsonWebKeySet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**set** | **string** | The set | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateJsonWebKeySetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **body** | [**JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md) | | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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 - -> OAuth2Client CreateOAuth2Client(ctx).Body(body).Execute() - -Create an OAuth 2.0 Client - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - body := *openapiclient.NewOAuth2Client() // OAuth2Client | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.CreateOAuth2Client(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.CreateOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `AdminApi.CreateOAuth2Client`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateOAuth2ClientRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OAuth2Client**](OAuth2Client.md) | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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 - -> DeleteJsonWebKey(ctx, kid, set).Execute() - -Delete a JSON Web Key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - kid := "kid_example" // string | The kid of the desired key - set := "set_example" // string | The set - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.DeleteJsonWebKey(context.Background(), kid, set).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.DeleteJsonWebKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**kid** | **string** | The kid of the desired key | -**set** | **string** | The set | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteJsonWebKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> DeleteJsonWebKeySet(ctx, set).Execute() - -Delete a JSON Web Key Set - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - set := "set_example" // string | The set - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.DeleteJsonWebKeySet(context.Background(), set).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.DeleteJsonWebKeySet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**set** | **string** | The set | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteJsonWebKeySetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> DeleteOAuth2Client(ctx, id).Execute() - -Deletes an OAuth 2.0 Client - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -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.AdminApi.DeleteOAuth2Client(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.DeleteOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The id of the OAuth 2.0 Client. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteOAuth2ClientRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> DeleteOAuth2Token(ctx).ClientId(clientId).Execute() - -Delete OAuth2 Access Tokens from a Client - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - clientId := "clientId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.DeleteOAuth2Token(context.Background()).ClientId(clientId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.DeleteOAuth2Token``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteOAuth2TokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **clientId** | **string** | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## DeleteTrustedJwtGrantIssuer - -> DeleteTrustedJwtGrantIssuer(ctx, id).Execute() - -Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - id := "id_example" // string | The id of the desired grant - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.DeleteTrustedJwtGrantIssuer(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.DeleteTrustedJwtGrantIssuer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The id of the desired grant | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteTrustedJwtGrantIssuerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## FlushInactiveOAuth2Tokens - -> FlushInactiveOAuth2Tokens(ctx).Body(body).Execute() - -Flush Expired OAuth2 Access Tokens - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - body := *openapiclient.NewFlushInactiveOAuth2TokensRequest() // FlushInactiveOAuth2TokensRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.FlushInactiveOAuth2Tokens(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.FlushInactiveOAuth2Tokens``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiFlushInactiveOAuth2TokensRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## GetConsentRequest - -> ConsentRequest GetConsentRequest(ctx).ConsentChallenge(consentChallenge).Execute() - -Get Consent Request Information - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - consentChallenge := "consentChallenge_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetConsentRequest(context.Background()).ConsentChallenge(consentChallenge).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetConsentRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetConsentRequest`: ConsentRequest - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetConsentRequest`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetConsentRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string** | | - -### Return type - -[**ConsentRequest**](ConsentRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> JSONWebKeySet GetJsonWebKey(ctx, kid, set).Execute() - -Fetch a JSON Web Key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - kid := "kid_example" // string | The kid of the desired key - set := "set_example" // string | The set - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetJsonWebKey(context.Background(), kid, set).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetJsonWebKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetJsonWebKey`: JSONWebKeySet - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetJsonWebKey`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**kid** | **string** | The kid of the desired key | -**set** | **string** | The set | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetJsonWebKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> JSONWebKeySet GetJsonWebKeySet(ctx, set).Execute() - -Retrieve a JSON Web Key Set - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - set := "set_example" // string | The set - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetJsonWebKeySet(context.Background(), set).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetJsonWebKeySet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetJsonWebKeySet`: JSONWebKeySet - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetJsonWebKeySet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**set** | **string** | The set | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetJsonWebKeySetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## GetLoginRequest - -> LoginRequest GetLoginRequest(ctx).LoginChallenge(loginChallenge).Execute() - -Get a Login Request - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - loginChallenge := "loginChallenge_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetLoginRequest(context.Background()).LoginChallenge(loginChallenge).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetLoginRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetLoginRequest`: LoginRequest - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetLoginRequest`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLoginRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string** | | - -### Return type - -[**LoginRequest**](LoginRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## GetLogoutRequest - -> LogoutRequest GetLogoutRequest(ctx).LogoutChallenge(logoutChallenge).Execute() - -Get a Logout Request - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - logoutChallenge := "logoutChallenge_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetLogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetLogoutRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetLogoutRequest`: LogoutRequest - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetLogoutRequest`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetLogoutRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string** | | - -### Return type - -[**LogoutRequest**](LogoutRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> OAuth2Client GetOAuth2Client(ctx, id).Execute() - -Get an OAuth 2.0 Client - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -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.AdminApi.GetOAuth2Client(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetOAuth2Client`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The id of the OAuth 2.0 Client. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetOAuth2ClientRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## GetTrustedJwtGrantIssuer - -> TrustedJwtGrantIssuer GetTrustedJwtGrantIssuer(ctx, id).Execute() - -Get a Trusted OAuth2 JWT Bearer Grant Type Issuer - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - id := "id_example" // string | The id of the desired grant - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetTrustedJwtGrantIssuer(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetTrustedJwtGrantIssuer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetTrustedJwtGrantIssuer`: TrustedJwtGrantIssuer - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetTrustedJwtGrantIssuer`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The id of the desired grant | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetTrustedJwtGrantIssuerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## GetVersion - -> Version GetVersion(ctx).Execute() - -Get Service Version - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.GetVersion(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.GetVersion``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetVersion`: Version - fmt.Fprintf(os.Stdout, "Response from `AdminApi.GetVersion`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetVersionRequest struct via the builder pattern - - -### Return type - -[**Version**](Version.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> OAuth2TokenIntrospection IntrospectOAuth2Token(ctx).Token(token).Scope(scope).Execute() - -Introspect OAuth2 Tokens - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -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.AdminApi.IntrospectOAuth2Token(context.Background()).Token(token).Scope(scope).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.IntrospectOAuth2Token``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IntrospectOAuth2Token`: OAuth2TokenIntrospection - fmt.Fprintf(os.Stdout, "Response from `AdminApi.IntrospectOAuth2Token`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiIntrospectOAuth2TokenRequest struct via the builder pattern - - -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. | - -### Return type - -[**OAuth2TokenIntrospection**](OAuth2TokenIntrospection.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[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) - - -## IsInstanceAlive - -> HealthStatus IsInstanceAlive(ctx).Execute() - -Check Alive Status - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.IsInstanceAlive(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.IsInstanceAlive``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IsInstanceAlive`: HealthStatus - fmt.Fprintf(os.Stdout, "Response from `AdminApi.IsInstanceAlive`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiIsInstanceAliveRequest struct via the builder pattern - - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> []OAuth2Client ListOAuth2Clients(ctx).Limit(limit).Offset(offset).ClientName(clientName).Owner(owner).Execute() - -List OAuth 2.0 Clients - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - limit := int64(789) // int64 | The maximum amount of clients to returned, upper bound is 500 clients. (optional) - offset := int64(789) // int64 | The offset from where to start looking. (optional) - 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.AdminApi.ListOAuth2Clients(context.Background()).Limit(limit).Offset(offset).ClientName(clientName).Owner(owner).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.ListOAuth2Clients``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListOAuth2Clients`: []OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `AdminApi.ListOAuth2Clients`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListOAuth2ClientsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int64** | The maximum amount of clients to returned, upper bound is 500 clients. | - **offset** | **int64** | The offset from where to start looking. | - **clientName** | **string** | The name of the clients to filter by. | - **owner** | **string** | The owner of the clients to filter by. | - -### Return type - -[**[]OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## ListSubjectConsentSessions - -> []PreviousConsentSession ListSubjectConsentSessions(ctx).Subject(subject).Execute() - -Lists All Consent Sessions of a Subject - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - subject := "subject_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.ListSubjectConsentSessions(context.Background()).Subject(subject).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.ListSubjectConsentSessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListSubjectConsentSessions`: []PreviousConsentSession - fmt.Fprintf(os.Stdout, "Response from `AdminApi.ListSubjectConsentSessions`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListSubjectConsentSessionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string** | | - -### Return type - -[**[]PreviousConsentSession**](PreviousConsentSession.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## ListTrustedJwtGrantIssuers - -> []TrustedJwtGrantIssuer ListTrustedJwtGrantIssuers(ctx).Issuer(issuer).Limit(limit).Offset(offset).Execute() - -List Trusted OAuth2 JWT Bearer Grant Type Issuers - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - issuer := "issuer_example" // string | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - limit := int64(789) // int64 | The maximum amount of policies returned, upper bound is 500 policies (optional) - offset := int64(789) // int64 | The offset from where to start looking. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.ListTrustedJwtGrantIssuers(context.Background()).Issuer(issuer).Limit(limit).Offset(offset).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.ListTrustedJwtGrantIssuers``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListTrustedJwtGrantIssuers`: []TrustedJwtGrantIssuer - fmt.Fprintf(os.Stdout, "Response from `AdminApi.ListTrustedJwtGrantIssuers`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListTrustedJwtGrantIssuersRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **issuer** | **string** | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | - **limit** | **int64** | The maximum amount of policies returned, upper bound is 500 policies | - **offset** | **int64** | The offset from where to start looking. | - -### Return type - -[**[]TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> OAuth2Client PatchOAuth2Client(ctx, id).Body(body).Execute() - -Patch an OAuth 2.0 Client - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - id := "id_example" // string | The id of the OAuth 2.0 Client. - body := []openapiclient.PatchDocument{*openapiclient.NewPatchDocument(""replace"", ""/name"")} // []PatchDocument | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.PatchOAuth2Client(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.PatchOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PatchOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `AdminApi.PatchOAuth2Client`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The id of the OAuth 2.0 Client. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiPatchOAuth2ClientRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **body** | [**[]PatchDocument**](PatchDocument.md) | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## RejectConsentRequest - -> CompletedRequest RejectConsentRequest(ctx).ConsentChallenge(consentChallenge).Body(body).Execute() - -Reject a Consent Request - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - consentChallenge := "consentChallenge_example" // string | - body := *openapiclient.NewRejectRequest() // RejectRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.RejectConsentRequest(context.Background()).ConsentChallenge(consentChallenge).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.RejectConsentRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RejectConsentRequest`: CompletedRequest - fmt.Fprintf(os.Stdout, "Response from `AdminApi.RejectConsentRequest`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRejectConsentRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string** | | - **body** | [**RejectRequest**](RejectRequest.md) | | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## RejectLoginRequest - -> CompletedRequest RejectLoginRequest(ctx).LoginChallenge(loginChallenge).Body(body).Execute() - -Reject a Login Request - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - loginChallenge := "loginChallenge_example" // string | - body := *openapiclient.NewRejectRequest() // RejectRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.RejectLoginRequest(context.Background()).LoginChallenge(loginChallenge).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.RejectLoginRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RejectLoginRequest`: CompletedRequest - fmt.Fprintf(os.Stdout, "Response from `AdminApi.RejectLoginRequest`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRejectLoginRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string** | | - **body** | [**RejectRequest**](RejectRequest.md) | | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## RejectLogoutRequest - -> RejectLogoutRequest(ctx).LogoutChallenge(logoutChallenge).Body(body).Execute() - -Reject a Logout Request - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - logoutChallenge := "logoutChallenge_example" // string | - body := *openapiclient.NewRejectRequest() // RejectRequest | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.RejectLogoutRequest(context.Background()).LogoutChallenge(logoutChallenge).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.RejectLogoutRequest``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRejectLogoutRequestRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string** | | - **body** | [**RejectRequest**](RejectRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json, application/x-www-form-urlencoded -- **Accept**: application/json - -[[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) - - -## RevokeAuthenticationSession - -> RevokeAuthenticationSession(ctx).Subject(subject).Execute() - -Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - subject := "subject_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.RevokeAuthenticationSession(context.Background()).Subject(subject).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.RevokeAuthenticationSession``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRevokeAuthenticationSessionRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string** | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## RevokeConsentSessions - -> RevokeConsentSessions(ctx).Subject(subject).Client(client).All(all).Execute() - -Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - subject := "subject_example" // string | The subject (Subject) who's consent sessions should be deleted. - client := "client_example" // string | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - all := true // bool | If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.RevokeConsentSessions(context.Background()).Subject(subject).Client(client).All(all).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.RevokeConsentSessions``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRevokeConsentSessionsRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string** | The subject (Subject) who's consent sessions should be deleted. | - **client** | **string** | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | - **all** | **bool** | If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## TrustJwtGrantIssuer - -> TrustedJwtGrantIssuer TrustJwtGrantIssuer(ctx).Body(body).Execute() - -Trust an OAuth2 JWT Bearer Grant Type Issuer - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - "time" - openapiclient "./openapi" -) - -func main() { - body := *openapiclient.NewTrustJwtGrantIssuerBody(time.Now(), "https://jwt-idp.example.com", *openapiclient.NewJSONWebKey("RS256", "1603dfe0af8f4596", "RSA", "sig"), []string{"Scope_example"}, "mike@example.com") // TrustJwtGrantIssuerBody | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.TrustJwtGrantIssuer(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.TrustJwtGrantIssuer``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `TrustJwtGrantIssuer`: TrustedJwtGrantIssuer - fmt.Fprintf(os.Stdout, "Response from `AdminApi.TrustJwtGrantIssuer`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiTrustJwtGrantIssuerRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**TrustJwtGrantIssuerBody**](TrustJwtGrantIssuerBody.md) | | - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## UpdateJsonWebKey - -> JSONWebKey UpdateJsonWebKey(ctx, kid, set).Body(body).Execute() - -Update a JSON Web Key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - kid := "kid_example" // string | The kid of the desired key - set := "set_example" // string | The set - body := *openapiclient.NewJSONWebKey("RS256", "1603dfe0af8f4596", "RSA", "sig") // JSONWebKey | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.UpdateJsonWebKey(context.Background(), kid, set).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.UpdateJsonWebKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateJsonWebKey`: JSONWebKey - fmt.Fprintf(os.Stdout, "Response from `AdminApi.UpdateJsonWebKey`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**kid** | **string** | The kid of the desired key | -**set** | **string** | The set | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateJsonWebKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **body** | [**JSONWebKey**](JSONWebKey.md) | | - -### Return type - -[**JSONWebKey**](JSONWebKey.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## UpdateJsonWebKeySet - -> JSONWebKeySet UpdateJsonWebKeySet(ctx, set).Body(body).Execute() - -Update a JSON Web Key Set - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - set := "set_example" // string | The set - body := *openapiclient.NewJSONWebKeySet() // JSONWebKeySet | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.UpdateJsonWebKeySet(context.Background(), set).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.UpdateJsonWebKeySet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateJsonWebKeySet`: JSONWebKeySet - fmt.Fprintf(os.Stdout, "Response from `AdminApi.UpdateJsonWebKeySet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**set** | **string** | The set | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateJsonWebKeySetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **body** | [**JSONWebKeySet**](JSONWebKeySet.md) | | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## UpdateOAuth2Client - -> OAuth2Client UpdateOAuth2Client(ctx, id).Body(body).Execute() - -Update an OAuth 2.0 Client - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - id := "id_example" // string | The id of the OAuth 2.0 Client. - body := *openapiclient.NewOAuth2Client() // OAuth2Client | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AdminApi.UpdateOAuth2Client(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AdminApi.UpdateOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `UpdateOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `AdminApi.UpdateOAuth2Client`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The id of the OAuth 2.0 Client. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiUpdateOAuth2ClientRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **body** | [**OAuth2Client**](OAuth2Client.md) | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - diff --git a/clients/hydra/go/docs/ConsentRequestSession.md b/clients/hydra/go/docs/ConsentRequestSession.md deleted file mode 100644 index 9c1e86454cc..00000000000 --- a/clients/hydra/go/docs/ConsentRequestSession.md +++ /dev/null @@ -1,82 +0,0 @@ -# ConsentRequestSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccessToken** | Pointer to **map[string]interface{}** | 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] -**IdToken** | Pointer to **map[string]interface{}** | 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] - -## Methods - -### NewConsentRequestSession - -`func NewConsentRequestSession() *ConsentRequestSession` - -NewConsentRequestSession instantiates a new ConsentRequestSession object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewConsentRequestSessionWithDefaults - -`func NewConsentRequestSessionWithDefaults() *ConsentRequestSession` - -NewConsentRequestSessionWithDefaults instantiates a new ConsentRequestSession object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAccessToken - -`func (o *ConsentRequestSession) GetAccessToken() map[string]interface{}` - -GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. - -### GetAccessTokenOk - -`func (o *ConsentRequestSession) GetAccessTokenOk() (*map[string]interface{}, bool)` - -GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessToken - -`func (o *ConsentRequestSession) SetAccessToken(v map[string]interface{})` - -SetAccessToken sets AccessToken field to given value. - -### HasAccessToken - -`func (o *ConsentRequestSession) HasAccessToken() bool` - -HasAccessToken returns a boolean if a field has been set. - -### GetIdToken - -`func (o *ConsentRequestSession) GetIdToken() map[string]interface{}` - -GetIdToken returns the IdToken field if non-nil, zero value otherwise. - -### GetIdTokenOk - -`func (o *ConsentRequestSession) GetIdTokenOk() (*map[string]interface{}, bool)` - -GetIdTokenOk returns a tuple with the IdToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdToken - -`func (o *ConsentRequestSession) SetIdToken(v map[string]interface{})` - -SetIdToken sets IdToken field to given value. - -### HasIdToken - -`func (o *ConsentRequestSession) HasIdToken() bool` - -HasIdToken returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/hydra/go/docs/ContainerWaitOKBodyError.md b/clients/hydra/go/docs/ContainerWaitOKBodyError.md deleted file mode 100644 index d49c993b440..00000000000 --- a/clients/hydra/go/docs/ContainerWaitOKBodyError.md +++ /dev/null @@ -1,56 +0,0 @@ -# ContainerWaitOKBodyError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | Pointer to **string** | Details of an error | [optional] - -## Methods - -### NewContainerWaitOKBodyError - -`func NewContainerWaitOKBodyError() *ContainerWaitOKBodyError` - -NewContainerWaitOKBodyError instantiates a new ContainerWaitOKBodyError object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewContainerWaitOKBodyErrorWithDefaults - -`func NewContainerWaitOKBodyErrorWithDefaults() *ContainerWaitOKBodyError` - -NewContainerWaitOKBodyErrorWithDefaults instantiates a new ContainerWaitOKBodyError object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetMessage - -`func (o *ContainerWaitOKBodyError) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *ContainerWaitOKBodyError) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *ContainerWaitOKBodyError) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *ContainerWaitOKBodyError) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/hydra/go/docs/CreateJsonWebKeySet.md b/clients/hydra/go/docs/CreateJsonWebKeySet.md new file mode 100644 index 00000000000..fb688d18c7a --- /dev/null +++ b/clients/hydra/go/docs/CreateJsonWebKeySet.md @@ -0,0 +1,93 @@ +# CreateJsonWebKeySet + +## Properties + +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\". | + +## Methods + +### NewCreateJsonWebKeySet + +`func NewCreateJsonWebKeySet(alg string, kid string, use string, ) *CreateJsonWebKeySet` + +NewCreateJsonWebKeySet instantiates a new CreateJsonWebKeySet object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateJsonWebKeySetWithDefaults + +`func NewCreateJsonWebKeySetWithDefaults() *CreateJsonWebKeySet` + +NewCreateJsonWebKeySetWithDefaults instantiates a new CreateJsonWebKeySet object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAlg + +`func (o *CreateJsonWebKeySet) GetAlg() string` + +GetAlg returns the Alg field if non-nil, zero value otherwise. + +### GetAlgOk + +`func (o *CreateJsonWebKeySet) GetAlgOk() (*string, bool)` + +GetAlgOk returns a tuple with the Alg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlg + +`func (o *CreateJsonWebKeySet) SetAlg(v string)` + +SetAlg sets Alg field to given value. + + +### GetKid + +`func (o *CreateJsonWebKeySet) GetKid() string` + +GetKid returns the Kid field if non-nil, zero value otherwise. + +### GetKidOk + +`func (o *CreateJsonWebKeySet) GetKidOk() (*string, bool)` + +GetKidOk returns a tuple with the Kid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKid + +`func (o *CreateJsonWebKeySet) SetKid(v string)` + +SetKid sets Kid field to given value. + + +### GetUse + +`func (o *CreateJsonWebKeySet) GetUse() string` + +GetUse returns the Use field if non-nil, zero value otherwise. + +### GetUseOk + +`func (o *CreateJsonWebKeySet) GetUseOk() (*string, bool)` + +GetUseOk returns a tuple with the Use field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUse + +`func (o *CreateJsonWebKeySet) SetUse(v string)` + +SetUse sets Use field to given value. + + + +[[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/go/docs/JsonError.md b/clients/hydra/go/docs/ErrorOAuth2.md similarity index 52% rename from clients/hydra/go/docs/JsonError.md rename to clients/hydra/go/docs/ErrorOAuth2.md index 2d449643480..70a44e6495f 100644 --- a/clients/hydra/go/docs/JsonError.md +++ b/clients/hydra/go/docs/ErrorOAuth2.md @@ -1,130 +1,156 @@ -# JsonError +# ErrorOAuth2 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Error** | Pointer to **string** | Name is the error name. | [optional] -**ErrorDebug** | Pointer to **string** | Debug contains debug information. This is usually not available and has to be enabled. | [optional] -**ErrorDescription** | Pointer to **string** | Description contains further information on the nature of the error. | [optional] -**StatusCode** | Pointer to **int64** | Code represents the error status code (404, 403, 401, ...). | [optional] +**Error** | Pointer to **string** | Error | [optional] +**ErrorDebug** | Pointer to **string** | Error Debug Information Only available in dev mode. | [optional] +**ErrorDescription** | Pointer to **string** | Error Description | [optional] +**ErrorHint** | Pointer to **string** | Error Hint Helps the user identify the error cause. | [optional] +**StatusCode** | Pointer to **int64** | HTTP Status Code | [optional] ## Methods -### NewJsonError +### NewErrorOAuth2 -`func NewJsonError() *JsonError` +`func NewErrorOAuth2() *ErrorOAuth2` -NewJsonError instantiates a new JsonError object +NewErrorOAuth2 instantiates a new ErrorOAuth2 object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewJsonErrorWithDefaults +### NewErrorOAuth2WithDefaults -`func NewJsonErrorWithDefaults() *JsonError` +`func NewErrorOAuth2WithDefaults() *ErrorOAuth2` -NewJsonErrorWithDefaults instantiates a new JsonError object +NewErrorOAuth2WithDefaults instantiates a new ErrorOAuth2 object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetError -`func (o *JsonError) GetError() string` +`func (o *ErrorOAuth2) GetError() string` GetError returns the Error field if non-nil, zero value otherwise. ### GetErrorOk -`func (o *JsonError) GetErrorOk() (*string, bool)` +`func (o *ErrorOAuth2) GetErrorOk() (*string, bool)` GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetError -`func (o *JsonError) SetError(v string)` +`func (o *ErrorOAuth2) SetError(v string)` SetError sets Error field to given value. ### HasError -`func (o *JsonError) HasError() bool` +`func (o *ErrorOAuth2) HasError() bool` HasError returns a boolean if a field has been set. ### GetErrorDebug -`func (o *JsonError) GetErrorDebug() string` +`func (o *ErrorOAuth2) GetErrorDebug() string` GetErrorDebug returns the ErrorDebug field if non-nil, zero value otherwise. ### GetErrorDebugOk -`func (o *JsonError) GetErrorDebugOk() (*string, bool)` +`func (o *ErrorOAuth2) GetErrorDebugOk() (*string, bool)` GetErrorDebugOk returns a tuple with the ErrorDebug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetErrorDebug -`func (o *JsonError) SetErrorDebug(v string)` +`func (o *ErrorOAuth2) SetErrorDebug(v string)` SetErrorDebug sets ErrorDebug field to given value. ### HasErrorDebug -`func (o *JsonError) HasErrorDebug() bool` +`func (o *ErrorOAuth2) HasErrorDebug() bool` HasErrorDebug returns a boolean if a field has been set. ### GetErrorDescription -`func (o *JsonError) GetErrorDescription() string` +`func (o *ErrorOAuth2) GetErrorDescription() string` GetErrorDescription returns the ErrorDescription field if non-nil, zero value otherwise. ### GetErrorDescriptionOk -`func (o *JsonError) GetErrorDescriptionOk() (*string, bool)` +`func (o *ErrorOAuth2) GetErrorDescriptionOk() (*string, bool)` GetErrorDescriptionOk returns a tuple with the ErrorDescription field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetErrorDescription -`func (o *JsonError) SetErrorDescription(v string)` +`func (o *ErrorOAuth2) SetErrorDescription(v string)` SetErrorDescription sets ErrorDescription field to given value. ### HasErrorDescription -`func (o *JsonError) HasErrorDescription() bool` +`func (o *ErrorOAuth2) HasErrorDescription() bool` HasErrorDescription returns a boolean if a field has been set. +### GetErrorHint + +`func (o *ErrorOAuth2) GetErrorHint() string` + +GetErrorHint returns the ErrorHint field if non-nil, zero value otherwise. + +### GetErrorHintOk + +`func (o *ErrorOAuth2) GetErrorHintOk() (*string, bool)` + +GetErrorHintOk returns a tuple with the ErrorHint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrorHint + +`func (o *ErrorOAuth2) SetErrorHint(v string)` + +SetErrorHint sets ErrorHint field to given value. + +### HasErrorHint + +`func (o *ErrorOAuth2) HasErrorHint() bool` + +HasErrorHint returns a boolean if a field has been set. + ### GetStatusCode -`func (o *JsonError) GetStatusCode() int64` +`func (o *ErrorOAuth2) GetStatusCode() int64` GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. ### GetStatusCodeOk -`func (o *JsonError) GetStatusCodeOk() (*int64, bool)` +`func (o *ErrorOAuth2) GetStatusCodeOk() (*int64, bool)` GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatusCode -`func (o *JsonError) SetStatusCode(v int64)` +`func (o *ErrorOAuth2) SetStatusCode(v int64)` SetStatusCode sets StatusCode field to given value. ### HasStatusCode -`func (o *JsonError) HasStatusCode() bool` +`func (o *ErrorOAuth2) HasStatusCode() bool` HasStatusCode returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/FlushInactiveOAuth2TokensRequest.md b/clients/hydra/go/docs/FlushInactiveOAuth2TokensRequest.md deleted file mode 100644 index e5e39d7f86b..00000000000 --- a/clients/hydra/go/docs/FlushInactiveOAuth2TokensRequest.md +++ /dev/null @@ -1,56 +0,0 @@ -# FlushInactiveOAuth2TokensRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NotAfter** | Pointer to **time.Time** | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. | [optional] - -## Methods - -### NewFlushInactiveOAuth2TokensRequest - -`func NewFlushInactiveOAuth2TokensRequest() *FlushInactiveOAuth2TokensRequest` - -NewFlushInactiveOAuth2TokensRequest instantiates a new FlushInactiveOAuth2TokensRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFlushInactiveOAuth2TokensRequestWithDefaults - -`func NewFlushInactiveOAuth2TokensRequestWithDefaults() *FlushInactiveOAuth2TokensRequest` - -NewFlushInactiveOAuth2TokensRequestWithDefaults instantiates a new FlushInactiveOAuth2TokensRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetNotAfter - -`func (o *FlushInactiveOAuth2TokensRequest) GetNotAfter() time.Time` - -GetNotAfter returns the NotAfter field if non-nil, zero value otherwise. - -### GetNotAfterOk - -`func (o *FlushInactiveOAuth2TokensRequest) GetNotAfterOk() (*time.Time, bool)` - -GetNotAfterOk returns a tuple with the NotAfter field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNotAfter - -`func (o *FlushInactiveOAuth2TokensRequest) SetNotAfter(v time.Time)` - -SetNotAfter sets NotAfter field to given value. - -### HasNotAfter - -`func (o *FlushInactiveOAuth2TokensRequest) HasNotAfter() bool` - -HasNotAfter returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/hydra/go/docs/GenericError.md b/clients/hydra/go/docs/GenericError.md index 5a09d739270..4f05d0a7c4a 100644 --- a/clients/hydra/go/docs/GenericError.md +++ b/clients/hydra/go/docs/GenericError.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Code** | Pointer to **int64** | The status code | [optional] **Debug** | Pointer to **string** | Debug information This field is often not exposed to protect against leaking sensitive information. | [optional] -**Details** | Pointer to **map[string]interface{}** | Further error details | [optional] +**Details** | Pointer to **interface{}** | Further error details | [optional] **Id** | Pointer to **string** | The error ID Useful when trying to identify various errors in application logic. | [optional] **Message** | **string** | Error message The error's message. | **Reason** | Pointer to **string** | A human-readable reason for the error | [optional] @@ -84,20 +84,20 @@ HasDebug returns a boolean if a field has been set. ### GetDetails -`func (o *GenericError) GetDetails() map[string]interface{}` +`func (o *GenericError) GetDetails() interface{}` GetDetails returns the Details field if non-nil, zero value otherwise. ### GetDetailsOk -`func (o *GenericError) GetDetailsOk() (*map[string]interface{}, bool)` +`func (o *GenericError) GetDetailsOk() (*interface{}, bool)` GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDetails -`func (o *GenericError) SetDetails(v map[string]interface{})` +`func (o *GenericError) SetDetails(v interface{})` SetDetails sets Details field to given value. @@ -107,6 +107,16 @@ SetDetails sets Details field to given value. HasDetails returns a boolean if a field has been set. +### SetDetailsNil + +`func (o *GenericError) SetDetailsNil(b bool)` + + SetDetailsNil sets the value for Details to be an explicit nil + +### UnsetDetails +`func (o *GenericError) UnsetDetails()` + +UnsetDetails ensures that no value is present for Details, not even an explicit nil ### GetId `func (o *GenericError) GetId() string` diff --git a/clients/hydra/go/docs/GetVersion200Response.md b/clients/hydra/go/docs/GetVersion200Response.md new file mode 100644 index 00000000000..e0e2b532f87 --- /dev/null +++ b/clients/hydra/go/docs/GetVersion200Response.md @@ -0,0 +1,56 @@ +# GetVersion200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Version** | Pointer to **string** | The version of Ory Hydra. | [optional] + +## Methods + +### NewGetVersion200Response + +`func NewGetVersion200Response() *GetVersion200Response` + +NewGetVersion200Response instantiates a new GetVersion200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGetVersion200ResponseWithDefaults + +`func NewGetVersion200ResponseWithDefaults() *GetVersion200Response` + +NewGetVersion200ResponseWithDefaults instantiates a new GetVersion200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVersion + +`func (o *GetVersion200Response) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *GetVersion200Response) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *GetVersion200Response) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *GetVersion200Response) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/OAuth2TokenIntrospection.md b/clients/hydra/go/docs/IntrospectedOAuth2Token.md similarity index 69% rename from clients/hydra/go/docs/OAuth2TokenIntrospection.md rename to clients/hydra/go/docs/IntrospectedOAuth2Token.md index e6207b6e5c0..fc71cd578e2 100644 --- a/clients/hydra/go/docs/OAuth2TokenIntrospection.md +++ b/clients/hydra/go/docs/IntrospectedOAuth2Token.md @@ -1,4 +1,4 @@ -# OAuth2TokenIntrospection +# IntrospectedOAuth2Token ## Properties @@ -21,365 +21,365 @@ Name | Type | Description | Notes ## Methods -### NewOAuth2TokenIntrospection +### NewIntrospectedOAuth2Token -`func NewOAuth2TokenIntrospection(active bool, ) *OAuth2TokenIntrospection` +`func NewIntrospectedOAuth2Token(active bool, ) *IntrospectedOAuth2Token` -NewOAuth2TokenIntrospection instantiates a new OAuth2TokenIntrospection object +NewIntrospectedOAuth2Token instantiates a new IntrospectedOAuth2Token object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewOAuth2TokenIntrospectionWithDefaults +### NewIntrospectedOAuth2TokenWithDefaults -`func NewOAuth2TokenIntrospectionWithDefaults() *OAuth2TokenIntrospection` +`func NewIntrospectedOAuth2TokenWithDefaults() *IntrospectedOAuth2Token` -NewOAuth2TokenIntrospectionWithDefaults instantiates a new OAuth2TokenIntrospection object +NewIntrospectedOAuth2TokenWithDefaults instantiates a new IntrospectedOAuth2Token object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetActive -`func (o *OAuth2TokenIntrospection) GetActive() bool` +`func (o *IntrospectedOAuth2Token) GetActive() bool` GetActive returns the Active field if non-nil, zero value otherwise. ### GetActiveOk -`func (o *OAuth2TokenIntrospection) GetActiveOk() (*bool, bool)` +`func (o *IntrospectedOAuth2Token) GetActiveOk() (*bool, bool)` GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetActive -`func (o *OAuth2TokenIntrospection) SetActive(v bool)` +`func (o *IntrospectedOAuth2Token) SetActive(v bool)` SetActive sets Active field to given value. ### GetAud -`func (o *OAuth2TokenIntrospection) GetAud() []string` +`func (o *IntrospectedOAuth2Token) GetAud() []string` GetAud returns the Aud field if non-nil, zero value otherwise. ### GetAudOk -`func (o *OAuth2TokenIntrospection) GetAudOk() (*[]string, bool)` +`func (o *IntrospectedOAuth2Token) GetAudOk() (*[]string, bool)` GetAudOk returns a tuple with the Aud field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAud -`func (o *OAuth2TokenIntrospection) SetAud(v []string)` +`func (o *IntrospectedOAuth2Token) SetAud(v []string)` SetAud sets Aud field to given value. ### HasAud -`func (o *OAuth2TokenIntrospection) HasAud() bool` +`func (o *IntrospectedOAuth2Token) HasAud() bool` HasAud returns a boolean if a field has been set. ### GetClientId -`func (o *OAuth2TokenIntrospection) GetClientId() string` +`func (o *IntrospectedOAuth2Token) GetClientId() string` GetClientId returns the ClientId field if non-nil, zero value otherwise. ### GetClientIdOk -`func (o *OAuth2TokenIntrospection) GetClientIdOk() (*string, bool)` +`func (o *IntrospectedOAuth2Token) GetClientIdOk() (*string, bool)` GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetClientId -`func (o *OAuth2TokenIntrospection) SetClientId(v string)` +`func (o *IntrospectedOAuth2Token) SetClientId(v string)` SetClientId sets ClientId field to given value. ### HasClientId -`func (o *OAuth2TokenIntrospection) HasClientId() bool` +`func (o *IntrospectedOAuth2Token) HasClientId() bool` HasClientId returns a boolean if a field has been set. ### GetExp -`func (o *OAuth2TokenIntrospection) GetExp() int64` +`func (o *IntrospectedOAuth2Token) GetExp() int64` GetExp returns the Exp field if non-nil, zero value otherwise. ### GetExpOk -`func (o *OAuth2TokenIntrospection) GetExpOk() (*int64, bool)` +`func (o *IntrospectedOAuth2Token) GetExpOk() (*int64, bool)` GetExpOk returns a tuple with the Exp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExp -`func (o *OAuth2TokenIntrospection) SetExp(v int64)` +`func (o *IntrospectedOAuth2Token) SetExp(v int64)` SetExp sets Exp field to given value. ### HasExp -`func (o *OAuth2TokenIntrospection) HasExp() bool` +`func (o *IntrospectedOAuth2Token) HasExp() bool` HasExp returns a boolean if a field has been set. ### GetExt -`func (o *OAuth2TokenIntrospection) GetExt() map[string]interface{}` +`func (o *IntrospectedOAuth2Token) GetExt() map[string]interface{}` GetExt returns the Ext field if non-nil, zero value otherwise. ### GetExtOk -`func (o *OAuth2TokenIntrospection) GetExtOk() (*map[string]interface{}, bool)` +`func (o *IntrospectedOAuth2Token) GetExtOk() (*map[string]interface{}, bool)` GetExtOk returns a tuple with the Ext field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExt -`func (o *OAuth2TokenIntrospection) SetExt(v map[string]interface{})` +`func (o *IntrospectedOAuth2Token) SetExt(v map[string]interface{})` SetExt sets Ext field to given value. ### HasExt -`func (o *OAuth2TokenIntrospection) HasExt() bool` +`func (o *IntrospectedOAuth2Token) HasExt() bool` HasExt returns a boolean if a field has been set. ### GetIat -`func (o *OAuth2TokenIntrospection) GetIat() int64` +`func (o *IntrospectedOAuth2Token) GetIat() int64` GetIat returns the Iat field if non-nil, zero value otherwise. ### GetIatOk -`func (o *OAuth2TokenIntrospection) GetIatOk() (*int64, bool)` +`func (o *IntrospectedOAuth2Token) GetIatOk() (*int64, bool)` GetIatOk returns a tuple with the Iat field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIat -`func (o *OAuth2TokenIntrospection) SetIat(v int64)` +`func (o *IntrospectedOAuth2Token) SetIat(v int64)` SetIat sets Iat field to given value. ### HasIat -`func (o *OAuth2TokenIntrospection) HasIat() bool` +`func (o *IntrospectedOAuth2Token) HasIat() bool` HasIat returns a boolean if a field has been set. ### GetIss -`func (o *OAuth2TokenIntrospection) GetIss() string` +`func (o *IntrospectedOAuth2Token) GetIss() string` GetIss returns the Iss field if non-nil, zero value otherwise. ### GetIssOk -`func (o *OAuth2TokenIntrospection) GetIssOk() (*string, bool)` +`func (o *IntrospectedOAuth2Token) GetIssOk() (*string, bool)` GetIssOk returns a tuple with the Iss field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIss -`func (o *OAuth2TokenIntrospection) SetIss(v string)` +`func (o *IntrospectedOAuth2Token) SetIss(v string)` SetIss sets Iss field to given value. ### HasIss -`func (o *OAuth2TokenIntrospection) HasIss() bool` +`func (o *IntrospectedOAuth2Token) HasIss() bool` HasIss returns a boolean if a field has been set. ### GetNbf -`func (o *OAuth2TokenIntrospection) GetNbf() int64` +`func (o *IntrospectedOAuth2Token) GetNbf() int64` GetNbf returns the Nbf field if non-nil, zero value otherwise. ### GetNbfOk -`func (o *OAuth2TokenIntrospection) GetNbfOk() (*int64, bool)` +`func (o *IntrospectedOAuth2Token) GetNbfOk() (*int64, bool)` GetNbfOk returns a tuple with the Nbf field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNbf -`func (o *OAuth2TokenIntrospection) SetNbf(v int64)` +`func (o *IntrospectedOAuth2Token) SetNbf(v int64)` SetNbf sets Nbf field to given value. ### HasNbf -`func (o *OAuth2TokenIntrospection) HasNbf() bool` +`func (o *IntrospectedOAuth2Token) HasNbf() bool` HasNbf returns a boolean if a field has been set. ### GetObfuscatedSubject -`func (o *OAuth2TokenIntrospection) GetObfuscatedSubject() string` +`func (o *IntrospectedOAuth2Token) GetObfuscatedSubject() string` GetObfuscatedSubject returns the ObfuscatedSubject field if non-nil, zero value otherwise. ### GetObfuscatedSubjectOk -`func (o *OAuth2TokenIntrospection) GetObfuscatedSubjectOk() (*string, bool)` +`func (o *IntrospectedOAuth2Token) GetObfuscatedSubjectOk() (*string, bool)` GetObfuscatedSubjectOk returns a tuple with the ObfuscatedSubject field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetObfuscatedSubject -`func (o *OAuth2TokenIntrospection) SetObfuscatedSubject(v string)` +`func (o *IntrospectedOAuth2Token) SetObfuscatedSubject(v string)` SetObfuscatedSubject sets ObfuscatedSubject field to given value. ### HasObfuscatedSubject -`func (o *OAuth2TokenIntrospection) HasObfuscatedSubject() bool` +`func (o *IntrospectedOAuth2Token) HasObfuscatedSubject() bool` HasObfuscatedSubject returns a boolean if a field has been set. ### GetScope -`func (o *OAuth2TokenIntrospection) GetScope() string` +`func (o *IntrospectedOAuth2Token) GetScope() string` GetScope returns the Scope field if non-nil, zero value otherwise. ### GetScopeOk -`func (o *OAuth2TokenIntrospection) GetScopeOk() (*string, bool)` +`func (o *IntrospectedOAuth2Token) GetScopeOk() (*string, bool)` GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetScope -`func (o *OAuth2TokenIntrospection) SetScope(v string)` +`func (o *IntrospectedOAuth2Token) SetScope(v string)` SetScope sets Scope field to given value. ### HasScope -`func (o *OAuth2TokenIntrospection) HasScope() bool` +`func (o *IntrospectedOAuth2Token) HasScope() bool` HasScope returns a boolean if a field has been set. ### GetSub -`func (o *OAuth2TokenIntrospection) GetSub() string` +`func (o *IntrospectedOAuth2Token) GetSub() string` GetSub returns the Sub field if non-nil, zero value otherwise. ### GetSubOk -`func (o *OAuth2TokenIntrospection) GetSubOk() (*string, bool)` +`func (o *IntrospectedOAuth2Token) GetSubOk() (*string, bool)` GetSubOk returns a tuple with the Sub field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSub -`func (o *OAuth2TokenIntrospection) SetSub(v string)` +`func (o *IntrospectedOAuth2Token) SetSub(v string)` SetSub sets Sub field to given value. ### HasSub -`func (o *OAuth2TokenIntrospection) HasSub() bool` +`func (o *IntrospectedOAuth2Token) HasSub() bool` HasSub returns a boolean if a field has been set. ### GetTokenType -`func (o *OAuth2TokenIntrospection) GetTokenType() string` +`func (o *IntrospectedOAuth2Token) GetTokenType() string` GetTokenType returns the TokenType field if non-nil, zero value otherwise. ### GetTokenTypeOk -`func (o *OAuth2TokenIntrospection) GetTokenTypeOk() (*string, bool)` +`func (o *IntrospectedOAuth2Token) GetTokenTypeOk() (*string, bool)` GetTokenTypeOk returns a tuple with the TokenType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTokenType -`func (o *OAuth2TokenIntrospection) SetTokenType(v string)` +`func (o *IntrospectedOAuth2Token) SetTokenType(v string)` SetTokenType sets TokenType field to given value. ### HasTokenType -`func (o *OAuth2TokenIntrospection) HasTokenType() bool` +`func (o *IntrospectedOAuth2Token) HasTokenType() bool` HasTokenType returns a boolean if a field has been set. ### GetTokenUse -`func (o *OAuth2TokenIntrospection) GetTokenUse() string` +`func (o *IntrospectedOAuth2Token) GetTokenUse() string` GetTokenUse returns the TokenUse field if non-nil, zero value otherwise. ### GetTokenUseOk -`func (o *OAuth2TokenIntrospection) GetTokenUseOk() (*string, bool)` +`func (o *IntrospectedOAuth2Token) GetTokenUseOk() (*string, bool)` GetTokenUseOk returns a tuple with the TokenUse field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTokenUse -`func (o *OAuth2TokenIntrospection) SetTokenUse(v string)` +`func (o *IntrospectedOAuth2Token) SetTokenUse(v string)` SetTokenUse sets TokenUse field to given value. ### HasTokenUse -`func (o *OAuth2TokenIntrospection) HasTokenUse() bool` +`func (o *IntrospectedOAuth2Token) HasTokenUse() bool` HasTokenUse returns a boolean if a field has been set. ### GetUsername -`func (o *OAuth2TokenIntrospection) GetUsername() string` +`func (o *IntrospectedOAuth2Token) GetUsername() string` GetUsername returns the Username field if non-nil, zero value otherwise. ### GetUsernameOk -`func (o *OAuth2TokenIntrospection) GetUsernameOk() (*string, bool)` +`func (o *IntrospectedOAuth2Token) GetUsernameOk() (*string, bool)` GetUsernameOk returns a tuple with the Username field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUsername -`func (o *OAuth2TokenIntrospection) SetUsername(v string)` +`func (o *IntrospectedOAuth2Token) SetUsername(v string)` SetUsername sets Username field to given value. ### HasUsername -`func (o *OAuth2TokenIntrospection) HasUsername() bool` +`func (o *IntrospectedOAuth2Token) HasUsername() bool` HasUsername returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/IsReady200Response.md b/clients/hydra/go/docs/IsReady200Response.md new file mode 100644 index 00000000000..350397d74d2 --- /dev/null +++ b/clients/hydra/go/docs/IsReady200Response.md @@ -0,0 +1,56 @@ +# IsReady200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | Always \"ok\". | [optional] + +## Methods + +### NewIsReady200Response + +`func NewIsReady200Response() *IsReady200Response` + +NewIsReady200Response instantiates a new IsReady200Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIsReady200ResponseWithDefaults + +`func NewIsReady200ResponseWithDefaults() *IsReady200Response` + +NewIsReady200ResponseWithDefaults instantiates a new IsReady200Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *IsReady200Response) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *IsReady200Response) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *IsReady200Response) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *IsReady200Response) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/IsReady503Response.md b/clients/hydra/go/docs/IsReady503Response.md new file mode 100644 index 00000000000..425d112f075 --- /dev/null +++ b/clients/hydra/go/docs/IsReady503Response.md @@ -0,0 +1,56 @@ +# IsReady503Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | Pointer to **map[string]string** | Errors contains a list of errors that caused the not ready status. | [optional] + +## Methods + +### NewIsReady503Response + +`func NewIsReady503Response() *IsReady503Response` + +NewIsReady503Response instantiates a new IsReady503Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIsReady503ResponseWithDefaults + +`func NewIsReady503ResponseWithDefaults() *IsReady503Response` + +NewIsReady503ResponseWithDefaults instantiates a new IsReady503Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetErrors + +`func (o *IsReady503Response) GetErrors() map[string]string` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *IsReady503Response) GetErrorsOk() (*map[string]string, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *IsReady503Response) SetErrors(v map[string]string)` + +SetErrors sets Errors field to given value. + +### HasErrors + +`func (o *IsReady503Response) HasErrors() bool` + +HasErrors returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/PatchDocument.md b/clients/hydra/go/docs/JsonPatch.md similarity index 50% rename from clients/hydra/go/docs/PatchDocument.md rename to clients/hydra/go/docs/JsonPatch.md index c577c7d883e..b114e8e914c 100644 --- a/clients/hydra/go/docs/PatchDocument.md +++ b/clients/hydra/go/docs/JsonPatch.md @@ -1,123 +1,133 @@ -# PatchDocument +# JsonPatch ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**From** | Pointer to **string** | A JSON-pointer | [optional] -**Op** | **string** | The operation to be performed | -**Path** | **string** | A JSON-pointer | -**Value** | Pointer to **map[string]interface{}** | The value to be used within the operations | [optional] +**From** | Pointer to **string** | 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** | **string** | The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". | +**Path** | **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). | +**Value** | Pointer to **interface{}** | The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). | [optional] ## Methods -### NewPatchDocument +### NewJsonPatch -`func NewPatchDocument(op string, path string, ) *PatchDocument` +`func NewJsonPatch(op string, path string, ) *JsonPatch` -NewPatchDocument instantiates a new PatchDocument object +NewJsonPatch instantiates a new JsonPatch object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewPatchDocumentWithDefaults +### NewJsonPatchWithDefaults -`func NewPatchDocumentWithDefaults() *PatchDocument` +`func NewJsonPatchWithDefaults() *JsonPatch` -NewPatchDocumentWithDefaults instantiates a new PatchDocument object +NewJsonPatchWithDefaults instantiates a new JsonPatch object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetFrom -`func (o *PatchDocument) GetFrom() string` +`func (o *JsonPatch) GetFrom() string` GetFrom returns the From field if non-nil, zero value otherwise. ### GetFromOk -`func (o *PatchDocument) GetFromOk() (*string, bool)` +`func (o *JsonPatch) GetFromOk() (*string, bool)` GetFromOk returns a tuple with the From field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFrom -`func (o *PatchDocument) SetFrom(v string)` +`func (o *JsonPatch) SetFrom(v string)` SetFrom sets From field to given value. ### HasFrom -`func (o *PatchDocument) HasFrom() bool` +`func (o *JsonPatch) HasFrom() bool` HasFrom returns a boolean if a field has been set. ### GetOp -`func (o *PatchDocument) GetOp() string` +`func (o *JsonPatch) GetOp() string` GetOp returns the Op field if non-nil, zero value otherwise. ### GetOpOk -`func (o *PatchDocument) GetOpOk() (*string, bool)` +`func (o *JsonPatch) GetOpOk() (*string, bool)` GetOpOk returns a tuple with the Op field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOp -`func (o *PatchDocument) SetOp(v string)` +`func (o *JsonPatch) SetOp(v string)` SetOp sets Op field to given value. ### GetPath -`func (o *PatchDocument) GetPath() string` +`func (o *JsonPatch) GetPath() string` GetPath returns the Path field if non-nil, zero value otherwise. ### GetPathOk -`func (o *PatchDocument) GetPathOk() (*string, bool)` +`func (o *JsonPatch) GetPathOk() (*string, bool)` GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPath -`func (o *PatchDocument) SetPath(v string)` +`func (o *JsonPatch) SetPath(v string)` SetPath sets Path field to given value. ### GetValue -`func (o *PatchDocument) GetValue() map[string]interface{}` +`func (o *JsonPatch) GetValue() interface{}` GetValue returns the Value field if non-nil, zero value otherwise. ### GetValueOk -`func (o *PatchDocument) GetValueOk() (*map[string]interface{}, bool)` +`func (o *JsonPatch) GetValueOk() (*interface{}, bool)` GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetValue -`func (o *PatchDocument) SetValue(v map[string]interface{})` +`func (o *JsonPatch) SetValue(v interface{})` SetValue sets Value field to given value. ### HasValue -`func (o *PatchDocument) HasValue() bool` +`func (o *JsonPatch) HasValue() bool` HasValue returns a boolean if a field has been set. +### SetValueNil + +`func (o *JsonPatch) SetValueNil(b bool)` + + SetValueNil sets the value for Value to be an explicit nil + +### UnsetValue +`func (o *JsonPatch) UnsetValue()` + +UnsetValue ensures that no value is present for Value, not even an explicit nil [[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/go/docs/JSONWebKey.md b/clients/hydra/go/docs/JsonWebKey.md similarity index 75% rename from clients/hydra/go/docs/JSONWebKey.md rename to clients/hydra/go/docs/JsonWebKey.md index 46fda7c12ba..008cb4a4ba7 100644 --- a/clients/hydra/go/docs/JSONWebKey.md +++ b/clients/hydra/go/docs/JsonWebKey.md @@ -1,4 +1,4 @@ -# JSONWebKey +# JsonWebKey ## Properties @@ -24,425 +24,425 @@ Name | Type | Description | Notes ## Methods -### NewJSONWebKey +### NewJsonWebKey -`func NewJSONWebKey(alg string, kid string, kty string, use string, ) *JSONWebKey` +`func NewJsonWebKey(alg string, kid string, kty string, use string, ) *JsonWebKey` -NewJSONWebKey instantiates a new JSONWebKey object +NewJsonWebKey instantiates a new JsonWebKey object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewJSONWebKeyWithDefaults +### NewJsonWebKeyWithDefaults -`func NewJSONWebKeyWithDefaults() *JSONWebKey` +`func NewJsonWebKeyWithDefaults() *JsonWebKey` -NewJSONWebKeyWithDefaults instantiates a new JSONWebKey object +NewJsonWebKeyWithDefaults instantiates a new JsonWebKey object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetAlg -`func (o *JSONWebKey) GetAlg() string` +`func (o *JsonWebKey) GetAlg() string` GetAlg returns the Alg field if non-nil, zero value otherwise. ### GetAlgOk -`func (o *JSONWebKey) GetAlgOk() (*string, bool)` +`func (o *JsonWebKey) GetAlgOk() (*string, bool)` GetAlgOk returns a tuple with the Alg field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAlg -`func (o *JSONWebKey) SetAlg(v string)` +`func (o *JsonWebKey) SetAlg(v string)` SetAlg sets Alg field to given value. ### GetCrv -`func (o *JSONWebKey) GetCrv() string` +`func (o *JsonWebKey) GetCrv() string` GetCrv returns the Crv field if non-nil, zero value otherwise. ### GetCrvOk -`func (o *JSONWebKey) GetCrvOk() (*string, bool)` +`func (o *JsonWebKey) GetCrvOk() (*string, bool)` GetCrvOk returns a tuple with the Crv field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCrv -`func (o *JSONWebKey) SetCrv(v string)` +`func (o *JsonWebKey) SetCrv(v string)` SetCrv sets Crv field to given value. ### HasCrv -`func (o *JSONWebKey) HasCrv() bool` +`func (o *JsonWebKey) HasCrv() bool` HasCrv returns a boolean if a field has been set. ### GetD -`func (o *JSONWebKey) GetD() string` +`func (o *JsonWebKey) GetD() string` GetD returns the D field if non-nil, zero value otherwise. ### GetDOk -`func (o *JSONWebKey) GetDOk() (*string, bool)` +`func (o *JsonWebKey) GetDOk() (*string, bool)` GetDOk returns a tuple with the D field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetD -`func (o *JSONWebKey) SetD(v string)` +`func (o *JsonWebKey) SetD(v string)` SetD sets D field to given value. ### HasD -`func (o *JSONWebKey) HasD() bool` +`func (o *JsonWebKey) HasD() bool` HasD returns a boolean if a field has been set. ### GetDp -`func (o *JSONWebKey) GetDp() string` +`func (o *JsonWebKey) GetDp() string` GetDp returns the Dp field if non-nil, zero value otherwise. ### GetDpOk -`func (o *JSONWebKey) GetDpOk() (*string, bool)` +`func (o *JsonWebKey) GetDpOk() (*string, bool)` GetDpOk returns a tuple with the Dp field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDp -`func (o *JSONWebKey) SetDp(v string)` +`func (o *JsonWebKey) SetDp(v string)` SetDp sets Dp field to given value. ### HasDp -`func (o *JSONWebKey) HasDp() bool` +`func (o *JsonWebKey) HasDp() bool` HasDp returns a boolean if a field has been set. ### GetDq -`func (o *JSONWebKey) GetDq() string` +`func (o *JsonWebKey) GetDq() string` GetDq returns the Dq field if non-nil, zero value otherwise. ### GetDqOk -`func (o *JSONWebKey) GetDqOk() (*string, bool)` +`func (o *JsonWebKey) GetDqOk() (*string, bool)` GetDqOk returns a tuple with the Dq field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDq -`func (o *JSONWebKey) SetDq(v string)` +`func (o *JsonWebKey) SetDq(v string)` SetDq sets Dq field to given value. ### HasDq -`func (o *JSONWebKey) HasDq() bool` +`func (o *JsonWebKey) HasDq() bool` HasDq returns a boolean if a field has been set. ### GetE -`func (o *JSONWebKey) GetE() string` +`func (o *JsonWebKey) GetE() string` GetE returns the E field if non-nil, zero value otherwise. ### GetEOk -`func (o *JSONWebKey) GetEOk() (*string, bool)` +`func (o *JsonWebKey) GetEOk() (*string, bool)` GetEOk returns a tuple with the E field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetE -`func (o *JSONWebKey) SetE(v string)` +`func (o *JsonWebKey) SetE(v string)` SetE sets E field to given value. ### HasE -`func (o *JSONWebKey) HasE() bool` +`func (o *JsonWebKey) HasE() bool` HasE returns a boolean if a field has been set. ### GetK -`func (o *JSONWebKey) GetK() string` +`func (o *JsonWebKey) GetK() string` GetK returns the K field if non-nil, zero value otherwise. ### GetKOk -`func (o *JSONWebKey) GetKOk() (*string, bool)` +`func (o *JsonWebKey) GetKOk() (*string, bool)` GetKOk returns a tuple with the K field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetK -`func (o *JSONWebKey) SetK(v string)` +`func (o *JsonWebKey) SetK(v string)` SetK sets K field to given value. ### HasK -`func (o *JSONWebKey) HasK() bool` +`func (o *JsonWebKey) HasK() bool` HasK returns a boolean if a field has been set. ### GetKid -`func (o *JSONWebKey) GetKid() string` +`func (o *JsonWebKey) GetKid() string` GetKid returns the Kid field if non-nil, zero value otherwise. ### GetKidOk -`func (o *JSONWebKey) GetKidOk() (*string, bool)` +`func (o *JsonWebKey) GetKidOk() (*string, bool)` GetKidOk returns a tuple with the Kid field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetKid -`func (o *JSONWebKey) SetKid(v string)` +`func (o *JsonWebKey) SetKid(v string)` SetKid sets Kid field to given value. ### GetKty -`func (o *JSONWebKey) GetKty() string` +`func (o *JsonWebKey) GetKty() string` GetKty returns the Kty field if non-nil, zero value otherwise. ### GetKtyOk -`func (o *JSONWebKey) GetKtyOk() (*string, bool)` +`func (o *JsonWebKey) GetKtyOk() (*string, bool)` GetKtyOk returns a tuple with the Kty field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetKty -`func (o *JSONWebKey) SetKty(v string)` +`func (o *JsonWebKey) SetKty(v string)` SetKty sets Kty field to given value. ### GetN -`func (o *JSONWebKey) GetN() string` +`func (o *JsonWebKey) GetN() string` GetN returns the N field if non-nil, zero value otherwise. ### GetNOk -`func (o *JSONWebKey) GetNOk() (*string, bool)` +`func (o *JsonWebKey) GetNOk() (*string, bool)` GetNOk returns a tuple with the N field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetN -`func (o *JSONWebKey) SetN(v string)` +`func (o *JsonWebKey) SetN(v string)` SetN sets N field to given value. ### HasN -`func (o *JSONWebKey) HasN() bool` +`func (o *JsonWebKey) HasN() bool` HasN returns a boolean if a field has been set. ### GetP -`func (o *JSONWebKey) GetP() string` +`func (o *JsonWebKey) GetP() string` GetP returns the P field if non-nil, zero value otherwise. ### GetPOk -`func (o *JSONWebKey) GetPOk() (*string, bool)` +`func (o *JsonWebKey) GetPOk() (*string, bool)` GetPOk returns a tuple with the P field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetP -`func (o *JSONWebKey) SetP(v string)` +`func (o *JsonWebKey) SetP(v string)` SetP sets P field to given value. ### HasP -`func (o *JSONWebKey) HasP() bool` +`func (o *JsonWebKey) HasP() bool` HasP returns a boolean if a field has been set. ### GetQ -`func (o *JSONWebKey) GetQ() string` +`func (o *JsonWebKey) GetQ() string` GetQ returns the Q field if non-nil, zero value otherwise. ### GetQOk -`func (o *JSONWebKey) GetQOk() (*string, bool)` +`func (o *JsonWebKey) GetQOk() (*string, bool)` GetQOk returns a tuple with the Q field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetQ -`func (o *JSONWebKey) SetQ(v string)` +`func (o *JsonWebKey) SetQ(v string)` SetQ sets Q field to given value. ### HasQ -`func (o *JSONWebKey) HasQ() bool` +`func (o *JsonWebKey) HasQ() bool` HasQ returns a boolean if a field has been set. ### GetQi -`func (o *JSONWebKey) GetQi() string` +`func (o *JsonWebKey) GetQi() string` GetQi returns the Qi field if non-nil, zero value otherwise. ### GetQiOk -`func (o *JSONWebKey) GetQiOk() (*string, bool)` +`func (o *JsonWebKey) GetQiOk() (*string, bool)` GetQiOk returns a tuple with the Qi field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetQi -`func (o *JSONWebKey) SetQi(v string)` +`func (o *JsonWebKey) SetQi(v string)` SetQi sets Qi field to given value. ### HasQi -`func (o *JSONWebKey) HasQi() bool` +`func (o *JsonWebKey) HasQi() bool` HasQi returns a boolean if a field has been set. ### GetUse -`func (o *JSONWebKey) GetUse() string` +`func (o *JsonWebKey) GetUse() string` GetUse returns the Use field if non-nil, zero value otherwise. ### GetUseOk -`func (o *JSONWebKey) GetUseOk() (*string, bool)` +`func (o *JsonWebKey) GetUseOk() (*string, bool)` GetUseOk returns a tuple with the Use field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUse -`func (o *JSONWebKey) SetUse(v string)` +`func (o *JsonWebKey) SetUse(v string)` SetUse sets Use field to given value. ### GetX -`func (o *JSONWebKey) GetX() string` +`func (o *JsonWebKey) GetX() string` GetX returns the X field if non-nil, zero value otherwise. ### GetXOk -`func (o *JSONWebKey) GetXOk() (*string, bool)` +`func (o *JsonWebKey) GetXOk() (*string, bool)` GetXOk returns a tuple with the X field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetX -`func (o *JSONWebKey) SetX(v string)` +`func (o *JsonWebKey) SetX(v string)` SetX sets X field to given value. ### HasX -`func (o *JSONWebKey) HasX() bool` +`func (o *JsonWebKey) HasX() bool` HasX returns a boolean if a field has been set. ### GetX5c -`func (o *JSONWebKey) GetX5c() []string` +`func (o *JsonWebKey) GetX5c() []string` GetX5c returns the X5c field if non-nil, zero value otherwise. ### GetX5cOk -`func (o *JSONWebKey) GetX5cOk() (*[]string, bool)` +`func (o *JsonWebKey) GetX5cOk() (*[]string, bool)` GetX5cOk returns a tuple with the X5c field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetX5c -`func (o *JSONWebKey) SetX5c(v []string)` +`func (o *JsonWebKey) SetX5c(v []string)` SetX5c sets X5c field to given value. ### HasX5c -`func (o *JSONWebKey) HasX5c() bool` +`func (o *JsonWebKey) HasX5c() bool` HasX5c returns a boolean if a field has been set. ### GetY -`func (o *JSONWebKey) GetY() string` +`func (o *JsonWebKey) GetY() string` GetY returns the Y field if non-nil, zero value otherwise. ### GetYOk -`func (o *JSONWebKey) GetYOk() (*string, bool)` +`func (o *JsonWebKey) GetYOk() (*string, bool)` GetYOk returns a tuple with the Y field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetY -`func (o *JSONWebKey) SetY(v string)` +`func (o *JsonWebKey) SetY(v string)` SetY sets Y field to given value. ### HasY -`func (o *JSONWebKey) HasY() bool` +`func (o *JsonWebKey) HasY() bool` HasY returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/JSONWebKeySet.md b/clients/hydra/go/docs/JsonWebKeySet.md similarity index 53% rename from clients/hydra/go/docs/JSONWebKeySet.md rename to clients/hydra/go/docs/JsonWebKeySet.md index b27fc367ccf..2f534f282fa 100644 --- a/clients/hydra/go/docs/JSONWebKeySet.md +++ b/clients/hydra/go/docs/JsonWebKeySet.md @@ -1,52 +1,52 @@ -# JSONWebKeySet +# JsonWebKeySet ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Keys** | Pointer to [**[]JSONWebKey**](JSONWebKey.md) | The value of the \"keys\" parameter is an array of 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** | Pointer to [**[]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] ## Methods -### NewJSONWebKeySet +### NewJsonWebKeySet -`func NewJSONWebKeySet() *JSONWebKeySet` +`func NewJsonWebKeySet() *JsonWebKeySet` -NewJSONWebKeySet instantiates a new JSONWebKeySet object +NewJsonWebKeySet instantiates a new JsonWebKeySet object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewJSONWebKeySetWithDefaults +### NewJsonWebKeySetWithDefaults -`func NewJSONWebKeySetWithDefaults() *JSONWebKeySet` +`func NewJsonWebKeySetWithDefaults() *JsonWebKeySet` -NewJSONWebKeySetWithDefaults instantiates a new JSONWebKeySet object +NewJsonWebKeySetWithDefaults instantiates a new JsonWebKeySet object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetKeys -`func (o *JSONWebKeySet) GetKeys() []JSONWebKey` +`func (o *JsonWebKeySet) GetKeys() []JsonWebKey` GetKeys returns the Keys field if non-nil, zero value otherwise. ### GetKeysOk -`func (o *JSONWebKeySet) GetKeysOk() (*[]JSONWebKey, bool)` +`func (o *JsonWebKeySet) GetKeysOk() (*[]JsonWebKey, bool)` GetKeysOk returns a tuple with the Keys field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetKeys -`func (o *JSONWebKeySet) SetKeys(v []JSONWebKey)` +`func (o *JsonWebKeySet) SetKeys(v []JsonWebKey)` SetKeys sets Keys field to given value. ### HasKeys -`func (o *JSONWebKeySet) HasKeys() bool` +`func (o *JsonWebKeySet) HasKeys() bool` HasKeys returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/JsonWebKeySetGeneratorRequest.md b/clients/hydra/go/docs/JsonWebKeySetGeneratorRequest.md deleted file mode 100644 index 64a9f67ee9d..00000000000 --- a/clients/hydra/go/docs/JsonWebKeySetGeneratorRequest.md +++ /dev/null @@ -1,93 +0,0 @@ -# JsonWebKeySetGeneratorRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Alg** | **string** | The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" | -**Kid** | **string** | The kid of the key to be created | -**Use** | **string** | 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\". | - -## Methods - -### NewJsonWebKeySetGeneratorRequest - -`func NewJsonWebKeySetGeneratorRequest(alg string, kid string, use string, ) *JsonWebKeySetGeneratorRequest` - -NewJsonWebKeySetGeneratorRequest instantiates a new JsonWebKeySetGeneratorRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewJsonWebKeySetGeneratorRequestWithDefaults - -`func NewJsonWebKeySetGeneratorRequestWithDefaults() *JsonWebKeySetGeneratorRequest` - -NewJsonWebKeySetGeneratorRequestWithDefaults instantiates a new JsonWebKeySetGeneratorRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAlg - -`func (o *JsonWebKeySetGeneratorRequest) GetAlg() string` - -GetAlg returns the Alg field if non-nil, zero value otherwise. - -### GetAlgOk - -`func (o *JsonWebKeySetGeneratorRequest) GetAlgOk() (*string, bool)` - -GetAlgOk returns a tuple with the Alg field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlg - -`func (o *JsonWebKeySetGeneratorRequest) SetAlg(v string)` - -SetAlg sets Alg field to given value. - - -### GetKid - -`func (o *JsonWebKeySetGeneratorRequest) GetKid() string` - -GetKid returns the Kid field if non-nil, zero value otherwise. - -### GetKidOk - -`func (o *JsonWebKeySetGeneratorRequest) GetKidOk() (*string, bool)` - -GetKidOk returns a tuple with the Kid field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKid - -`func (o *JsonWebKeySetGeneratorRequest) SetKid(v string)` - -SetKid sets Kid field to given value. - - -### GetUse - -`func (o *JsonWebKeySetGeneratorRequest) GetUse() string` - -GetUse returns the Use field if non-nil, zero value otherwise. - -### GetUseOk - -`func (o *JsonWebKeySetGeneratorRequest) GetUseOk() (*string, bool)` - -GetUseOk returns a tuple with the Use field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUse - -`func (o *JsonWebKeySetGeneratorRequest) SetUse(v string)` - -SetUse sets Use field to given value. - - - -[[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/go/docs/JwkApi.md b/clients/hydra/go/docs/JwkApi.md new file mode 100644 index 00000000000..3527e0b9622 --- /dev/null +++ b/clients/hydra/go/docs/JwkApi.md @@ -0,0 +1,516 @@ +# \JwkApi + +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 + + + +## CreateJsonWebKeySet + +> JsonWebKeySet CreateJsonWebKeySet(ctx, set).CreateJsonWebKeySet(createJsonWebKeySet).Execute() + +Create JSON Web Key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**set** | **string** | The JSON Web Key Set ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateJsonWebKeySetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createJsonWebKeySet** | [**CreateJsonWebKeySet**](CreateJsonWebKeySet.md) | | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> DeleteJsonWebKey(ctx, set, kid).Execute() + +Delete JSON Web Key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) + resp, 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) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**set** | **string** | The JSON Web Key Set | +**kid** | **string** | The JSON Web Key ID (kid) | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteJsonWebKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> DeleteJsonWebKeySet(ctx, set).Execute() + +Delete JSON Web Key Set + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + set := "set_example" // string | The JSON Web Key Set + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, 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) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**set** | **string** | The JSON Web Key Set | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteJsonWebKeySetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> JsonWebKeySet GetJsonWebKey(ctx, set, kid).Execute() + +Get JSON Web Key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**set** | **string** | JSON Web Key Set ID | +**kid** | **string** | JSON Web Key ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetJsonWebKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> JsonWebKeySet GetJsonWebKeySet(ctx, set).Execute() + +Retrieve a JSON Web Key Set + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**set** | **string** | JSON Web Key Set ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetJsonWebKeySetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> JsonWebKey SetJsonWebKey(ctx, set, kid).JsonWebKey(jsonWebKey).Execute() + +Set JSON Web Key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**set** | **string** | The JSON Web Key Set ID | +**kid** | **string** | JSON Web Key ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSetJsonWebKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **jsonWebKey** | [**JsonWebKey**](JsonWebKey.md) | | + +### Return type + +[**JsonWebKey**](JsonWebKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> JsonWebKeySet SetJsonWebKeySet(ctx, set).JsonWebKeySet(jsonWebKeySet).Execute() + +Update a JSON Web Key Set + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**set** | **string** | The JSON Web Key Set ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSetJsonWebKeySetRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **jsonWebKeySet** | [**JsonWebKeySet**](JsonWebKeySet.md) | | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + diff --git a/clients/hydra/go/docs/MetadataApi.md b/clients/hydra/go/docs/MetadataApi.md index 2a42c989a76..064272fd09b 100644 --- a/clients/hydra/go/docs/MetadataApi.md +++ b/clients/hydra/go/docs/MetadataApi.md @@ -4,15 +4,17 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**Prometheus**](MetadataApi.md#Prometheus) | **Get** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +[**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 -## Prometheus +## GetVersion -> Prometheus(ctx).Execute() +> GetVersion200Response GetVersion(ctx).Execute() -Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +Return Running Software Version. @@ -32,11 +34,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MetadataApi.Prometheus(context.Background()).Execute() + resp, r, err := apiClient.MetadataApi.GetVersion(context.Background()).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MetadataApi.Prometheus``: %v\n", err) + 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) } ``` @@ -46,12 +50,12 @@ This endpoint does not need any parameter. ### Other Parameters -Other parameters are passed through a pointer to a apiPrometheusRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetVersionRequest struct via the builder pattern ### Return type - (empty response body) +[**GetVersion200Response**](GetVersion200Response.md) ### Authorization @@ -60,7 +64,129 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json + +[[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 + +> HealthStatus IsAlive(ctx).Execute() + +Check HTTP Server Status + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiIsAliveRequest struct via the builder pattern + + +### Return type + +[**HealthStatus**](HealthStatus.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> IsReady200Response IsReady(ctx).Execute() + +Check HTTP Server and Database Status + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiIsReadyRequest struct via the builder pattern + + +### Return type + +[**IsReady200Response**](IsReady200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/clients/hydra/go/docs/OAuth2Api.md b/clients/hydra/go/docs/OAuth2Api.md new file mode 100644 index 00000000000..0f986582787 --- /dev/null +++ b/clients/hydra/go/docs/OAuth2Api.md @@ -0,0 +1,1936 @@ +# \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 All OAuth 2.0 Login Sessions of a Subject +[**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 + +> OAuth2RedirectTo AcceptOAuth2ConsentRequest(ctx).ConsentChallenge(consentChallenge).AcceptOAuth2ConsentRequest(acceptOAuth2ConsentRequest).Execute() + +Accept OAuth 2.0 Consent Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAcceptOAuth2ConsentRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **consentChallenge** | **string** | OAuth 2.0 Consent Request Challenge | + **acceptOAuth2ConsentRequest** | [**AcceptOAuth2ConsentRequest**](AcceptOAuth2ConsentRequest.md) | | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> OAuth2RedirectTo AcceptOAuth2LoginRequest(ctx).LoginChallenge(loginChallenge).AcceptOAuth2LoginRequest(acceptOAuth2LoginRequest).Execute() + +Accept OAuth 2.0 Login Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAcceptOAuth2LoginRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginChallenge** | **string** | OAuth 2.0 Login Request Challenge | + **acceptOAuth2LoginRequest** | [**AcceptOAuth2LoginRequest**](AcceptOAuth2LoginRequest.md) | | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> OAuth2RedirectTo AcceptOAuth2LogoutRequest(ctx).LogoutChallenge(logoutChallenge).Execute() + +Accept OAuth 2.0 Session Logout Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAcceptOAuth2LogoutRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **string** | OAuth 2.0 Logout Request Challenge | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> OAuth2Client CreateOAuth2Client(ctx).OAuth2Client(oAuth2Client).Execute() + +Create OAuth 2.0 Client + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateOAuth2ClientRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oAuth2Client** | [**OAuth2Client**](OAuth2Client.md) | OAuth 2.0 Client Request Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> DeleteOAuth2Client(ctx, id).Execute() + +Delete OAuth 2.0 Client + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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.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) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | The id of the OAuth 2.0 Client. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOAuth2ClientRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> DeleteOAuth2Token(ctx).ClientId(clientId).Execute() + +Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + clientId := "clientId_example" // string | OAuth 2.0 Client ID + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, 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) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOAuth2TokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **clientId** | **string** | OAuth 2.0 Client ID | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> DeleteTrustedOAuth2JwtGrantIssuer(ctx, id).Execute() + +Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + id := "id_example" // string | The id of the desired grant + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, 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) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | The id of the desired grant | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteTrustedOAuth2JwtGrantIssuerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> OAuth2Client GetOAuth2Client(ctx, id).Execute() + +Get an OAuth 2.0 Client + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | The id of the OAuth 2.0 Client. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOAuth2ClientRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> OAuth2ConsentRequest GetOAuth2ConsentRequest(ctx).ConsentChallenge(consentChallenge).Execute() + +Get OAuth 2.0 Consent Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOAuth2ConsentRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **consentChallenge** | **string** | OAuth 2.0 Consent Request Challenge | + +### Return type + +[**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> OAuth2LoginRequest GetOAuth2LoginRequest(ctx).LoginChallenge(loginChallenge).Execute() + +Get OAuth 2.0 Login Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOAuth2LoginRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginChallenge** | **string** | OAuth 2.0 Login Request Challenge | + +### Return type + +[**OAuth2LoginRequest**](OAuth2LoginRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> OAuth2LogoutRequest GetOAuth2LogoutRequest(ctx).LogoutChallenge(logoutChallenge).Execute() + +Get OAuth 2.0 Session Logout Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOAuth2LogoutRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **string** | | + +### Return type + +[**OAuth2LogoutRequest**](OAuth2LogoutRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> TrustedOAuth2JwtGrantIssuer GetTrustedOAuth2JwtGrantIssuer(ctx, id).Execute() + +Get Trusted OAuth2 JWT Bearer Grant Type Issuer + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | The id of the desired grant | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTrustedOAuth2JwtGrantIssuerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> IntrospectedOAuth2Token IntrospectOAuth2Token(ctx).Token(token).Scope(scope).Execute() + +Introspect OAuth2 Access and Refresh Tokens + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiIntrospectOAuth2TokenRequest struct via the builder pattern + + +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. | + +### Return type + +[**IntrospectedOAuth2Token**](IntrospectedOAuth2Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[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 + +> []OAuth2Client ListOAuth2Clients(ctx).PageSize(pageSize).PageToken(pageToken).ClientName(clientName).Owner(owner).Execute() + +List OAuth 2.0 Clients + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListOAuth2ClientsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageSize** | **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). | [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). | [default to "1"] + **clientName** | **string** | The name of the clients to filter by. | + **owner** | **string** | The owner of the clients to filter by. | + +### Return type + +[**[]OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> []OAuth2ConsentSession ListOAuth2ConsentSessions(ctx).Subject(subject).PageSize(pageSize).PageToken(pageToken).Execute() + +List OAuth 2.0 Consent Sessions of a Subject + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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") + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2Api.ListOAuth2ConsentSessions(context.Background()).Subject(subject).PageSize(pageSize).PageToken(pageToken).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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListOAuth2ConsentSessionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subject** | **string** | The subject to list the consent sessions for. | + **pageSize** | **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). | [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). | [default to "1"] + +### Return type + +[**[]OAuth2ConsentSession**](OAuth2ConsentSession.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> []TrustedOAuth2JwtGrantIssuer ListTrustedOAuth2JwtGrantIssuers(ctx).MaxItems(maxItems).DefaultItems(defaultItems).Issuer(issuer).Execute() + +List Trusted OAuth2 JWT Bearer Grant Type Issuers + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTrustedOAuth2JwtGrantIssuersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **maxItems** | **int64** | | + **defaultItems** | **int64** | | + **issuer** | **string** | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | + +### Return type + +[**[]TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> ErrorOAuth2 OAuth2Authorize(ctx).Execute() + +OAuth 2.0 Authorize Endpoint + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiOAuth2AuthorizeRequest struct via the builder pattern + + +### Return type + +[**ErrorOAuth2**](ErrorOAuth2.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> OAuth2TokenExchange Oauth2TokenExchange(ctx).GrantType(grantType).ClientId(clientId).Code(code).RedirectUri(redirectUri).RefreshToken(refreshToken).Execute() + +The OAuth 2.0 Token Endpoint + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiOauth2TokenExchangeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **grantType** | **string** | | + **clientId** | **string** | | + **code** | **string** | | + **redirectUri** | **string** | | + **refreshToken** | **string** | | + +### Return type + +[**OAuth2TokenExchange**](OAuth2TokenExchange.md) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[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 + +> OAuth2Client PatchOAuth2Client(ctx, id).JsonPatch(jsonPatch).Execute() + +Patch OAuth 2.0 Client + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | The id of the OAuth 2.0 Client. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchOAuth2ClientRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **jsonPatch** | [**[]JsonPatch**](JsonPatch.md) | OAuth 2.0 Client JSON Patch Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> OAuth2RedirectTo RejectOAuth2ConsentRequest(ctx).ConsentChallenge(consentChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() + +Reject OAuth 2.0 Consent Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRejectOAuth2ConsentRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **consentChallenge** | **string** | OAuth 2.0 Consent Request Challenge | + **rejectOAuth2Request** | [**RejectOAuth2Request**](RejectOAuth2Request.md) | | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> OAuth2RedirectTo RejectOAuth2LoginRequest(ctx).LoginChallenge(loginChallenge).RejectOAuth2Request(rejectOAuth2Request).Execute() + +Reject OAuth 2.0 Login Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRejectOAuth2LoginRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginChallenge** | **string** | OAuth 2.0 Login Request Challenge | + **rejectOAuth2Request** | [**RejectOAuth2Request**](RejectOAuth2Request.md) | | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> RejectOAuth2LogoutRequest(ctx).LogoutChallenge(logoutChallenge).Execute() + +Reject OAuth 2.0 Session Logout Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + logoutChallenge := "logoutChallenge_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, 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) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRejectOAuth2LogoutRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **string** | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> RevokeOAuth2ConsentSessions(ctx).Subject(subject).Client(client).All(all).Execute() + +Revoke OAuth 2.0 Consent Sessions of a Subject + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) + resp, 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) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRevokeOAuth2ConsentSessionsRequest struct via the builder pattern + + +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. | + **all** | **bool** | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> RevokeOAuth2LoginSessions(ctx).Subject(subject).Execute() + +Revokes All OAuth 2.0 Login Sessions of a Subject + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + subject := "subject_example" // string | OAuth 2.0 Subject The subject to revoke authentication sessions for. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2Api.RevokeOAuth2LoginSessions(context.Background()).Subject(subject).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) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRevokeOAuth2LoginSessionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subject** | **string** | OAuth 2.0 Subject The subject to revoke authentication sessions for. | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> RevokeOAuth2Token(ctx).Token(token).Execute() + +Revoke OAuth 2.0 Access or Refresh Token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + token := "token_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OAuth2Api.RevokeOAuth2Token(context.Background()).Token(token).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) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRevokeOAuth2TokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **string** | | + +### Return type + + (empty response body) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[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 + +> OAuth2Client SetOAuth2Client(ctx, id).OAuth2Client(oAuth2Client).Execute() + +Set OAuth 2.0 Client + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | OAuth 2.0 Client ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSetOAuth2ClientRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oAuth2Client** | [**OAuth2Client**](OAuth2Client.md) | OAuth 2.0 Client Request Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> OAuth2Client SetOAuth2ClientLifespans(ctx, id).OAuth2ClientTokenLifespans(oAuth2ClientTokenLifespans).Execute() + +Set OAuth2 Client Token Lifespans + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | OAuth 2.0 Client ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSetOAuth2ClientLifespansRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oAuth2ClientTokenLifespans** | [**OAuth2ClientTokenLifespans**](OAuth2ClientTokenLifespans.md) | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> TrustedOAuth2JwtGrantIssuer TrustOAuth2JwtGrantIssuer(ctx).TrustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer).Execute() + +Trust OAuth2 JWT Bearer Grant Type Issuer + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTrustOAuth2JwtGrantIssuerRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trustOAuth2JwtGrantIssuer** | [**TrustOAuth2JwtGrantIssuer**](TrustOAuth2JwtGrantIssuer.md) | | + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + diff --git a/clients/hydra/go/docs/OAuth2Client.md b/clients/hydra/go/docs/OAuth2Client.md index 030c3af4ed4..9fc94fd071c 100644 --- a/clients/hydra/go/docs/OAuth2Client.md +++ b/clients/hydra/go/docs/OAuth2Client.md @@ -6,39 +6,49 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AllowedCorsOrigins** | Pointer to **[]string** | | [optional] **Audience** | Pointer to **[]string** | | [optional] -**BackchannelLogoutSessionRequired** | Pointer to **bool** | 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] -**BackchannelLogoutUri** | Pointer to **string** | RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. | [optional] -**ClientId** | Pointer to **string** | ID is the id for this client. | [optional] -**ClientName** | Pointer to **string** | Name is the human-readable string name of the client to be presented to the end-user during authorization. | [optional] -**ClientSecret** | Pointer to **string** | Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. | [optional] -**ClientSecretExpiresAt** | Pointer to **int64** | SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. | [optional] -**ClientUri** | Pointer to **string** | ClientURI is an 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] +**AuthorizationCodeGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**AuthorizationCodeGrantIdTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**AuthorizationCodeGrantRefreshTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**BackchannelLogoutSessionRequired** | Pointer to **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] +**BackchannelLogoutUri** | Pointer to **string** | 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] +**ClientCredentialsGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ClientId** | Pointer to **string** | OAuth 2.0 Client ID The ID is autogenerated and immutable. | [optional] +**ClientName** | Pointer to **string** | OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. | [optional] +**ClientSecret** | Pointer to **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. | [optional] +**ClientSecretExpiresAt** | Pointer to **int64** | OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. | [optional] +**ClientUri** | Pointer to **string** | 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** | Pointer to **[]string** | | [optional] -**CreatedAt** | Pointer to **time.Time** | CreatedAt returns the timestamp of the client's creation. | [optional] -**FrontchannelLogoutSessionRequired** | Pointer to **bool** | 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] -**FrontchannelLogoutUri** | Pointer to **string** | 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] +**CreatedAt** | Pointer to **time.Time** | OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. | [optional] +**FrontchannelLogoutSessionRequired** | Pointer to **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] +**FrontchannelLogoutUri** | Pointer to **string** | 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] **GrantTypes** | Pointer to **[]string** | | [optional] -**Jwks** | Pointer to **map[string]interface{}** | | [optional] -**JwksUri** | Pointer to **string** | 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] -**LogoUri** | Pointer to **string** | LogoURI is an URL string that references a logo for the client. | [optional] -**Metadata** | Pointer to **map[string]interface{}** | | [optional] -**Owner** | Pointer to **string** | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] -**PolicyUri** | Pointer to **string** | 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] +**ImplicitGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ImplicitGrantIdTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**Jwks** | Pointer to **interface{}** | OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together. | [optional] +**JwksUri** | Pointer to **string** | OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | [optional] +**JwtBearerGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**LogoUri** | Pointer to **string** | OAuth 2.0 Client Logo URI A URL string referencing the client's logo. | [optional] +**Metadata** | Pointer to **interface{}** | | [optional] +**Owner** | Pointer to **string** | OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] +**PolicyUri** | Pointer to **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. | [optional] **PostLogoutRedirectUris** | Pointer to **[]string** | | [optional] **RedirectUris** | Pointer to **[]string** | | [optional] -**RegistrationAccessToken** | Pointer to **string** | RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. | [optional] -**RegistrationClientUri** | Pointer to **string** | RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] -**RequestObjectSigningAlg** | Pointer to **string** | 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] +**RefreshTokenGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantIdTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantRefreshTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RegistrationAccessToken** | Pointer to **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. | [optional] +**RegistrationClientUri** | Pointer to **string** | OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] +**RequestObjectSigningAlg** | Pointer to **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. | [optional] **RequestUris** | Pointer to **[]string** | | [optional] **ResponseTypes** | Pointer to **[]string** | | [optional] -**Scope** | Pointer to **string** | 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] -**SectorIdentifierUri** | Pointer to **string** | 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] -**SubjectType** | Pointer to **string** | SubjectType requested for responses to this Client. 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] -**TokenEndpointAuthMethod** | Pointer to **string** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional] -**TokenEndpointAuthSigningAlg** | Pointer to **string** | Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] -**TosUri** | Pointer to **string** | TermsOfServiceURI is a URL string that points 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] -**UpdatedAt** | Pointer to **time.Time** | UpdatedAt returns the timestamp of the last update. | [optional] -**UserinfoSignedResponseAlg** | Pointer to **string** | 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] +**Scope** | Pointer to **string** | 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] +**SectorIdentifierUri** | Pointer to **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. | [optional] +**SubjectType** | Pointer to **string** | 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] +**TokenEndpointAuthMethod** | Pointer to **string** | OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] +**TokenEndpointAuthSigningAlg** | Pointer to **string** | OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] +**TosUri** | Pointer to **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. | [optional] +**UpdatedAt** | Pointer to **time.Time** | OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. | [optional] +**UserinfoSignedResponseAlg** | Pointer to **string** | 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] ## Methods @@ -109,6 +119,81 @@ SetAudience sets Audience field to given value. HasAudience returns a boolean if a field has been set. +### GetAuthorizationCodeGrantAccessTokenLifespan + +`func (o *OAuth2Client) GetAuthorizationCodeGrantAccessTokenLifespan() string` + +GetAuthorizationCodeGrantAccessTokenLifespan returns the AuthorizationCodeGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetAuthorizationCodeGrantAccessTokenLifespanOk + +`func (o *OAuth2Client) GetAuthorizationCodeGrantAccessTokenLifespanOk() (*string, bool)` + +GetAuthorizationCodeGrantAccessTokenLifespanOk returns a tuple with the AuthorizationCodeGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorizationCodeGrantAccessTokenLifespan + +`func (o *OAuth2Client) SetAuthorizationCodeGrantAccessTokenLifespan(v string)` + +SetAuthorizationCodeGrantAccessTokenLifespan sets AuthorizationCodeGrantAccessTokenLifespan field to given value. + +### HasAuthorizationCodeGrantAccessTokenLifespan + +`func (o *OAuth2Client) HasAuthorizationCodeGrantAccessTokenLifespan() bool` + +HasAuthorizationCodeGrantAccessTokenLifespan returns a boolean if a field has been set. + +### GetAuthorizationCodeGrantIdTokenLifespan + +`func (o *OAuth2Client) GetAuthorizationCodeGrantIdTokenLifespan() string` + +GetAuthorizationCodeGrantIdTokenLifespan returns the AuthorizationCodeGrantIdTokenLifespan field if non-nil, zero value otherwise. + +### GetAuthorizationCodeGrantIdTokenLifespanOk + +`func (o *OAuth2Client) GetAuthorizationCodeGrantIdTokenLifespanOk() (*string, bool)` + +GetAuthorizationCodeGrantIdTokenLifespanOk returns a tuple with the AuthorizationCodeGrantIdTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorizationCodeGrantIdTokenLifespan + +`func (o *OAuth2Client) SetAuthorizationCodeGrantIdTokenLifespan(v string)` + +SetAuthorizationCodeGrantIdTokenLifespan sets AuthorizationCodeGrantIdTokenLifespan field to given value. + +### HasAuthorizationCodeGrantIdTokenLifespan + +`func (o *OAuth2Client) HasAuthorizationCodeGrantIdTokenLifespan() bool` + +HasAuthorizationCodeGrantIdTokenLifespan returns a boolean if a field has been set. + +### GetAuthorizationCodeGrantRefreshTokenLifespan + +`func (o *OAuth2Client) GetAuthorizationCodeGrantRefreshTokenLifespan() string` + +GetAuthorizationCodeGrantRefreshTokenLifespan returns the AuthorizationCodeGrantRefreshTokenLifespan field if non-nil, zero value otherwise. + +### GetAuthorizationCodeGrantRefreshTokenLifespanOk + +`func (o *OAuth2Client) GetAuthorizationCodeGrantRefreshTokenLifespanOk() (*string, bool)` + +GetAuthorizationCodeGrantRefreshTokenLifespanOk returns a tuple with the AuthorizationCodeGrantRefreshTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorizationCodeGrantRefreshTokenLifespan + +`func (o *OAuth2Client) SetAuthorizationCodeGrantRefreshTokenLifespan(v string)` + +SetAuthorizationCodeGrantRefreshTokenLifespan sets AuthorizationCodeGrantRefreshTokenLifespan field to given value. + +### HasAuthorizationCodeGrantRefreshTokenLifespan + +`func (o *OAuth2Client) HasAuthorizationCodeGrantRefreshTokenLifespan() bool` + +HasAuthorizationCodeGrantRefreshTokenLifespan returns a boolean if a field has been set. + ### GetBackchannelLogoutSessionRequired `func (o *OAuth2Client) GetBackchannelLogoutSessionRequired() bool` @@ -159,6 +244,31 @@ SetBackchannelLogoutUri sets BackchannelLogoutUri field to given value. HasBackchannelLogoutUri returns a boolean if a field has been set. +### GetClientCredentialsGrantAccessTokenLifespan + +`func (o *OAuth2Client) GetClientCredentialsGrantAccessTokenLifespan() string` + +GetClientCredentialsGrantAccessTokenLifespan returns the ClientCredentialsGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetClientCredentialsGrantAccessTokenLifespanOk + +`func (o *OAuth2Client) GetClientCredentialsGrantAccessTokenLifespanOk() (*string, bool)` + +GetClientCredentialsGrantAccessTokenLifespanOk returns a tuple with the ClientCredentialsGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientCredentialsGrantAccessTokenLifespan + +`func (o *OAuth2Client) SetClientCredentialsGrantAccessTokenLifespan(v string)` + +SetClientCredentialsGrantAccessTokenLifespan sets ClientCredentialsGrantAccessTokenLifespan field to given value. + +### HasClientCredentialsGrantAccessTokenLifespan + +`func (o *OAuth2Client) HasClientCredentialsGrantAccessTokenLifespan() bool` + +HasClientCredentialsGrantAccessTokenLifespan returns a boolean if a field has been set. + ### GetClientId `func (o *OAuth2Client) GetClientId() string` @@ -409,22 +519,72 @@ SetGrantTypes sets GrantTypes field to given value. HasGrantTypes returns a boolean if a field has been set. +### GetImplicitGrantAccessTokenLifespan + +`func (o *OAuth2Client) GetImplicitGrantAccessTokenLifespan() string` + +GetImplicitGrantAccessTokenLifespan returns the ImplicitGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetImplicitGrantAccessTokenLifespanOk + +`func (o *OAuth2Client) GetImplicitGrantAccessTokenLifespanOk() (*string, bool)` + +GetImplicitGrantAccessTokenLifespanOk returns a tuple with the ImplicitGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImplicitGrantAccessTokenLifespan + +`func (o *OAuth2Client) SetImplicitGrantAccessTokenLifespan(v string)` + +SetImplicitGrantAccessTokenLifespan sets ImplicitGrantAccessTokenLifespan field to given value. + +### HasImplicitGrantAccessTokenLifespan + +`func (o *OAuth2Client) HasImplicitGrantAccessTokenLifespan() bool` + +HasImplicitGrantAccessTokenLifespan returns a boolean if a field has been set. + +### GetImplicitGrantIdTokenLifespan + +`func (o *OAuth2Client) GetImplicitGrantIdTokenLifespan() string` + +GetImplicitGrantIdTokenLifespan returns the ImplicitGrantIdTokenLifespan field if non-nil, zero value otherwise. + +### GetImplicitGrantIdTokenLifespanOk + +`func (o *OAuth2Client) GetImplicitGrantIdTokenLifespanOk() (*string, bool)` + +GetImplicitGrantIdTokenLifespanOk returns a tuple with the ImplicitGrantIdTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImplicitGrantIdTokenLifespan + +`func (o *OAuth2Client) SetImplicitGrantIdTokenLifespan(v string)` + +SetImplicitGrantIdTokenLifespan sets ImplicitGrantIdTokenLifespan field to given value. + +### HasImplicitGrantIdTokenLifespan + +`func (o *OAuth2Client) HasImplicitGrantIdTokenLifespan() bool` + +HasImplicitGrantIdTokenLifespan returns a boolean if a field has been set. + ### GetJwks -`func (o *OAuth2Client) GetJwks() map[string]interface{}` +`func (o *OAuth2Client) GetJwks() interface{}` GetJwks returns the Jwks field if non-nil, zero value otherwise. ### GetJwksOk -`func (o *OAuth2Client) GetJwksOk() (*map[string]interface{}, bool)` +`func (o *OAuth2Client) GetJwksOk() (*interface{}, bool)` GetJwksOk returns a tuple with the Jwks field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetJwks -`func (o *OAuth2Client) SetJwks(v map[string]interface{})` +`func (o *OAuth2Client) SetJwks(v interface{})` SetJwks sets Jwks field to given value. @@ -434,6 +594,16 @@ SetJwks sets Jwks field to given value. HasJwks returns a boolean if a field has been set. +### SetJwksNil + +`func (o *OAuth2Client) SetJwksNil(b bool)` + + SetJwksNil sets the value for Jwks to be an explicit nil + +### UnsetJwks +`func (o *OAuth2Client) UnsetJwks()` + +UnsetJwks ensures that no value is present for Jwks, not even an explicit nil ### GetJwksUri `func (o *OAuth2Client) GetJwksUri() string` @@ -459,6 +629,31 @@ SetJwksUri sets JwksUri field to given value. HasJwksUri returns a boolean if a field has been set. +### GetJwtBearerGrantAccessTokenLifespan + +`func (o *OAuth2Client) GetJwtBearerGrantAccessTokenLifespan() string` + +GetJwtBearerGrantAccessTokenLifespan returns the JwtBearerGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetJwtBearerGrantAccessTokenLifespanOk + +`func (o *OAuth2Client) GetJwtBearerGrantAccessTokenLifespanOk() (*string, bool)` + +GetJwtBearerGrantAccessTokenLifespanOk returns a tuple with the JwtBearerGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJwtBearerGrantAccessTokenLifespan + +`func (o *OAuth2Client) SetJwtBearerGrantAccessTokenLifespan(v string)` + +SetJwtBearerGrantAccessTokenLifespan sets JwtBearerGrantAccessTokenLifespan field to given value. + +### HasJwtBearerGrantAccessTokenLifespan + +`func (o *OAuth2Client) HasJwtBearerGrantAccessTokenLifespan() bool` + +HasJwtBearerGrantAccessTokenLifespan returns a boolean if a field has been set. + ### GetLogoUri `func (o *OAuth2Client) GetLogoUri() string` @@ -486,20 +681,20 @@ HasLogoUri returns a boolean if a field has been set. ### GetMetadata -`func (o *OAuth2Client) GetMetadata() map[string]interface{}` +`func (o *OAuth2Client) GetMetadata() interface{}` GetMetadata returns the Metadata field if non-nil, zero value otherwise. ### GetMetadataOk -`func (o *OAuth2Client) GetMetadataOk() (*map[string]interface{}, bool)` +`func (o *OAuth2Client) GetMetadataOk() (*interface{}, bool)` GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetadata -`func (o *OAuth2Client) SetMetadata(v map[string]interface{})` +`func (o *OAuth2Client) SetMetadata(v interface{})` SetMetadata sets Metadata field to given value. @@ -509,6 +704,16 @@ SetMetadata sets Metadata field to given value. HasMetadata returns a boolean if a field has been set. +### SetMetadataNil + +`func (o *OAuth2Client) SetMetadataNil(b bool)` + + SetMetadataNil sets the value for Metadata to be an explicit nil + +### UnsetMetadata +`func (o *OAuth2Client) UnsetMetadata()` + +UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil ### GetOwner `func (o *OAuth2Client) GetOwner() string` @@ -609,6 +814,81 @@ SetRedirectUris sets RedirectUris field to given value. HasRedirectUris returns a boolean if a field has been set. +### GetRefreshTokenGrantAccessTokenLifespan + +`func (o *OAuth2Client) GetRefreshTokenGrantAccessTokenLifespan() string` + +GetRefreshTokenGrantAccessTokenLifespan returns the RefreshTokenGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetRefreshTokenGrantAccessTokenLifespanOk + +`func (o *OAuth2Client) GetRefreshTokenGrantAccessTokenLifespanOk() (*string, bool)` + +GetRefreshTokenGrantAccessTokenLifespanOk returns a tuple with the RefreshTokenGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshTokenGrantAccessTokenLifespan + +`func (o *OAuth2Client) SetRefreshTokenGrantAccessTokenLifespan(v string)` + +SetRefreshTokenGrantAccessTokenLifespan sets RefreshTokenGrantAccessTokenLifespan field to given value. + +### HasRefreshTokenGrantAccessTokenLifespan + +`func (o *OAuth2Client) HasRefreshTokenGrantAccessTokenLifespan() bool` + +HasRefreshTokenGrantAccessTokenLifespan returns a boolean if a field has been set. + +### GetRefreshTokenGrantIdTokenLifespan + +`func (o *OAuth2Client) GetRefreshTokenGrantIdTokenLifespan() string` + +GetRefreshTokenGrantIdTokenLifespan returns the RefreshTokenGrantIdTokenLifespan field if non-nil, zero value otherwise. + +### GetRefreshTokenGrantIdTokenLifespanOk + +`func (o *OAuth2Client) GetRefreshTokenGrantIdTokenLifespanOk() (*string, bool)` + +GetRefreshTokenGrantIdTokenLifespanOk returns a tuple with the RefreshTokenGrantIdTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshTokenGrantIdTokenLifespan + +`func (o *OAuth2Client) SetRefreshTokenGrantIdTokenLifespan(v string)` + +SetRefreshTokenGrantIdTokenLifespan sets RefreshTokenGrantIdTokenLifespan field to given value. + +### HasRefreshTokenGrantIdTokenLifespan + +`func (o *OAuth2Client) HasRefreshTokenGrantIdTokenLifespan() bool` + +HasRefreshTokenGrantIdTokenLifespan returns a boolean if a field has been set. + +### GetRefreshTokenGrantRefreshTokenLifespan + +`func (o *OAuth2Client) GetRefreshTokenGrantRefreshTokenLifespan() string` + +GetRefreshTokenGrantRefreshTokenLifespan returns the RefreshTokenGrantRefreshTokenLifespan field if non-nil, zero value otherwise. + +### GetRefreshTokenGrantRefreshTokenLifespanOk + +`func (o *OAuth2Client) GetRefreshTokenGrantRefreshTokenLifespanOk() (*string, bool)` + +GetRefreshTokenGrantRefreshTokenLifespanOk returns a tuple with the RefreshTokenGrantRefreshTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshTokenGrantRefreshTokenLifespan + +`func (o *OAuth2Client) SetRefreshTokenGrantRefreshTokenLifespan(v string)` + +SetRefreshTokenGrantRefreshTokenLifespan sets RefreshTokenGrantRefreshTokenLifespan field to given value. + +### HasRefreshTokenGrantRefreshTokenLifespan + +`func (o *OAuth2Client) HasRefreshTokenGrantRefreshTokenLifespan() bool` + +HasRefreshTokenGrantRefreshTokenLifespan returns a boolean if a field has been set. + ### GetRegistrationAccessToken `func (o *OAuth2Client) GetRegistrationAccessToken() string` diff --git a/clients/hydra/go/docs/OAuth2ClientTokenLifespans.md b/clients/hydra/go/docs/OAuth2ClientTokenLifespans.md new file mode 100644 index 00000000000..cda6ca600ca --- /dev/null +++ b/clients/hydra/go/docs/OAuth2ClientTokenLifespans.md @@ -0,0 +1,290 @@ +# OAuth2ClientTokenLifespans + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthorizationCodeGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**AuthorizationCodeGrantIdTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**AuthorizationCodeGrantRefreshTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ClientCredentialsGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ImplicitGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**ImplicitGrantIdTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**JwtBearerGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantAccessTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantIdTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**RefreshTokenGrantRefreshTokenLifespan** | Pointer to **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] + +## Methods + +### NewOAuth2ClientTokenLifespans + +`func NewOAuth2ClientTokenLifespans() *OAuth2ClientTokenLifespans` + +NewOAuth2ClientTokenLifespans instantiates a new OAuth2ClientTokenLifespans object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOAuth2ClientTokenLifespansWithDefaults + +`func NewOAuth2ClientTokenLifespansWithDefaults() *OAuth2ClientTokenLifespans` + +NewOAuth2ClientTokenLifespansWithDefaults instantiates a new OAuth2ClientTokenLifespans object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAuthorizationCodeGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantAccessTokenLifespan() string` + +GetAuthorizationCodeGrantAccessTokenLifespan returns the AuthorizationCodeGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetAuthorizationCodeGrantAccessTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantAccessTokenLifespanOk() (*string, bool)` + +GetAuthorizationCodeGrantAccessTokenLifespanOk returns a tuple with the AuthorizationCodeGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorizationCodeGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetAuthorizationCodeGrantAccessTokenLifespan(v string)` + +SetAuthorizationCodeGrantAccessTokenLifespan sets AuthorizationCodeGrantAccessTokenLifespan field to given value. + +### HasAuthorizationCodeGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasAuthorizationCodeGrantAccessTokenLifespan() bool` + +HasAuthorizationCodeGrantAccessTokenLifespan returns a boolean if a field has been set. + +### GetAuthorizationCodeGrantIdTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantIdTokenLifespan() string` + +GetAuthorizationCodeGrantIdTokenLifespan returns the AuthorizationCodeGrantIdTokenLifespan field if non-nil, zero value otherwise. + +### GetAuthorizationCodeGrantIdTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantIdTokenLifespanOk() (*string, bool)` + +GetAuthorizationCodeGrantIdTokenLifespanOk returns a tuple with the AuthorizationCodeGrantIdTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorizationCodeGrantIdTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetAuthorizationCodeGrantIdTokenLifespan(v string)` + +SetAuthorizationCodeGrantIdTokenLifespan sets AuthorizationCodeGrantIdTokenLifespan field to given value. + +### HasAuthorizationCodeGrantIdTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasAuthorizationCodeGrantIdTokenLifespan() bool` + +HasAuthorizationCodeGrantIdTokenLifespan returns a boolean if a field has been set. + +### GetAuthorizationCodeGrantRefreshTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantRefreshTokenLifespan() string` + +GetAuthorizationCodeGrantRefreshTokenLifespan returns the AuthorizationCodeGrantRefreshTokenLifespan field if non-nil, zero value otherwise. + +### GetAuthorizationCodeGrantRefreshTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantRefreshTokenLifespanOk() (*string, bool)` + +GetAuthorizationCodeGrantRefreshTokenLifespanOk returns a tuple with the AuthorizationCodeGrantRefreshTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorizationCodeGrantRefreshTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetAuthorizationCodeGrantRefreshTokenLifespan(v string)` + +SetAuthorizationCodeGrantRefreshTokenLifespan sets AuthorizationCodeGrantRefreshTokenLifespan field to given value. + +### HasAuthorizationCodeGrantRefreshTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasAuthorizationCodeGrantRefreshTokenLifespan() bool` + +HasAuthorizationCodeGrantRefreshTokenLifespan returns a boolean if a field has been set. + +### GetClientCredentialsGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetClientCredentialsGrantAccessTokenLifespan() string` + +GetClientCredentialsGrantAccessTokenLifespan returns the ClientCredentialsGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetClientCredentialsGrantAccessTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetClientCredentialsGrantAccessTokenLifespanOk() (*string, bool)` + +GetClientCredentialsGrantAccessTokenLifespanOk returns a tuple with the ClientCredentialsGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientCredentialsGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetClientCredentialsGrantAccessTokenLifespan(v string)` + +SetClientCredentialsGrantAccessTokenLifespan sets ClientCredentialsGrantAccessTokenLifespan field to given value. + +### HasClientCredentialsGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasClientCredentialsGrantAccessTokenLifespan() bool` + +HasClientCredentialsGrantAccessTokenLifespan returns a boolean if a field has been set. + +### GetImplicitGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetImplicitGrantAccessTokenLifespan() string` + +GetImplicitGrantAccessTokenLifespan returns the ImplicitGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetImplicitGrantAccessTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetImplicitGrantAccessTokenLifespanOk() (*string, bool)` + +GetImplicitGrantAccessTokenLifespanOk returns a tuple with the ImplicitGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImplicitGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetImplicitGrantAccessTokenLifespan(v string)` + +SetImplicitGrantAccessTokenLifespan sets ImplicitGrantAccessTokenLifespan field to given value. + +### HasImplicitGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasImplicitGrantAccessTokenLifespan() bool` + +HasImplicitGrantAccessTokenLifespan returns a boolean if a field has been set. + +### GetImplicitGrantIdTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetImplicitGrantIdTokenLifespan() string` + +GetImplicitGrantIdTokenLifespan returns the ImplicitGrantIdTokenLifespan field if non-nil, zero value otherwise. + +### GetImplicitGrantIdTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetImplicitGrantIdTokenLifespanOk() (*string, bool)` + +GetImplicitGrantIdTokenLifespanOk returns a tuple with the ImplicitGrantIdTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImplicitGrantIdTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetImplicitGrantIdTokenLifespan(v string)` + +SetImplicitGrantIdTokenLifespan sets ImplicitGrantIdTokenLifespan field to given value. + +### HasImplicitGrantIdTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasImplicitGrantIdTokenLifespan() bool` + +HasImplicitGrantIdTokenLifespan returns a boolean if a field has been set. + +### GetJwtBearerGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetJwtBearerGrantAccessTokenLifespan() string` + +GetJwtBearerGrantAccessTokenLifespan returns the JwtBearerGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetJwtBearerGrantAccessTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetJwtBearerGrantAccessTokenLifespanOk() (*string, bool)` + +GetJwtBearerGrantAccessTokenLifespanOk returns a tuple with the JwtBearerGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJwtBearerGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetJwtBearerGrantAccessTokenLifespan(v string)` + +SetJwtBearerGrantAccessTokenLifespan sets JwtBearerGrantAccessTokenLifespan field to given value. + +### HasJwtBearerGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasJwtBearerGrantAccessTokenLifespan() bool` + +HasJwtBearerGrantAccessTokenLifespan returns a boolean if a field has been set. + +### GetRefreshTokenGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantAccessTokenLifespan() string` + +GetRefreshTokenGrantAccessTokenLifespan returns the RefreshTokenGrantAccessTokenLifespan field if non-nil, zero value otherwise. + +### GetRefreshTokenGrantAccessTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantAccessTokenLifespanOk() (*string, bool)` + +GetRefreshTokenGrantAccessTokenLifespanOk returns a tuple with the RefreshTokenGrantAccessTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshTokenGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetRefreshTokenGrantAccessTokenLifespan(v string)` + +SetRefreshTokenGrantAccessTokenLifespan sets RefreshTokenGrantAccessTokenLifespan field to given value. + +### HasRefreshTokenGrantAccessTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasRefreshTokenGrantAccessTokenLifespan() bool` + +HasRefreshTokenGrantAccessTokenLifespan returns a boolean if a field has been set. + +### GetRefreshTokenGrantIdTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantIdTokenLifespan() string` + +GetRefreshTokenGrantIdTokenLifespan returns the RefreshTokenGrantIdTokenLifespan field if non-nil, zero value otherwise. + +### GetRefreshTokenGrantIdTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantIdTokenLifespanOk() (*string, bool)` + +GetRefreshTokenGrantIdTokenLifespanOk returns a tuple with the RefreshTokenGrantIdTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshTokenGrantIdTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetRefreshTokenGrantIdTokenLifespan(v string)` + +SetRefreshTokenGrantIdTokenLifespan sets RefreshTokenGrantIdTokenLifespan field to given value. + +### HasRefreshTokenGrantIdTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasRefreshTokenGrantIdTokenLifespan() bool` + +HasRefreshTokenGrantIdTokenLifespan returns a boolean if a field has been set. + +### GetRefreshTokenGrantRefreshTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantRefreshTokenLifespan() string` + +GetRefreshTokenGrantRefreshTokenLifespan returns the RefreshTokenGrantRefreshTokenLifespan field if non-nil, zero value otherwise. + +### GetRefreshTokenGrantRefreshTokenLifespanOk + +`func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantRefreshTokenLifespanOk() (*string, bool)` + +GetRefreshTokenGrantRefreshTokenLifespanOk returns a tuple with the RefreshTokenGrantRefreshTokenLifespan field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshTokenGrantRefreshTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) SetRefreshTokenGrantRefreshTokenLifespan(v string)` + +SetRefreshTokenGrantRefreshTokenLifespan sets RefreshTokenGrantRefreshTokenLifespan field to given value. + +### HasRefreshTokenGrantRefreshTokenLifespan + +`func (o *OAuth2ClientTokenLifespans) HasRefreshTokenGrantRefreshTokenLifespan() bool` + +HasRefreshTokenGrantRefreshTokenLifespan returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/ConsentRequest.md b/clients/hydra/go/docs/OAuth2ConsentRequest.md similarity index 67% rename from clients/hydra/go/docs/ConsentRequest.md rename to clients/hydra/go/docs/OAuth2ConsentRequest.md index 3d09558c94b..f01dc3f79f9 100644 --- a/clients/hydra/go/docs/ConsentRequest.md +++ b/clients/hydra/go/docs/OAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# ConsentRequest +# OAuth2ConsentRequest ## Properties @@ -8,10 +8,10 @@ Name | Type | Description | Notes **Amr** | Pointer to **[]string** | | [optional] **Challenge** | **string** | ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. | **Client** | Pointer to [**OAuth2Client**](OAuth2Client.md) | | [optional] -**Context** | Pointer to **map[string]interface{}** | | [optional] +**Context** | Pointer to **interface{}** | | [optional] **LoginChallenge** | Pointer to **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** | Pointer to **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] -**OidcContext** | Pointer to [**OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**OidcContext** | Pointer to [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.md) | | [optional] **RequestUrl** | Pointer to **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] **RequestedAccessTokenAudience** | Pointer to **[]string** | | [optional] **RequestedScope** | Pointer to **[]string** | | [optional] @@ -20,340 +20,350 @@ Name | Type | Description | Notes ## Methods -### NewConsentRequest +### NewOAuth2ConsentRequest -`func NewConsentRequest(challenge string, ) *ConsentRequest` +`func NewOAuth2ConsentRequest(challenge string, ) *OAuth2ConsentRequest` -NewConsentRequest instantiates a new ConsentRequest object +NewOAuth2ConsentRequest instantiates a new OAuth2ConsentRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewConsentRequestWithDefaults +### NewOAuth2ConsentRequestWithDefaults -`func NewConsentRequestWithDefaults() *ConsentRequest` +`func NewOAuth2ConsentRequestWithDefaults() *OAuth2ConsentRequest` -NewConsentRequestWithDefaults instantiates a new ConsentRequest object +NewOAuth2ConsentRequestWithDefaults instantiates a new OAuth2ConsentRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetAcr -`func (o *ConsentRequest) GetAcr() string` +`func (o *OAuth2ConsentRequest) GetAcr() string` GetAcr returns the Acr field if non-nil, zero value otherwise. ### GetAcrOk -`func (o *ConsentRequest) GetAcrOk() (*string, bool)` +`func (o *OAuth2ConsentRequest) GetAcrOk() (*string, bool)` GetAcrOk returns a tuple with the Acr field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAcr -`func (o *ConsentRequest) SetAcr(v string)` +`func (o *OAuth2ConsentRequest) SetAcr(v string)` SetAcr sets Acr field to given value. ### HasAcr -`func (o *ConsentRequest) HasAcr() bool` +`func (o *OAuth2ConsentRequest) HasAcr() bool` HasAcr returns a boolean if a field has been set. ### GetAmr -`func (o *ConsentRequest) GetAmr() []string` +`func (o *OAuth2ConsentRequest) GetAmr() []string` GetAmr returns the Amr field if non-nil, zero value otherwise. ### GetAmrOk -`func (o *ConsentRequest) GetAmrOk() (*[]string, bool)` +`func (o *OAuth2ConsentRequest) GetAmrOk() (*[]string, bool)` GetAmrOk returns a tuple with the Amr field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAmr -`func (o *ConsentRequest) SetAmr(v []string)` +`func (o *OAuth2ConsentRequest) SetAmr(v []string)` SetAmr sets Amr field to given value. ### HasAmr -`func (o *ConsentRequest) HasAmr() bool` +`func (o *OAuth2ConsentRequest) HasAmr() bool` HasAmr returns a boolean if a field has been set. ### GetChallenge -`func (o *ConsentRequest) GetChallenge() string` +`func (o *OAuth2ConsentRequest) GetChallenge() string` GetChallenge returns the Challenge field if non-nil, zero value otherwise. ### GetChallengeOk -`func (o *ConsentRequest) GetChallengeOk() (*string, bool)` +`func (o *OAuth2ConsentRequest) GetChallengeOk() (*string, bool)` GetChallengeOk returns a tuple with the Challenge field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetChallenge -`func (o *ConsentRequest) SetChallenge(v string)` +`func (o *OAuth2ConsentRequest) SetChallenge(v string)` SetChallenge sets Challenge field to given value. ### GetClient -`func (o *ConsentRequest) GetClient() OAuth2Client` +`func (o *OAuth2ConsentRequest) GetClient() OAuth2Client` GetClient returns the Client field if non-nil, zero value otherwise. ### GetClientOk -`func (o *ConsentRequest) GetClientOk() (*OAuth2Client, bool)` +`func (o *OAuth2ConsentRequest) GetClientOk() (*OAuth2Client, bool)` GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetClient -`func (o *ConsentRequest) SetClient(v OAuth2Client)` +`func (o *OAuth2ConsentRequest) SetClient(v OAuth2Client)` SetClient sets Client field to given value. ### HasClient -`func (o *ConsentRequest) HasClient() bool` +`func (o *OAuth2ConsentRequest) HasClient() bool` HasClient returns a boolean if a field has been set. ### GetContext -`func (o *ConsentRequest) GetContext() map[string]interface{}` +`func (o *OAuth2ConsentRequest) GetContext() interface{}` GetContext returns the Context field if non-nil, zero value otherwise. ### GetContextOk -`func (o *ConsentRequest) GetContextOk() (*map[string]interface{}, bool)` +`func (o *OAuth2ConsentRequest) GetContextOk() (*interface{}, bool)` GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetContext -`func (o *ConsentRequest) SetContext(v map[string]interface{})` +`func (o *OAuth2ConsentRequest) SetContext(v interface{})` SetContext sets Context field to given value. ### HasContext -`func (o *ConsentRequest) HasContext() bool` +`func (o *OAuth2ConsentRequest) HasContext() bool` HasContext returns a boolean if a field has been set. +### SetContextNil + +`func (o *OAuth2ConsentRequest) SetContextNil(b bool)` + + SetContextNil sets the value for Context to be an explicit nil + +### UnsetContext +`func (o *OAuth2ConsentRequest) UnsetContext()` + +UnsetContext ensures that no value is present for Context, not even an explicit nil ### GetLoginChallenge -`func (o *ConsentRequest) GetLoginChallenge() string` +`func (o *OAuth2ConsentRequest) GetLoginChallenge() string` GetLoginChallenge returns the LoginChallenge field if non-nil, zero value otherwise. ### GetLoginChallengeOk -`func (o *ConsentRequest) GetLoginChallengeOk() (*string, bool)` +`func (o *OAuth2ConsentRequest) GetLoginChallengeOk() (*string, bool)` GetLoginChallengeOk returns a tuple with the LoginChallenge field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLoginChallenge -`func (o *ConsentRequest) SetLoginChallenge(v string)` +`func (o *OAuth2ConsentRequest) SetLoginChallenge(v string)` SetLoginChallenge sets LoginChallenge field to given value. ### HasLoginChallenge -`func (o *ConsentRequest) HasLoginChallenge() bool` +`func (o *OAuth2ConsentRequest) HasLoginChallenge() bool` HasLoginChallenge returns a boolean if a field has been set. ### GetLoginSessionId -`func (o *ConsentRequest) GetLoginSessionId() string` +`func (o *OAuth2ConsentRequest) GetLoginSessionId() string` GetLoginSessionId returns the LoginSessionId field if non-nil, zero value otherwise. ### GetLoginSessionIdOk -`func (o *ConsentRequest) GetLoginSessionIdOk() (*string, bool)` +`func (o *OAuth2ConsentRequest) GetLoginSessionIdOk() (*string, bool)` GetLoginSessionIdOk returns a tuple with the LoginSessionId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLoginSessionId -`func (o *ConsentRequest) SetLoginSessionId(v string)` +`func (o *OAuth2ConsentRequest) SetLoginSessionId(v string)` SetLoginSessionId sets LoginSessionId field to given value. ### HasLoginSessionId -`func (o *ConsentRequest) HasLoginSessionId() bool` +`func (o *OAuth2ConsentRequest) HasLoginSessionId() bool` HasLoginSessionId returns a boolean if a field has been set. ### GetOidcContext -`func (o *ConsentRequest) GetOidcContext() OpenIDConnectContext` +`func (o *OAuth2ConsentRequest) GetOidcContext() OAuth2ConsentRequestOpenIDConnectContext` GetOidcContext returns the OidcContext field if non-nil, zero value otherwise. ### GetOidcContextOk -`func (o *ConsentRequest) GetOidcContextOk() (*OpenIDConnectContext, bool)` +`func (o *OAuth2ConsentRequest) GetOidcContextOk() (*OAuth2ConsentRequestOpenIDConnectContext, bool)` GetOidcContextOk returns a tuple with the OidcContext field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOidcContext -`func (o *ConsentRequest) SetOidcContext(v OpenIDConnectContext)` +`func (o *OAuth2ConsentRequest) SetOidcContext(v OAuth2ConsentRequestOpenIDConnectContext)` SetOidcContext sets OidcContext field to given value. ### HasOidcContext -`func (o *ConsentRequest) HasOidcContext() bool` +`func (o *OAuth2ConsentRequest) HasOidcContext() bool` HasOidcContext returns a boolean if a field has been set. ### GetRequestUrl -`func (o *ConsentRequest) GetRequestUrl() string` +`func (o *OAuth2ConsentRequest) GetRequestUrl() string` GetRequestUrl returns the RequestUrl field if non-nil, zero value otherwise. ### GetRequestUrlOk -`func (o *ConsentRequest) GetRequestUrlOk() (*string, bool)` +`func (o *OAuth2ConsentRequest) GetRequestUrlOk() (*string, bool)` GetRequestUrlOk returns a tuple with the RequestUrl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRequestUrl -`func (o *ConsentRequest) SetRequestUrl(v string)` +`func (o *OAuth2ConsentRequest) SetRequestUrl(v string)` SetRequestUrl sets RequestUrl field to given value. ### HasRequestUrl -`func (o *ConsentRequest) HasRequestUrl() bool` +`func (o *OAuth2ConsentRequest) HasRequestUrl() bool` HasRequestUrl returns a boolean if a field has been set. ### GetRequestedAccessTokenAudience -`func (o *ConsentRequest) GetRequestedAccessTokenAudience() []string` +`func (o *OAuth2ConsentRequest) GetRequestedAccessTokenAudience() []string` GetRequestedAccessTokenAudience returns the RequestedAccessTokenAudience field if non-nil, zero value otherwise. ### GetRequestedAccessTokenAudienceOk -`func (o *ConsentRequest) GetRequestedAccessTokenAudienceOk() (*[]string, bool)` +`func (o *OAuth2ConsentRequest) GetRequestedAccessTokenAudienceOk() (*[]string, bool)` GetRequestedAccessTokenAudienceOk returns a tuple with the RequestedAccessTokenAudience field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRequestedAccessTokenAudience -`func (o *ConsentRequest) SetRequestedAccessTokenAudience(v []string)` +`func (o *OAuth2ConsentRequest) SetRequestedAccessTokenAudience(v []string)` SetRequestedAccessTokenAudience sets RequestedAccessTokenAudience field to given value. ### HasRequestedAccessTokenAudience -`func (o *ConsentRequest) HasRequestedAccessTokenAudience() bool` +`func (o *OAuth2ConsentRequest) HasRequestedAccessTokenAudience() bool` HasRequestedAccessTokenAudience returns a boolean if a field has been set. ### GetRequestedScope -`func (o *ConsentRequest) GetRequestedScope() []string` +`func (o *OAuth2ConsentRequest) GetRequestedScope() []string` GetRequestedScope returns the RequestedScope field if non-nil, zero value otherwise. ### GetRequestedScopeOk -`func (o *ConsentRequest) GetRequestedScopeOk() (*[]string, bool)` +`func (o *OAuth2ConsentRequest) GetRequestedScopeOk() (*[]string, bool)` GetRequestedScopeOk returns a tuple with the RequestedScope field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRequestedScope -`func (o *ConsentRequest) SetRequestedScope(v []string)` +`func (o *OAuth2ConsentRequest) SetRequestedScope(v []string)` SetRequestedScope sets RequestedScope field to given value. ### HasRequestedScope -`func (o *ConsentRequest) HasRequestedScope() bool` +`func (o *OAuth2ConsentRequest) HasRequestedScope() bool` HasRequestedScope returns a boolean if a field has been set. ### GetSkip -`func (o *ConsentRequest) GetSkip() bool` +`func (o *OAuth2ConsentRequest) GetSkip() bool` GetSkip returns the Skip field if non-nil, zero value otherwise. ### GetSkipOk -`func (o *ConsentRequest) GetSkipOk() (*bool, bool)` +`func (o *OAuth2ConsentRequest) GetSkipOk() (*bool, bool)` GetSkipOk returns a tuple with the Skip field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSkip -`func (o *ConsentRequest) SetSkip(v bool)` +`func (o *OAuth2ConsentRequest) SetSkip(v bool)` SetSkip sets Skip field to given value. ### HasSkip -`func (o *ConsentRequest) HasSkip() bool` +`func (o *OAuth2ConsentRequest) HasSkip() bool` HasSkip returns a boolean if a field has been set. ### GetSubject -`func (o *ConsentRequest) GetSubject() string` +`func (o *OAuth2ConsentRequest) GetSubject() string` GetSubject returns the Subject field if non-nil, zero value otherwise. ### GetSubjectOk -`func (o *ConsentRequest) GetSubjectOk() (*string, bool)` +`func (o *OAuth2ConsentRequest) GetSubjectOk() (*string, bool)` GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubject -`func (o *ConsentRequest) SetSubject(v string)` +`func (o *OAuth2ConsentRequest) SetSubject(v string)` SetSubject sets Subject field to given value. ### HasSubject -`func (o *ConsentRequest) HasSubject() bool` +`func (o *OAuth2ConsentRequest) HasSubject() bool` HasSubject returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/OpenIDConnectContext.md b/clients/hydra/go/docs/OAuth2ConsentRequestOpenIDConnectContext.md similarity index 72% rename from clients/hydra/go/docs/OpenIDConnectContext.md rename to clients/hydra/go/docs/OAuth2ConsentRequestOpenIDConnectContext.md index 25701949d9a..ac95394e0f0 100644 --- a/clients/hydra/go/docs/OpenIDConnectContext.md +++ b/clients/hydra/go/docs/OAuth2ConsentRequestOpenIDConnectContext.md @@ -1,4 +1,4 @@ -# OpenIDConnectContext +# OAuth2ConsentRequestOpenIDConnectContext ## Properties @@ -12,145 +12,145 @@ Name | Type | Description | Notes ## Methods -### NewOpenIDConnectContext +### NewOAuth2ConsentRequestOpenIDConnectContext -`func NewOpenIDConnectContext() *OpenIDConnectContext` +`func NewOAuth2ConsentRequestOpenIDConnectContext() *OAuth2ConsentRequestOpenIDConnectContext` -NewOpenIDConnectContext instantiates a new OpenIDConnectContext object +NewOAuth2ConsentRequestOpenIDConnectContext instantiates a new OAuth2ConsentRequestOpenIDConnectContext object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewOpenIDConnectContextWithDefaults +### NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults -`func NewOpenIDConnectContextWithDefaults() *OpenIDConnectContext` +`func NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults() *OAuth2ConsentRequestOpenIDConnectContext` -NewOpenIDConnectContextWithDefaults instantiates a new OpenIDConnectContext object +NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults instantiates a new OAuth2ConsentRequestOpenIDConnectContext object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetAcrValues -`func (o *OpenIDConnectContext) GetAcrValues() []string` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValues() []string` GetAcrValues returns the AcrValues field if non-nil, zero value otherwise. ### GetAcrValuesOk -`func (o *OpenIDConnectContext) GetAcrValuesOk() (*[]string, bool)` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValuesOk() (*[]string, bool)` GetAcrValuesOk returns a tuple with the AcrValues field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAcrValues -`func (o *OpenIDConnectContext) SetAcrValues(v []string)` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) SetAcrValues(v []string)` SetAcrValues sets AcrValues field to given value. ### HasAcrValues -`func (o *OpenIDConnectContext) HasAcrValues() bool` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) HasAcrValues() bool` HasAcrValues returns a boolean if a field has been set. ### GetDisplay -`func (o *OpenIDConnectContext) GetDisplay() string` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplay() string` GetDisplay returns the Display field if non-nil, zero value otherwise. ### GetDisplayOk -`func (o *OpenIDConnectContext) GetDisplayOk() (*string, bool)` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplayOk() (*string, bool)` GetDisplayOk returns a tuple with the Display field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDisplay -`func (o *OpenIDConnectContext) SetDisplay(v string)` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) SetDisplay(v string)` SetDisplay sets Display field to given value. ### HasDisplay -`func (o *OpenIDConnectContext) HasDisplay() bool` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) HasDisplay() bool` HasDisplay returns a boolean if a field has been set. ### GetIdTokenHintClaims -`func (o *OpenIDConnectContext) GetIdTokenHintClaims() map[string]interface{}` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaims() map[string]interface{}` GetIdTokenHintClaims returns the IdTokenHintClaims field if non-nil, zero value otherwise. ### GetIdTokenHintClaimsOk -`func (o *OpenIDConnectContext) GetIdTokenHintClaimsOk() (*map[string]interface{}, bool)` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaimsOk() (*map[string]interface{}, bool)` GetIdTokenHintClaimsOk returns a tuple with the IdTokenHintClaims field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIdTokenHintClaims -`func (o *OpenIDConnectContext) SetIdTokenHintClaims(v map[string]interface{})` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) SetIdTokenHintClaims(v map[string]interface{})` SetIdTokenHintClaims sets IdTokenHintClaims field to given value. ### HasIdTokenHintClaims -`func (o *OpenIDConnectContext) HasIdTokenHintClaims() bool` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) HasIdTokenHintClaims() bool` HasIdTokenHintClaims returns a boolean if a field has been set. ### GetLoginHint -`func (o *OpenIDConnectContext) GetLoginHint() string` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHint() string` GetLoginHint returns the LoginHint field if non-nil, zero value otherwise. ### GetLoginHintOk -`func (o *OpenIDConnectContext) GetLoginHintOk() (*string, bool)` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHintOk() (*string, bool)` GetLoginHintOk returns a tuple with the LoginHint field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLoginHint -`func (o *OpenIDConnectContext) SetLoginHint(v string)` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) SetLoginHint(v string)` SetLoginHint sets LoginHint field to given value. ### HasLoginHint -`func (o *OpenIDConnectContext) HasLoginHint() bool` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) HasLoginHint() bool` HasLoginHint returns a boolean if a field has been set. ### GetUiLocales -`func (o *OpenIDConnectContext) GetUiLocales() []string` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocales() []string` GetUiLocales returns the UiLocales field if non-nil, zero value otherwise. ### GetUiLocalesOk -`func (o *OpenIDConnectContext) GetUiLocalesOk() (*[]string, bool)` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocalesOk() (*[]string, bool)` GetUiLocalesOk returns a tuple with the UiLocales field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUiLocales -`func (o *OpenIDConnectContext) SetUiLocales(v []string)` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) SetUiLocales(v []string)` SetUiLocales sets UiLocales field to given value. ### HasUiLocales -`func (o *OpenIDConnectContext) HasUiLocales() bool` +`func (o *OAuth2ConsentRequestOpenIDConnectContext) HasUiLocales() bool` HasUiLocales returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/PreviousConsentSession.md b/clients/hydra/go/docs/OAuth2ConsentSession.md similarity index 51% rename from clients/hydra/go/docs/PreviousConsentSession.md rename to clients/hydra/go/docs/OAuth2ConsentSession.md index e89bf002fcf..732ecca2a3f 100644 --- a/clients/hydra/go/docs/PreviousConsentSession.md +++ b/clients/hydra/go/docs/OAuth2ConsentSession.md @@ -1,208 +1,234 @@ -# PreviousConsentSession +# OAuth2ConsentSession ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ConsentRequest** | Pointer to [**ConsentRequest**](ConsentRequest.md) | | [optional] +**ConsentRequest** | Pointer to [**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) | | [optional] +**ExpiresAt** | Pointer to [**OAuth2ConsentSessionExpiresAt**](OAuth2ConsentSessionExpiresAt.md) | | [optional] **GrantAccessTokenAudience** | Pointer to **[]string** | | [optional] **GrantScope** | Pointer to **[]string** | | [optional] **HandledAt** | Pointer to **time.Time** | | [optional] -**Remember** | Pointer to **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] -**RememberFor** | Pointer to **int64** | 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** | Pointer to [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] +**Remember** | Pointer to **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] +**RememberFor** | Pointer to **int64** | 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** | Pointer to [**AcceptOAuth2ConsentRequestSession**](AcceptOAuth2ConsentRequestSession.md) | | [optional] ## Methods -### NewPreviousConsentSession +### NewOAuth2ConsentSession -`func NewPreviousConsentSession() *PreviousConsentSession` +`func NewOAuth2ConsentSession() *OAuth2ConsentSession` -NewPreviousConsentSession instantiates a new PreviousConsentSession object +NewOAuth2ConsentSession instantiates a new OAuth2ConsentSession object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewPreviousConsentSessionWithDefaults +### NewOAuth2ConsentSessionWithDefaults -`func NewPreviousConsentSessionWithDefaults() *PreviousConsentSession` +`func NewOAuth2ConsentSessionWithDefaults() *OAuth2ConsentSession` -NewPreviousConsentSessionWithDefaults instantiates a new PreviousConsentSession object +NewOAuth2ConsentSessionWithDefaults instantiates a new OAuth2ConsentSession object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetConsentRequest -`func (o *PreviousConsentSession) GetConsentRequest() ConsentRequest` +`func (o *OAuth2ConsentSession) GetConsentRequest() OAuth2ConsentRequest` GetConsentRequest returns the ConsentRequest field if non-nil, zero value otherwise. ### GetConsentRequestOk -`func (o *PreviousConsentSession) GetConsentRequestOk() (*ConsentRequest, bool)` +`func (o *OAuth2ConsentSession) GetConsentRequestOk() (*OAuth2ConsentRequest, bool)` GetConsentRequestOk returns a tuple with the ConsentRequest field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetConsentRequest -`func (o *PreviousConsentSession) SetConsentRequest(v ConsentRequest)` +`func (o *OAuth2ConsentSession) SetConsentRequest(v OAuth2ConsentRequest)` SetConsentRequest sets ConsentRequest field to given value. ### HasConsentRequest -`func (o *PreviousConsentSession) HasConsentRequest() bool` +`func (o *OAuth2ConsentSession) HasConsentRequest() bool` HasConsentRequest returns a boolean if a field has been set. +### GetExpiresAt + +`func (o *OAuth2ConsentSession) GetExpiresAt() OAuth2ConsentSessionExpiresAt` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *OAuth2ConsentSession) GetExpiresAtOk() (*OAuth2ConsentSessionExpiresAt, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *OAuth2ConsentSession) SetExpiresAt(v OAuth2ConsentSessionExpiresAt)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *OAuth2ConsentSession) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + ### GetGrantAccessTokenAudience -`func (o *PreviousConsentSession) GetGrantAccessTokenAudience() []string` +`func (o *OAuth2ConsentSession) GetGrantAccessTokenAudience() []string` GetGrantAccessTokenAudience returns the GrantAccessTokenAudience field if non-nil, zero value otherwise. ### GetGrantAccessTokenAudienceOk -`func (o *PreviousConsentSession) GetGrantAccessTokenAudienceOk() (*[]string, bool)` +`func (o *OAuth2ConsentSession) GetGrantAccessTokenAudienceOk() (*[]string, bool)` GetGrantAccessTokenAudienceOk returns a tuple with the GrantAccessTokenAudience field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGrantAccessTokenAudience -`func (o *PreviousConsentSession) SetGrantAccessTokenAudience(v []string)` +`func (o *OAuth2ConsentSession) SetGrantAccessTokenAudience(v []string)` SetGrantAccessTokenAudience sets GrantAccessTokenAudience field to given value. ### HasGrantAccessTokenAudience -`func (o *PreviousConsentSession) HasGrantAccessTokenAudience() bool` +`func (o *OAuth2ConsentSession) HasGrantAccessTokenAudience() bool` HasGrantAccessTokenAudience returns a boolean if a field has been set. ### GetGrantScope -`func (o *PreviousConsentSession) GetGrantScope() []string` +`func (o *OAuth2ConsentSession) GetGrantScope() []string` GetGrantScope returns the GrantScope field if non-nil, zero value otherwise. ### GetGrantScopeOk -`func (o *PreviousConsentSession) GetGrantScopeOk() (*[]string, bool)` +`func (o *OAuth2ConsentSession) GetGrantScopeOk() (*[]string, bool)` GetGrantScopeOk returns a tuple with the GrantScope field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGrantScope -`func (o *PreviousConsentSession) SetGrantScope(v []string)` +`func (o *OAuth2ConsentSession) SetGrantScope(v []string)` SetGrantScope sets GrantScope field to given value. ### HasGrantScope -`func (o *PreviousConsentSession) HasGrantScope() bool` +`func (o *OAuth2ConsentSession) HasGrantScope() bool` HasGrantScope returns a boolean if a field has been set. ### GetHandledAt -`func (o *PreviousConsentSession) GetHandledAt() time.Time` +`func (o *OAuth2ConsentSession) GetHandledAt() time.Time` GetHandledAt returns the HandledAt field if non-nil, zero value otherwise. ### GetHandledAtOk -`func (o *PreviousConsentSession) GetHandledAtOk() (*time.Time, bool)` +`func (o *OAuth2ConsentSession) GetHandledAtOk() (*time.Time, bool)` GetHandledAtOk returns a tuple with the HandledAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetHandledAt -`func (o *PreviousConsentSession) SetHandledAt(v time.Time)` +`func (o *OAuth2ConsentSession) SetHandledAt(v time.Time)` SetHandledAt sets HandledAt field to given value. ### HasHandledAt -`func (o *PreviousConsentSession) HasHandledAt() bool` +`func (o *OAuth2ConsentSession) HasHandledAt() bool` HasHandledAt returns a boolean if a field has been set. ### GetRemember -`func (o *PreviousConsentSession) GetRemember() bool` +`func (o *OAuth2ConsentSession) GetRemember() bool` GetRemember returns the Remember field if non-nil, zero value otherwise. ### GetRememberOk -`func (o *PreviousConsentSession) GetRememberOk() (*bool, bool)` +`func (o *OAuth2ConsentSession) GetRememberOk() (*bool, bool)` GetRememberOk returns a tuple with the Remember field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRemember -`func (o *PreviousConsentSession) SetRemember(v bool)` +`func (o *OAuth2ConsentSession) SetRemember(v bool)` SetRemember sets Remember field to given value. ### HasRemember -`func (o *PreviousConsentSession) HasRemember() bool` +`func (o *OAuth2ConsentSession) HasRemember() bool` HasRemember returns a boolean if a field has been set. ### GetRememberFor -`func (o *PreviousConsentSession) GetRememberFor() int64` +`func (o *OAuth2ConsentSession) GetRememberFor() int64` GetRememberFor returns the RememberFor field if non-nil, zero value otherwise. ### GetRememberForOk -`func (o *PreviousConsentSession) GetRememberForOk() (*int64, bool)` +`func (o *OAuth2ConsentSession) GetRememberForOk() (*int64, bool)` GetRememberForOk returns a tuple with the RememberFor field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRememberFor -`func (o *PreviousConsentSession) SetRememberFor(v int64)` +`func (o *OAuth2ConsentSession) SetRememberFor(v int64)` SetRememberFor sets RememberFor field to given value. ### HasRememberFor -`func (o *PreviousConsentSession) HasRememberFor() bool` +`func (o *OAuth2ConsentSession) HasRememberFor() bool` HasRememberFor returns a boolean if a field has been set. ### GetSession -`func (o *PreviousConsentSession) GetSession() ConsentRequestSession` +`func (o *OAuth2ConsentSession) GetSession() AcceptOAuth2ConsentRequestSession` GetSession returns the Session field if non-nil, zero value otherwise. ### GetSessionOk -`func (o *PreviousConsentSession) GetSessionOk() (*ConsentRequestSession, bool)` +`func (o *OAuth2ConsentSession) GetSessionOk() (*AcceptOAuth2ConsentRequestSession, bool)` GetSessionOk returns a tuple with the Session field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSession -`func (o *PreviousConsentSession) SetSession(v ConsentRequestSession)` +`func (o *OAuth2ConsentSession) SetSession(v AcceptOAuth2ConsentRequestSession)` SetSession sets Session field to given value. ### HasSession -`func (o *PreviousConsentSession) HasSession() bool` +`func (o *OAuth2ConsentSession) HasSession() bool` HasSession returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/OAuth2ConsentSessionExpiresAt.md b/clients/hydra/go/docs/OAuth2ConsentSessionExpiresAt.md new file mode 100644 index 00000000000..f49c3aeb6b7 --- /dev/null +++ b/clients/hydra/go/docs/OAuth2ConsentSessionExpiresAt.md @@ -0,0 +1,160 @@ +# OAuth2ConsentSessionExpiresAt + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | Pointer to **time.Time** | | [optional] +**AuthorizeCode** | Pointer to **time.Time** | | [optional] +**IdToken** | Pointer to **time.Time** | | [optional] +**ParContext** | Pointer to **time.Time** | | [optional] +**RefreshToken** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewOAuth2ConsentSessionExpiresAt + +`func NewOAuth2ConsentSessionExpiresAt() *OAuth2ConsentSessionExpiresAt` + +NewOAuth2ConsentSessionExpiresAt instantiates a new OAuth2ConsentSessionExpiresAt object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOAuth2ConsentSessionExpiresAtWithDefaults + +`func NewOAuth2ConsentSessionExpiresAtWithDefaults() *OAuth2ConsentSessionExpiresAt` + +NewOAuth2ConsentSessionExpiresAtWithDefaults instantiates a new OAuth2ConsentSessionExpiresAt object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessToken + +`func (o *OAuth2ConsentSessionExpiresAt) GetAccessToken() time.Time` + +GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. + +### GetAccessTokenOk + +`func (o *OAuth2ConsentSessionExpiresAt) GetAccessTokenOk() (*time.Time, bool)` + +GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessToken + +`func (o *OAuth2ConsentSessionExpiresAt) SetAccessToken(v time.Time)` + +SetAccessToken sets AccessToken field to given value. + +### HasAccessToken + +`func (o *OAuth2ConsentSessionExpiresAt) HasAccessToken() bool` + +HasAccessToken returns a boolean if a field has been set. + +### GetAuthorizeCode + +`func (o *OAuth2ConsentSessionExpiresAt) GetAuthorizeCode() time.Time` + +GetAuthorizeCode returns the AuthorizeCode field if non-nil, zero value otherwise. + +### GetAuthorizeCodeOk + +`func (o *OAuth2ConsentSessionExpiresAt) GetAuthorizeCodeOk() (*time.Time, bool)` + +GetAuthorizeCodeOk returns a tuple with the AuthorizeCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorizeCode + +`func (o *OAuth2ConsentSessionExpiresAt) SetAuthorizeCode(v time.Time)` + +SetAuthorizeCode sets AuthorizeCode field to given value. + +### HasAuthorizeCode + +`func (o *OAuth2ConsentSessionExpiresAt) HasAuthorizeCode() bool` + +HasAuthorizeCode returns a boolean if a field has been set. + +### GetIdToken + +`func (o *OAuth2ConsentSessionExpiresAt) GetIdToken() time.Time` + +GetIdToken returns the IdToken field if non-nil, zero value otherwise. + +### GetIdTokenOk + +`func (o *OAuth2ConsentSessionExpiresAt) GetIdTokenOk() (*time.Time, bool)` + +GetIdTokenOk returns a tuple with the IdToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdToken + +`func (o *OAuth2ConsentSessionExpiresAt) SetIdToken(v time.Time)` + +SetIdToken sets IdToken field to given value. + +### HasIdToken + +`func (o *OAuth2ConsentSessionExpiresAt) HasIdToken() bool` + +HasIdToken returns a boolean if a field has been set. + +### GetParContext + +`func (o *OAuth2ConsentSessionExpiresAt) GetParContext() time.Time` + +GetParContext returns the ParContext field if non-nil, zero value otherwise. + +### GetParContextOk + +`func (o *OAuth2ConsentSessionExpiresAt) GetParContextOk() (*time.Time, bool)` + +GetParContextOk returns a tuple with the ParContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParContext + +`func (o *OAuth2ConsentSessionExpiresAt) SetParContext(v time.Time)` + +SetParContext sets ParContext field to given value. + +### HasParContext + +`func (o *OAuth2ConsentSessionExpiresAt) HasParContext() bool` + +HasParContext returns a boolean if a field has been set. + +### GetRefreshToken + +`func (o *OAuth2ConsentSessionExpiresAt) GetRefreshToken() time.Time` + +GetRefreshToken returns the RefreshToken field if non-nil, zero value otherwise. + +### GetRefreshTokenOk + +`func (o *OAuth2ConsentSessionExpiresAt) GetRefreshTokenOk() (*time.Time, bool)` + +GetRefreshTokenOk returns a tuple with the RefreshToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshToken + +`func (o *OAuth2ConsentSessionExpiresAt) SetRefreshToken(v time.Time)` + +SetRefreshToken sets RefreshToken field to given value. + +### HasRefreshToken + +`func (o *OAuth2ConsentSessionExpiresAt) HasRefreshToken() bool` + +HasRefreshToken returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/LoginRequest.md b/clients/hydra/go/docs/OAuth2LoginRequest.md similarity index 70% rename from clients/hydra/go/docs/LoginRequest.md rename to clients/hydra/go/docs/OAuth2LoginRequest.md index 82e9e76beda..aa34f248272 100644 --- a/clients/hydra/go/docs/LoginRequest.md +++ b/clients/hydra/go/docs/OAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# LoginRequest +# OAuth2LoginRequest ## Properties @@ -6,7 +6,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** | [**OAuth2Client**](OAuth2Client.md) | | -**OidcContext** | Pointer to [**OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**OidcContext** | Pointer to [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.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** | **[]string** | | **RequestedScope** | **[]string** | | @@ -16,209 +16,209 @@ Name | Type | Description | Notes ## Methods -### NewLoginRequest +### NewOAuth2LoginRequest -`func NewLoginRequest(challenge string, client OAuth2Client, requestUrl string, requestedAccessTokenAudience []string, requestedScope []string, skip bool, subject string, ) *LoginRequest` +`func NewOAuth2LoginRequest(challenge string, client OAuth2Client, requestUrl string, requestedAccessTokenAudience []string, requestedScope []string, skip bool, subject string, ) *OAuth2LoginRequest` -NewLoginRequest instantiates a new LoginRequest object +NewOAuth2LoginRequest instantiates a new OAuth2LoginRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewLoginRequestWithDefaults +### NewOAuth2LoginRequestWithDefaults -`func NewLoginRequestWithDefaults() *LoginRequest` +`func NewOAuth2LoginRequestWithDefaults() *OAuth2LoginRequest` -NewLoginRequestWithDefaults instantiates a new LoginRequest object +NewOAuth2LoginRequestWithDefaults instantiates a new OAuth2LoginRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetChallenge -`func (o *LoginRequest) GetChallenge() string` +`func (o *OAuth2LoginRequest) GetChallenge() string` GetChallenge returns the Challenge field if non-nil, zero value otherwise. ### GetChallengeOk -`func (o *LoginRequest) GetChallengeOk() (*string, bool)` +`func (o *OAuth2LoginRequest) GetChallengeOk() (*string, bool)` GetChallengeOk returns a tuple with the Challenge field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetChallenge -`func (o *LoginRequest) SetChallenge(v string)` +`func (o *OAuth2LoginRequest) SetChallenge(v string)` SetChallenge sets Challenge field to given value. ### GetClient -`func (o *LoginRequest) GetClient() OAuth2Client` +`func (o *OAuth2LoginRequest) GetClient() OAuth2Client` GetClient returns the Client field if non-nil, zero value otherwise. ### GetClientOk -`func (o *LoginRequest) GetClientOk() (*OAuth2Client, bool)` +`func (o *OAuth2LoginRequest) GetClientOk() (*OAuth2Client, bool)` GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetClient -`func (o *LoginRequest) SetClient(v OAuth2Client)` +`func (o *OAuth2LoginRequest) SetClient(v OAuth2Client)` SetClient sets Client field to given value. ### GetOidcContext -`func (o *LoginRequest) GetOidcContext() OpenIDConnectContext` +`func (o *OAuth2LoginRequest) GetOidcContext() OAuth2ConsentRequestOpenIDConnectContext` GetOidcContext returns the OidcContext field if non-nil, zero value otherwise. ### GetOidcContextOk -`func (o *LoginRequest) GetOidcContextOk() (*OpenIDConnectContext, bool)` +`func (o *OAuth2LoginRequest) GetOidcContextOk() (*OAuth2ConsentRequestOpenIDConnectContext, bool)` GetOidcContextOk returns a tuple with the OidcContext field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOidcContext -`func (o *LoginRequest) SetOidcContext(v OpenIDConnectContext)` +`func (o *OAuth2LoginRequest) SetOidcContext(v OAuth2ConsentRequestOpenIDConnectContext)` SetOidcContext sets OidcContext field to given value. ### HasOidcContext -`func (o *LoginRequest) HasOidcContext() bool` +`func (o *OAuth2LoginRequest) HasOidcContext() bool` HasOidcContext returns a boolean if a field has been set. ### GetRequestUrl -`func (o *LoginRequest) GetRequestUrl() string` +`func (o *OAuth2LoginRequest) GetRequestUrl() string` GetRequestUrl returns the RequestUrl field if non-nil, zero value otherwise. ### GetRequestUrlOk -`func (o *LoginRequest) GetRequestUrlOk() (*string, bool)` +`func (o *OAuth2LoginRequest) GetRequestUrlOk() (*string, bool)` GetRequestUrlOk returns a tuple with the RequestUrl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRequestUrl -`func (o *LoginRequest) SetRequestUrl(v string)` +`func (o *OAuth2LoginRequest) SetRequestUrl(v string)` SetRequestUrl sets RequestUrl field to given value. ### GetRequestedAccessTokenAudience -`func (o *LoginRequest) GetRequestedAccessTokenAudience() []string` +`func (o *OAuth2LoginRequest) GetRequestedAccessTokenAudience() []string` GetRequestedAccessTokenAudience returns the RequestedAccessTokenAudience field if non-nil, zero value otherwise. ### GetRequestedAccessTokenAudienceOk -`func (o *LoginRequest) GetRequestedAccessTokenAudienceOk() (*[]string, bool)` +`func (o *OAuth2LoginRequest) GetRequestedAccessTokenAudienceOk() (*[]string, bool)` GetRequestedAccessTokenAudienceOk returns a tuple with the RequestedAccessTokenAudience field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRequestedAccessTokenAudience -`func (o *LoginRequest) SetRequestedAccessTokenAudience(v []string)` +`func (o *OAuth2LoginRequest) SetRequestedAccessTokenAudience(v []string)` SetRequestedAccessTokenAudience sets RequestedAccessTokenAudience field to given value. ### GetRequestedScope -`func (o *LoginRequest) GetRequestedScope() []string` +`func (o *OAuth2LoginRequest) GetRequestedScope() []string` GetRequestedScope returns the RequestedScope field if non-nil, zero value otherwise. ### GetRequestedScopeOk -`func (o *LoginRequest) GetRequestedScopeOk() (*[]string, bool)` +`func (o *OAuth2LoginRequest) GetRequestedScopeOk() (*[]string, bool)` GetRequestedScopeOk returns a tuple with the RequestedScope field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRequestedScope -`func (o *LoginRequest) SetRequestedScope(v []string)` +`func (o *OAuth2LoginRequest) SetRequestedScope(v []string)` SetRequestedScope sets RequestedScope field to given value. ### GetSessionId -`func (o *LoginRequest) GetSessionId() string` +`func (o *OAuth2LoginRequest) GetSessionId() string` GetSessionId returns the SessionId field if non-nil, zero value otherwise. ### GetSessionIdOk -`func (o *LoginRequest) GetSessionIdOk() (*string, bool)` +`func (o *OAuth2LoginRequest) GetSessionIdOk() (*string, bool)` GetSessionIdOk returns a tuple with the SessionId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSessionId -`func (o *LoginRequest) SetSessionId(v string)` +`func (o *OAuth2LoginRequest) SetSessionId(v string)` SetSessionId sets SessionId field to given value. ### HasSessionId -`func (o *LoginRequest) HasSessionId() bool` +`func (o *OAuth2LoginRequest) HasSessionId() bool` HasSessionId returns a boolean if a field has been set. ### GetSkip -`func (o *LoginRequest) GetSkip() bool` +`func (o *OAuth2LoginRequest) GetSkip() bool` GetSkip returns the Skip field if non-nil, zero value otherwise. ### GetSkipOk -`func (o *LoginRequest) GetSkipOk() (*bool, bool)` +`func (o *OAuth2LoginRequest) GetSkipOk() (*bool, bool)` GetSkipOk returns a tuple with the Skip field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSkip -`func (o *LoginRequest) SetSkip(v bool)` +`func (o *OAuth2LoginRequest) SetSkip(v bool)` SetSkip sets Skip field to given value. ### GetSubject -`func (o *LoginRequest) GetSubject() string` +`func (o *OAuth2LoginRequest) GetSubject() string` GetSubject returns the Subject field if non-nil, zero value otherwise. ### GetSubjectOk -`func (o *LoginRequest) GetSubjectOk() (*string, bool)` +`func (o *OAuth2LoginRequest) GetSubjectOk() (*string, bool)` GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubject -`func (o *LoginRequest) SetSubject(v string)` +`func (o *OAuth2LoginRequest) SetSubject(v string)` SetSubject sets Subject field to given value. diff --git a/clients/hydra/go/docs/LogoutRequest.md b/clients/hydra/go/docs/OAuth2LogoutRequest.md similarity index 69% rename from clients/hydra/go/docs/LogoutRequest.md rename to clients/hydra/go/docs/OAuth2LogoutRequest.md index a51708b7bf6..cd620202bf8 100644 --- a/clients/hydra/go/docs/LogoutRequest.md +++ b/clients/hydra/go/docs/OAuth2LogoutRequest.md @@ -1,4 +1,4 @@ -# LogoutRequest +# OAuth2LogoutRequest ## Properties @@ -13,170 +13,170 @@ Name | Type | Description | Notes ## Methods -### NewLogoutRequest +### NewOAuth2LogoutRequest -`func NewLogoutRequest() *LogoutRequest` +`func NewOAuth2LogoutRequest() *OAuth2LogoutRequest` -NewLogoutRequest instantiates a new LogoutRequest object +NewOAuth2LogoutRequest instantiates a new OAuth2LogoutRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewLogoutRequestWithDefaults +### NewOAuth2LogoutRequestWithDefaults -`func NewLogoutRequestWithDefaults() *LogoutRequest` +`func NewOAuth2LogoutRequestWithDefaults() *OAuth2LogoutRequest` -NewLogoutRequestWithDefaults instantiates a new LogoutRequest object +NewOAuth2LogoutRequestWithDefaults instantiates a new OAuth2LogoutRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetChallenge -`func (o *LogoutRequest) GetChallenge() string` +`func (o *OAuth2LogoutRequest) GetChallenge() string` GetChallenge returns the Challenge field if non-nil, zero value otherwise. ### GetChallengeOk -`func (o *LogoutRequest) GetChallengeOk() (*string, bool)` +`func (o *OAuth2LogoutRequest) GetChallengeOk() (*string, bool)` GetChallengeOk returns a tuple with the Challenge field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetChallenge -`func (o *LogoutRequest) SetChallenge(v string)` +`func (o *OAuth2LogoutRequest) SetChallenge(v string)` SetChallenge sets Challenge field to given value. ### HasChallenge -`func (o *LogoutRequest) HasChallenge() bool` +`func (o *OAuth2LogoutRequest) HasChallenge() bool` HasChallenge returns a boolean if a field has been set. ### GetClient -`func (o *LogoutRequest) GetClient() OAuth2Client` +`func (o *OAuth2LogoutRequest) GetClient() OAuth2Client` GetClient returns the Client field if non-nil, zero value otherwise. ### GetClientOk -`func (o *LogoutRequest) GetClientOk() (*OAuth2Client, bool)` +`func (o *OAuth2LogoutRequest) GetClientOk() (*OAuth2Client, bool)` GetClientOk returns a tuple with the Client field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetClient -`func (o *LogoutRequest) SetClient(v OAuth2Client)` +`func (o *OAuth2LogoutRequest) SetClient(v OAuth2Client)` SetClient sets Client field to given value. ### HasClient -`func (o *LogoutRequest) HasClient() bool` +`func (o *OAuth2LogoutRequest) HasClient() bool` HasClient returns a boolean if a field has been set. ### GetRequestUrl -`func (o *LogoutRequest) GetRequestUrl() string` +`func (o *OAuth2LogoutRequest) GetRequestUrl() string` GetRequestUrl returns the RequestUrl field if non-nil, zero value otherwise. ### GetRequestUrlOk -`func (o *LogoutRequest) GetRequestUrlOk() (*string, bool)` +`func (o *OAuth2LogoutRequest) GetRequestUrlOk() (*string, bool)` GetRequestUrlOk returns a tuple with the RequestUrl field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRequestUrl -`func (o *LogoutRequest) SetRequestUrl(v string)` +`func (o *OAuth2LogoutRequest) SetRequestUrl(v string)` SetRequestUrl sets RequestUrl field to given value. ### HasRequestUrl -`func (o *LogoutRequest) HasRequestUrl() bool` +`func (o *OAuth2LogoutRequest) HasRequestUrl() bool` HasRequestUrl returns a boolean if a field has been set. ### GetRpInitiated -`func (o *LogoutRequest) GetRpInitiated() bool` +`func (o *OAuth2LogoutRequest) GetRpInitiated() bool` GetRpInitiated returns the RpInitiated field if non-nil, zero value otherwise. ### GetRpInitiatedOk -`func (o *LogoutRequest) GetRpInitiatedOk() (*bool, bool)` +`func (o *OAuth2LogoutRequest) GetRpInitiatedOk() (*bool, bool)` GetRpInitiatedOk returns a tuple with the RpInitiated field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRpInitiated -`func (o *LogoutRequest) SetRpInitiated(v bool)` +`func (o *OAuth2LogoutRequest) SetRpInitiated(v bool)` SetRpInitiated sets RpInitiated field to given value. ### HasRpInitiated -`func (o *LogoutRequest) HasRpInitiated() bool` +`func (o *OAuth2LogoutRequest) HasRpInitiated() bool` HasRpInitiated returns a boolean if a field has been set. ### GetSid -`func (o *LogoutRequest) GetSid() string` +`func (o *OAuth2LogoutRequest) GetSid() string` GetSid returns the Sid field if non-nil, zero value otherwise. ### GetSidOk -`func (o *LogoutRequest) GetSidOk() (*string, bool)` +`func (o *OAuth2LogoutRequest) GetSidOk() (*string, bool)` GetSidOk returns a tuple with the Sid field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSid -`func (o *LogoutRequest) SetSid(v string)` +`func (o *OAuth2LogoutRequest) SetSid(v string)` SetSid sets Sid field to given value. ### HasSid -`func (o *LogoutRequest) HasSid() bool` +`func (o *OAuth2LogoutRequest) HasSid() bool` HasSid returns a boolean if a field has been set. ### GetSubject -`func (o *LogoutRequest) GetSubject() string` +`func (o *OAuth2LogoutRequest) GetSubject() string` GetSubject returns the Subject field if non-nil, zero value otherwise. ### GetSubjectOk -`func (o *LogoutRequest) GetSubjectOk() (*string, bool)` +`func (o *OAuth2LogoutRequest) GetSubjectOk() (*string, bool)` GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubject -`func (o *LogoutRequest) SetSubject(v string)` +`func (o *OAuth2LogoutRequest) SetSubject(v string)` SetSubject sets Subject field to given value. ### HasSubject -`func (o *LogoutRequest) HasSubject() bool` +`func (o *OAuth2LogoutRequest) HasSubject() bool` HasSubject returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/CompletedRequest.md b/clients/hydra/go/docs/OAuth2RedirectTo.md similarity index 64% rename from clients/hydra/go/docs/CompletedRequest.md rename to clients/hydra/go/docs/OAuth2RedirectTo.md index 45c3571f991..8d6e647be35 100644 --- a/clients/hydra/go/docs/CompletedRequest.md +++ b/clients/hydra/go/docs/OAuth2RedirectTo.md @@ -1,46 +1,46 @@ -# CompletedRequest +# OAuth2RedirectTo ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**RedirectTo** | **string** | RedirectURL is the URL which you should redirect the user to once the authentication process is completed. | +**RedirectTo** | **string** | RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. | ## Methods -### NewCompletedRequest +### NewOAuth2RedirectTo -`func NewCompletedRequest(redirectTo string, ) *CompletedRequest` +`func NewOAuth2RedirectTo(redirectTo string, ) *OAuth2RedirectTo` -NewCompletedRequest instantiates a new CompletedRequest object +NewOAuth2RedirectTo instantiates a new OAuth2RedirectTo object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewCompletedRequestWithDefaults +### NewOAuth2RedirectToWithDefaults -`func NewCompletedRequestWithDefaults() *CompletedRequest` +`func NewOAuth2RedirectToWithDefaults() *OAuth2RedirectTo` -NewCompletedRequestWithDefaults instantiates a new CompletedRequest object +NewOAuth2RedirectToWithDefaults instantiates a new OAuth2RedirectTo object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetRedirectTo -`func (o *CompletedRequest) GetRedirectTo() string` +`func (o *OAuth2RedirectTo) GetRedirectTo() string` GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. ### GetRedirectToOk -`func (o *CompletedRequest) GetRedirectToOk() (*string, bool)` +`func (o *OAuth2RedirectTo) GetRedirectToOk() (*string, bool)` GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRedirectTo -`func (o *CompletedRequest) SetRedirectTo(v string)` +`func (o *OAuth2RedirectTo) SetRedirectTo(v string)` SetRedirectTo sets RedirectTo field to given value. diff --git a/clients/hydra/go/docs/Oauth2TokenResponse.md b/clients/hydra/go/docs/OAuth2TokenExchange.md similarity index 55% rename from clients/hydra/go/docs/Oauth2TokenResponse.md rename to clients/hydra/go/docs/OAuth2TokenExchange.md index bda9d2793c7..38659c1883c 100644 --- a/clients/hydra/go/docs/Oauth2TokenResponse.md +++ b/clients/hydra/go/docs/OAuth2TokenExchange.md @@ -1,182 +1,182 @@ -# Oauth2TokenResponse +# OAuth2TokenExchange ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccessToken** | Pointer to **string** | | [optional] -**ExpiresIn** | Pointer to **int64** | | [optional] -**IdToken** | Pointer to **string** | | [optional] -**RefreshToken** | Pointer to **string** | | [optional] -**Scope** | Pointer to **string** | | [optional] -**TokenType** | Pointer to **string** | | [optional] +**AccessToken** | Pointer to **string** | The access token issued by the authorization server. | [optional] +**ExpiresIn** | Pointer to **int64** | 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] +**IdToken** | Pointer to **int64** | To retrieve a refresh token request the id_token scope. | [optional] +**RefreshToken** | Pointer to **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. | [optional] +**Scope** | Pointer to **int64** | The scope of the access token | [optional] +**TokenType** | Pointer to **string** | The type of the token issued | [optional] ## Methods -### NewOauth2TokenResponse +### NewOAuth2TokenExchange -`func NewOauth2TokenResponse() *Oauth2TokenResponse` +`func NewOAuth2TokenExchange() *OAuth2TokenExchange` -NewOauth2TokenResponse instantiates a new Oauth2TokenResponse object +NewOAuth2TokenExchange instantiates a new OAuth2TokenExchange object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewOauth2TokenResponseWithDefaults +### NewOAuth2TokenExchangeWithDefaults -`func NewOauth2TokenResponseWithDefaults() *Oauth2TokenResponse` +`func NewOAuth2TokenExchangeWithDefaults() *OAuth2TokenExchange` -NewOauth2TokenResponseWithDefaults instantiates a new Oauth2TokenResponse object +NewOAuth2TokenExchangeWithDefaults instantiates a new OAuth2TokenExchange object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetAccessToken -`func (o *Oauth2TokenResponse) GetAccessToken() string` +`func (o *OAuth2TokenExchange) GetAccessToken() string` GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. ### GetAccessTokenOk -`func (o *Oauth2TokenResponse) GetAccessTokenOk() (*string, bool)` +`func (o *OAuth2TokenExchange) GetAccessTokenOk() (*string, bool)` GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAccessToken -`func (o *Oauth2TokenResponse) SetAccessToken(v string)` +`func (o *OAuth2TokenExchange) SetAccessToken(v string)` SetAccessToken sets AccessToken field to given value. ### HasAccessToken -`func (o *Oauth2TokenResponse) HasAccessToken() bool` +`func (o *OAuth2TokenExchange) HasAccessToken() bool` HasAccessToken returns a boolean if a field has been set. ### GetExpiresIn -`func (o *Oauth2TokenResponse) GetExpiresIn() int64` +`func (o *OAuth2TokenExchange) GetExpiresIn() int64` GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. ### GetExpiresInOk -`func (o *Oauth2TokenResponse) GetExpiresInOk() (*int64, bool)` +`func (o *OAuth2TokenExchange) GetExpiresInOk() (*int64, bool)` GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExpiresIn -`func (o *Oauth2TokenResponse) SetExpiresIn(v int64)` +`func (o *OAuth2TokenExchange) SetExpiresIn(v int64)` SetExpiresIn sets ExpiresIn field to given value. ### HasExpiresIn -`func (o *Oauth2TokenResponse) HasExpiresIn() bool` +`func (o *OAuth2TokenExchange) HasExpiresIn() bool` HasExpiresIn returns a boolean if a field has been set. ### GetIdToken -`func (o *Oauth2TokenResponse) GetIdToken() string` +`func (o *OAuth2TokenExchange) GetIdToken() int64` GetIdToken returns the IdToken field if non-nil, zero value otherwise. ### GetIdTokenOk -`func (o *Oauth2TokenResponse) GetIdTokenOk() (*string, bool)` +`func (o *OAuth2TokenExchange) GetIdTokenOk() (*int64, bool)` GetIdTokenOk returns a tuple with the IdToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIdToken -`func (o *Oauth2TokenResponse) SetIdToken(v string)` +`func (o *OAuth2TokenExchange) SetIdToken(v int64)` SetIdToken sets IdToken field to given value. ### HasIdToken -`func (o *Oauth2TokenResponse) HasIdToken() bool` +`func (o *OAuth2TokenExchange) HasIdToken() bool` HasIdToken returns a boolean if a field has been set. ### GetRefreshToken -`func (o *Oauth2TokenResponse) GetRefreshToken() string` +`func (o *OAuth2TokenExchange) GetRefreshToken() string` GetRefreshToken returns the RefreshToken field if non-nil, zero value otherwise. ### GetRefreshTokenOk -`func (o *Oauth2TokenResponse) GetRefreshTokenOk() (*string, bool)` +`func (o *OAuth2TokenExchange) GetRefreshTokenOk() (*string, bool)` GetRefreshTokenOk returns a tuple with the RefreshToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRefreshToken -`func (o *Oauth2TokenResponse) SetRefreshToken(v string)` +`func (o *OAuth2TokenExchange) SetRefreshToken(v string)` SetRefreshToken sets RefreshToken field to given value. ### HasRefreshToken -`func (o *Oauth2TokenResponse) HasRefreshToken() bool` +`func (o *OAuth2TokenExchange) HasRefreshToken() bool` HasRefreshToken returns a boolean if a field has been set. ### GetScope -`func (o *Oauth2TokenResponse) GetScope() string` +`func (o *OAuth2TokenExchange) GetScope() int64` GetScope returns the Scope field if non-nil, zero value otherwise. ### GetScopeOk -`func (o *Oauth2TokenResponse) GetScopeOk() (*string, bool)` +`func (o *OAuth2TokenExchange) GetScopeOk() (*int64, bool)` GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetScope -`func (o *Oauth2TokenResponse) SetScope(v string)` +`func (o *OAuth2TokenExchange) SetScope(v int64)` SetScope sets Scope field to given value. ### HasScope -`func (o *Oauth2TokenResponse) HasScope() bool` +`func (o *OAuth2TokenExchange) HasScope() bool` HasScope returns a boolean if a field has been set. ### GetTokenType -`func (o *Oauth2TokenResponse) GetTokenType() string` +`func (o *OAuth2TokenExchange) GetTokenType() string` GetTokenType returns the TokenType field if non-nil, zero value otherwise. ### GetTokenTypeOk -`func (o *Oauth2TokenResponse) GetTokenTypeOk() (*string, bool)` +`func (o *OAuth2TokenExchange) GetTokenTypeOk() (*string, bool)` GetTokenTypeOk returns a tuple with the TokenType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTokenType -`func (o *Oauth2TokenResponse) SetTokenType(v string)` +`func (o *OAuth2TokenExchange) SetTokenType(v string)` SetTokenType sets TokenType field to given value. ### HasTokenType -`func (o *Oauth2TokenResponse) HasTokenType() bool` +`func (o *OAuth2TokenExchange) HasTokenType() bool` HasTokenType returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/OidcApi.md b/clients/hydra/go/docs/OidcApi.md new file mode 100644 index 00000000000..8087d0565df --- /dev/null +++ b/clients/hydra/go/docs/OidcApi.md @@ -0,0 +1,472 @@ +# \OidcApi + +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 +[**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 + +> OAuth2Client CreateOidcDynamicClient(ctx).OAuth2Client(oAuth2Client).Execute() + +Register OAuth2 Client using OpenID Dynamic Client Registration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateOidcDynamicClientRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oAuth2Client** | [**OAuth2Client**](OAuth2Client.md) | Dynamic Client Registration Request Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> DeleteOidcDynamicClient(ctx, id).Execute() + +Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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.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) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | The id of the OAuth 2.0 Client. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteOidcDynamicClientRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> OidcConfiguration DiscoverOidcConfiguration(ctx).Execute() + +OpenID Connect Discovery + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiDiscoverOidcConfigurationRequest struct via the builder pattern + + +### Return type + +[**OidcConfiguration**](OidcConfiguration.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> OAuth2Client GetOidcDynamicClient(ctx, id).Execute() + +Get OAuth2 Client using OpenID Dynamic Client Registration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | The id of the OAuth 2.0 Client. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOidcDynamicClientRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> OidcUserInfo GetOidcUserInfo(ctx).Execute() + +OpenID Connect Userinfo + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetOidcUserInfoRequest struct via the builder pattern + + +### Return type + +[**OidcUserInfo**](OidcUserInfo.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> RevokeOidcSession(ctx).Execute() + +OpenID Connect Front- and Back-channel Enabled Logout + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, 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) + } +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiRevokeOidcSessionRequest struct via the builder pattern + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[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 + +> OAuth2Client SetOidcDynamicClient(ctx, id).OAuth2Client(oAuth2Client).Execute() + +Set OAuth2 Client using OpenID Dynamic Client Registration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | OAuth 2.0 Client ID | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSetOidcDynamicClientRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **oAuth2Client** | [**OAuth2Client**](OAuth2Client.md) | OAuth 2.0 Client Request Body | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + diff --git a/clients/hydra/go/docs/OidcConfiguration.md b/clients/hydra/go/docs/OidcConfiguration.md new file mode 100644 index 00000000000..723bd6a8b47 --- /dev/null +++ b/clients/hydra/go/docs/OidcConfiguration.md @@ -0,0 +1,739 @@ +# OidcConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AuthorizationEndpoint** | **string** | OAuth 2.0 Authorization Endpoint URL | +**BackchannelLogoutSessionSupported** | Pointer to **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] +**BackchannelLogoutSupported** | Pointer to **bool** | OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] +**ClaimsParameterSupported** | Pointer to **bool** | OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] +**ClaimsSupported** | Pointer to **[]string** | 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] +**CodeChallengeMethodsSupported** | Pointer to **[]string** | 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] +**EndSessionEndpoint** | Pointer to **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] +**FrontchannelLogoutSessionSupported** | Pointer to **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] +**FrontchannelLogoutSupported** | Pointer to **bool** | OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] +**GrantTypesSupported** | Pointer to **[]string** | OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] +**IdTokenSignedResponseAlg** | **[]string** | OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. | +**IdTokenSigningAlgValuesSupported** | **[]string** | 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** | **string** | 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. | +**JwksUri** | **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. | +**RegistrationEndpoint** | Pointer to **string** | OpenID Connect Dynamic Client Registration Endpoint URL | [optional] +**RequestObjectSigningAlgValuesSupported** | Pointer to **[]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). | [optional] +**RequestParameterSupported** | Pointer to **bool** | OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] +**RequestUriParameterSupported** | Pointer to **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] +**RequireRequestUriRegistration** | Pointer to **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] +**ResponseModesSupported** | Pointer to **[]string** | OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] +**ResponseTypesSupported** | **[]string** | 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. | +**RevocationEndpoint** | Pointer to **string** | OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] +**ScopesSupported** | Pointer to **[]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 | [optional] +**SubjectTypesSupported** | **[]string** | 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. | +**TokenEndpoint** | **string** | OAuth 2.0 Token Endpoint URL | +**TokenEndpointAuthMethodsSupported** | Pointer to **[]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 | [optional] +**UserinfoEndpoint** | Pointer to **string** | OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. | [optional] +**UserinfoSignedResponseAlg** | **[]string** | OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. | +**UserinfoSigningAlgValuesSupported** | Pointer to **[]string** | 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] + +## Methods + +### NewOidcConfiguration + +`func NewOidcConfiguration(authorizationEndpoint string, idTokenSignedResponseAlg []string, idTokenSigningAlgValuesSupported []string, issuer string, jwksUri string, responseTypesSupported []string, subjectTypesSupported []string, tokenEndpoint string, userinfoSignedResponseAlg []string, ) *OidcConfiguration` + +NewOidcConfiguration instantiates a new OidcConfiguration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOidcConfigurationWithDefaults + +`func NewOidcConfigurationWithDefaults() *OidcConfiguration` + +NewOidcConfigurationWithDefaults instantiates a new OidcConfiguration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAuthorizationEndpoint + +`func (o *OidcConfiguration) GetAuthorizationEndpoint() string` + +GetAuthorizationEndpoint returns the AuthorizationEndpoint field if non-nil, zero value otherwise. + +### GetAuthorizationEndpointOk + +`func (o *OidcConfiguration) GetAuthorizationEndpointOk() (*string, bool)` + +GetAuthorizationEndpointOk returns a tuple with the AuthorizationEndpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthorizationEndpoint + +`func (o *OidcConfiguration) SetAuthorizationEndpoint(v string)` + +SetAuthorizationEndpoint sets AuthorizationEndpoint field to given value. + + +### GetBackchannelLogoutSessionSupported + +`func (o *OidcConfiguration) GetBackchannelLogoutSessionSupported() bool` + +GetBackchannelLogoutSessionSupported returns the BackchannelLogoutSessionSupported field if non-nil, zero value otherwise. + +### GetBackchannelLogoutSessionSupportedOk + +`func (o *OidcConfiguration) GetBackchannelLogoutSessionSupportedOk() (*bool, bool)` + +GetBackchannelLogoutSessionSupportedOk returns a tuple with the BackchannelLogoutSessionSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBackchannelLogoutSessionSupported + +`func (o *OidcConfiguration) SetBackchannelLogoutSessionSupported(v bool)` + +SetBackchannelLogoutSessionSupported sets BackchannelLogoutSessionSupported field to given value. + +### HasBackchannelLogoutSessionSupported + +`func (o *OidcConfiguration) HasBackchannelLogoutSessionSupported() bool` + +HasBackchannelLogoutSessionSupported returns a boolean if a field has been set. + +### GetBackchannelLogoutSupported + +`func (o *OidcConfiguration) GetBackchannelLogoutSupported() bool` + +GetBackchannelLogoutSupported returns the BackchannelLogoutSupported field if non-nil, zero value otherwise. + +### GetBackchannelLogoutSupportedOk + +`func (o *OidcConfiguration) GetBackchannelLogoutSupportedOk() (*bool, bool)` + +GetBackchannelLogoutSupportedOk returns a tuple with the BackchannelLogoutSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBackchannelLogoutSupported + +`func (o *OidcConfiguration) SetBackchannelLogoutSupported(v bool)` + +SetBackchannelLogoutSupported sets BackchannelLogoutSupported field to given value. + +### HasBackchannelLogoutSupported + +`func (o *OidcConfiguration) HasBackchannelLogoutSupported() bool` + +HasBackchannelLogoutSupported returns a boolean if a field has been set. + +### GetClaimsParameterSupported + +`func (o *OidcConfiguration) GetClaimsParameterSupported() bool` + +GetClaimsParameterSupported returns the ClaimsParameterSupported field if non-nil, zero value otherwise. + +### GetClaimsParameterSupportedOk + +`func (o *OidcConfiguration) GetClaimsParameterSupportedOk() (*bool, bool)` + +GetClaimsParameterSupportedOk returns a tuple with the ClaimsParameterSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClaimsParameterSupported + +`func (o *OidcConfiguration) SetClaimsParameterSupported(v bool)` + +SetClaimsParameterSupported sets ClaimsParameterSupported field to given value. + +### HasClaimsParameterSupported + +`func (o *OidcConfiguration) HasClaimsParameterSupported() bool` + +HasClaimsParameterSupported returns a boolean if a field has been set. + +### GetClaimsSupported + +`func (o *OidcConfiguration) GetClaimsSupported() []string` + +GetClaimsSupported returns the ClaimsSupported field if non-nil, zero value otherwise. + +### GetClaimsSupportedOk + +`func (o *OidcConfiguration) GetClaimsSupportedOk() (*[]string, bool)` + +GetClaimsSupportedOk returns a tuple with the ClaimsSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClaimsSupported + +`func (o *OidcConfiguration) SetClaimsSupported(v []string)` + +SetClaimsSupported sets ClaimsSupported field to given value. + +### HasClaimsSupported + +`func (o *OidcConfiguration) HasClaimsSupported() bool` + +HasClaimsSupported returns a boolean if a field has been set. + +### GetCodeChallengeMethodsSupported + +`func (o *OidcConfiguration) GetCodeChallengeMethodsSupported() []string` + +GetCodeChallengeMethodsSupported returns the CodeChallengeMethodsSupported field if non-nil, zero value otherwise. + +### GetCodeChallengeMethodsSupportedOk + +`func (o *OidcConfiguration) GetCodeChallengeMethodsSupportedOk() (*[]string, bool)` + +GetCodeChallengeMethodsSupportedOk returns a tuple with the CodeChallengeMethodsSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCodeChallengeMethodsSupported + +`func (o *OidcConfiguration) SetCodeChallengeMethodsSupported(v []string)` + +SetCodeChallengeMethodsSupported sets CodeChallengeMethodsSupported field to given value. + +### HasCodeChallengeMethodsSupported + +`func (o *OidcConfiguration) HasCodeChallengeMethodsSupported() bool` + +HasCodeChallengeMethodsSupported returns a boolean if a field has been set. + +### GetEndSessionEndpoint + +`func (o *OidcConfiguration) GetEndSessionEndpoint() string` + +GetEndSessionEndpoint returns the EndSessionEndpoint field if non-nil, zero value otherwise. + +### GetEndSessionEndpointOk + +`func (o *OidcConfiguration) GetEndSessionEndpointOk() (*string, bool)` + +GetEndSessionEndpointOk returns a tuple with the EndSessionEndpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndSessionEndpoint + +`func (o *OidcConfiguration) SetEndSessionEndpoint(v string)` + +SetEndSessionEndpoint sets EndSessionEndpoint field to given value. + +### HasEndSessionEndpoint + +`func (o *OidcConfiguration) HasEndSessionEndpoint() bool` + +HasEndSessionEndpoint returns a boolean if a field has been set. + +### GetFrontchannelLogoutSessionSupported + +`func (o *OidcConfiguration) GetFrontchannelLogoutSessionSupported() bool` + +GetFrontchannelLogoutSessionSupported returns the FrontchannelLogoutSessionSupported field if non-nil, zero value otherwise. + +### GetFrontchannelLogoutSessionSupportedOk + +`func (o *OidcConfiguration) GetFrontchannelLogoutSessionSupportedOk() (*bool, bool)` + +GetFrontchannelLogoutSessionSupportedOk returns a tuple with the FrontchannelLogoutSessionSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrontchannelLogoutSessionSupported + +`func (o *OidcConfiguration) SetFrontchannelLogoutSessionSupported(v bool)` + +SetFrontchannelLogoutSessionSupported sets FrontchannelLogoutSessionSupported field to given value. + +### HasFrontchannelLogoutSessionSupported + +`func (o *OidcConfiguration) HasFrontchannelLogoutSessionSupported() bool` + +HasFrontchannelLogoutSessionSupported returns a boolean if a field has been set. + +### GetFrontchannelLogoutSupported + +`func (o *OidcConfiguration) GetFrontchannelLogoutSupported() bool` + +GetFrontchannelLogoutSupported returns the FrontchannelLogoutSupported field if non-nil, zero value otherwise. + +### GetFrontchannelLogoutSupportedOk + +`func (o *OidcConfiguration) GetFrontchannelLogoutSupportedOk() (*bool, bool)` + +GetFrontchannelLogoutSupportedOk returns a tuple with the FrontchannelLogoutSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFrontchannelLogoutSupported + +`func (o *OidcConfiguration) SetFrontchannelLogoutSupported(v bool)` + +SetFrontchannelLogoutSupported sets FrontchannelLogoutSupported field to given value. + +### HasFrontchannelLogoutSupported + +`func (o *OidcConfiguration) HasFrontchannelLogoutSupported() bool` + +HasFrontchannelLogoutSupported returns a boolean if a field has been set. + +### GetGrantTypesSupported + +`func (o *OidcConfiguration) GetGrantTypesSupported() []string` + +GetGrantTypesSupported returns the GrantTypesSupported field if non-nil, zero value otherwise. + +### GetGrantTypesSupportedOk + +`func (o *OidcConfiguration) GetGrantTypesSupportedOk() (*[]string, bool)` + +GetGrantTypesSupportedOk returns a tuple with the GrantTypesSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGrantTypesSupported + +`func (o *OidcConfiguration) SetGrantTypesSupported(v []string)` + +SetGrantTypesSupported sets GrantTypesSupported field to given value. + +### HasGrantTypesSupported + +`func (o *OidcConfiguration) HasGrantTypesSupported() bool` + +HasGrantTypesSupported returns a boolean if a field has been set. + +### GetIdTokenSignedResponseAlg + +`func (o *OidcConfiguration) GetIdTokenSignedResponseAlg() []string` + +GetIdTokenSignedResponseAlg returns the IdTokenSignedResponseAlg field if non-nil, zero value otherwise. + +### GetIdTokenSignedResponseAlgOk + +`func (o *OidcConfiguration) GetIdTokenSignedResponseAlgOk() (*[]string, bool)` + +GetIdTokenSignedResponseAlgOk returns a tuple with the IdTokenSignedResponseAlg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdTokenSignedResponseAlg + +`func (o *OidcConfiguration) SetIdTokenSignedResponseAlg(v []string)` + +SetIdTokenSignedResponseAlg sets IdTokenSignedResponseAlg field to given value. + + +### GetIdTokenSigningAlgValuesSupported + +`func (o *OidcConfiguration) GetIdTokenSigningAlgValuesSupported() []string` + +GetIdTokenSigningAlgValuesSupported returns the IdTokenSigningAlgValuesSupported field if non-nil, zero value otherwise. + +### GetIdTokenSigningAlgValuesSupportedOk + +`func (o *OidcConfiguration) GetIdTokenSigningAlgValuesSupportedOk() (*[]string, bool)` + +GetIdTokenSigningAlgValuesSupportedOk returns a tuple with the IdTokenSigningAlgValuesSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdTokenSigningAlgValuesSupported + +`func (o *OidcConfiguration) SetIdTokenSigningAlgValuesSupported(v []string)` + +SetIdTokenSigningAlgValuesSupported sets IdTokenSigningAlgValuesSupported field to given value. + + +### GetIssuer + +`func (o *OidcConfiguration) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *OidcConfiguration) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *OidcConfiguration) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + + +### GetJwksUri + +`func (o *OidcConfiguration) GetJwksUri() string` + +GetJwksUri returns the JwksUri field if non-nil, zero value otherwise. + +### GetJwksUriOk + +`func (o *OidcConfiguration) GetJwksUriOk() (*string, bool)` + +GetJwksUriOk returns a tuple with the JwksUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJwksUri + +`func (o *OidcConfiguration) SetJwksUri(v string)` + +SetJwksUri sets JwksUri field to given value. + + +### GetRegistrationEndpoint + +`func (o *OidcConfiguration) GetRegistrationEndpoint() string` + +GetRegistrationEndpoint returns the RegistrationEndpoint field if non-nil, zero value otherwise. + +### GetRegistrationEndpointOk + +`func (o *OidcConfiguration) GetRegistrationEndpointOk() (*string, bool)` + +GetRegistrationEndpointOk returns a tuple with the RegistrationEndpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegistrationEndpoint + +`func (o *OidcConfiguration) SetRegistrationEndpoint(v string)` + +SetRegistrationEndpoint sets RegistrationEndpoint field to given value. + +### HasRegistrationEndpoint + +`func (o *OidcConfiguration) HasRegistrationEndpoint() bool` + +HasRegistrationEndpoint returns a boolean if a field has been set. + +### GetRequestObjectSigningAlgValuesSupported + +`func (o *OidcConfiguration) GetRequestObjectSigningAlgValuesSupported() []string` + +GetRequestObjectSigningAlgValuesSupported returns the RequestObjectSigningAlgValuesSupported field if non-nil, zero value otherwise. + +### GetRequestObjectSigningAlgValuesSupportedOk + +`func (o *OidcConfiguration) GetRequestObjectSigningAlgValuesSupportedOk() (*[]string, bool)` + +GetRequestObjectSigningAlgValuesSupportedOk returns a tuple with the RequestObjectSigningAlgValuesSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestObjectSigningAlgValuesSupported + +`func (o *OidcConfiguration) SetRequestObjectSigningAlgValuesSupported(v []string)` + +SetRequestObjectSigningAlgValuesSupported sets RequestObjectSigningAlgValuesSupported field to given value. + +### HasRequestObjectSigningAlgValuesSupported + +`func (o *OidcConfiguration) HasRequestObjectSigningAlgValuesSupported() bool` + +HasRequestObjectSigningAlgValuesSupported returns a boolean if a field has been set. + +### GetRequestParameterSupported + +`func (o *OidcConfiguration) GetRequestParameterSupported() bool` + +GetRequestParameterSupported returns the RequestParameterSupported field if non-nil, zero value otherwise. + +### GetRequestParameterSupportedOk + +`func (o *OidcConfiguration) GetRequestParameterSupportedOk() (*bool, bool)` + +GetRequestParameterSupportedOk returns a tuple with the RequestParameterSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestParameterSupported + +`func (o *OidcConfiguration) SetRequestParameterSupported(v bool)` + +SetRequestParameterSupported sets RequestParameterSupported field to given value. + +### HasRequestParameterSupported + +`func (o *OidcConfiguration) HasRequestParameterSupported() bool` + +HasRequestParameterSupported returns a boolean if a field has been set. + +### GetRequestUriParameterSupported + +`func (o *OidcConfiguration) GetRequestUriParameterSupported() bool` + +GetRequestUriParameterSupported returns the RequestUriParameterSupported field if non-nil, zero value otherwise. + +### GetRequestUriParameterSupportedOk + +`func (o *OidcConfiguration) GetRequestUriParameterSupportedOk() (*bool, bool)` + +GetRequestUriParameterSupportedOk returns a tuple with the RequestUriParameterSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequestUriParameterSupported + +`func (o *OidcConfiguration) SetRequestUriParameterSupported(v bool)` + +SetRequestUriParameterSupported sets RequestUriParameterSupported field to given value. + +### HasRequestUriParameterSupported + +`func (o *OidcConfiguration) HasRequestUriParameterSupported() bool` + +HasRequestUriParameterSupported returns a boolean if a field has been set. + +### GetRequireRequestUriRegistration + +`func (o *OidcConfiguration) GetRequireRequestUriRegistration() bool` + +GetRequireRequestUriRegistration returns the RequireRequestUriRegistration field if non-nil, zero value otherwise. + +### GetRequireRequestUriRegistrationOk + +`func (o *OidcConfiguration) GetRequireRequestUriRegistrationOk() (*bool, bool)` + +GetRequireRequestUriRegistrationOk returns a tuple with the RequireRequestUriRegistration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequireRequestUriRegistration + +`func (o *OidcConfiguration) SetRequireRequestUriRegistration(v bool)` + +SetRequireRequestUriRegistration sets RequireRequestUriRegistration field to given value. + +### HasRequireRequestUriRegistration + +`func (o *OidcConfiguration) HasRequireRequestUriRegistration() bool` + +HasRequireRequestUriRegistration returns a boolean if a field has been set. + +### GetResponseModesSupported + +`func (o *OidcConfiguration) GetResponseModesSupported() []string` + +GetResponseModesSupported returns the ResponseModesSupported field if non-nil, zero value otherwise. + +### GetResponseModesSupportedOk + +`func (o *OidcConfiguration) GetResponseModesSupportedOk() (*[]string, bool)` + +GetResponseModesSupportedOk returns a tuple with the ResponseModesSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseModesSupported + +`func (o *OidcConfiguration) SetResponseModesSupported(v []string)` + +SetResponseModesSupported sets ResponseModesSupported field to given value. + +### HasResponseModesSupported + +`func (o *OidcConfiguration) HasResponseModesSupported() bool` + +HasResponseModesSupported returns a boolean if a field has been set. + +### GetResponseTypesSupported + +`func (o *OidcConfiguration) GetResponseTypesSupported() []string` + +GetResponseTypesSupported returns the ResponseTypesSupported field if non-nil, zero value otherwise. + +### GetResponseTypesSupportedOk + +`func (o *OidcConfiguration) GetResponseTypesSupportedOk() (*[]string, bool)` + +GetResponseTypesSupportedOk returns a tuple with the ResponseTypesSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseTypesSupported + +`func (o *OidcConfiguration) SetResponseTypesSupported(v []string)` + +SetResponseTypesSupported sets ResponseTypesSupported field to given value. + + +### GetRevocationEndpoint + +`func (o *OidcConfiguration) GetRevocationEndpoint() string` + +GetRevocationEndpoint returns the RevocationEndpoint field if non-nil, zero value otherwise. + +### GetRevocationEndpointOk + +`func (o *OidcConfiguration) GetRevocationEndpointOk() (*string, bool)` + +GetRevocationEndpointOk returns a tuple with the RevocationEndpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRevocationEndpoint + +`func (o *OidcConfiguration) SetRevocationEndpoint(v string)` + +SetRevocationEndpoint sets RevocationEndpoint field to given value. + +### HasRevocationEndpoint + +`func (o *OidcConfiguration) HasRevocationEndpoint() bool` + +HasRevocationEndpoint returns a boolean if a field has been set. + +### GetScopesSupported + +`func (o *OidcConfiguration) GetScopesSupported() []string` + +GetScopesSupported returns the ScopesSupported field if non-nil, zero value otherwise. + +### GetScopesSupportedOk + +`func (o *OidcConfiguration) GetScopesSupportedOk() (*[]string, bool)` + +GetScopesSupportedOk returns a tuple with the ScopesSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScopesSupported + +`func (o *OidcConfiguration) SetScopesSupported(v []string)` + +SetScopesSupported sets ScopesSupported field to given value. + +### HasScopesSupported + +`func (o *OidcConfiguration) HasScopesSupported() bool` + +HasScopesSupported returns a boolean if a field has been set. + +### GetSubjectTypesSupported + +`func (o *OidcConfiguration) GetSubjectTypesSupported() []string` + +GetSubjectTypesSupported returns the SubjectTypesSupported field if non-nil, zero value otherwise. + +### GetSubjectTypesSupportedOk + +`func (o *OidcConfiguration) GetSubjectTypesSupportedOk() (*[]string, bool)` + +GetSubjectTypesSupportedOk returns a tuple with the SubjectTypesSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubjectTypesSupported + +`func (o *OidcConfiguration) SetSubjectTypesSupported(v []string)` + +SetSubjectTypesSupported sets SubjectTypesSupported field to given value. + + +### GetTokenEndpoint + +`func (o *OidcConfiguration) GetTokenEndpoint() string` + +GetTokenEndpoint returns the TokenEndpoint field if non-nil, zero value otherwise. + +### GetTokenEndpointOk + +`func (o *OidcConfiguration) GetTokenEndpointOk() (*string, bool)` + +GetTokenEndpointOk returns a tuple with the TokenEndpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenEndpoint + +`func (o *OidcConfiguration) SetTokenEndpoint(v string)` + +SetTokenEndpoint sets TokenEndpoint field to given value. + + +### GetTokenEndpointAuthMethodsSupported + +`func (o *OidcConfiguration) GetTokenEndpointAuthMethodsSupported() []string` + +GetTokenEndpointAuthMethodsSupported returns the TokenEndpointAuthMethodsSupported field if non-nil, zero value otherwise. + +### GetTokenEndpointAuthMethodsSupportedOk + +`func (o *OidcConfiguration) GetTokenEndpointAuthMethodsSupportedOk() (*[]string, bool)` + +GetTokenEndpointAuthMethodsSupportedOk returns a tuple with the TokenEndpointAuthMethodsSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTokenEndpointAuthMethodsSupported + +`func (o *OidcConfiguration) SetTokenEndpointAuthMethodsSupported(v []string)` + +SetTokenEndpointAuthMethodsSupported sets TokenEndpointAuthMethodsSupported field to given value. + +### HasTokenEndpointAuthMethodsSupported + +`func (o *OidcConfiguration) HasTokenEndpointAuthMethodsSupported() bool` + +HasTokenEndpointAuthMethodsSupported returns a boolean if a field has been set. + +### GetUserinfoEndpoint + +`func (o *OidcConfiguration) GetUserinfoEndpoint() string` + +GetUserinfoEndpoint returns the UserinfoEndpoint field if non-nil, zero value otherwise. + +### GetUserinfoEndpointOk + +`func (o *OidcConfiguration) GetUserinfoEndpointOk() (*string, bool)` + +GetUserinfoEndpointOk returns a tuple with the UserinfoEndpoint field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserinfoEndpoint + +`func (o *OidcConfiguration) SetUserinfoEndpoint(v string)` + +SetUserinfoEndpoint sets UserinfoEndpoint field to given value. + +### HasUserinfoEndpoint + +`func (o *OidcConfiguration) HasUserinfoEndpoint() bool` + +HasUserinfoEndpoint returns a boolean if a field has been set. + +### GetUserinfoSignedResponseAlg + +`func (o *OidcConfiguration) GetUserinfoSignedResponseAlg() []string` + +GetUserinfoSignedResponseAlg returns the UserinfoSignedResponseAlg field if non-nil, zero value otherwise. + +### GetUserinfoSignedResponseAlgOk + +`func (o *OidcConfiguration) GetUserinfoSignedResponseAlgOk() (*[]string, bool)` + +GetUserinfoSignedResponseAlgOk returns a tuple with the UserinfoSignedResponseAlg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserinfoSignedResponseAlg + +`func (o *OidcConfiguration) SetUserinfoSignedResponseAlg(v []string)` + +SetUserinfoSignedResponseAlg sets UserinfoSignedResponseAlg field to given value. + + +### GetUserinfoSigningAlgValuesSupported + +`func (o *OidcConfiguration) GetUserinfoSigningAlgValuesSupported() []string` + +GetUserinfoSigningAlgValuesSupported returns the UserinfoSigningAlgValuesSupported field if non-nil, zero value otherwise. + +### GetUserinfoSigningAlgValuesSupportedOk + +`func (o *OidcConfiguration) GetUserinfoSigningAlgValuesSupportedOk() (*[]string, bool)` + +GetUserinfoSigningAlgValuesSupportedOk returns a tuple with the UserinfoSigningAlgValuesSupported field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserinfoSigningAlgValuesSupported + +`func (o *OidcConfiguration) SetUserinfoSigningAlgValuesSupported(v []string)` + +SetUserinfoSigningAlgValuesSupported sets UserinfoSigningAlgValuesSupported field to given value. + +### HasUserinfoSigningAlgValuesSupported + +`func (o *OidcConfiguration) HasUserinfoSigningAlgValuesSupported() bool` + +HasUserinfoSigningAlgValuesSupported returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/UserinfoResponse.md b/clients/hydra/go/docs/OidcUserInfo.md similarity index 76% rename from clients/hydra/go/docs/UserinfoResponse.md rename to clients/hydra/go/docs/OidcUserInfo.md index 164ce490ecd..6b584debaf6 100644 --- a/clients/hydra/go/docs/UserinfoResponse.md +++ b/clients/hydra/go/docs/OidcUserInfo.md @@ -1,4 +1,4 @@ -# UserinfoResponse +# OidcUserInfo ## Properties @@ -26,495 +26,495 @@ Name | Type | Description | Notes ## Methods -### NewUserinfoResponse +### NewOidcUserInfo -`func NewUserinfoResponse() *UserinfoResponse` +`func NewOidcUserInfo() *OidcUserInfo` -NewUserinfoResponse instantiates a new UserinfoResponse object +NewOidcUserInfo instantiates a new OidcUserInfo object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewUserinfoResponseWithDefaults +### NewOidcUserInfoWithDefaults -`func NewUserinfoResponseWithDefaults() *UserinfoResponse` +`func NewOidcUserInfoWithDefaults() *OidcUserInfo` -NewUserinfoResponseWithDefaults instantiates a new UserinfoResponse object +NewOidcUserInfoWithDefaults instantiates a new OidcUserInfo object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetBirthdate -`func (o *UserinfoResponse) GetBirthdate() string` +`func (o *OidcUserInfo) GetBirthdate() string` GetBirthdate returns the Birthdate field if non-nil, zero value otherwise. ### GetBirthdateOk -`func (o *UserinfoResponse) GetBirthdateOk() (*string, bool)` +`func (o *OidcUserInfo) GetBirthdateOk() (*string, bool)` GetBirthdateOk returns a tuple with the Birthdate field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBirthdate -`func (o *UserinfoResponse) SetBirthdate(v string)` +`func (o *OidcUserInfo) SetBirthdate(v string)` SetBirthdate sets Birthdate field to given value. ### HasBirthdate -`func (o *UserinfoResponse) HasBirthdate() bool` +`func (o *OidcUserInfo) HasBirthdate() bool` HasBirthdate returns a boolean if a field has been set. ### GetEmail -`func (o *UserinfoResponse) GetEmail() string` +`func (o *OidcUserInfo) GetEmail() string` GetEmail returns the Email field if non-nil, zero value otherwise. ### GetEmailOk -`func (o *UserinfoResponse) GetEmailOk() (*string, bool)` +`func (o *OidcUserInfo) GetEmailOk() (*string, bool)` GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEmail -`func (o *UserinfoResponse) SetEmail(v string)` +`func (o *OidcUserInfo) SetEmail(v string)` SetEmail sets Email field to given value. ### HasEmail -`func (o *UserinfoResponse) HasEmail() bool` +`func (o *OidcUserInfo) HasEmail() bool` HasEmail returns a boolean if a field has been set. ### GetEmailVerified -`func (o *UserinfoResponse) GetEmailVerified() bool` +`func (o *OidcUserInfo) GetEmailVerified() bool` GetEmailVerified returns the EmailVerified field if non-nil, zero value otherwise. ### GetEmailVerifiedOk -`func (o *UserinfoResponse) GetEmailVerifiedOk() (*bool, bool)` +`func (o *OidcUserInfo) GetEmailVerifiedOk() (*bool, bool)` GetEmailVerifiedOk returns a tuple with the EmailVerified field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEmailVerified -`func (o *UserinfoResponse) SetEmailVerified(v bool)` +`func (o *OidcUserInfo) SetEmailVerified(v bool)` SetEmailVerified sets EmailVerified field to given value. ### HasEmailVerified -`func (o *UserinfoResponse) HasEmailVerified() bool` +`func (o *OidcUserInfo) HasEmailVerified() bool` HasEmailVerified returns a boolean if a field has been set. ### GetFamilyName -`func (o *UserinfoResponse) GetFamilyName() string` +`func (o *OidcUserInfo) GetFamilyName() string` GetFamilyName returns the FamilyName field if non-nil, zero value otherwise. ### GetFamilyNameOk -`func (o *UserinfoResponse) GetFamilyNameOk() (*string, bool)` +`func (o *OidcUserInfo) GetFamilyNameOk() (*string, bool)` GetFamilyNameOk returns a tuple with the FamilyName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFamilyName -`func (o *UserinfoResponse) SetFamilyName(v string)` +`func (o *OidcUserInfo) SetFamilyName(v string)` SetFamilyName sets FamilyName field to given value. ### HasFamilyName -`func (o *UserinfoResponse) HasFamilyName() bool` +`func (o *OidcUserInfo) HasFamilyName() bool` HasFamilyName returns a boolean if a field has been set. ### GetGender -`func (o *UserinfoResponse) GetGender() string` +`func (o *OidcUserInfo) GetGender() string` GetGender returns the Gender field if non-nil, zero value otherwise. ### GetGenderOk -`func (o *UserinfoResponse) GetGenderOk() (*string, bool)` +`func (o *OidcUserInfo) GetGenderOk() (*string, bool)` GetGenderOk returns a tuple with the Gender field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGender -`func (o *UserinfoResponse) SetGender(v string)` +`func (o *OidcUserInfo) SetGender(v string)` SetGender sets Gender field to given value. ### HasGender -`func (o *UserinfoResponse) HasGender() bool` +`func (o *OidcUserInfo) HasGender() bool` HasGender returns a boolean if a field has been set. ### GetGivenName -`func (o *UserinfoResponse) GetGivenName() string` +`func (o *OidcUserInfo) GetGivenName() string` GetGivenName returns the GivenName field if non-nil, zero value otherwise. ### GetGivenNameOk -`func (o *UserinfoResponse) GetGivenNameOk() (*string, bool)` +`func (o *OidcUserInfo) GetGivenNameOk() (*string, bool)` GetGivenNameOk returns a tuple with the GivenName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGivenName -`func (o *UserinfoResponse) SetGivenName(v string)` +`func (o *OidcUserInfo) SetGivenName(v string)` SetGivenName sets GivenName field to given value. ### HasGivenName -`func (o *UserinfoResponse) HasGivenName() bool` +`func (o *OidcUserInfo) HasGivenName() bool` HasGivenName returns a boolean if a field has been set. ### GetLocale -`func (o *UserinfoResponse) GetLocale() string` +`func (o *OidcUserInfo) GetLocale() string` GetLocale returns the Locale field if non-nil, zero value otherwise. ### GetLocaleOk -`func (o *UserinfoResponse) GetLocaleOk() (*string, bool)` +`func (o *OidcUserInfo) GetLocaleOk() (*string, bool)` GetLocaleOk returns a tuple with the Locale field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLocale -`func (o *UserinfoResponse) SetLocale(v string)` +`func (o *OidcUserInfo) SetLocale(v string)` SetLocale sets Locale field to given value. ### HasLocale -`func (o *UserinfoResponse) HasLocale() bool` +`func (o *OidcUserInfo) HasLocale() bool` HasLocale returns a boolean if a field has been set. ### GetMiddleName -`func (o *UserinfoResponse) GetMiddleName() string` +`func (o *OidcUserInfo) GetMiddleName() string` GetMiddleName returns the MiddleName field if non-nil, zero value otherwise. ### GetMiddleNameOk -`func (o *UserinfoResponse) GetMiddleNameOk() (*string, bool)` +`func (o *OidcUserInfo) GetMiddleNameOk() (*string, bool)` GetMiddleNameOk returns a tuple with the MiddleName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMiddleName -`func (o *UserinfoResponse) SetMiddleName(v string)` +`func (o *OidcUserInfo) SetMiddleName(v string)` SetMiddleName sets MiddleName field to given value. ### HasMiddleName -`func (o *UserinfoResponse) HasMiddleName() bool` +`func (o *OidcUserInfo) HasMiddleName() bool` HasMiddleName returns a boolean if a field has been set. ### GetName -`func (o *UserinfoResponse) GetName() string` +`func (o *OidcUserInfo) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *UserinfoResponse) GetNameOk() (*string, bool)` +`func (o *OidcUserInfo) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName -`func (o *UserinfoResponse) SetName(v string)` +`func (o *OidcUserInfo) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *UserinfoResponse) HasName() bool` +`func (o *OidcUserInfo) HasName() bool` HasName returns a boolean if a field has been set. ### GetNickname -`func (o *UserinfoResponse) GetNickname() string` +`func (o *OidcUserInfo) GetNickname() string` GetNickname returns the Nickname field if non-nil, zero value otherwise. ### GetNicknameOk -`func (o *UserinfoResponse) GetNicknameOk() (*string, bool)` +`func (o *OidcUserInfo) GetNicknameOk() (*string, bool)` GetNicknameOk returns a tuple with the Nickname field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNickname -`func (o *UserinfoResponse) SetNickname(v string)` +`func (o *OidcUserInfo) SetNickname(v string)` SetNickname sets Nickname field to given value. ### HasNickname -`func (o *UserinfoResponse) HasNickname() bool` +`func (o *OidcUserInfo) HasNickname() bool` HasNickname returns a boolean if a field has been set. ### GetPhoneNumber -`func (o *UserinfoResponse) GetPhoneNumber() string` +`func (o *OidcUserInfo) GetPhoneNumber() string` GetPhoneNumber returns the PhoneNumber field if non-nil, zero value otherwise. ### GetPhoneNumberOk -`func (o *UserinfoResponse) GetPhoneNumberOk() (*string, bool)` +`func (o *OidcUserInfo) GetPhoneNumberOk() (*string, bool)` GetPhoneNumberOk returns a tuple with the PhoneNumber field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPhoneNumber -`func (o *UserinfoResponse) SetPhoneNumber(v string)` +`func (o *OidcUserInfo) SetPhoneNumber(v string)` SetPhoneNumber sets PhoneNumber field to given value. ### HasPhoneNumber -`func (o *UserinfoResponse) HasPhoneNumber() bool` +`func (o *OidcUserInfo) HasPhoneNumber() bool` HasPhoneNumber returns a boolean if a field has been set. ### GetPhoneNumberVerified -`func (o *UserinfoResponse) GetPhoneNumberVerified() bool` +`func (o *OidcUserInfo) GetPhoneNumberVerified() bool` GetPhoneNumberVerified returns the PhoneNumberVerified field if non-nil, zero value otherwise. ### GetPhoneNumberVerifiedOk -`func (o *UserinfoResponse) GetPhoneNumberVerifiedOk() (*bool, bool)` +`func (o *OidcUserInfo) GetPhoneNumberVerifiedOk() (*bool, bool)` GetPhoneNumberVerifiedOk returns a tuple with the PhoneNumberVerified field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPhoneNumberVerified -`func (o *UserinfoResponse) SetPhoneNumberVerified(v bool)` +`func (o *OidcUserInfo) SetPhoneNumberVerified(v bool)` SetPhoneNumberVerified sets PhoneNumberVerified field to given value. ### HasPhoneNumberVerified -`func (o *UserinfoResponse) HasPhoneNumberVerified() bool` +`func (o *OidcUserInfo) HasPhoneNumberVerified() bool` HasPhoneNumberVerified returns a boolean if a field has been set. ### GetPicture -`func (o *UserinfoResponse) GetPicture() string` +`func (o *OidcUserInfo) GetPicture() string` GetPicture returns the Picture field if non-nil, zero value otherwise. ### GetPictureOk -`func (o *UserinfoResponse) GetPictureOk() (*string, bool)` +`func (o *OidcUserInfo) GetPictureOk() (*string, bool)` GetPictureOk returns a tuple with the Picture field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPicture -`func (o *UserinfoResponse) SetPicture(v string)` +`func (o *OidcUserInfo) SetPicture(v string)` SetPicture sets Picture field to given value. ### HasPicture -`func (o *UserinfoResponse) HasPicture() bool` +`func (o *OidcUserInfo) HasPicture() bool` HasPicture returns a boolean if a field has been set. ### GetPreferredUsername -`func (o *UserinfoResponse) GetPreferredUsername() string` +`func (o *OidcUserInfo) GetPreferredUsername() string` GetPreferredUsername returns the PreferredUsername field if non-nil, zero value otherwise. ### GetPreferredUsernameOk -`func (o *UserinfoResponse) GetPreferredUsernameOk() (*string, bool)` +`func (o *OidcUserInfo) GetPreferredUsernameOk() (*string, bool)` GetPreferredUsernameOk returns a tuple with the PreferredUsername field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPreferredUsername -`func (o *UserinfoResponse) SetPreferredUsername(v string)` +`func (o *OidcUserInfo) SetPreferredUsername(v string)` SetPreferredUsername sets PreferredUsername field to given value. ### HasPreferredUsername -`func (o *UserinfoResponse) HasPreferredUsername() bool` +`func (o *OidcUserInfo) HasPreferredUsername() bool` HasPreferredUsername returns a boolean if a field has been set. ### GetProfile -`func (o *UserinfoResponse) GetProfile() string` +`func (o *OidcUserInfo) GetProfile() string` GetProfile returns the Profile field if non-nil, zero value otherwise. ### GetProfileOk -`func (o *UserinfoResponse) GetProfileOk() (*string, bool)` +`func (o *OidcUserInfo) GetProfileOk() (*string, bool)` GetProfileOk returns a tuple with the Profile field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProfile -`func (o *UserinfoResponse) SetProfile(v string)` +`func (o *OidcUserInfo) SetProfile(v string)` SetProfile sets Profile field to given value. ### HasProfile -`func (o *UserinfoResponse) HasProfile() bool` +`func (o *OidcUserInfo) HasProfile() bool` HasProfile returns a boolean if a field has been set. ### GetSub -`func (o *UserinfoResponse) GetSub() string` +`func (o *OidcUserInfo) GetSub() string` GetSub returns the Sub field if non-nil, zero value otherwise. ### GetSubOk -`func (o *UserinfoResponse) GetSubOk() (*string, bool)` +`func (o *OidcUserInfo) GetSubOk() (*string, bool)` GetSubOk returns a tuple with the Sub field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSub -`func (o *UserinfoResponse) SetSub(v string)` +`func (o *OidcUserInfo) SetSub(v string)` SetSub sets Sub field to given value. ### HasSub -`func (o *UserinfoResponse) HasSub() bool` +`func (o *OidcUserInfo) HasSub() bool` HasSub returns a boolean if a field has been set. ### GetUpdatedAt -`func (o *UserinfoResponse) GetUpdatedAt() int64` +`func (o *OidcUserInfo) GetUpdatedAt() int64` GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. ### GetUpdatedAtOk -`func (o *UserinfoResponse) GetUpdatedAtOk() (*int64, bool)` +`func (o *OidcUserInfo) GetUpdatedAtOk() (*int64, bool)` GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUpdatedAt -`func (o *UserinfoResponse) SetUpdatedAt(v int64)` +`func (o *OidcUserInfo) SetUpdatedAt(v int64)` SetUpdatedAt sets UpdatedAt field to given value. ### HasUpdatedAt -`func (o *UserinfoResponse) HasUpdatedAt() bool` +`func (o *OidcUserInfo) HasUpdatedAt() bool` HasUpdatedAt returns a boolean if a field has been set. ### GetWebsite -`func (o *UserinfoResponse) GetWebsite() string` +`func (o *OidcUserInfo) GetWebsite() string` GetWebsite returns the Website field if non-nil, zero value otherwise. ### GetWebsiteOk -`func (o *UserinfoResponse) GetWebsiteOk() (*string, bool)` +`func (o *OidcUserInfo) GetWebsiteOk() (*string, bool)` GetWebsiteOk returns a tuple with the Website field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetWebsite -`func (o *UserinfoResponse) SetWebsite(v string)` +`func (o *OidcUserInfo) SetWebsite(v string)` SetWebsite sets Website field to given value. ### HasWebsite -`func (o *UserinfoResponse) HasWebsite() bool` +`func (o *OidcUserInfo) HasWebsite() bool` HasWebsite returns a boolean if a field has been set. ### GetZoneinfo -`func (o *UserinfoResponse) GetZoneinfo() string` +`func (o *OidcUserInfo) GetZoneinfo() string` GetZoneinfo returns the Zoneinfo field if non-nil, zero value otherwise. ### GetZoneinfoOk -`func (o *UserinfoResponse) GetZoneinfoOk() (*string, bool)` +`func (o *OidcUserInfo) GetZoneinfoOk() (*string, bool)` GetZoneinfoOk returns a tuple with the Zoneinfo field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetZoneinfo -`func (o *UserinfoResponse) SetZoneinfo(v string)` +`func (o *OidcUserInfo) SetZoneinfo(v string)` SetZoneinfo sets Zoneinfo field to given value. ### HasZoneinfo -`func (o *UserinfoResponse) HasZoneinfo() bool` +`func (o *OidcUserInfo) HasZoneinfo() bool` HasZoneinfo returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/Pagination.md b/clients/hydra/go/docs/Pagination.md new file mode 100644 index 00000000000..e3978ee5f58 --- /dev/null +++ b/clients/hydra/go/docs/Pagination.md @@ -0,0 +1,82 @@ +# Pagination + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PageSize** | Pointer to **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** | Pointer to **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"] + +## Methods + +### NewPagination + +`func NewPagination() *Pagination` + +NewPagination instantiates a new Pagination object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginationWithDefaults + +`func NewPaginationWithDefaults() *Pagination` + +NewPaginationWithDefaults instantiates a new Pagination object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPageSize + +`func (o *Pagination) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *Pagination) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *Pagination) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *Pagination) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetPageToken + +`func (o *Pagination) GetPageToken() string` + +GetPageToken returns the PageToken field if non-nil, zero value otherwise. + +### GetPageTokenOk + +`func (o *Pagination) GetPageTokenOk() (*string, bool)` + +GetPageTokenOk returns a tuple with the PageToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageToken + +`func (o *Pagination) SetPageToken(v string)` + +SetPageToken sets PageToken field to given value. + +### HasPageToken + +`func (o *Pagination) HasPageToken() bool` + +HasPageToken returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/PaginationHeaders.md b/clients/hydra/go/docs/PaginationHeaders.md new file mode 100644 index 00000000000..78f93cc4b16 --- /dev/null +++ b/clients/hydra/go/docs/PaginationHeaders.md @@ -0,0 +1,82 @@ +# PaginationHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Link** | Pointer to **string** | 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] +**XTotalCount** | Pointer to **string** | The total number of clients. in: header | [optional] + +## Methods + +### NewPaginationHeaders + +`func NewPaginationHeaders() *PaginationHeaders` + +NewPaginationHeaders instantiates a new PaginationHeaders object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginationHeadersWithDefaults + +`func NewPaginationHeadersWithDefaults() *PaginationHeaders` + +NewPaginationHeadersWithDefaults instantiates a new PaginationHeaders object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLink + +`func (o *PaginationHeaders) GetLink() string` + +GetLink returns the Link field if non-nil, zero value otherwise. + +### GetLinkOk + +`func (o *PaginationHeaders) GetLinkOk() (*string, bool)` + +GetLinkOk returns a tuple with the Link field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLink + +`func (o *PaginationHeaders) SetLink(v string)` + +SetLink sets Link field to given value. + +### HasLink + +`func (o *PaginationHeaders) HasLink() bool` + +HasLink returns a boolean if a field has been set. + +### GetXTotalCount + +`func (o *PaginationHeaders) GetXTotalCount() string` + +GetXTotalCount returns the XTotalCount field if non-nil, zero value otherwise. + +### GetXTotalCountOk + +`func (o *PaginationHeaders) GetXTotalCountOk() (*string, bool)` + +GetXTotalCountOk returns a tuple with the XTotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXTotalCount + +`func (o *PaginationHeaders) SetXTotalCount(v string)` + +SetXTotalCount sets XTotalCount field to given value. + +### HasXTotalCount + +`func (o *PaginationHeaders) HasXTotalCount() bool` + +HasXTotalCount returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/PluginConfig.md b/clients/hydra/go/docs/PluginConfig.md deleted file mode 100644 index 568e72f37b2..00000000000 --- a/clients/hydra/go/docs/PluginConfig.md +++ /dev/null @@ -1,381 +0,0 @@ -# PluginConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Args** | [**PluginConfigArgs**](PluginConfigArgs.md) | | -**Description** | **string** | description | -**DockerVersion** | Pointer to **string** | Docker Version used to create the plugin | [optional] -**Documentation** | **string** | documentation | -**Entrypoint** | **[]string** | entrypoint | -**Env** | [**[]PluginEnv**](PluginEnv.md) | env | -**Interface** | [**PluginConfigInterface**](PluginConfigInterface.md) | | -**IpcHost** | **bool** | ipc host | -**Linux** | [**PluginConfigLinux**](PluginConfigLinux.md) | | -**Mounts** | [**[]PluginMount**](PluginMount.md) | mounts | -**Network** | [**PluginConfigNetwork**](PluginConfigNetwork.md) | | -**PidHost** | **bool** | pid host | -**PropagatedMount** | **string** | propagated mount | -**User** | Pointer to [**PluginConfigUser**](PluginConfigUser.md) | | [optional] -**WorkDir** | **string** | work dir | -**Rootfs** | Pointer to [**PluginConfigRootfs**](PluginConfigRootfs.md) | | [optional] - -## Methods - -### NewPluginConfig - -`func NewPluginConfig(args PluginConfigArgs, description string, documentation string, entrypoint []string, env []PluginEnv, interface_ PluginConfigInterface, ipcHost bool, linux PluginConfigLinux, mounts []PluginMount, network PluginConfigNetwork, pidHost bool, propagatedMount string, workDir string, ) *PluginConfig` - -NewPluginConfig instantiates a new PluginConfig object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginConfigWithDefaults - -`func NewPluginConfigWithDefaults() *PluginConfig` - -NewPluginConfigWithDefaults instantiates a new PluginConfig object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetArgs - -`func (o *PluginConfig) GetArgs() PluginConfigArgs` - -GetArgs returns the Args field if non-nil, zero value otherwise. - -### GetArgsOk - -`func (o *PluginConfig) GetArgsOk() (*PluginConfigArgs, bool)` - -GetArgsOk returns a tuple with the Args field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetArgs - -`func (o *PluginConfig) SetArgs(v PluginConfigArgs)` - -SetArgs sets Args field to given value. - - -### GetDescription - -`func (o *PluginConfig) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *PluginConfig) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *PluginConfig) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetDockerVersion - -`func (o *PluginConfig) GetDockerVersion() string` - -GetDockerVersion returns the DockerVersion field if non-nil, zero value otherwise. - -### GetDockerVersionOk - -`func (o *PluginConfig) GetDockerVersionOk() (*string, bool)` - -GetDockerVersionOk returns a tuple with the DockerVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDockerVersion - -`func (o *PluginConfig) SetDockerVersion(v string)` - -SetDockerVersion sets DockerVersion field to given value. - -### HasDockerVersion - -`func (o *PluginConfig) HasDockerVersion() bool` - -HasDockerVersion returns a boolean if a field has been set. - -### GetDocumentation - -`func (o *PluginConfig) GetDocumentation() string` - -GetDocumentation returns the Documentation field if non-nil, zero value otherwise. - -### GetDocumentationOk - -`func (o *PluginConfig) GetDocumentationOk() (*string, bool)` - -GetDocumentationOk returns a tuple with the Documentation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDocumentation - -`func (o *PluginConfig) SetDocumentation(v string)` - -SetDocumentation sets Documentation field to given value. - - -### GetEntrypoint - -`func (o *PluginConfig) GetEntrypoint() []string` - -GetEntrypoint returns the Entrypoint field if non-nil, zero value otherwise. - -### GetEntrypointOk - -`func (o *PluginConfig) GetEntrypointOk() (*[]string, bool)` - -GetEntrypointOk returns a tuple with the Entrypoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEntrypoint - -`func (o *PluginConfig) SetEntrypoint(v []string)` - -SetEntrypoint sets Entrypoint field to given value. - - -### GetEnv - -`func (o *PluginConfig) GetEnv() []PluginEnv` - -GetEnv returns the Env field if non-nil, zero value otherwise. - -### GetEnvOk - -`func (o *PluginConfig) GetEnvOk() (*[]PluginEnv, bool)` - -GetEnvOk returns a tuple with the Env field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnv - -`func (o *PluginConfig) SetEnv(v []PluginEnv)` - -SetEnv sets Env field to given value. - - -### GetInterface - -`func (o *PluginConfig) GetInterface() PluginConfigInterface` - -GetInterface returns the Interface field if non-nil, zero value otherwise. - -### GetInterfaceOk - -`func (o *PluginConfig) GetInterfaceOk() (*PluginConfigInterface, bool)` - -GetInterfaceOk returns a tuple with the Interface field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInterface - -`func (o *PluginConfig) SetInterface(v PluginConfigInterface)` - -SetInterface sets Interface field to given value. - - -### GetIpcHost - -`func (o *PluginConfig) GetIpcHost() bool` - -GetIpcHost returns the IpcHost field if non-nil, zero value otherwise. - -### GetIpcHostOk - -`func (o *PluginConfig) GetIpcHostOk() (*bool, bool)` - -GetIpcHostOk returns a tuple with the IpcHost field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIpcHost - -`func (o *PluginConfig) SetIpcHost(v bool)` - -SetIpcHost sets IpcHost field to given value. - - -### GetLinux - -`func (o *PluginConfig) GetLinux() PluginConfigLinux` - -GetLinux returns the Linux field if non-nil, zero value otherwise. - -### GetLinuxOk - -`func (o *PluginConfig) GetLinuxOk() (*PluginConfigLinux, bool)` - -GetLinuxOk returns a tuple with the Linux field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLinux - -`func (o *PluginConfig) SetLinux(v PluginConfigLinux)` - -SetLinux sets Linux field to given value. - - -### GetMounts - -`func (o *PluginConfig) GetMounts() []PluginMount` - -GetMounts returns the Mounts field if non-nil, zero value otherwise. - -### GetMountsOk - -`func (o *PluginConfig) GetMountsOk() (*[]PluginMount, bool)` - -GetMountsOk returns a tuple with the Mounts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMounts - -`func (o *PluginConfig) SetMounts(v []PluginMount)` - -SetMounts sets Mounts field to given value. - - -### GetNetwork - -`func (o *PluginConfig) GetNetwork() PluginConfigNetwork` - -GetNetwork returns the Network field if non-nil, zero value otherwise. - -### GetNetworkOk - -`func (o *PluginConfig) GetNetworkOk() (*PluginConfigNetwork, bool)` - -GetNetworkOk returns a tuple with the Network field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNetwork - -`func (o *PluginConfig) SetNetwork(v PluginConfigNetwork)` - -SetNetwork sets Network field to given value. - - -### GetPidHost - -`func (o *PluginConfig) GetPidHost() bool` - -GetPidHost returns the PidHost field if non-nil, zero value otherwise. - -### GetPidHostOk - -`func (o *PluginConfig) GetPidHostOk() (*bool, bool)` - -GetPidHostOk returns a tuple with the PidHost field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPidHost - -`func (o *PluginConfig) SetPidHost(v bool)` - -SetPidHost sets PidHost field to given value. - - -### GetPropagatedMount - -`func (o *PluginConfig) GetPropagatedMount() string` - -GetPropagatedMount returns the PropagatedMount field if non-nil, zero value otherwise. - -### GetPropagatedMountOk - -`func (o *PluginConfig) GetPropagatedMountOk() (*string, bool)` - -GetPropagatedMountOk returns a tuple with the PropagatedMount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPropagatedMount - -`func (o *PluginConfig) SetPropagatedMount(v string)` - -SetPropagatedMount sets PropagatedMount field to given value. - - -### GetUser - -`func (o *PluginConfig) GetUser() PluginConfigUser` - -GetUser returns the User field if non-nil, zero value otherwise. - -### GetUserOk - -`func (o *PluginConfig) GetUserOk() (*PluginConfigUser, bool)` - -GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUser - -`func (o *PluginConfig) SetUser(v PluginConfigUser)` - -SetUser sets User field to given value. - -### HasUser - -`func (o *PluginConfig) HasUser() bool` - -HasUser returns a boolean if a field has been set. - -### GetWorkDir - -`func (o *PluginConfig) GetWorkDir() string` - -GetWorkDir returns the WorkDir field if non-nil, zero value otherwise. - -### GetWorkDirOk - -`func (o *PluginConfig) GetWorkDirOk() (*string, bool)` - -GetWorkDirOk returns a tuple with the WorkDir field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWorkDir - -`func (o *PluginConfig) SetWorkDir(v string)` - -SetWorkDir sets WorkDir field to given value. - - -### GetRootfs - -`func (o *PluginConfig) GetRootfs() PluginConfigRootfs` - -GetRootfs returns the Rootfs field if non-nil, zero value otherwise. - -### GetRootfsOk - -`func (o *PluginConfig) GetRootfsOk() (*PluginConfigRootfs, bool)` - -GetRootfsOk returns a tuple with the Rootfs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRootfs - -`func (o *PluginConfig) SetRootfs(v PluginConfigRootfs)` - -SetRootfs sets Rootfs field to given value. - -### HasRootfs - -`func (o *PluginConfig) HasRootfs() bool` - -HasRootfs returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/hydra/go/docs/PluginConfigArgs.md b/clients/hydra/go/docs/PluginConfigArgs.md deleted file mode 100644 index 6c0f3f022af..00000000000 --- a/clients/hydra/go/docs/PluginConfigArgs.md +++ /dev/null @@ -1,114 +0,0 @@ -# PluginConfigArgs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | description | -**Name** | **string** | name | -**Settable** | **[]string** | settable | -**Value** | **[]string** | value | - -## Methods - -### NewPluginConfigArgs - -`func NewPluginConfigArgs(description string, name string, settable []string, value []string, ) *PluginConfigArgs` - -NewPluginConfigArgs instantiates a new PluginConfigArgs object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginConfigArgsWithDefaults - -`func NewPluginConfigArgsWithDefaults() *PluginConfigArgs` - -NewPluginConfigArgsWithDefaults instantiates a new PluginConfigArgs object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDescription - -`func (o *PluginConfigArgs) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *PluginConfigArgs) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *PluginConfigArgs) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetName - -`func (o *PluginConfigArgs) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *PluginConfigArgs) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *PluginConfigArgs) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSettable - -`func (o *PluginConfigArgs) GetSettable() []string` - -GetSettable returns the Settable field if non-nil, zero value otherwise. - -### GetSettableOk - -`func (o *PluginConfigArgs) GetSettableOk() (*[]string, bool)` - -GetSettableOk returns a tuple with the Settable field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSettable - -`func (o *PluginConfigArgs) SetSettable(v []string)` - -SetSettable sets Settable field to given value. - - -### GetValue - -`func (o *PluginConfigArgs) GetValue() []string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *PluginConfigArgs) GetValueOk() (*[]string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *PluginConfigArgs) SetValue(v []string)` - -SetValue sets Value field to given value. - - - -[[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/go/docs/PluginConfigInterface.md b/clients/hydra/go/docs/PluginConfigInterface.md deleted file mode 100644 index 61091f4939f..00000000000 --- a/clients/hydra/go/docs/PluginConfigInterface.md +++ /dev/null @@ -1,98 +0,0 @@ -# PluginConfigInterface - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ProtocolScheme** | Pointer to **string** | Protocol to use for clients connecting to the plugin. | [optional] -**Socket** | **string** | socket | -**Types** | [**[]PluginInterfaceType**](PluginInterfaceType.md) | types | - -## Methods - -### NewPluginConfigInterface - -`func NewPluginConfigInterface(socket string, types []PluginInterfaceType, ) *PluginConfigInterface` - -NewPluginConfigInterface instantiates a new PluginConfigInterface object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginConfigInterfaceWithDefaults - -`func NewPluginConfigInterfaceWithDefaults() *PluginConfigInterface` - -NewPluginConfigInterfaceWithDefaults instantiates a new PluginConfigInterface object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetProtocolScheme - -`func (o *PluginConfigInterface) GetProtocolScheme() string` - -GetProtocolScheme returns the ProtocolScheme field if non-nil, zero value otherwise. - -### GetProtocolSchemeOk - -`func (o *PluginConfigInterface) GetProtocolSchemeOk() (*string, bool)` - -GetProtocolSchemeOk returns a tuple with the ProtocolScheme field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProtocolScheme - -`func (o *PluginConfigInterface) SetProtocolScheme(v string)` - -SetProtocolScheme sets ProtocolScheme field to given value. - -### HasProtocolScheme - -`func (o *PluginConfigInterface) HasProtocolScheme() bool` - -HasProtocolScheme returns a boolean if a field has been set. - -### GetSocket - -`func (o *PluginConfigInterface) GetSocket() string` - -GetSocket returns the Socket field if non-nil, zero value otherwise. - -### GetSocketOk - -`func (o *PluginConfigInterface) GetSocketOk() (*string, bool)` - -GetSocketOk returns a tuple with the Socket field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSocket - -`func (o *PluginConfigInterface) SetSocket(v string)` - -SetSocket sets Socket field to given value. - - -### GetTypes - -`func (o *PluginConfigInterface) GetTypes() []PluginInterfaceType` - -GetTypes returns the Types field if non-nil, zero value otherwise. - -### GetTypesOk - -`func (o *PluginConfigInterface) GetTypesOk() (*[]PluginInterfaceType, bool)` - -GetTypesOk returns a tuple with the Types field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTypes - -`func (o *PluginConfigInterface) SetTypes(v []PluginInterfaceType)` - -SetTypes sets Types field to given value. - - - -[[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/go/docs/PluginConfigLinux.md b/clients/hydra/go/docs/PluginConfigLinux.md deleted file mode 100644 index 7542ccea2c8..00000000000 --- a/clients/hydra/go/docs/PluginConfigLinux.md +++ /dev/null @@ -1,93 +0,0 @@ -# PluginConfigLinux - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AllowAllDevices** | **bool** | allow all devices | -**Capabilities** | **[]string** | capabilities | -**Devices** | [**[]PluginDevice**](PluginDevice.md) | devices | - -## Methods - -### NewPluginConfigLinux - -`func NewPluginConfigLinux(allowAllDevices bool, capabilities []string, devices []PluginDevice, ) *PluginConfigLinux` - -NewPluginConfigLinux instantiates a new PluginConfigLinux object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginConfigLinuxWithDefaults - -`func NewPluginConfigLinuxWithDefaults() *PluginConfigLinux` - -NewPluginConfigLinuxWithDefaults instantiates a new PluginConfigLinux object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAllowAllDevices - -`func (o *PluginConfigLinux) GetAllowAllDevices() bool` - -GetAllowAllDevices returns the AllowAllDevices field if non-nil, zero value otherwise. - -### GetAllowAllDevicesOk - -`func (o *PluginConfigLinux) GetAllowAllDevicesOk() (*bool, bool)` - -GetAllowAllDevicesOk returns a tuple with the AllowAllDevices field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAllowAllDevices - -`func (o *PluginConfigLinux) SetAllowAllDevices(v bool)` - -SetAllowAllDevices sets AllowAllDevices field to given value. - - -### GetCapabilities - -`func (o *PluginConfigLinux) GetCapabilities() []string` - -GetCapabilities returns the Capabilities field if non-nil, zero value otherwise. - -### GetCapabilitiesOk - -`func (o *PluginConfigLinux) GetCapabilitiesOk() (*[]string, bool)` - -GetCapabilitiesOk returns a tuple with the Capabilities field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCapabilities - -`func (o *PluginConfigLinux) SetCapabilities(v []string)` - -SetCapabilities sets Capabilities field to given value. - - -### GetDevices - -`func (o *PluginConfigLinux) GetDevices() []PluginDevice` - -GetDevices returns the Devices field if non-nil, zero value otherwise. - -### GetDevicesOk - -`func (o *PluginConfigLinux) GetDevicesOk() (*[]PluginDevice, bool)` - -GetDevicesOk returns a tuple with the Devices field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDevices - -`func (o *PluginConfigLinux) SetDevices(v []PluginDevice)` - -SetDevices sets Devices field to given value. - - - -[[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/go/docs/PluginConfigNetwork.md b/clients/hydra/go/docs/PluginConfigNetwork.md deleted file mode 100644 index b9bec1ab671..00000000000 --- a/clients/hydra/go/docs/PluginConfigNetwork.md +++ /dev/null @@ -1,51 +0,0 @@ -# PluginConfigNetwork - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | type | - -## Methods - -### NewPluginConfigNetwork - -`func NewPluginConfigNetwork(type_ string, ) *PluginConfigNetwork` - -NewPluginConfigNetwork instantiates a new PluginConfigNetwork object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginConfigNetworkWithDefaults - -`func NewPluginConfigNetworkWithDefaults() *PluginConfigNetwork` - -NewPluginConfigNetworkWithDefaults instantiates a new PluginConfigNetwork object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetType - -`func (o *PluginConfigNetwork) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *PluginConfigNetwork) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *PluginConfigNetwork) SetType(v string)` - -SetType sets Type field to given value. - - - -[[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/go/docs/PluginConfigRootfs.md b/clients/hydra/go/docs/PluginConfigRootfs.md deleted file mode 100644 index 4b25fcf24cd..00000000000 --- a/clients/hydra/go/docs/PluginConfigRootfs.md +++ /dev/null @@ -1,82 +0,0 @@ -# PluginConfigRootfs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DiffIds** | Pointer to **[]string** | diff ids | [optional] -**Type** | Pointer to **string** | type | [optional] - -## Methods - -### NewPluginConfigRootfs - -`func NewPluginConfigRootfs() *PluginConfigRootfs` - -NewPluginConfigRootfs instantiates a new PluginConfigRootfs object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginConfigRootfsWithDefaults - -`func NewPluginConfigRootfsWithDefaults() *PluginConfigRootfs` - -NewPluginConfigRootfsWithDefaults instantiates a new PluginConfigRootfs object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDiffIds - -`func (o *PluginConfigRootfs) GetDiffIds() []string` - -GetDiffIds returns the DiffIds field if non-nil, zero value otherwise. - -### GetDiffIdsOk - -`func (o *PluginConfigRootfs) GetDiffIdsOk() (*[]string, bool)` - -GetDiffIdsOk returns a tuple with the DiffIds field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDiffIds - -`func (o *PluginConfigRootfs) SetDiffIds(v []string)` - -SetDiffIds sets DiffIds field to given value. - -### HasDiffIds - -`func (o *PluginConfigRootfs) HasDiffIds() bool` - -HasDiffIds returns a boolean if a field has been set. - -### GetType - -`func (o *PluginConfigRootfs) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *PluginConfigRootfs) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *PluginConfigRootfs) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *PluginConfigRootfs) HasType() bool` - -HasType returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/hydra/go/docs/PluginConfigUser.md b/clients/hydra/go/docs/PluginConfigUser.md deleted file mode 100644 index 58c4ec05a45..00000000000 --- a/clients/hydra/go/docs/PluginConfigUser.md +++ /dev/null @@ -1,82 +0,0 @@ -# PluginConfigUser - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**GID** | Pointer to **int32** | g ID | [optional] -**UID** | Pointer to **int32** | UID | [optional] - -## Methods - -### NewPluginConfigUser - -`func NewPluginConfigUser() *PluginConfigUser` - -NewPluginConfigUser instantiates a new PluginConfigUser object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginConfigUserWithDefaults - -`func NewPluginConfigUserWithDefaults() *PluginConfigUser` - -NewPluginConfigUserWithDefaults instantiates a new PluginConfigUser object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetGID - -`func (o *PluginConfigUser) GetGID() int32` - -GetGID returns the GID field if non-nil, zero value otherwise. - -### GetGIDOk - -`func (o *PluginConfigUser) GetGIDOk() (*int32, bool)` - -GetGIDOk returns a tuple with the GID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGID - -`func (o *PluginConfigUser) SetGID(v int32)` - -SetGID sets GID field to given value. - -### HasGID - -`func (o *PluginConfigUser) HasGID() bool` - -HasGID returns a boolean if a field has been set. - -### GetUID - -`func (o *PluginConfigUser) GetUID() int32` - -GetUID returns the UID field if non-nil, zero value otherwise. - -### GetUIDOk - -`func (o *PluginConfigUser) GetUIDOk() (*int32, bool)` - -GetUIDOk returns a tuple with the UID field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUID - -`func (o *PluginConfigUser) SetUID(v int32)` - -SetUID sets UID field to given value. - -### HasUID - -`func (o *PluginConfigUser) HasUID() bool` - -HasUID returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/hydra/go/docs/PluginDevice.md b/clients/hydra/go/docs/PluginDevice.md deleted file mode 100644 index ab7b8a5fc91..00000000000 --- a/clients/hydra/go/docs/PluginDevice.md +++ /dev/null @@ -1,114 +0,0 @@ -# PluginDevice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | description | -**Name** | **string** | name | -**Path** | **string** | path | -**Settable** | **[]string** | settable | - -## Methods - -### NewPluginDevice - -`func NewPluginDevice(description string, name string, path string, settable []string, ) *PluginDevice` - -NewPluginDevice instantiates a new PluginDevice object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginDeviceWithDefaults - -`func NewPluginDeviceWithDefaults() *PluginDevice` - -NewPluginDeviceWithDefaults instantiates a new PluginDevice object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDescription - -`func (o *PluginDevice) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *PluginDevice) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *PluginDevice) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetName - -`func (o *PluginDevice) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *PluginDevice) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *PluginDevice) SetName(v string)` - -SetName sets Name field to given value. - - -### GetPath - -`func (o *PluginDevice) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *PluginDevice) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *PluginDevice) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetSettable - -`func (o *PluginDevice) GetSettable() []string` - -GetSettable returns the Settable field if non-nil, zero value otherwise. - -### GetSettableOk - -`func (o *PluginDevice) GetSettableOk() (*[]string, bool)` - -GetSettableOk returns a tuple with the Settable field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSettable - -`func (o *PluginDevice) SetSettable(v []string)` - -SetSettable sets Settable field to given value. - - - -[[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/go/docs/PluginEnv.md b/clients/hydra/go/docs/PluginEnv.md deleted file mode 100644 index f853c2df295..00000000000 --- a/clients/hydra/go/docs/PluginEnv.md +++ /dev/null @@ -1,114 +0,0 @@ -# PluginEnv - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | description | -**Name** | **string** | name | -**Settable** | **[]string** | settable | -**Value** | **string** | value | - -## Methods - -### NewPluginEnv - -`func NewPluginEnv(description string, name string, settable []string, value string, ) *PluginEnv` - -NewPluginEnv instantiates a new PluginEnv object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginEnvWithDefaults - -`func NewPluginEnvWithDefaults() *PluginEnv` - -NewPluginEnvWithDefaults instantiates a new PluginEnv object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDescription - -`func (o *PluginEnv) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *PluginEnv) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *PluginEnv) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetName - -`func (o *PluginEnv) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *PluginEnv) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *PluginEnv) SetName(v string)` - -SetName sets Name field to given value. - - -### GetSettable - -`func (o *PluginEnv) GetSettable() []string` - -GetSettable returns the Settable field if non-nil, zero value otherwise. - -### GetSettableOk - -`func (o *PluginEnv) GetSettableOk() (*[]string, bool)` - -GetSettableOk returns a tuple with the Settable field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSettable - -`func (o *PluginEnv) SetSettable(v []string)` - -SetSettable sets Settable field to given value. - - -### GetValue - -`func (o *PluginEnv) GetValue() string` - -GetValue returns the Value field if non-nil, zero value otherwise. - -### GetValueOk - -`func (o *PluginEnv) GetValueOk() (*string, bool)` - -GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValue - -`func (o *PluginEnv) SetValue(v string)` - -SetValue sets Value field to given value. - - - -[[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/go/docs/PluginInterfaceType.md b/clients/hydra/go/docs/PluginInterfaceType.md deleted file mode 100644 index 82ee3a4418e..00000000000 --- a/clients/hydra/go/docs/PluginInterfaceType.md +++ /dev/null @@ -1,93 +0,0 @@ -# PluginInterfaceType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Capability** | **string** | capability | -**Prefix** | **string** | prefix | -**Version** | **string** | version | - -## Methods - -### NewPluginInterfaceType - -`func NewPluginInterfaceType(capability string, prefix string, version string, ) *PluginInterfaceType` - -NewPluginInterfaceType instantiates a new PluginInterfaceType object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginInterfaceTypeWithDefaults - -`func NewPluginInterfaceTypeWithDefaults() *PluginInterfaceType` - -NewPluginInterfaceTypeWithDefaults instantiates a new PluginInterfaceType object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCapability - -`func (o *PluginInterfaceType) GetCapability() string` - -GetCapability returns the Capability field if non-nil, zero value otherwise. - -### GetCapabilityOk - -`func (o *PluginInterfaceType) GetCapabilityOk() (*string, bool)` - -GetCapabilityOk returns a tuple with the Capability field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCapability - -`func (o *PluginInterfaceType) SetCapability(v string)` - -SetCapability sets Capability field to given value. - - -### GetPrefix - -`func (o *PluginInterfaceType) GetPrefix() string` - -GetPrefix returns the Prefix field if non-nil, zero value otherwise. - -### GetPrefixOk - -`func (o *PluginInterfaceType) GetPrefixOk() (*string, bool)` - -GetPrefixOk returns a tuple with the Prefix field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrefix - -`func (o *PluginInterfaceType) SetPrefix(v string)` - -SetPrefix sets Prefix field to given value. - - -### GetVersion - -`func (o *PluginInterfaceType) GetVersion() string` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *PluginInterfaceType) GetVersionOk() (*string, bool)` - -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersion - -`func (o *PluginInterfaceType) SetVersion(v string)` - -SetVersion sets Version field to given value. - - - -[[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/go/docs/PluginMount.md b/clients/hydra/go/docs/PluginMount.md deleted file mode 100644 index 138b229224a..00000000000 --- a/clients/hydra/go/docs/PluginMount.md +++ /dev/null @@ -1,177 +0,0 @@ -# PluginMount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | description | -**Destination** | **string** | destination | -**Name** | **string** | name | -**Options** | **[]string** | options | -**Settable** | **[]string** | settable | -**Source** | **string** | source | -**Type** | **string** | type | - -## Methods - -### NewPluginMount - -`func NewPluginMount(description string, destination string, name string, options []string, settable []string, source string, type_ string, ) *PluginMount` - -NewPluginMount instantiates a new PluginMount object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginMountWithDefaults - -`func NewPluginMountWithDefaults() *PluginMount` - -NewPluginMountWithDefaults instantiates a new PluginMount object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDescription - -`func (o *PluginMount) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *PluginMount) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *PluginMount) SetDescription(v string)` - -SetDescription sets Description field to given value. - - -### GetDestination - -`func (o *PluginMount) GetDestination() string` - -GetDestination returns the Destination field if non-nil, zero value otherwise. - -### GetDestinationOk - -`func (o *PluginMount) GetDestinationOk() (*string, bool)` - -GetDestinationOk returns a tuple with the Destination field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDestination - -`func (o *PluginMount) SetDestination(v string)` - -SetDestination sets Destination field to given value. - - -### GetName - -`func (o *PluginMount) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *PluginMount) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *PluginMount) SetName(v string)` - -SetName sets Name field to given value. - - -### GetOptions - -`func (o *PluginMount) GetOptions() []string` - -GetOptions returns the Options field if non-nil, zero value otherwise. - -### GetOptionsOk - -`func (o *PluginMount) GetOptionsOk() (*[]string, bool)` - -GetOptionsOk returns a tuple with the Options field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOptions - -`func (o *PluginMount) SetOptions(v []string)` - -SetOptions sets Options field to given value. - - -### GetSettable - -`func (o *PluginMount) GetSettable() []string` - -GetSettable returns the Settable field if non-nil, zero value otherwise. - -### GetSettableOk - -`func (o *PluginMount) GetSettableOk() (*[]string, bool)` - -GetSettableOk returns a tuple with the Settable field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSettable - -`func (o *PluginMount) SetSettable(v []string)` - -SetSettable sets Settable field to given value. - - -### GetSource - -`func (o *PluginMount) GetSource() string` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *PluginMount) GetSourceOk() (*string, bool)` - -GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSource - -`func (o *PluginMount) SetSource(v string)` - -SetSource sets Source field to given value. - - -### GetType - -`func (o *PluginMount) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *PluginMount) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *PluginMount) SetType(v string)` - -SetType sets Type field to given value. - - - -[[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/go/docs/PluginSettings.md b/clients/hydra/go/docs/PluginSettings.md deleted file mode 100644 index ab117dc1284..00000000000 --- a/clients/hydra/go/docs/PluginSettings.md +++ /dev/null @@ -1,114 +0,0 @@ -# PluginSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Args** | **[]string** | args | -**Devices** | [**[]PluginDevice**](PluginDevice.md) | devices | -**Env** | **[]string** | env | -**Mounts** | [**[]PluginMount**](PluginMount.md) | mounts | - -## Methods - -### NewPluginSettings - -`func NewPluginSettings(args []string, devices []PluginDevice, env []string, mounts []PluginMount, ) *PluginSettings` - -NewPluginSettings instantiates a new PluginSettings object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPluginSettingsWithDefaults - -`func NewPluginSettingsWithDefaults() *PluginSettings` - -NewPluginSettingsWithDefaults instantiates a new PluginSettings object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetArgs - -`func (o *PluginSettings) GetArgs() []string` - -GetArgs returns the Args field if non-nil, zero value otherwise. - -### GetArgsOk - -`func (o *PluginSettings) GetArgsOk() (*[]string, bool)` - -GetArgsOk returns a tuple with the Args field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetArgs - -`func (o *PluginSettings) SetArgs(v []string)` - -SetArgs sets Args field to given value. - - -### GetDevices - -`func (o *PluginSettings) GetDevices() []PluginDevice` - -GetDevices returns the Devices field if non-nil, zero value otherwise. - -### GetDevicesOk - -`func (o *PluginSettings) GetDevicesOk() (*[]PluginDevice, bool)` - -GetDevicesOk returns a tuple with the Devices field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDevices - -`func (o *PluginSettings) SetDevices(v []PluginDevice)` - -SetDevices sets Devices field to given value. - - -### GetEnv - -`func (o *PluginSettings) GetEnv() []string` - -GetEnv returns the Env field if non-nil, zero value otherwise. - -### GetEnvOk - -`func (o *PluginSettings) GetEnvOk() (*[]string, bool)` - -GetEnvOk returns a tuple with the Env field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnv - -`func (o *PluginSettings) SetEnv(v []string)` - -SetEnv sets Env field to given value. - - -### GetMounts - -`func (o *PluginSettings) GetMounts() []PluginMount` - -GetMounts returns the Mounts field if non-nil, zero value otherwise. - -### GetMountsOk - -`func (o *PluginSettings) GetMountsOk() (*[]PluginMount, bool)` - -GetMountsOk returns a tuple with the Mounts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMounts - -`func (o *PluginSettings) SetMounts(v []PluginMount)` - -SetMounts sets Mounts field to given value. - - - -[[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/go/docs/PublicApi.md b/clients/hydra/go/docs/PublicApi.md deleted file mode 100644 index 036356b34f0..00000000000 --- a/clients/hydra/go/docs/PublicApi.md +++ /dev/null @@ -1,796 +0,0 @@ -# \PublicApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DisconnectUser**](PublicApi.md#DisconnectUser) | **Get** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -[**DiscoverOpenIDConfiguration**](PublicApi.md#DiscoverOpenIDConfiguration) | **Get** /.well-known/openid-configuration | OpenID Connect Discovery -[**DynamicClientRegistrationCreateOAuth2Client**](PublicApi.md#DynamicClientRegistrationCreateOAuth2Client) | **Post** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**DynamicClientRegistrationDeleteOAuth2Client**](PublicApi.md#DynamicClientRegistrationDeleteOAuth2Client) | **Delete** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**DynamicClientRegistrationGetOAuth2Client**](PublicApi.md#DynamicClientRegistrationGetOAuth2Client) | **Get** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**DynamicClientRegistrationUpdateOAuth2Client**](PublicApi.md#DynamicClientRegistrationUpdateOAuth2Client) | **Put** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**IsInstanceReady**](PublicApi.md#IsInstanceReady) | **Get** /health/ready | Check Readiness Status -[**Oauth2Token**](PublicApi.md#Oauth2Token) | **Post** /oauth2/token | The OAuth 2.0 Token Endpoint -[**OauthAuth**](PublicApi.md#OauthAuth) | **Get** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -[**RevokeOAuth2Token**](PublicApi.md#RevokeOAuth2Token) | **Post** /oauth2/revoke | Revoke OAuth2 Tokens -[**Userinfo**](PublicApi.md#Userinfo) | **Get** /userinfo | OpenID Connect Userinfo -[**WellKnown**](PublicApi.md#WellKnown) | **Get** /.well-known/jwks.json | JSON Web Keys Discovery - - - -## DisconnectUser - -> DisconnectUser(ctx).Execute() - -OpenID Connect Front-Backchannel Enabled Logout - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.DisconnectUser(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.DisconnectUser``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiDisconnectUserRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[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) - - -## DiscoverOpenIDConfiguration - -> WellKnown DiscoverOpenIDConfiguration(ctx).Execute() - -OpenID Connect Discovery - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.DiscoverOpenIDConfiguration(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.DiscoverOpenIDConfiguration``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DiscoverOpenIDConfiguration`: WellKnown - fmt.Fprintf(os.Stdout, "Response from `PublicApi.DiscoverOpenIDConfiguration`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiDiscoverOpenIDConfigurationRequest struct via the builder pattern - - -### Return type - -[**WellKnown**](WellKnown.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## DynamicClientRegistrationCreateOAuth2Client - -> OAuth2Client DynamicClientRegistrationCreateOAuth2Client(ctx).Body(body).Execute() - -Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - body := *openapiclient.NewOAuth2Client() // OAuth2Client | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.DynamicClientRegistrationCreateOAuth2Client(context.Background()).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.DynamicClientRegistrationCreateOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DynamicClientRegistrationCreateOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `PublicApi.DynamicClientRegistrationCreateOAuth2Client`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiDynamicClientRegistrationCreateOAuth2ClientRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OAuth2Client**](OAuth2Client.md) | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## DynamicClientRegistrationDeleteOAuth2Client - -> DynamicClientRegistrationDeleteOAuth2Client(ctx, id).Execute() - -Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -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.PublicApi.DynamicClientRegistrationDeleteOAuth2Client(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.DynamicClientRegistrationDeleteOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The id of the OAuth 2.0 Client. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDynamicClientRegistrationDeleteOAuth2ClientRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## DynamicClientRegistrationGetOAuth2Client - -> OAuth2Client DynamicClientRegistrationGetOAuth2Client(ctx, id).Execute() - -Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -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.PublicApi.DynamicClientRegistrationGetOAuth2Client(context.Background(), id).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.DynamicClientRegistrationGetOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DynamicClientRegistrationGetOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `PublicApi.DynamicClientRegistrationGetOAuth2Client`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The id of the OAuth 2.0 Client. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDynamicClientRegistrationGetOAuth2ClientRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## DynamicClientRegistrationUpdateOAuth2Client - -> OAuth2Client DynamicClientRegistrationUpdateOAuth2Client(ctx, id).Body(body).Execute() - -Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - id := "id_example" // string | The id of the OAuth 2.0 Client. - body := *openapiclient.NewOAuth2Client() // OAuth2Client | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.DynamicClientRegistrationUpdateOAuth2Client(context.Background(), id).Body(body).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.DynamicClientRegistrationUpdateOAuth2Client``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DynamicClientRegistrationUpdateOAuth2Client`: OAuth2Client - fmt.Fprintf(os.Stdout, "Response from `PublicApi.DynamicClientRegistrationUpdateOAuth2Client`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**id** | **string** | The id of the OAuth 2.0 Client. | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDynamicClientRegistrationUpdateOAuth2ClientRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **body** | [**OAuth2Client**](OAuth2Client.md) | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## IsInstanceReady - -> HealthStatus IsInstanceReady(ctx).Execute() - -Check Readiness Status - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.IsInstanceReady(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.IsInstanceReady``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `IsInstanceReady`: HealthStatus - fmt.Fprintf(os.Stdout, "Response from `PublicApi.IsInstanceReady`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiIsInstanceReadyRequest struct via the builder pattern - - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## Oauth2Token - -> Oauth2TokenResponse Oauth2Token(ctx).GrantType(grantType).Code(code).RefreshToken(refreshToken).RedirectUri(redirectUri).ClientId(clientId).Execute() - -The OAuth 2.0 Token Endpoint - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - grantType := "grantType_example" // string | - code := "code_example" // string | (optional) - refreshToken := "refreshToken_example" // string | (optional) - redirectUri := "redirectUri_example" // string | (optional) - clientId := "clientId_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.Oauth2Token(context.Background()).GrantType(grantType).Code(code).RefreshToken(refreshToken).RedirectUri(redirectUri).ClientId(clientId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.Oauth2Token``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Oauth2Token`: Oauth2TokenResponse - fmt.Fprintf(os.Stdout, "Response from `PublicApi.Oauth2Token`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiOauth2TokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grantType** | **string** | | - **code** | **string** | | - **refreshToken** | **string** | | - **redirectUri** | **string** | | - **clientId** | **string** | | - -### Return type - -[**Oauth2TokenResponse**](Oauth2TokenResponse.md) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[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) - - -## OauthAuth - -> OauthAuth(ctx).Execute() - -The OAuth 2.0 Authorize Endpoint - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.OauthAuth(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.OauthAuth``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiOauthAuthRequest struct via the builder pattern - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> RevokeOAuth2Token(ctx).Token(token).Execute() - -Revoke OAuth2 Tokens - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - token := "token_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.RevokeOAuth2Token(context.Background()).Token(token).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.RevokeOAuth2Token``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRevokeOAuth2TokenRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **string** | | - -### Return type - - (empty response body) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[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) - - -## Userinfo - -> UserinfoResponse Userinfo(ctx).Execute() - -OpenID Connect Userinfo - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.Userinfo(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.Userinfo``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Userinfo`: UserinfoResponse - fmt.Fprintf(os.Stdout, "Response from `PublicApi.Userinfo`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiUserinfoRequest struct via the builder pattern - - -### Return type - -[**UserinfoResponse**](UserinfoResponse.md) - -### Authorization - -[oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## WellKnown - -> JSONWebKeySet WellKnown(ctx).Execute() - -JSON Web Keys Discovery - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PublicApi.WellKnown(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PublicApi.WellKnown``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `WellKnown`: JSONWebKeySet - fmt.Fprintf(os.Stdout, "Response from `PublicApi.WellKnown`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiWellKnownRequest struct via the builder pattern - - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - diff --git a/clients/hydra/go/docs/RejectRequest.md b/clients/hydra/go/docs/RejectOAuth2Request.md similarity index 69% rename from clients/hydra/go/docs/RejectRequest.md rename to clients/hydra/go/docs/RejectOAuth2Request.md index fabb336ba9d..41c890b44ee 100644 --- a/clients/hydra/go/docs/RejectRequest.md +++ b/clients/hydra/go/docs/RejectOAuth2Request.md @@ -1,4 +1,4 @@ -# RejectRequest +# RejectOAuth2Request ## Properties @@ -12,145 +12,145 @@ Name | Type | Description | Notes ## Methods -### NewRejectRequest +### NewRejectOAuth2Request -`func NewRejectRequest() *RejectRequest` +`func NewRejectOAuth2Request() *RejectOAuth2Request` -NewRejectRequest instantiates a new RejectRequest object +NewRejectOAuth2Request instantiates a new RejectOAuth2Request object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewRejectRequestWithDefaults +### NewRejectOAuth2RequestWithDefaults -`func NewRejectRequestWithDefaults() *RejectRequest` +`func NewRejectOAuth2RequestWithDefaults() *RejectOAuth2Request` -NewRejectRequestWithDefaults instantiates a new RejectRequest object +NewRejectOAuth2RequestWithDefaults instantiates a new RejectOAuth2Request object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetError -`func (o *RejectRequest) GetError() string` +`func (o *RejectOAuth2Request) GetError() string` GetError returns the Error field if non-nil, zero value otherwise. ### GetErrorOk -`func (o *RejectRequest) GetErrorOk() (*string, bool)` +`func (o *RejectOAuth2Request) GetErrorOk() (*string, bool)` GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetError -`func (o *RejectRequest) SetError(v string)` +`func (o *RejectOAuth2Request) SetError(v string)` SetError sets Error field to given value. ### HasError -`func (o *RejectRequest) HasError() bool` +`func (o *RejectOAuth2Request) HasError() bool` HasError returns a boolean if a field has been set. ### GetErrorDebug -`func (o *RejectRequest) GetErrorDebug() string` +`func (o *RejectOAuth2Request) GetErrorDebug() string` GetErrorDebug returns the ErrorDebug field if non-nil, zero value otherwise. ### GetErrorDebugOk -`func (o *RejectRequest) GetErrorDebugOk() (*string, bool)` +`func (o *RejectOAuth2Request) GetErrorDebugOk() (*string, bool)` GetErrorDebugOk returns a tuple with the ErrorDebug field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetErrorDebug -`func (o *RejectRequest) SetErrorDebug(v string)` +`func (o *RejectOAuth2Request) SetErrorDebug(v string)` SetErrorDebug sets ErrorDebug field to given value. ### HasErrorDebug -`func (o *RejectRequest) HasErrorDebug() bool` +`func (o *RejectOAuth2Request) HasErrorDebug() bool` HasErrorDebug returns a boolean if a field has been set. ### GetErrorDescription -`func (o *RejectRequest) GetErrorDescription() string` +`func (o *RejectOAuth2Request) GetErrorDescription() string` GetErrorDescription returns the ErrorDescription field if non-nil, zero value otherwise. ### GetErrorDescriptionOk -`func (o *RejectRequest) GetErrorDescriptionOk() (*string, bool)` +`func (o *RejectOAuth2Request) GetErrorDescriptionOk() (*string, bool)` GetErrorDescriptionOk returns a tuple with the ErrorDescription field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetErrorDescription -`func (o *RejectRequest) SetErrorDescription(v string)` +`func (o *RejectOAuth2Request) SetErrorDescription(v string)` SetErrorDescription sets ErrorDescription field to given value. ### HasErrorDescription -`func (o *RejectRequest) HasErrorDescription() bool` +`func (o *RejectOAuth2Request) HasErrorDescription() bool` HasErrorDescription returns a boolean if a field has been set. ### GetErrorHint -`func (o *RejectRequest) GetErrorHint() string` +`func (o *RejectOAuth2Request) GetErrorHint() string` GetErrorHint returns the ErrorHint field if non-nil, zero value otherwise. ### GetErrorHintOk -`func (o *RejectRequest) GetErrorHintOk() (*string, bool)` +`func (o *RejectOAuth2Request) GetErrorHintOk() (*string, bool)` GetErrorHintOk returns a tuple with the ErrorHint field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetErrorHint -`func (o *RejectRequest) SetErrorHint(v string)` +`func (o *RejectOAuth2Request) SetErrorHint(v string)` SetErrorHint sets ErrorHint field to given value. ### HasErrorHint -`func (o *RejectRequest) HasErrorHint() bool` +`func (o *RejectOAuth2Request) HasErrorHint() bool` HasErrorHint returns a boolean if a field has been set. ### GetStatusCode -`func (o *RejectRequest) GetStatusCode() int64` +`func (o *RejectOAuth2Request) GetStatusCode() int64` GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. ### GetStatusCodeOk -`func (o *RejectRequest) GetStatusCodeOk() (*int64, bool)` +`func (o *RejectOAuth2Request) GetStatusCodeOk() (*int64, bool)` GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStatusCode -`func (o *RejectRequest) SetStatusCode(v int64)` +`func (o *RejectOAuth2Request) SetStatusCode(v int64)` SetStatusCode sets StatusCode field to given value. ### HasStatusCode -`func (o *RejectRequest) HasStatusCode() bool` +`func (o *RejectOAuth2Request) HasStatusCode() bool` HasStatusCode returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/RequestWasHandledResponse.md b/clients/hydra/go/docs/RequestWasHandledResponse.md deleted file mode 100644 index c14a3be691d..00000000000 --- a/clients/hydra/go/docs/RequestWasHandledResponse.md +++ /dev/null @@ -1,51 +0,0 @@ -# RequestWasHandledResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RedirectTo** | **string** | Original request URL to which you should redirect the user if request was already handled. | - -## Methods - -### NewRequestWasHandledResponse - -`func NewRequestWasHandledResponse(redirectTo string, ) *RequestWasHandledResponse` - -NewRequestWasHandledResponse instantiates a new RequestWasHandledResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRequestWasHandledResponseWithDefaults - -`func NewRequestWasHandledResponseWithDefaults() *RequestWasHandledResponse` - -NewRequestWasHandledResponseWithDefaults instantiates a new RequestWasHandledResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRedirectTo - -`func (o *RequestWasHandledResponse) GetRedirectTo() string` - -GetRedirectTo returns the RedirectTo field if non-nil, zero value otherwise. - -### GetRedirectToOk - -`func (o *RequestWasHandledResponse) GetRedirectToOk() (*string, bool)` - -GetRedirectToOk returns a tuple with the RedirectTo field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRedirectTo - -`func (o *RequestWasHandledResponse) SetRedirectTo(v string)` - -SetRedirectTo sets RedirectTo field to given value. - - - -[[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/go/docs/TokenPagination.md b/clients/hydra/go/docs/TokenPagination.md new file mode 100644 index 00000000000..289eeaf5616 --- /dev/null +++ b/clients/hydra/go/docs/TokenPagination.md @@ -0,0 +1,82 @@ +# TokenPagination + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PageSize** | Pointer to **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** | Pointer to **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"] + +## Methods + +### NewTokenPagination + +`func NewTokenPagination() *TokenPagination` + +NewTokenPagination instantiates a new TokenPagination object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenPaginationWithDefaults + +`func NewTokenPaginationWithDefaults() *TokenPagination` + +NewTokenPaginationWithDefaults instantiates a new TokenPagination object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPageSize + +`func (o *TokenPagination) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *TokenPagination) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *TokenPagination) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *TokenPagination) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetPageToken + +`func (o *TokenPagination) GetPageToken() string` + +GetPageToken returns the PageToken field if non-nil, zero value otherwise. + +### GetPageTokenOk + +`func (o *TokenPagination) GetPageTokenOk() (*string, bool)` + +GetPageTokenOk returns a tuple with the PageToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageToken + +`func (o *TokenPagination) SetPageToken(v string)` + +SetPageToken sets PageToken field to given value. + +### HasPageToken + +`func (o *TokenPagination) HasPageToken() bool` + +HasPageToken returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/TokenPaginationHeaders.md b/clients/hydra/go/docs/TokenPaginationHeaders.md new file mode 100644 index 00000000000..3934d35bb5f --- /dev/null +++ b/clients/hydra/go/docs/TokenPaginationHeaders.md @@ -0,0 +1,82 @@ +# TokenPaginationHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Link** | Pointer to **string** | 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] +**XTotalCount** | Pointer to **string** | The total number of clients. in: header | [optional] + +## Methods + +### NewTokenPaginationHeaders + +`func NewTokenPaginationHeaders() *TokenPaginationHeaders` + +NewTokenPaginationHeaders instantiates a new TokenPaginationHeaders object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenPaginationHeadersWithDefaults + +`func NewTokenPaginationHeadersWithDefaults() *TokenPaginationHeaders` + +NewTokenPaginationHeadersWithDefaults instantiates a new TokenPaginationHeaders object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLink + +`func (o *TokenPaginationHeaders) GetLink() string` + +GetLink returns the Link field if non-nil, zero value otherwise. + +### GetLinkOk + +`func (o *TokenPaginationHeaders) GetLinkOk() (*string, bool)` + +GetLinkOk returns a tuple with the Link field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLink + +`func (o *TokenPaginationHeaders) SetLink(v string)` + +SetLink sets Link field to given value. + +### HasLink + +`func (o *TokenPaginationHeaders) HasLink() bool` + +HasLink returns a boolean if a field has been set. + +### GetXTotalCount + +`func (o *TokenPaginationHeaders) GetXTotalCount() string` + +GetXTotalCount returns the XTotalCount field if non-nil, zero value otherwise. + +### GetXTotalCountOk + +`func (o *TokenPaginationHeaders) GetXTotalCountOk() (*string, bool)` + +GetXTotalCountOk returns a tuple with the XTotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXTotalCount + +`func (o *TokenPaginationHeaders) SetXTotalCount(v string)` + +SetXTotalCount sets XTotalCount field to given value. + +### HasXTotalCount + +`func (o *TokenPaginationHeaders) HasXTotalCount() bool` + +HasXTotalCount returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/TokenPaginationRequestParameters.md b/clients/hydra/go/docs/TokenPaginationRequestParameters.md new file mode 100644 index 00000000000..a0e140cda9c --- /dev/null +++ b/clients/hydra/go/docs/TokenPaginationRequestParameters.md @@ -0,0 +1,82 @@ +# TokenPaginationRequestParameters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PageSize** | Pointer to **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** | Pointer to **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"] + +## Methods + +### NewTokenPaginationRequestParameters + +`func NewTokenPaginationRequestParameters() *TokenPaginationRequestParameters` + +NewTokenPaginationRequestParameters instantiates a new TokenPaginationRequestParameters object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenPaginationRequestParametersWithDefaults + +`func NewTokenPaginationRequestParametersWithDefaults() *TokenPaginationRequestParameters` + +NewTokenPaginationRequestParametersWithDefaults instantiates a new TokenPaginationRequestParameters object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPageSize + +`func (o *TokenPaginationRequestParameters) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *TokenPaginationRequestParameters) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *TokenPaginationRequestParameters) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *TokenPaginationRequestParameters) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetPageToken + +`func (o *TokenPaginationRequestParameters) GetPageToken() string` + +GetPageToken returns the PageToken field if non-nil, zero value otherwise. + +### GetPageTokenOk + +`func (o *TokenPaginationRequestParameters) GetPageTokenOk() (*string, bool)` + +GetPageTokenOk returns a tuple with the PageToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageToken + +`func (o *TokenPaginationRequestParameters) SetPageToken(v string)` + +SetPageToken sets PageToken field to given value. + +### HasPageToken + +`func (o *TokenPaginationRequestParameters) HasPageToken() bool` + +HasPageToken returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/TokenPaginationResponseHeaders.md b/clients/hydra/go/docs/TokenPaginationResponseHeaders.md new file mode 100644 index 00000000000..74e23b70466 --- /dev/null +++ b/clients/hydra/go/docs/TokenPaginationResponseHeaders.md @@ -0,0 +1,82 @@ +# TokenPaginationResponseHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Link** | Pointer to **string** | 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=20>; rel=\"last\" | [optional] +**XTotalCount** | Pointer to **int64** | The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. | [optional] + +## Methods + +### NewTokenPaginationResponseHeaders + +`func NewTokenPaginationResponseHeaders() *TokenPaginationResponseHeaders` + +NewTokenPaginationResponseHeaders instantiates a new TokenPaginationResponseHeaders object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenPaginationResponseHeadersWithDefaults + +`func NewTokenPaginationResponseHeadersWithDefaults() *TokenPaginationResponseHeaders` + +NewTokenPaginationResponseHeadersWithDefaults instantiates a new TokenPaginationResponseHeaders object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLink + +`func (o *TokenPaginationResponseHeaders) GetLink() string` + +GetLink returns the Link field if non-nil, zero value otherwise. + +### GetLinkOk + +`func (o *TokenPaginationResponseHeaders) GetLinkOk() (*string, bool)` + +GetLinkOk returns a tuple with the Link field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLink + +`func (o *TokenPaginationResponseHeaders) SetLink(v string)` + +SetLink sets Link field to given value. + +### HasLink + +`func (o *TokenPaginationResponseHeaders) HasLink() bool` + +HasLink returns a boolean if a field has been set. + +### GetXTotalCount + +`func (o *TokenPaginationResponseHeaders) GetXTotalCount() int64` + +GetXTotalCount returns the XTotalCount field if non-nil, zero value otherwise. + +### GetXTotalCountOk + +`func (o *TokenPaginationResponseHeaders) GetXTotalCountOk() (*int64, bool)` + +GetXTotalCountOk returns a tuple with the XTotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXTotalCount + +`func (o *TokenPaginationResponseHeaders) SetXTotalCount(v int64)` + +SetXTotalCount sets XTotalCount field to given value. + +### HasXTotalCount + +`func (o *TokenPaginationResponseHeaders) HasXTotalCount() bool` + +HasXTotalCount returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/TrustJwtGrantIssuerBody.md b/clients/hydra/go/docs/TrustJwtGrantIssuerBody.md deleted file mode 100644 index 3ae8c603e8a..00000000000 --- a/clients/hydra/go/docs/TrustJwtGrantIssuerBody.md +++ /dev/null @@ -1,135 +0,0 @@ -# TrustJwtGrantIssuerBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExpiresAt** | **time.Time** | 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** | [**JSONWebKey**](JSONWebKey.md) | | -**Scope** | **[]string** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | -**Subject** | **string** | The \"subject\" identifies the principal that is the subject of the JWT. | - -## Methods - -### NewTrustJwtGrantIssuerBody - -`func NewTrustJwtGrantIssuerBody(expiresAt time.Time, issuer string, jwk JSONWebKey, scope []string, subject string, ) *TrustJwtGrantIssuerBody` - -NewTrustJwtGrantIssuerBody instantiates a new TrustJwtGrantIssuerBody object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTrustJwtGrantIssuerBodyWithDefaults - -`func NewTrustJwtGrantIssuerBodyWithDefaults() *TrustJwtGrantIssuerBody` - -NewTrustJwtGrantIssuerBodyWithDefaults instantiates a new TrustJwtGrantIssuerBody object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetExpiresAt - -`func (o *TrustJwtGrantIssuerBody) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *TrustJwtGrantIssuerBody) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *TrustJwtGrantIssuerBody) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - - -### GetIssuer - -`func (o *TrustJwtGrantIssuerBody) GetIssuer() string` - -GetIssuer returns the Issuer field if non-nil, zero value otherwise. - -### GetIssuerOk - -`func (o *TrustJwtGrantIssuerBody) GetIssuerOk() (*string, bool)` - -GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIssuer - -`func (o *TrustJwtGrantIssuerBody) SetIssuer(v string)` - -SetIssuer sets Issuer field to given value. - - -### GetJwk - -`func (o *TrustJwtGrantIssuerBody) GetJwk() JSONWebKey` - -GetJwk returns the Jwk field if non-nil, zero value otherwise. - -### GetJwkOk - -`func (o *TrustJwtGrantIssuerBody) GetJwkOk() (*JSONWebKey, bool)` - -GetJwkOk returns a tuple with the Jwk field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJwk - -`func (o *TrustJwtGrantIssuerBody) SetJwk(v JSONWebKey)` - -SetJwk sets Jwk field to given value. - - -### GetScope - -`func (o *TrustJwtGrantIssuerBody) GetScope() []string` - -GetScope returns the Scope field if non-nil, zero value otherwise. - -### GetScopeOk - -`func (o *TrustJwtGrantIssuerBody) GetScopeOk() (*[]string, bool)` - -GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScope - -`func (o *TrustJwtGrantIssuerBody) SetScope(v []string)` - -SetScope sets Scope field to given value. - - -### GetSubject - -`func (o *TrustJwtGrantIssuerBody) GetSubject() string` - -GetSubject returns the Subject field if non-nil, zero value otherwise. - -### GetSubjectOk - -`func (o *TrustJwtGrantIssuerBody) GetSubjectOk() (*string, bool)` - -GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubject - -`func (o *TrustJwtGrantIssuerBody) SetSubject(v string)` - -SetSubject sets Subject field to given value. - - - -[[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/go/docs/TrustOAuth2JwtGrantIssuer.md b/clients/hydra/go/docs/TrustOAuth2JwtGrantIssuer.md new file mode 100644 index 00000000000..64e5e44224b --- /dev/null +++ b/clients/hydra/go/docs/TrustOAuth2JwtGrantIssuer.md @@ -0,0 +1,166 @@ +# TrustOAuth2JwtGrantIssuer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowAnySubject** | Pointer to **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] +**ExpiresAt** | **time.Time** | 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** | [**JsonWebKey**](JsonWebKey.md) | | +**Scope** | **[]string** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | +**Subject** | Pointer to **string** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] + +## Methods + +### NewTrustOAuth2JwtGrantIssuer + +`func NewTrustOAuth2JwtGrantIssuer(expiresAt time.Time, issuer string, jwk JsonWebKey, scope []string, ) *TrustOAuth2JwtGrantIssuer` + +NewTrustOAuth2JwtGrantIssuer instantiates a new TrustOAuth2JwtGrantIssuer object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTrustOAuth2JwtGrantIssuerWithDefaults + +`func NewTrustOAuth2JwtGrantIssuerWithDefaults() *TrustOAuth2JwtGrantIssuer` + +NewTrustOAuth2JwtGrantIssuerWithDefaults instantiates a new TrustOAuth2JwtGrantIssuer object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAllowAnySubject + +`func (o *TrustOAuth2JwtGrantIssuer) GetAllowAnySubject() bool` + +GetAllowAnySubject returns the AllowAnySubject field if non-nil, zero value otherwise. + +### GetAllowAnySubjectOk + +`func (o *TrustOAuth2JwtGrantIssuer) GetAllowAnySubjectOk() (*bool, bool)` + +GetAllowAnySubjectOk returns a tuple with the AllowAnySubject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowAnySubject + +`func (o *TrustOAuth2JwtGrantIssuer) SetAllowAnySubject(v bool)` + +SetAllowAnySubject sets AllowAnySubject field to given value. + +### HasAllowAnySubject + +`func (o *TrustOAuth2JwtGrantIssuer) HasAllowAnySubject() bool` + +HasAllowAnySubject returns a boolean if a field has been set. + +### GetExpiresAt + +`func (o *TrustOAuth2JwtGrantIssuer) GetExpiresAt() time.Time` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *TrustOAuth2JwtGrantIssuer) GetExpiresAtOk() (*time.Time, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *TrustOAuth2JwtGrantIssuer) SetExpiresAt(v time.Time)` + +SetExpiresAt sets ExpiresAt field to given value. + + +### GetIssuer + +`func (o *TrustOAuth2JwtGrantIssuer) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *TrustOAuth2JwtGrantIssuer) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *TrustOAuth2JwtGrantIssuer) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + + +### GetJwk + +`func (o *TrustOAuth2JwtGrantIssuer) GetJwk() JsonWebKey` + +GetJwk returns the Jwk field if non-nil, zero value otherwise. + +### GetJwkOk + +`func (o *TrustOAuth2JwtGrantIssuer) GetJwkOk() (*JsonWebKey, bool)` + +GetJwkOk returns a tuple with the Jwk field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJwk + +`func (o *TrustOAuth2JwtGrantIssuer) SetJwk(v JsonWebKey)` + +SetJwk sets Jwk field to given value. + + +### GetScope + +`func (o *TrustOAuth2JwtGrantIssuer) GetScope() []string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *TrustOAuth2JwtGrantIssuer) GetScopeOk() (*[]string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *TrustOAuth2JwtGrantIssuer) SetScope(v []string)` + +SetScope sets Scope field to given value. + + +### GetSubject + +`func (o *TrustOAuth2JwtGrantIssuer) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *TrustOAuth2JwtGrantIssuer) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *TrustOAuth2JwtGrantIssuer) SetSubject(v string)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *TrustOAuth2JwtGrantIssuer) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/clients/hydra/go/docs/TrustedJwtGrantIssuer.md b/clients/hydra/go/docs/TrustedOAuth2JwtGrantIssuer.md similarity index 56% rename from clients/hydra/go/docs/TrustedJwtGrantIssuer.md rename to clients/hydra/go/docs/TrustedOAuth2JwtGrantIssuer.md index 04c97c648a9..9cdedb7a1c5 100644 --- a/clients/hydra/go/docs/TrustedJwtGrantIssuer.md +++ b/clients/hydra/go/docs/TrustedOAuth2JwtGrantIssuer.md @@ -1,208 +1,234 @@ -# TrustedJwtGrantIssuer +# TrustedOAuth2JwtGrantIssuer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**AllowAnySubject** | Pointer to **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] **CreatedAt** | Pointer to **time.Time** | The \"created_at\" indicates, when grant was created. | [optional] **ExpiresAt** | Pointer to **time.Time** | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | [optional] **Id** | Pointer to **string** | | [optional] **Issuer** | Pointer to **string** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] -**PublicKey** | Pointer to [**TrustedJsonWebKey**](TrustedJsonWebKey.md) | | [optional] +**PublicKey** | Pointer to [**TrustedOAuth2JwtGrantJsonWebKey**](TrustedOAuth2JwtGrantJsonWebKey.md) | | [optional] **Scope** | Pointer to **[]string** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] **Subject** | Pointer to **string** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] ## Methods -### NewTrustedJwtGrantIssuer +### NewTrustedOAuth2JwtGrantIssuer -`func NewTrustedJwtGrantIssuer() *TrustedJwtGrantIssuer` +`func NewTrustedOAuth2JwtGrantIssuer() *TrustedOAuth2JwtGrantIssuer` -NewTrustedJwtGrantIssuer instantiates a new TrustedJwtGrantIssuer object +NewTrustedOAuth2JwtGrantIssuer instantiates a new TrustedOAuth2JwtGrantIssuer object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewTrustedJwtGrantIssuerWithDefaults +### NewTrustedOAuth2JwtGrantIssuerWithDefaults -`func NewTrustedJwtGrantIssuerWithDefaults() *TrustedJwtGrantIssuer` +`func NewTrustedOAuth2JwtGrantIssuerWithDefaults() *TrustedOAuth2JwtGrantIssuer` -NewTrustedJwtGrantIssuerWithDefaults instantiates a new TrustedJwtGrantIssuer object +NewTrustedOAuth2JwtGrantIssuerWithDefaults instantiates a new TrustedOAuth2JwtGrantIssuer object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetAllowAnySubject + +`func (o *TrustedOAuth2JwtGrantIssuer) GetAllowAnySubject() bool` + +GetAllowAnySubject returns the AllowAnySubject field if non-nil, zero value otherwise. + +### GetAllowAnySubjectOk + +`func (o *TrustedOAuth2JwtGrantIssuer) GetAllowAnySubjectOk() (*bool, bool)` + +GetAllowAnySubjectOk returns a tuple with the AllowAnySubject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowAnySubject + +`func (o *TrustedOAuth2JwtGrantIssuer) SetAllowAnySubject(v bool)` + +SetAllowAnySubject sets AllowAnySubject field to given value. + +### HasAllowAnySubject + +`func (o *TrustedOAuth2JwtGrantIssuer) HasAllowAnySubject() bool` + +HasAllowAnySubject returns a boolean if a field has been set. + ### GetCreatedAt -`func (o *TrustedJwtGrantIssuer) GetCreatedAt() time.Time` +`func (o *TrustedOAuth2JwtGrantIssuer) GetCreatedAt() time.Time` GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. ### GetCreatedAtOk -`func (o *TrustedJwtGrantIssuer) GetCreatedAtOk() (*time.Time, bool)` +`func (o *TrustedOAuth2JwtGrantIssuer) GetCreatedAtOk() (*time.Time, bool)` GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedAt -`func (o *TrustedJwtGrantIssuer) SetCreatedAt(v time.Time)` +`func (o *TrustedOAuth2JwtGrantIssuer) SetCreatedAt(v time.Time)` SetCreatedAt sets CreatedAt field to given value. ### HasCreatedAt -`func (o *TrustedJwtGrantIssuer) HasCreatedAt() bool` +`func (o *TrustedOAuth2JwtGrantIssuer) HasCreatedAt() bool` HasCreatedAt returns a boolean if a field has been set. ### GetExpiresAt -`func (o *TrustedJwtGrantIssuer) GetExpiresAt() time.Time` +`func (o *TrustedOAuth2JwtGrantIssuer) GetExpiresAt() time.Time` GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. ### GetExpiresAtOk -`func (o *TrustedJwtGrantIssuer) GetExpiresAtOk() (*time.Time, bool)` +`func (o *TrustedOAuth2JwtGrantIssuer) GetExpiresAtOk() (*time.Time, bool)` GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetExpiresAt -`func (o *TrustedJwtGrantIssuer) SetExpiresAt(v time.Time)` +`func (o *TrustedOAuth2JwtGrantIssuer) SetExpiresAt(v time.Time)` SetExpiresAt sets ExpiresAt field to given value. ### HasExpiresAt -`func (o *TrustedJwtGrantIssuer) HasExpiresAt() bool` +`func (o *TrustedOAuth2JwtGrantIssuer) HasExpiresAt() bool` HasExpiresAt returns a boolean if a field has been set. ### GetId -`func (o *TrustedJwtGrantIssuer) GetId() string` +`func (o *TrustedOAuth2JwtGrantIssuer) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *TrustedJwtGrantIssuer) GetIdOk() (*string, bool)` +`func (o *TrustedOAuth2JwtGrantIssuer) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *TrustedJwtGrantIssuer) SetId(v string)` +`func (o *TrustedOAuth2JwtGrantIssuer) SetId(v string)` SetId sets Id field to given value. ### HasId -`func (o *TrustedJwtGrantIssuer) HasId() bool` +`func (o *TrustedOAuth2JwtGrantIssuer) HasId() bool` HasId returns a boolean if a field has been set. ### GetIssuer -`func (o *TrustedJwtGrantIssuer) GetIssuer() string` +`func (o *TrustedOAuth2JwtGrantIssuer) GetIssuer() string` GetIssuer returns the Issuer field if non-nil, zero value otherwise. ### GetIssuerOk -`func (o *TrustedJwtGrantIssuer) GetIssuerOk() (*string, bool)` +`func (o *TrustedOAuth2JwtGrantIssuer) GetIssuerOk() (*string, bool)` GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIssuer -`func (o *TrustedJwtGrantIssuer) SetIssuer(v string)` +`func (o *TrustedOAuth2JwtGrantIssuer) SetIssuer(v string)` SetIssuer sets Issuer field to given value. ### HasIssuer -`func (o *TrustedJwtGrantIssuer) HasIssuer() bool` +`func (o *TrustedOAuth2JwtGrantIssuer) HasIssuer() bool` HasIssuer returns a boolean if a field has been set. ### GetPublicKey -`func (o *TrustedJwtGrantIssuer) GetPublicKey() TrustedJsonWebKey` +`func (o *TrustedOAuth2JwtGrantIssuer) GetPublicKey() TrustedOAuth2JwtGrantJsonWebKey` GetPublicKey returns the PublicKey field if non-nil, zero value otherwise. ### GetPublicKeyOk -`func (o *TrustedJwtGrantIssuer) GetPublicKeyOk() (*TrustedJsonWebKey, bool)` +`func (o *TrustedOAuth2JwtGrantIssuer) GetPublicKeyOk() (*TrustedOAuth2JwtGrantJsonWebKey, bool)` GetPublicKeyOk returns a tuple with the PublicKey field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPublicKey -`func (o *TrustedJwtGrantIssuer) SetPublicKey(v TrustedJsonWebKey)` +`func (o *TrustedOAuth2JwtGrantIssuer) SetPublicKey(v TrustedOAuth2JwtGrantJsonWebKey)` SetPublicKey sets PublicKey field to given value. ### HasPublicKey -`func (o *TrustedJwtGrantIssuer) HasPublicKey() bool` +`func (o *TrustedOAuth2JwtGrantIssuer) HasPublicKey() bool` HasPublicKey returns a boolean if a field has been set. ### GetScope -`func (o *TrustedJwtGrantIssuer) GetScope() []string` +`func (o *TrustedOAuth2JwtGrantIssuer) GetScope() []string` GetScope returns the Scope field if non-nil, zero value otherwise. ### GetScopeOk -`func (o *TrustedJwtGrantIssuer) GetScopeOk() (*[]string, bool)` +`func (o *TrustedOAuth2JwtGrantIssuer) GetScopeOk() (*[]string, bool)` GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetScope -`func (o *TrustedJwtGrantIssuer) SetScope(v []string)` +`func (o *TrustedOAuth2JwtGrantIssuer) SetScope(v []string)` SetScope sets Scope field to given value. ### HasScope -`func (o *TrustedJwtGrantIssuer) HasScope() bool` +`func (o *TrustedOAuth2JwtGrantIssuer) HasScope() bool` HasScope returns a boolean if a field has been set. ### GetSubject -`func (o *TrustedJwtGrantIssuer) GetSubject() string` +`func (o *TrustedOAuth2JwtGrantIssuer) GetSubject() string` GetSubject returns the Subject field if non-nil, zero value otherwise. ### GetSubjectOk -`func (o *TrustedJwtGrantIssuer) GetSubjectOk() (*string, bool)` +`func (o *TrustedOAuth2JwtGrantIssuer) GetSubjectOk() (*string, bool)` GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubject -`func (o *TrustedJwtGrantIssuer) SetSubject(v string)` +`func (o *TrustedOAuth2JwtGrantIssuer) SetSubject(v string)` SetSubject sets Subject field to given value. ### HasSubject -`func (o *TrustedJwtGrantIssuer) HasSubject() bool` +`func (o *TrustedOAuth2JwtGrantIssuer) HasSubject() bool` HasSubject returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/TrustedJsonWebKey.md b/clients/hydra/go/docs/TrustedOAuth2JwtGrantJsonWebKey.md similarity index 62% rename from clients/hydra/go/docs/TrustedJsonWebKey.md rename to clients/hydra/go/docs/TrustedOAuth2JwtGrantJsonWebKey.md index cb89789b1a7..0a2320d1f67 100644 --- a/clients/hydra/go/docs/TrustedJsonWebKey.md +++ b/clients/hydra/go/docs/TrustedOAuth2JwtGrantJsonWebKey.md @@ -1,4 +1,4 @@ -# TrustedJsonWebKey +# TrustedOAuth2JwtGrantJsonWebKey ## Properties @@ -9,70 +9,70 @@ Name | Type | Description | Notes ## Methods -### NewTrustedJsonWebKey +### NewTrustedOAuth2JwtGrantJsonWebKey -`func NewTrustedJsonWebKey() *TrustedJsonWebKey` +`func NewTrustedOAuth2JwtGrantJsonWebKey() *TrustedOAuth2JwtGrantJsonWebKey` -NewTrustedJsonWebKey instantiates a new TrustedJsonWebKey object +NewTrustedOAuth2JwtGrantJsonWebKey instantiates a new TrustedOAuth2JwtGrantJsonWebKey object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewTrustedJsonWebKeyWithDefaults +### NewTrustedOAuth2JwtGrantJsonWebKeyWithDefaults -`func NewTrustedJsonWebKeyWithDefaults() *TrustedJsonWebKey` +`func NewTrustedOAuth2JwtGrantJsonWebKeyWithDefaults() *TrustedOAuth2JwtGrantJsonWebKey` -NewTrustedJsonWebKeyWithDefaults instantiates a new TrustedJsonWebKey object +NewTrustedOAuth2JwtGrantJsonWebKeyWithDefaults instantiates a new TrustedOAuth2JwtGrantJsonWebKey object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetKid -`func (o *TrustedJsonWebKey) GetKid() string` +`func (o *TrustedOAuth2JwtGrantJsonWebKey) GetKid() string` GetKid returns the Kid field if non-nil, zero value otherwise. ### GetKidOk -`func (o *TrustedJsonWebKey) GetKidOk() (*string, bool)` +`func (o *TrustedOAuth2JwtGrantJsonWebKey) GetKidOk() (*string, bool)` GetKidOk returns a tuple with the Kid field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetKid -`func (o *TrustedJsonWebKey) SetKid(v string)` +`func (o *TrustedOAuth2JwtGrantJsonWebKey) SetKid(v string)` SetKid sets Kid field to given value. ### HasKid -`func (o *TrustedJsonWebKey) HasKid() bool` +`func (o *TrustedOAuth2JwtGrantJsonWebKey) HasKid() bool` HasKid returns a boolean if a field has been set. ### GetSet -`func (o *TrustedJsonWebKey) GetSet() string` +`func (o *TrustedOAuth2JwtGrantJsonWebKey) GetSet() string` GetSet returns the Set field if non-nil, zero value otherwise. ### GetSetOk -`func (o *TrustedJsonWebKey) GetSetOk() (*string, bool)` +`func (o *TrustedOAuth2JwtGrantJsonWebKey) GetSetOk() (*string, bool)` GetSetOk returns a tuple with the Set field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSet -`func (o *TrustedJsonWebKey) SetSet(v string)` +`func (o *TrustedOAuth2JwtGrantJsonWebKey) SetSet(v string)` SetSet sets Set field to given value. ### HasSet -`func (o *TrustedJsonWebKey) HasSet() bool` +`func (o *TrustedOAuth2JwtGrantJsonWebKey) HasSet() bool` HasSet returns a boolean if a field has been set. diff --git a/clients/hydra/go/docs/Volume.md b/clients/hydra/go/docs/Volume.md deleted file mode 100644 index dc83ca05b0c..00000000000 --- a/clients/hydra/go/docs/Volume.md +++ /dev/null @@ -1,234 +0,0 @@ -# Volume - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | Pointer to **string** | Date/Time the volume was created. | [optional] -**Driver** | **string** | Name of the volume driver used by the volume. | -**Labels** | **map[string]string** | User-defined key/value metadata. | -**Mountpoint** | **string** | Mount path of the volume on the host. | -**Name** | **string** | Name of the volume. | -**Options** | **map[string]string** | The driver specific options used when creating the volume. | -**Scope** | **string** | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | -**Status** | Pointer to **map[string]interface{}** | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. | [optional] -**UsageData** | Pointer to [**VolumeUsageData**](VolumeUsageData.md) | | [optional] - -## Methods - -### NewVolume - -`func NewVolume(driver string, labels map[string]string, mountpoint string, name string, options map[string]string, scope string, ) *Volume` - -NewVolume instantiates a new Volume object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewVolumeWithDefaults - -`func NewVolumeWithDefaults() *Volume` - -NewVolumeWithDefaults instantiates a new Volume object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreatedAt - -`func (o *Volume) GetCreatedAt() string` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *Volume) GetCreatedAtOk() (*string, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *Volume) SetCreatedAt(v string)` - -SetCreatedAt sets CreatedAt field to given value. - -### HasCreatedAt - -`func (o *Volume) HasCreatedAt() bool` - -HasCreatedAt returns a boolean if a field has been set. - -### GetDriver - -`func (o *Volume) GetDriver() string` - -GetDriver returns the Driver field if non-nil, zero value otherwise. - -### GetDriverOk - -`func (o *Volume) GetDriverOk() (*string, bool)` - -GetDriverOk returns a tuple with the Driver field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDriver - -`func (o *Volume) SetDriver(v string)` - -SetDriver sets Driver field to given value. - - -### GetLabels - -`func (o *Volume) GetLabels() map[string]string` - -GetLabels returns the Labels field if non-nil, zero value otherwise. - -### GetLabelsOk - -`func (o *Volume) GetLabelsOk() (*map[string]string, bool)` - -GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabels - -`func (o *Volume) SetLabels(v map[string]string)` - -SetLabels sets Labels field to given value. - - -### GetMountpoint - -`func (o *Volume) GetMountpoint() string` - -GetMountpoint returns the Mountpoint field if non-nil, zero value otherwise. - -### GetMountpointOk - -`func (o *Volume) GetMountpointOk() (*string, bool)` - -GetMountpointOk returns a tuple with the Mountpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMountpoint - -`func (o *Volume) SetMountpoint(v string)` - -SetMountpoint sets Mountpoint field to given value. - - -### GetName - -`func (o *Volume) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *Volume) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *Volume) SetName(v string)` - -SetName sets Name field to given value. - - -### GetOptions - -`func (o *Volume) GetOptions() map[string]string` - -GetOptions returns the Options field if non-nil, zero value otherwise. - -### GetOptionsOk - -`func (o *Volume) GetOptionsOk() (*map[string]string, bool)` - -GetOptionsOk returns a tuple with the Options field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOptions - -`func (o *Volume) SetOptions(v map[string]string)` - -SetOptions sets Options field to given value. - - -### GetScope - -`func (o *Volume) GetScope() string` - -GetScope returns the Scope field if non-nil, zero value otherwise. - -### GetScopeOk - -`func (o *Volume) GetScopeOk() (*string, bool)` - -GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScope - -`func (o *Volume) SetScope(v string)` - -SetScope sets Scope field to given value. - - -### GetStatus - -`func (o *Volume) GetStatus() map[string]interface{}` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *Volume) GetStatusOk() (*map[string]interface{}, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *Volume) SetStatus(v map[string]interface{})` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *Volume) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetUsageData - -`func (o *Volume) GetUsageData() VolumeUsageData` - -GetUsageData returns the UsageData field if non-nil, zero value otherwise. - -### GetUsageDataOk - -`func (o *Volume) GetUsageDataOk() (*VolumeUsageData, bool)` - -GetUsageDataOk returns a tuple with the UsageData field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsageData - -`func (o *Volume) SetUsageData(v VolumeUsageData)` - -SetUsageData sets UsageData field to given value. - -### HasUsageData - -`func (o *Volume) HasUsageData() bool` - -HasUsageData returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/hydra/go/docs/VolumeUsageData.md b/clients/hydra/go/docs/VolumeUsageData.md deleted file mode 100644 index d499c493861..00000000000 --- a/clients/hydra/go/docs/VolumeUsageData.md +++ /dev/null @@ -1,72 +0,0 @@ -# VolumeUsageData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RefCount** | **int64** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | -**Size** | **int64** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | - -## Methods - -### NewVolumeUsageData - -`func NewVolumeUsageData(refCount int64, size int64, ) *VolumeUsageData` - -NewVolumeUsageData instantiates a new VolumeUsageData object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewVolumeUsageDataWithDefaults - -`func NewVolumeUsageDataWithDefaults() *VolumeUsageData` - -NewVolumeUsageDataWithDefaults instantiates a new VolumeUsageData object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRefCount - -`func (o *VolumeUsageData) GetRefCount() int64` - -GetRefCount returns the RefCount field if non-nil, zero value otherwise. - -### GetRefCountOk - -`func (o *VolumeUsageData) GetRefCountOk() (*int64, bool)` - -GetRefCountOk returns a tuple with the RefCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRefCount - -`func (o *VolumeUsageData) SetRefCount(v int64)` - -SetRefCount sets RefCount field to given value. - - -### GetSize - -`func (o *VolumeUsageData) GetSize() int64` - -GetSize returns the Size field if non-nil, zero value otherwise. - -### GetSizeOk - -`func (o *VolumeUsageData) GetSizeOk() (*int64, bool)` - -GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSize - -`func (o *VolumeUsageData) SetSize(v int64)` - -SetSize sets Size field to given value. - - - -[[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/go/docs/WellKnown.md b/clients/hydra/go/docs/WellKnown.md deleted file mode 100644 index 6a74873b381..00000000000 --- a/clients/hydra/go/docs/WellKnown.md +++ /dev/null @@ -1,697 +0,0 @@ -# WellKnown - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuthorizationEndpoint** | **string** | URL of the OP's OAuth 2.0 Authorization Endpoint. | -**BackchannelLogoutSessionSupported** | Pointer to **bool** | 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] -**BackchannelLogoutSupported** | Pointer to **bool** | Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] -**ClaimsParameterSupported** | Pointer to **bool** | Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] -**ClaimsSupported** | Pointer to **[]string** | 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] -**CodeChallengeMethodsSupported** | Pointer to **[]string** | JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] -**EndSessionEndpoint** | Pointer to **string** | 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] -**FrontchannelLogoutSessionSupported** | Pointer to **bool** | 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] -**FrontchannelLogoutSupported** | Pointer to **bool** | Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] -**GrantTypesSupported** | Pointer to **[]string** | JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] -**IdTokenSigningAlgValuesSupported** | **[]string** | 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** | **string** | 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. | -**JwksUri** | **string** | 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. | -**RegistrationEndpoint** | Pointer to **string** | URL of the OP's Dynamic Client Registration Endpoint. | [optional] -**RequestObjectSigningAlgValuesSupported** | Pointer to **[]string** | 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] -**RequestParameterSupported** | Pointer to **bool** | Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] -**RequestUriParameterSupported** | Pointer to **bool** | Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] -**RequireRequestUriRegistration** | Pointer to **bool** | Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. | [optional] -**ResponseModesSupported** | Pointer to **[]string** | JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] -**ResponseTypesSupported** | **[]string** | 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. | -**RevocationEndpoint** | Pointer to **string** | URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] -**ScopesSupported** | Pointer to **[]string** | SON 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] -**SubjectTypesSupported** | **[]string** | JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | -**TokenEndpoint** | **string** | URL of the OP's OAuth 2.0 Token Endpoint | -**TokenEndpointAuthMethodsSupported** | Pointer to **[]string** | 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] -**UserinfoEndpoint** | Pointer to **string** | URL of the OP's UserInfo Endpoint. | [optional] -**UserinfoSigningAlgValuesSupported** | Pointer to **[]string** | 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] - -## Methods - -### NewWellKnown - -`func NewWellKnown(authorizationEndpoint string, idTokenSigningAlgValuesSupported []string, issuer string, jwksUri string, responseTypesSupported []string, subjectTypesSupported []string, tokenEndpoint string, ) *WellKnown` - -NewWellKnown instantiates a new WellKnown object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewWellKnownWithDefaults - -`func NewWellKnownWithDefaults() *WellKnown` - -NewWellKnownWithDefaults instantiates a new WellKnown object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAuthorizationEndpoint - -`func (o *WellKnown) GetAuthorizationEndpoint() string` - -GetAuthorizationEndpoint returns the AuthorizationEndpoint field if non-nil, zero value otherwise. - -### GetAuthorizationEndpointOk - -`func (o *WellKnown) GetAuthorizationEndpointOk() (*string, bool)` - -GetAuthorizationEndpointOk returns a tuple with the AuthorizationEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthorizationEndpoint - -`func (o *WellKnown) SetAuthorizationEndpoint(v string)` - -SetAuthorizationEndpoint sets AuthorizationEndpoint field to given value. - - -### GetBackchannelLogoutSessionSupported - -`func (o *WellKnown) GetBackchannelLogoutSessionSupported() bool` - -GetBackchannelLogoutSessionSupported returns the BackchannelLogoutSessionSupported field if non-nil, zero value otherwise. - -### GetBackchannelLogoutSessionSupportedOk - -`func (o *WellKnown) GetBackchannelLogoutSessionSupportedOk() (*bool, bool)` - -GetBackchannelLogoutSessionSupportedOk returns a tuple with the BackchannelLogoutSessionSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBackchannelLogoutSessionSupported - -`func (o *WellKnown) SetBackchannelLogoutSessionSupported(v bool)` - -SetBackchannelLogoutSessionSupported sets BackchannelLogoutSessionSupported field to given value. - -### HasBackchannelLogoutSessionSupported - -`func (o *WellKnown) HasBackchannelLogoutSessionSupported() bool` - -HasBackchannelLogoutSessionSupported returns a boolean if a field has been set. - -### GetBackchannelLogoutSupported - -`func (o *WellKnown) GetBackchannelLogoutSupported() bool` - -GetBackchannelLogoutSupported returns the BackchannelLogoutSupported field if non-nil, zero value otherwise. - -### GetBackchannelLogoutSupportedOk - -`func (o *WellKnown) GetBackchannelLogoutSupportedOk() (*bool, bool)` - -GetBackchannelLogoutSupportedOk returns a tuple with the BackchannelLogoutSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBackchannelLogoutSupported - -`func (o *WellKnown) SetBackchannelLogoutSupported(v bool)` - -SetBackchannelLogoutSupported sets BackchannelLogoutSupported field to given value. - -### HasBackchannelLogoutSupported - -`func (o *WellKnown) HasBackchannelLogoutSupported() bool` - -HasBackchannelLogoutSupported returns a boolean if a field has been set. - -### GetClaimsParameterSupported - -`func (o *WellKnown) GetClaimsParameterSupported() bool` - -GetClaimsParameterSupported returns the ClaimsParameterSupported field if non-nil, zero value otherwise. - -### GetClaimsParameterSupportedOk - -`func (o *WellKnown) GetClaimsParameterSupportedOk() (*bool, bool)` - -GetClaimsParameterSupportedOk returns a tuple with the ClaimsParameterSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClaimsParameterSupported - -`func (o *WellKnown) SetClaimsParameterSupported(v bool)` - -SetClaimsParameterSupported sets ClaimsParameterSupported field to given value. - -### HasClaimsParameterSupported - -`func (o *WellKnown) HasClaimsParameterSupported() bool` - -HasClaimsParameterSupported returns a boolean if a field has been set. - -### GetClaimsSupported - -`func (o *WellKnown) GetClaimsSupported() []string` - -GetClaimsSupported returns the ClaimsSupported field if non-nil, zero value otherwise. - -### GetClaimsSupportedOk - -`func (o *WellKnown) GetClaimsSupportedOk() (*[]string, bool)` - -GetClaimsSupportedOk returns a tuple with the ClaimsSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClaimsSupported - -`func (o *WellKnown) SetClaimsSupported(v []string)` - -SetClaimsSupported sets ClaimsSupported field to given value. - -### HasClaimsSupported - -`func (o *WellKnown) HasClaimsSupported() bool` - -HasClaimsSupported returns a boolean if a field has been set. - -### GetCodeChallengeMethodsSupported - -`func (o *WellKnown) GetCodeChallengeMethodsSupported() []string` - -GetCodeChallengeMethodsSupported returns the CodeChallengeMethodsSupported field if non-nil, zero value otherwise. - -### GetCodeChallengeMethodsSupportedOk - -`func (o *WellKnown) GetCodeChallengeMethodsSupportedOk() (*[]string, bool)` - -GetCodeChallengeMethodsSupportedOk returns a tuple with the CodeChallengeMethodsSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCodeChallengeMethodsSupported - -`func (o *WellKnown) SetCodeChallengeMethodsSupported(v []string)` - -SetCodeChallengeMethodsSupported sets CodeChallengeMethodsSupported field to given value. - -### HasCodeChallengeMethodsSupported - -`func (o *WellKnown) HasCodeChallengeMethodsSupported() bool` - -HasCodeChallengeMethodsSupported returns a boolean if a field has been set. - -### GetEndSessionEndpoint - -`func (o *WellKnown) GetEndSessionEndpoint() string` - -GetEndSessionEndpoint returns the EndSessionEndpoint field if non-nil, zero value otherwise. - -### GetEndSessionEndpointOk - -`func (o *WellKnown) GetEndSessionEndpointOk() (*string, bool)` - -GetEndSessionEndpointOk returns a tuple with the EndSessionEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEndSessionEndpoint - -`func (o *WellKnown) SetEndSessionEndpoint(v string)` - -SetEndSessionEndpoint sets EndSessionEndpoint field to given value. - -### HasEndSessionEndpoint - -`func (o *WellKnown) HasEndSessionEndpoint() bool` - -HasEndSessionEndpoint returns a boolean if a field has been set. - -### GetFrontchannelLogoutSessionSupported - -`func (o *WellKnown) GetFrontchannelLogoutSessionSupported() bool` - -GetFrontchannelLogoutSessionSupported returns the FrontchannelLogoutSessionSupported field if non-nil, zero value otherwise. - -### GetFrontchannelLogoutSessionSupportedOk - -`func (o *WellKnown) GetFrontchannelLogoutSessionSupportedOk() (*bool, bool)` - -GetFrontchannelLogoutSessionSupportedOk returns a tuple with the FrontchannelLogoutSessionSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFrontchannelLogoutSessionSupported - -`func (o *WellKnown) SetFrontchannelLogoutSessionSupported(v bool)` - -SetFrontchannelLogoutSessionSupported sets FrontchannelLogoutSessionSupported field to given value. - -### HasFrontchannelLogoutSessionSupported - -`func (o *WellKnown) HasFrontchannelLogoutSessionSupported() bool` - -HasFrontchannelLogoutSessionSupported returns a boolean if a field has been set. - -### GetFrontchannelLogoutSupported - -`func (o *WellKnown) GetFrontchannelLogoutSupported() bool` - -GetFrontchannelLogoutSupported returns the FrontchannelLogoutSupported field if non-nil, zero value otherwise. - -### GetFrontchannelLogoutSupportedOk - -`func (o *WellKnown) GetFrontchannelLogoutSupportedOk() (*bool, bool)` - -GetFrontchannelLogoutSupportedOk returns a tuple with the FrontchannelLogoutSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFrontchannelLogoutSupported - -`func (o *WellKnown) SetFrontchannelLogoutSupported(v bool)` - -SetFrontchannelLogoutSupported sets FrontchannelLogoutSupported field to given value. - -### HasFrontchannelLogoutSupported - -`func (o *WellKnown) HasFrontchannelLogoutSupported() bool` - -HasFrontchannelLogoutSupported returns a boolean if a field has been set. - -### GetGrantTypesSupported - -`func (o *WellKnown) GetGrantTypesSupported() []string` - -GetGrantTypesSupported returns the GrantTypesSupported field if non-nil, zero value otherwise. - -### GetGrantTypesSupportedOk - -`func (o *WellKnown) GetGrantTypesSupportedOk() (*[]string, bool)` - -GetGrantTypesSupportedOk returns a tuple with the GrantTypesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGrantTypesSupported - -`func (o *WellKnown) SetGrantTypesSupported(v []string)` - -SetGrantTypesSupported sets GrantTypesSupported field to given value. - -### HasGrantTypesSupported - -`func (o *WellKnown) HasGrantTypesSupported() bool` - -HasGrantTypesSupported returns a boolean if a field has been set. - -### GetIdTokenSigningAlgValuesSupported - -`func (o *WellKnown) GetIdTokenSigningAlgValuesSupported() []string` - -GetIdTokenSigningAlgValuesSupported returns the IdTokenSigningAlgValuesSupported field if non-nil, zero value otherwise. - -### GetIdTokenSigningAlgValuesSupportedOk - -`func (o *WellKnown) GetIdTokenSigningAlgValuesSupportedOk() (*[]string, bool)` - -GetIdTokenSigningAlgValuesSupportedOk returns a tuple with the IdTokenSigningAlgValuesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdTokenSigningAlgValuesSupported - -`func (o *WellKnown) SetIdTokenSigningAlgValuesSupported(v []string)` - -SetIdTokenSigningAlgValuesSupported sets IdTokenSigningAlgValuesSupported field to given value. - - -### GetIssuer - -`func (o *WellKnown) GetIssuer() string` - -GetIssuer returns the Issuer field if non-nil, zero value otherwise. - -### GetIssuerOk - -`func (o *WellKnown) GetIssuerOk() (*string, bool)` - -GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIssuer - -`func (o *WellKnown) SetIssuer(v string)` - -SetIssuer sets Issuer field to given value. - - -### GetJwksUri - -`func (o *WellKnown) GetJwksUri() string` - -GetJwksUri returns the JwksUri field if non-nil, zero value otherwise. - -### GetJwksUriOk - -`func (o *WellKnown) GetJwksUriOk() (*string, bool)` - -GetJwksUriOk returns a tuple with the JwksUri field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJwksUri - -`func (o *WellKnown) SetJwksUri(v string)` - -SetJwksUri sets JwksUri field to given value. - - -### GetRegistrationEndpoint - -`func (o *WellKnown) GetRegistrationEndpoint() string` - -GetRegistrationEndpoint returns the RegistrationEndpoint field if non-nil, zero value otherwise. - -### GetRegistrationEndpointOk - -`func (o *WellKnown) GetRegistrationEndpointOk() (*string, bool)` - -GetRegistrationEndpointOk returns a tuple with the RegistrationEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRegistrationEndpoint - -`func (o *WellKnown) SetRegistrationEndpoint(v string)` - -SetRegistrationEndpoint sets RegistrationEndpoint field to given value. - -### HasRegistrationEndpoint - -`func (o *WellKnown) HasRegistrationEndpoint() bool` - -HasRegistrationEndpoint returns a boolean if a field has been set. - -### GetRequestObjectSigningAlgValuesSupported - -`func (o *WellKnown) GetRequestObjectSigningAlgValuesSupported() []string` - -GetRequestObjectSigningAlgValuesSupported returns the RequestObjectSigningAlgValuesSupported field if non-nil, zero value otherwise. - -### GetRequestObjectSigningAlgValuesSupportedOk - -`func (o *WellKnown) GetRequestObjectSigningAlgValuesSupportedOk() (*[]string, bool)` - -GetRequestObjectSigningAlgValuesSupportedOk returns a tuple with the RequestObjectSigningAlgValuesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequestObjectSigningAlgValuesSupported - -`func (o *WellKnown) SetRequestObjectSigningAlgValuesSupported(v []string)` - -SetRequestObjectSigningAlgValuesSupported sets RequestObjectSigningAlgValuesSupported field to given value. - -### HasRequestObjectSigningAlgValuesSupported - -`func (o *WellKnown) HasRequestObjectSigningAlgValuesSupported() bool` - -HasRequestObjectSigningAlgValuesSupported returns a boolean if a field has been set. - -### GetRequestParameterSupported - -`func (o *WellKnown) GetRequestParameterSupported() bool` - -GetRequestParameterSupported returns the RequestParameterSupported field if non-nil, zero value otherwise. - -### GetRequestParameterSupportedOk - -`func (o *WellKnown) GetRequestParameterSupportedOk() (*bool, bool)` - -GetRequestParameterSupportedOk returns a tuple with the RequestParameterSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequestParameterSupported - -`func (o *WellKnown) SetRequestParameterSupported(v bool)` - -SetRequestParameterSupported sets RequestParameterSupported field to given value. - -### HasRequestParameterSupported - -`func (o *WellKnown) HasRequestParameterSupported() bool` - -HasRequestParameterSupported returns a boolean if a field has been set. - -### GetRequestUriParameterSupported - -`func (o *WellKnown) GetRequestUriParameterSupported() bool` - -GetRequestUriParameterSupported returns the RequestUriParameterSupported field if non-nil, zero value otherwise. - -### GetRequestUriParameterSupportedOk - -`func (o *WellKnown) GetRequestUriParameterSupportedOk() (*bool, bool)` - -GetRequestUriParameterSupportedOk returns a tuple with the RequestUriParameterSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequestUriParameterSupported - -`func (o *WellKnown) SetRequestUriParameterSupported(v bool)` - -SetRequestUriParameterSupported sets RequestUriParameterSupported field to given value. - -### HasRequestUriParameterSupported - -`func (o *WellKnown) HasRequestUriParameterSupported() bool` - -HasRequestUriParameterSupported returns a boolean if a field has been set. - -### GetRequireRequestUriRegistration - -`func (o *WellKnown) GetRequireRequestUriRegistration() bool` - -GetRequireRequestUriRegistration returns the RequireRequestUriRegistration field if non-nil, zero value otherwise. - -### GetRequireRequestUriRegistrationOk - -`func (o *WellKnown) GetRequireRequestUriRegistrationOk() (*bool, bool)` - -GetRequireRequestUriRegistrationOk returns a tuple with the RequireRequestUriRegistration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequireRequestUriRegistration - -`func (o *WellKnown) SetRequireRequestUriRegistration(v bool)` - -SetRequireRequestUriRegistration sets RequireRequestUriRegistration field to given value. - -### HasRequireRequestUriRegistration - -`func (o *WellKnown) HasRequireRequestUriRegistration() bool` - -HasRequireRequestUriRegistration returns a boolean if a field has been set. - -### GetResponseModesSupported - -`func (o *WellKnown) GetResponseModesSupported() []string` - -GetResponseModesSupported returns the ResponseModesSupported field if non-nil, zero value otherwise. - -### GetResponseModesSupportedOk - -`func (o *WellKnown) GetResponseModesSupportedOk() (*[]string, bool)` - -GetResponseModesSupportedOk returns a tuple with the ResponseModesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResponseModesSupported - -`func (o *WellKnown) SetResponseModesSupported(v []string)` - -SetResponseModesSupported sets ResponseModesSupported field to given value. - -### HasResponseModesSupported - -`func (o *WellKnown) HasResponseModesSupported() bool` - -HasResponseModesSupported returns a boolean if a field has been set. - -### GetResponseTypesSupported - -`func (o *WellKnown) GetResponseTypesSupported() []string` - -GetResponseTypesSupported returns the ResponseTypesSupported field if non-nil, zero value otherwise. - -### GetResponseTypesSupportedOk - -`func (o *WellKnown) GetResponseTypesSupportedOk() (*[]string, bool)` - -GetResponseTypesSupportedOk returns a tuple with the ResponseTypesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResponseTypesSupported - -`func (o *WellKnown) SetResponseTypesSupported(v []string)` - -SetResponseTypesSupported sets ResponseTypesSupported field to given value. - - -### GetRevocationEndpoint - -`func (o *WellKnown) GetRevocationEndpoint() string` - -GetRevocationEndpoint returns the RevocationEndpoint field if non-nil, zero value otherwise. - -### GetRevocationEndpointOk - -`func (o *WellKnown) GetRevocationEndpointOk() (*string, bool)` - -GetRevocationEndpointOk returns a tuple with the RevocationEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRevocationEndpoint - -`func (o *WellKnown) SetRevocationEndpoint(v string)` - -SetRevocationEndpoint sets RevocationEndpoint field to given value. - -### HasRevocationEndpoint - -`func (o *WellKnown) HasRevocationEndpoint() bool` - -HasRevocationEndpoint returns a boolean if a field has been set. - -### GetScopesSupported - -`func (o *WellKnown) GetScopesSupported() []string` - -GetScopesSupported returns the ScopesSupported field if non-nil, zero value otherwise. - -### GetScopesSupportedOk - -`func (o *WellKnown) GetScopesSupportedOk() (*[]string, bool)` - -GetScopesSupportedOk returns a tuple with the ScopesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScopesSupported - -`func (o *WellKnown) SetScopesSupported(v []string)` - -SetScopesSupported sets ScopesSupported field to given value. - -### HasScopesSupported - -`func (o *WellKnown) HasScopesSupported() bool` - -HasScopesSupported returns a boolean if a field has been set. - -### GetSubjectTypesSupported - -`func (o *WellKnown) GetSubjectTypesSupported() []string` - -GetSubjectTypesSupported returns the SubjectTypesSupported field if non-nil, zero value otherwise. - -### GetSubjectTypesSupportedOk - -`func (o *WellKnown) GetSubjectTypesSupportedOk() (*[]string, bool)` - -GetSubjectTypesSupportedOk returns a tuple with the SubjectTypesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubjectTypesSupported - -`func (o *WellKnown) SetSubjectTypesSupported(v []string)` - -SetSubjectTypesSupported sets SubjectTypesSupported field to given value. - - -### GetTokenEndpoint - -`func (o *WellKnown) GetTokenEndpoint() string` - -GetTokenEndpoint returns the TokenEndpoint field if non-nil, zero value otherwise. - -### GetTokenEndpointOk - -`func (o *WellKnown) GetTokenEndpointOk() (*string, bool)` - -GetTokenEndpointOk returns a tuple with the TokenEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenEndpoint - -`func (o *WellKnown) SetTokenEndpoint(v string)` - -SetTokenEndpoint sets TokenEndpoint field to given value. - - -### GetTokenEndpointAuthMethodsSupported - -`func (o *WellKnown) GetTokenEndpointAuthMethodsSupported() []string` - -GetTokenEndpointAuthMethodsSupported returns the TokenEndpointAuthMethodsSupported field if non-nil, zero value otherwise. - -### GetTokenEndpointAuthMethodsSupportedOk - -`func (o *WellKnown) GetTokenEndpointAuthMethodsSupportedOk() (*[]string, bool)` - -GetTokenEndpointAuthMethodsSupportedOk returns a tuple with the TokenEndpointAuthMethodsSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenEndpointAuthMethodsSupported - -`func (o *WellKnown) SetTokenEndpointAuthMethodsSupported(v []string)` - -SetTokenEndpointAuthMethodsSupported sets TokenEndpointAuthMethodsSupported field to given value. - -### HasTokenEndpointAuthMethodsSupported - -`func (o *WellKnown) HasTokenEndpointAuthMethodsSupported() bool` - -HasTokenEndpointAuthMethodsSupported returns a boolean if a field has been set. - -### GetUserinfoEndpoint - -`func (o *WellKnown) GetUserinfoEndpoint() string` - -GetUserinfoEndpoint returns the UserinfoEndpoint field if non-nil, zero value otherwise. - -### GetUserinfoEndpointOk - -`func (o *WellKnown) GetUserinfoEndpointOk() (*string, bool)` - -GetUserinfoEndpointOk returns a tuple with the UserinfoEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserinfoEndpoint - -`func (o *WellKnown) SetUserinfoEndpoint(v string)` - -SetUserinfoEndpoint sets UserinfoEndpoint field to given value. - -### HasUserinfoEndpoint - -`func (o *WellKnown) HasUserinfoEndpoint() bool` - -HasUserinfoEndpoint returns a boolean if a field has been set. - -### GetUserinfoSigningAlgValuesSupported - -`func (o *WellKnown) GetUserinfoSigningAlgValuesSupported() []string` - -GetUserinfoSigningAlgValuesSupported returns the UserinfoSigningAlgValuesSupported field if non-nil, zero value otherwise. - -### GetUserinfoSigningAlgValuesSupportedOk - -`func (o *WellKnown) GetUserinfoSigningAlgValuesSupportedOk() (*[]string, bool)` - -GetUserinfoSigningAlgValuesSupportedOk returns a tuple with the UserinfoSigningAlgValuesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserinfoSigningAlgValuesSupported - -`func (o *WellKnown) SetUserinfoSigningAlgValuesSupported(v []string)` - -SetUserinfoSigningAlgValuesSupported sets UserinfoSigningAlgValuesSupported field to given value. - -### HasUserinfoSigningAlgValuesSupported - -`func (o *WellKnown) HasUserinfoSigningAlgValuesSupported() bool` - -HasUserinfoSigningAlgValuesSupported returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/clients/hydra/go/docs/WellknownApi.md b/clients/hydra/go/docs/WellknownApi.md new file mode 100644 index 00000000000..5f184777044 --- /dev/null +++ b/clients/hydra/go/docs/WellknownApi.md @@ -0,0 +1,70 @@ +# \WellknownApi + +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 + + + +## DiscoverJsonWebKeys + +> JsonWebKeySet DiscoverJsonWebKeys(ctx).Execute() + +Discover Well-Known JSON Web Keys + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +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) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiDiscoverJsonWebKeysRequest struct via the builder pattern + + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + diff --git a/clients/hydra/go/git_push.sh b/clients/hydra/go/git_push.sh index ebcdbbd5b4a..cb3fc304a3a 100644 --- a/clients/hydra/go/git_push.sh +++ b/clients/hydra/go/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' - diff --git a/clients/hydra/go/go.mod b/clients/hydra/go/go.mod index b4d363e00c8..bd405eb0751 100644 --- a/clients/hydra/go/go.mod +++ b/clients/hydra/go/go.mod @@ -2,6 +2,4 @@ module github.com/ory/hydra-client-go go 1.13 -require ( - golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 -) +require golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 diff --git a/clients/hydra/go/go.sum b/clients/hydra/go/go.sum index 734252e6815..aca013a6f39 100644 --- a/clients/hydra/go/go.sum +++ b/clients/hydra/go/go.sum @@ -1,13 +1,362 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +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 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +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= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +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/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= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +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 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +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/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +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 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +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= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +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 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/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= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +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 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/clients/hydra/go/model_accept_consent_request.go b/clients/hydra/go/model_accept_o_auth2_consent_request.go similarity index 64% rename from clients/hydra/go/model_accept_consent_request.go rename to clients/hydra/go/model_accept_o_auth2_consent_request.go index e3e367913a0..cffd711c6aa 100644 --- a/clients/hydra/go/model_accept_consent_request.go +++ b/clients/hydra/go/model_accept_o_auth2_consent_request.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,8 +16,8 @@ import ( "time" ) -// AcceptConsentRequest struct for AcceptConsentRequest -type AcceptConsentRequest struct { +// AcceptOAuth2ConsentRequest struct for AcceptOAuth2ConsentRequest +type AcceptOAuth2ConsentRequest struct { GrantAccessTokenAudience []string `json:"grant_access_token_audience,omitempty"` GrantScope []string `json:"grant_scope,omitempty"` HandledAt *time.Time `json:"handled_at,omitempty"` @@ -24,28 +25,28 @@ type AcceptConsentRequest struct { Remember *bool `json:"remember,omitempty"` // RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. RememberFor *int64 `json:"remember_for,omitempty"` - Session *ConsentRequestSession `json:"session,omitempty"` + Session *AcceptOAuth2ConsentRequestSession `json:"session,omitempty"` } -// NewAcceptConsentRequest instantiates a new AcceptConsentRequest object +// NewAcceptOAuth2ConsentRequest instantiates a new AcceptOAuth2ConsentRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAcceptConsentRequest() *AcceptConsentRequest { - this := AcceptConsentRequest{} +func NewAcceptOAuth2ConsentRequest() *AcceptOAuth2ConsentRequest { + this := AcceptOAuth2ConsentRequest{} return &this } -// NewAcceptConsentRequestWithDefaults instantiates a new AcceptConsentRequest object +// NewAcceptOAuth2ConsentRequestWithDefaults instantiates a new AcceptOAuth2ConsentRequest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewAcceptConsentRequestWithDefaults() *AcceptConsentRequest { - this := AcceptConsentRequest{} +func NewAcceptOAuth2ConsentRequestWithDefaults() *AcceptOAuth2ConsentRequest { + this := AcceptOAuth2ConsentRequest{} return &this } // GetGrantAccessTokenAudience returns the GrantAccessTokenAudience field value if set, zero value otherwise. -func (o *AcceptConsentRequest) GetGrantAccessTokenAudience() []string { +func (o *AcceptOAuth2ConsentRequest) GetGrantAccessTokenAudience() []string { if o == nil || o.GrantAccessTokenAudience == nil { var ret []string return ret @@ -55,7 +56,7 @@ func (o *AcceptConsentRequest) GetGrantAccessTokenAudience() []string { // GetGrantAccessTokenAudienceOk returns a tuple with the GrantAccessTokenAudience field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptConsentRequest) GetGrantAccessTokenAudienceOk() ([]string, bool) { +func (o *AcceptOAuth2ConsentRequest) GetGrantAccessTokenAudienceOk() ([]string, bool) { if o == nil || o.GrantAccessTokenAudience == nil { return nil, false } @@ -63,7 +64,7 @@ func (o *AcceptConsentRequest) GetGrantAccessTokenAudienceOk() ([]string, bool) } // HasGrantAccessTokenAudience returns a boolean if a field has been set. -func (o *AcceptConsentRequest) HasGrantAccessTokenAudience() bool { +func (o *AcceptOAuth2ConsentRequest) HasGrantAccessTokenAudience() bool { if o != nil && o.GrantAccessTokenAudience != nil { return true } @@ -72,12 +73,12 @@ func (o *AcceptConsentRequest) HasGrantAccessTokenAudience() bool { } // SetGrantAccessTokenAudience gets a reference to the given []string and assigns it to the GrantAccessTokenAudience field. -func (o *AcceptConsentRequest) SetGrantAccessTokenAudience(v []string) { +func (o *AcceptOAuth2ConsentRequest) SetGrantAccessTokenAudience(v []string) { o.GrantAccessTokenAudience = v } // GetGrantScope returns the GrantScope field value if set, zero value otherwise. -func (o *AcceptConsentRequest) GetGrantScope() []string { +func (o *AcceptOAuth2ConsentRequest) GetGrantScope() []string { if o == nil || o.GrantScope == nil { var ret []string return ret @@ -87,7 +88,7 @@ func (o *AcceptConsentRequest) GetGrantScope() []string { // GetGrantScopeOk returns a tuple with the GrantScope field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptConsentRequest) GetGrantScopeOk() ([]string, bool) { +func (o *AcceptOAuth2ConsentRequest) GetGrantScopeOk() ([]string, bool) { if o == nil || o.GrantScope == nil { return nil, false } @@ -95,7 +96,7 @@ func (o *AcceptConsentRequest) GetGrantScopeOk() ([]string, bool) { } // HasGrantScope returns a boolean if a field has been set. -func (o *AcceptConsentRequest) HasGrantScope() bool { +func (o *AcceptOAuth2ConsentRequest) HasGrantScope() bool { if o != nil && o.GrantScope != nil { return true } @@ -104,12 +105,12 @@ func (o *AcceptConsentRequest) HasGrantScope() bool { } // SetGrantScope gets a reference to the given []string and assigns it to the GrantScope field. -func (o *AcceptConsentRequest) SetGrantScope(v []string) { +func (o *AcceptOAuth2ConsentRequest) SetGrantScope(v []string) { o.GrantScope = v } // GetHandledAt returns the HandledAt field value if set, zero value otherwise. -func (o *AcceptConsentRequest) GetHandledAt() time.Time { +func (o *AcceptOAuth2ConsentRequest) GetHandledAt() time.Time { if o == nil || o.HandledAt == nil { var ret time.Time return ret @@ -119,7 +120,7 @@ func (o *AcceptConsentRequest) GetHandledAt() time.Time { // GetHandledAtOk returns a tuple with the HandledAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptConsentRequest) GetHandledAtOk() (*time.Time, bool) { +func (o *AcceptOAuth2ConsentRequest) GetHandledAtOk() (*time.Time, bool) { if o == nil || o.HandledAt == nil { return nil, false } @@ -127,7 +128,7 @@ func (o *AcceptConsentRequest) GetHandledAtOk() (*time.Time, bool) { } // HasHandledAt returns a boolean if a field has been set. -func (o *AcceptConsentRequest) HasHandledAt() bool { +func (o *AcceptOAuth2ConsentRequest) HasHandledAt() bool { if o != nil && o.HandledAt != nil { return true } @@ -136,12 +137,12 @@ func (o *AcceptConsentRequest) HasHandledAt() bool { } // SetHandledAt gets a reference to the given time.Time and assigns it to the HandledAt field. -func (o *AcceptConsentRequest) SetHandledAt(v time.Time) { +func (o *AcceptOAuth2ConsentRequest) SetHandledAt(v time.Time) { o.HandledAt = &v } // GetRemember returns the Remember field value if set, zero value otherwise. -func (o *AcceptConsentRequest) GetRemember() bool { +func (o *AcceptOAuth2ConsentRequest) GetRemember() bool { if o == nil || o.Remember == nil { var ret bool return ret @@ -151,7 +152,7 @@ func (o *AcceptConsentRequest) GetRemember() bool { // GetRememberOk returns a tuple with the Remember field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptConsentRequest) GetRememberOk() (*bool, bool) { +func (o *AcceptOAuth2ConsentRequest) GetRememberOk() (*bool, bool) { if o == nil || o.Remember == nil { return nil, false } @@ -159,7 +160,7 @@ func (o *AcceptConsentRequest) GetRememberOk() (*bool, bool) { } // HasRemember returns a boolean if a field has been set. -func (o *AcceptConsentRequest) HasRemember() bool { +func (o *AcceptOAuth2ConsentRequest) HasRemember() bool { if o != nil && o.Remember != nil { return true } @@ -168,12 +169,12 @@ func (o *AcceptConsentRequest) HasRemember() bool { } // SetRemember gets a reference to the given bool and assigns it to the Remember field. -func (o *AcceptConsentRequest) SetRemember(v bool) { +func (o *AcceptOAuth2ConsentRequest) SetRemember(v bool) { o.Remember = &v } // GetRememberFor returns the RememberFor field value if set, zero value otherwise. -func (o *AcceptConsentRequest) GetRememberFor() int64 { +func (o *AcceptOAuth2ConsentRequest) GetRememberFor() int64 { if o == nil || o.RememberFor == nil { var ret int64 return ret @@ -183,7 +184,7 @@ func (o *AcceptConsentRequest) GetRememberFor() int64 { // GetRememberForOk returns a tuple with the RememberFor field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptConsentRequest) GetRememberForOk() (*int64, bool) { +func (o *AcceptOAuth2ConsentRequest) GetRememberForOk() (*int64, bool) { if o == nil || o.RememberFor == nil { return nil, false } @@ -191,7 +192,7 @@ func (o *AcceptConsentRequest) GetRememberForOk() (*int64, bool) { } // HasRememberFor returns a boolean if a field has been set. -func (o *AcceptConsentRequest) HasRememberFor() bool { +func (o *AcceptOAuth2ConsentRequest) HasRememberFor() bool { if o != nil && o.RememberFor != nil { return true } @@ -200,14 +201,14 @@ func (o *AcceptConsentRequest) HasRememberFor() bool { } // SetRememberFor gets a reference to the given int64 and assigns it to the RememberFor field. -func (o *AcceptConsentRequest) SetRememberFor(v int64) { +func (o *AcceptOAuth2ConsentRequest) SetRememberFor(v int64) { o.RememberFor = &v } // GetSession returns the Session field value if set, zero value otherwise. -func (o *AcceptConsentRequest) GetSession() ConsentRequestSession { +func (o *AcceptOAuth2ConsentRequest) GetSession() AcceptOAuth2ConsentRequestSession { if o == nil || o.Session == nil { - var ret ConsentRequestSession + var ret AcceptOAuth2ConsentRequestSession return ret } return *o.Session @@ -215,7 +216,7 @@ func (o *AcceptConsentRequest) GetSession() ConsentRequestSession { // GetSessionOk returns a tuple with the Session field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptConsentRequest) GetSessionOk() (*ConsentRequestSession, bool) { +func (o *AcceptOAuth2ConsentRequest) GetSessionOk() (*AcceptOAuth2ConsentRequestSession, bool) { if o == nil || o.Session == nil { return nil, false } @@ -223,7 +224,7 @@ func (o *AcceptConsentRequest) GetSessionOk() (*ConsentRequestSession, bool) { } // HasSession returns a boolean if a field has been set. -func (o *AcceptConsentRequest) HasSession() bool { +func (o *AcceptOAuth2ConsentRequest) HasSession() bool { if o != nil && o.Session != nil { return true } @@ -231,12 +232,12 @@ func (o *AcceptConsentRequest) HasSession() bool { return false } -// SetSession gets a reference to the given ConsentRequestSession and assigns it to the Session field. -func (o *AcceptConsentRequest) SetSession(v ConsentRequestSession) { +// SetSession gets a reference to the given AcceptOAuth2ConsentRequestSession and assigns it to the Session field. +func (o *AcceptOAuth2ConsentRequest) SetSession(v AcceptOAuth2ConsentRequestSession) { o.Session = &v } -func (o AcceptConsentRequest) MarshalJSON() ([]byte, error) { +func (o AcceptOAuth2ConsentRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.GrantAccessTokenAudience != nil { toSerialize["grant_access_token_audience"] = o.GrantAccessTokenAudience @@ -259,38 +260,38 @@ func (o AcceptConsentRequest) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableAcceptConsentRequest struct { - value *AcceptConsentRequest +type NullableAcceptOAuth2ConsentRequest struct { + value *AcceptOAuth2ConsentRequest isSet bool } -func (v NullableAcceptConsentRequest) Get() *AcceptConsentRequest { +func (v NullableAcceptOAuth2ConsentRequest) Get() *AcceptOAuth2ConsentRequest { return v.value } -func (v *NullableAcceptConsentRequest) Set(val *AcceptConsentRequest) { +func (v *NullableAcceptOAuth2ConsentRequest) Set(val *AcceptOAuth2ConsentRequest) { v.value = val v.isSet = true } -func (v NullableAcceptConsentRequest) IsSet() bool { +func (v NullableAcceptOAuth2ConsentRequest) IsSet() bool { return v.isSet } -func (v *NullableAcceptConsentRequest) Unset() { +func (v *NullableAcceptOAuth2ConsentRequest) Unset() { v.value = nil v.isSet = false } -func NewNullableAcceptConsentRequest(val *AcceptConsentRequest) *NullableAcceptConsentRequest { - return &NullableAcceptConsentRequest{value: val, isSet: true} +func NewNullableAcceptOAuth2ConsentRequest(val *AcceptOAuth2ConsentRequest) *NullableAcceptOAuth2ConsentRequest { + return &NullableAcceptOAuth2ConsentRequest{value: val, isSet: true} } -func (v NullableAcceptConsentRequest) MarshalJSON() ([]byte, error) { +func (v NullableAcceptOAuth2ConsentRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableAcceptConsentRequest) UnmarshalJSON(src []byte) error { +func (v *NullableAcceptOAuth2ConsentRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } 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 new file mode 100644 index 00000000000..300cacbd4ce --- /dev/null +++ b/clients/hydra/go/model_accept_o_auth2_consent_request_session.go @@ -0,0 +1,156 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// AcceptOAuth2ConsentRequestSession struct for AcceptOAuth2ConsentRequestSession +type AcceptOAuth2ConsentRequestSession struct { + // 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! + AccessToken interface{} `json:"access_token,omitempty"` + // 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! + IdToken interface{} `json:"id_token,omitempty"` +} + +// NewAcceptOAuth2ConsentRequestSession instantiates a new AcceptOAuth2ConsentRequestSession object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAcceptOAuth2ConsentRequestSession() *AcceptOAuth2ConsentRequestSession { + this := AcceptOAuth2ConsentRequestSession{} + return &this +} + +// NewAcceptOAuth2ConsentRequestSessionWithDefaults instantiates a new AcceptOAuth2ConsentRequestSession object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAcceptOAuth2ConsentRequestSessionWithDefaults() *AcceptOAuth2ConsentRequestSession { + this := AcceptOAuth2ConsentRequestSession{} + return &this +} + +// GetAccessToken returns the AccessToken field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AcceptOAuth2ConsentRequestSession) GetAccessToken() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AcceptOAuth2ConsentRequestSession) GetAccessTokenOk() (*interface{}, bool) { + if o == nil || o.AccessToken == nil { + return nil, false + } + return &o.AccessToken, true +} + +// HasAccessToken returns a boolean if a field has been set. +func (o *AcceptOAuth2ConsentRequestSession) HasAccessToken() bool { + if o != nil && o.AccessToken != nil { + return true + } + + return false +} + +// SetAccessToken gets a reference to the given interface{} and assigns it to the AccessToken field. +func (o *AcceptOAuth2ConsentRequestSession) SetAccessToken(v interface{}) { + o.AccessToken = v +} + +// GetIdToken returns the IdToken field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AcceptOAuth2ConsentRequestSession) GetIdToken() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.IdToken +} + +// GetIdTokenOk returns a tuple with the IdToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AcceptOAuth2ConsentRequestSession) GetIdTokenOk() (*interface{}, bool) { + if o == nil || o.IdToken == nil { + return nil, false + } + return &o.IdToken, true +} + +// HasIdToken returns a boolean if a field has been set. +func (o *AcceptOAuth2ConsentRequestSession) HasIdToken() bool { + if o != nil && o.IdToken != nil { + return true + } + + return false +} + +// SetIdToken gets a reference to the given interface{} and assigns it to the IdToken field. +func (o *AcceptOAuth2ConsentRequestSession) SetIdToken(v interface{}) { + o.IdToken = v +} + +func (o AcceptOAuth2ConsentRequestSession) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AccessToken != nil { + toSerialize["access_token"] = o.AccessToken + } + if o.IdToken != nil { + toSerialize["id_token"] = o.IdToken + } + return json.Marshal(toSerialize) +} + +type NullableAcceptOAuth2ConsentRequestSession struct { + value *AcceptOAuth2ConsentRequestSession + isSet bool +} + +func (v NullableAcceptOAuth2ConsentRequestSession) Get() *AcceptOAuth2ConsentRequestSession { + return v.value +} + +func (v *NullableAcceptOAuth2ConsentRequestSession) Set(val *AcceptOAuth2ConsentRequestSession) { + v.value = val + v.isSet = true +} + +func (v NullableAcceptOAuth2ConsentRequestSession) IsSet() bool { + return v.isSet +} + +func (v *NullableAcceptOAuth2ConsentRequestSession) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAcceptOAuth2ConsentRequestSession(val *AcceptOAuth2ConsentRequestSession) *NullableAcceptOAuth2ConsentRequestSession { + return &NullableAcceptOAuth2ConsentRequestSession{value: val, isSet: true} +} + +func (v NullableAcceptOAuth2ConsentRequestSession) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAcceptOAuth2ConsentRequestSession) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_accept_login_request.go b/clients/hydra/go/model_accept_o_auth2_login_request.go similarity index 69% rename from clients/hydra/go/model_accept_login_request.go rename to clients/hydra/go/model_accept_o_auth2_login_request.go index 6bcd3dcf58d..cc5b23341b0 100644 --- a/clients/hydra/go/model_accept_login_request.go +++ b/clients/hydra/go/model_accept_o_auth2_login_request.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,12 +15,12 @@ import ( "encoding/json" ) -// AcceptLoginRequest struct for AcceptLoginRequest -type AcceptLoginRequest struct { +// AcceptOAuth2LoginRequest struct for AcceptOAuth2LoginRequest +type AcceptOAuth2LoginRequest struct { // 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. Acr *string `json:"acr,omitempty"` Amr []string `json:"amr,omitempty"` - Context map[string]interface{} `json:"context,omitempty"` + Context interface{} `json:"context,omitempty"` // 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. ForceSubjectIdentifier *string `json:"force_subject_identifier,omitempty"` // 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. @@ -30,26 +31,26 @@ type AcceptLoginRequest struct { Subject string `json:"subject"` } -// NewAcceptLoginRequest instantiates a new AcceptLoginRequest object +// NewAcceptOAuth2LoginRequest instantiates a new AcceptOAuth2LoginRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewAcceptLoginRequest(subject string) *AcceptLoginRequest { - this := AcceptLoginRequest{} +func NewAcceptOAuth2LoginRequest(subject string) *AcceptOAuth2LoginRequest { + this := AcceptOAuth2LoginRequest{} this.Subject = subject return &this } -// NewAcceptLoginRequestWithDefaults instantiates a new AcceptLoginRequest object +// NewAcceptOAuth2LoginRequestWithDefaults instantiates a new AcceptOAuth2LoginRequest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewAcceptLoginRequestWithDefaults() *AcceptLoginRequest { - this := AcceptLoginRequest{} +func NewAcceptOAuth2LoginRequestWithDefaults() *AcceptOAuth2LoginRequest { + this := AcceptOAuth2LoginRequest{} return &this } // GetAcr returns the Acr field value if set, zero value otherwise. -func (o *AcceptLoginRequest) GetAcr() string { +func (o *AcceptOAuth2LoginRequest) GetAcr() string { if o == nil || o.Acr == nil { var ret string return ret @@ -59,7 +60,7 @@ func (o *AcceptLoginRequest) GetAcr() string { // GetAcrOk returns a tuple with the Acr field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptLoginRequest) GetAcrOk() (*string, bool) { +func (o *AcceptOAuth2LoginRequest) GetAcrOk() (*string, bool) { if o == nil || o.Acr == nil { return nil, false } @@ -67,7 +68,7 @@ func (o *AcceptLoginRequest) GetAcrOk() (*string, bool) { } // HasAcr returns a boolean if a field has been set. -func (o *AcceptLoginRequest) HasAcr() bool { +func (o *AcceptOAuth2LoginRequest) HasAcr() bool { if o != nil && o.Acr != nil { return true } @@ -76,12 +77,12 @@ func (o *AcceptLoginRequest) HasAcr() bool { } // SetAcr gets a reference to the given string and assigns it to the Acr field. -func (o *AcceptLoginRequest) SetAcr(v string) { +func (o *AcceptOAuth2LoginRequest) SetAcr(v string) { o.Acr = &v } // GetAmr returns the Amr field value if set, zero value otherwise. -func (o *AcceptLoginRequest) GetAmr() []string { +func (o *AcceptOAuth2LoginRequest) GetAmr() []string { if o == nil || o.Amr == nil { var ret []string return ret @@ -91,7 +92,7 @@ func (o *AcceptLoginRequest) GetAmr() []string { // GetAmrOk returns a tuple with the Amr field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptLoginRequest) GetAmrOk() ([]string, bool) { +func (o *AcceptOAuth2LoginRequest) GetAmrOk() ([]string, bool) { if o == nil || o.Amr == nil { return nil, false } @@ -99,7 +100,7 @@ func (o *AcceptLoginRequest) GetAmrOk() ([]string, bool) { } // HasAmr returns a boolean if a field has been set. -func (o *AcceptLoginRequest) HasAmr() bool { +func (o *AcceptOAuth2LoginRequest) HasAmr() bool { if o != nil && o.Amr != nil { return true } @@ -108,14 +109,14 @@ func (o *AcceptLoginRequest) HasAmr() bool { } // SetAmr gets a reference to the given []string and assigns it to the Amr field. -func (o *AcceptLoginRequest) SetAmr(v []string) { +func (o *AcceptOAuth2LoginRequest) SetAmr(v []string) { o.Amr = v } -// GetContext returns the Context field value if set, zero value otherwise. -func (o *AcceptLoginRequest) GetContext() map[string]interface{} { - if o == nil || o.Context == nil { - var ret map[string]interface{} +// GetContext returns the Context field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AcceptOAuth2LoginRequest) GetContext() interface{} { + if o == nil { + var ret interface{} return ret } return o.Context @@ -123,15 +124,16 @@ func (o *AcceptLoginRequest) GetContext() map[string]interface{} { // GetContextOk returns a tuple with the Context field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptLoginRequest) GetContextOk() (map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AcceptOAuth2LoginRequest) GetContextOk() (*interface{}, bool) { if o == nil || o.Context == nil { return nil, false } - return o.Context, true + return &o.Context, true } // HasContext returns a boolean if a field has been set. -func (o *AcceptLoginRequest) HasContext() bool { +func (o *AcceptOAuth2LoginRequest) HasContext() bool { if o != nil && o.Context != nil { return true } @@ -139,13 +141,13 @@ func (o *AcceptLoginRequest) HasContext() bool { return false } -// SetContext gets a reference to the given map[string]interface{} and assigns it to the Context field. -func (o *AcceptLoginRequest) SetContext(v map[string]interface{}) { +// SetContext gets a reference to the given interface{} and assigns it to the Context field. +func (o *AcceptOAuth2LoginRequest) SetContext(v interface{}) { o.Context = v } // GetForceSubjectIdentifier returns the ForceSubjectIdentifier field value if set, zero value otherwise. -func (o *AcceptLoginRequest) GetForceSubjectIdentifier() string { +func (o *AcceptOAuth2LoginRequest) GetForceSubjectIdentifier() string { if o == nil || o.ForceSubjectIdentifier == nil { var ret string return ret @@ -155,7 +157,7 @@ func (o *AcceptLoginRequest) GetForceSubjectIdentifier() string { // GetForceSubjectIdentifierOk returns a tuple with the ForceSubjectIdentifier field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptLoginRequest) GetForceSubjectIdentifierOk() (*string, bool) { +func (o *AcceptOAuth2LoginRequest) GetForceSubjectIdentifierOk() (*string, bool) { if o == nil || o.ForceSubjectIdentifier == nil { return nil, false } @@ -163,7 +165,7 @@ func (o *AcceptLoginRequest) GetForceSubjectIdentifierOk() (*string, bool) { } // HasForceSubjectIdentifier returns a boolean if a field has been set. -func (o *AcceptLoginRequest) HasForceSubjectIdentifier() bool { +func (o *AcceptOAuth2LoginRequest) HasForceSubjectIdentifier() bool { if o != nil && o.ForceSubjectIdentifier != nil { return true } @@ -172,12 +174,12 @@ func (o *AcceptLoginRequest) HasForceSubjectIdentifier() bool { } // SetForceSubjectIdentifier gets a reference to the given string and assigns it to the ForceSubjectIdentifier field. -func (o *AcceptLoginRequest) SetForceSubjectIdentifier(v string) { +func (o *AcceptOAuth2LoginRequest) SetForceSubjectIdentifier(v string) { o.ForceSubjectIdentifier = &v } // GetRemember returns the Remember field value if set, zero value otherwise. -func (o *AcceptLoginRequest) GetRemember() bool { +func (o *AcceptOAuth2LoginRequest) GetRemember() bool { if o == nil || o.Remember == nil { var ret bool return ret @@ -187,7 +189,7 @@ func (o *AcceptLoginRequest) GetRemember() bool { // GetRememberOk returns a tuple with the Remember field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptLoginRequest) GetRememberOk() (*bool, bool) { +func (o *AcceptOAuth2LoginRequest) GetRememberOk() (*bool, bool) { if o == nil || o.Remember == nil { return nil, false } @@ -195,7 +197,7 @@ func (o *AcceptLoginRequest) GetRememberOk() (*bool, bool) { } // HasRemember returns a boolean if a field has been set. -func (o *AcceptLoginRequest) HasRemember() bool { +func (o *AcceptOAuth2LoginRequest) HasRemember() bool { if o != nil && o.Remember != nil { return true } @@ -204,12 +206,12 @@ func (o *AcceptLoginRequest) HasRemember() bool { } // SetRemember gets a reference to the given bool and assigns it to the Remember field. -func (o *AcceptLoginRequest) SetRemember(v bool) { +func (o *AcceptOAuth2LoginRequest) SetRemember(v bool) { o.Remember = &v } // GetRememberFor returns the RememberFor field value if set, zero value otherwise. -func (o *AcceptLoginRequest) GetRememberFor() int64 { +func (o *AcceptOAuth2LoginRequest) GetRememberFor() int64 { if o == nil || o.RememberFor == nil { var ret int64 return ret @@ -219,7 +221,7 @@ func (o *AcceptLoginRequest) GetRememberFor() int64 { // GetRememberForOk returns a tuple with the RememberFor field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *AcceptLoginRequest) GetRememberForOk() (*int64, bool) { +func (o *AcceptOAuth2LoginRequest) GetRememberForOk() (*int64, bool) { if o == nil || o.RememberFor == nil { return nil, false } @@ -227,7 +229,7 @@ func (o *AcceptLoginRequest) GetRememberForOk() (*int64, bool) { } // HasRememberFor returns a boolean if a field has been set. -func (o *AcceptLoginRequest) HasRememberFor() bool { +func (o *AcceptOAuth2LoginRequest) HasRememberFor() bool { if o != nil && o.RememberFor != nil { return true } @@ -236,12 +238,12 @@ func (o *AcceptLoginRequest) HasRememberFor() bool { } // SetRememberFor gets a reference to the given int64 and assigns it to the RememberFor field. -func (o *AcceptLoginRequest) SetRememberFor(v int64) { +func (o *AcceptOAuth2LoginRequest) SetRememberFor(v int64) { o.RememberFor = &v } // GetSubject returns the Subject field value -func (o *AcceptLoginRequest) GetSubject() string { +func (o *AcceptOAuth2LoginRequest) GetSubject() string { if o == nil { var ret string return ret @@ -252,19 +254,19 @@ func (o *AcceptLoginRequest) GetSubject() string { // GetSubjectOk returns a tuple with the Subject field value // and a boolean to check if the value has been set. -func (o *AcceptLoginRequest) GetSubjectOk() (*string, bool) { - if o == nil { +func (o *AcceptOAuth2LoginRequest) GetSubjectOk() (*string, bool) { + if o == nil { return nil, false } return &o.Subject, true } // SetSubject sets field value -func (o *AcceptLoginRequest) SetSubject(v string) { +func (o *AcceptOAuth2LoginRequest) SetSubject(v string) { o.Subject = v } -func (o AcceptLoginRequest) MarshalJSON() ([]byte, error) { +func (o AcceptOAuth2LoginRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Acr != nil { toSerialize["acr"] = o.Acr @@ -290,38 +292,38 @@ func (o AcceptLoginRequest) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableAcceptLoginRequest struct { - value *AcceptLoginRequest +type NullableAcceptOAuth2LoginRequest struct { + value *AcceptOAuth2LoginRequest isSet bool } -func (v NullableAcceptLoginRequest) Get() *AcceptLoginRequest { +func (v NullableAcceptOAuth2LoginRequest) Get() *AcceptOAuth2LoginRequest { return v.value } -func (v *NullableAcceptLoginRequest) Set(val *AcceptLoginRequest) { +func (v *NullableAcceptOAuth2LoginRequest) Set(val *AcceptOAuth2LoginRequest) { v.value = val v.isSet = true } -func (v NullableAcceptLoginRequest) IsSet() bool { +func (v NullableAcceptOAuth2LoginRequest) IsSet() bool { return v.isSet } -func (v *NullableAcceptLoginRequest) Unset() { +func (v *NullableAcceptOAuth2LoginRequest) Unset() { v.value = nil v.isSet = false } -func NewNullableAcceptLoginRequest(val *AcceptLoginRequest) *NullableAcceptLoginRequest { - return &NullableAcceptLoginRequest{value: val, isSet: true} +func NewNullableAcceptOAuth2LoginRequest(val *AcceptOAuth2LoginRequest) *NullableAcceptOAuth2LoginRequest { + return &NullableAcceptOAuth2LoginRequest{value: val, isSet: true} } -func (v NullableAcceptLoginRequest) MarshalJSON() ([]byte, error) { +func (v NullableAcceptOAuth2LoginRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableAcceptLoginRequest) UnmarshalJSON(src []byte) error { +func (v *NullableAcceptOAuth2LoginRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_completed_request.go b/clients/hydra/go/model_completed_request.go deleted file mode 100644 index 6ff4f5c46cc..00000000000 --- a/clients/hydra/go/model_completed_request.go +++ /dev/null @@ -1,109 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// CompletedRequest struct for CompletedRequest -type CompletedRequest struct { - // RedirectURL is the URL which you should redirect the user to once the authentication process is completed. - RedirectTo string `json:"redirect_to"` -} - -// NewCompletedRequest instantiates a new CompletedRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCompletedRequest(redirectTo string) *CompletedRequest { - this := CompletedRequest{} - this.RedirectTo = redirectTo - return &this -} - -// NewCompletedRequestWithDefaults instantiates a new CompletedRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCompletedRequestWithDefaults() *CompletedRequest { - this := CompletedRequest{} - return &this -} - -// GetRedirectTo returns the RedirectTo field value -func (o *CompletedRequest) GetRedirectTo() string { - if o == nil { - var ret string - return ret - } - - return o.RedirectTo -} - -// GetRedirectToOk returns a tuple with the RedirectTo field value -// and a boolean to check if the value has been set. -func (o *CompletedRequest) GetRedirectToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RedirectTo, true -} - -// SetRedirectTo sets field value -func (o *CompletedRequest) SetRedirectTo(v string) { - o.RedirectTo = v -} - -func (o CompletedRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["redirect_to"] = o.RedirectTo - } - return json.Marshal(toSerialize) -} - -type NullableCompletedRequest struct { - value *CompletedRequest - isSet bool -} - -func (v NullableCompletedRequest) Get() *CompletedRequest { - return v.value -} - -func (v *NullableCompletedRequest) Set(val *CompletedRequest) { - v.value = val - v.isSet = true -} - -func (v NullableCompletedRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableCompletedRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCompletedRequest(val *CompletedRequest) *NullableCompletedRequest { - return &NullableCompletedRequest{value: val, isSet: true} -} - -func (v NullableCompletedRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCompletedRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_consent_request_session.go b/clients/hydra/go/model_consent_request_session.go deleted file mode 100644 index e033918a7fe..00000000000 --- a/clients/hydra/go/model_consent_request_session.go +++ /dev/null @@ -1,153 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// ConsentRequestSession struct for ConsentRequestSession -type ConsentRequestSession struct { - // 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! - AccessToken map[string]interface{} `json:"access_token,omitempty"` - // 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! - IdToken map[string]interface{} `json:"id_token,omitempty"` -} - -// NewConsentRequestSession instantiates a new ConsentRequestSession object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewConsentRequestSession() *ConsentRequestSession { - this := ConsentRequestSession{} - return &this -} - -// NewConsentRequestSessionWithDefaults instantiates a new ConsentRequestSession object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewConsentRequestSessionWithDefaults() *ConsentRequestSession { - this := ConsentRequestSession{} - return &this -} - -// GetAccessToken returns the AccessToken field value if set, zero value otherwise. -func (o *ConsentRequestSession) GetAccessToken() map[string]interface{} { - if o == nil || o.AccessToken == nil { - var ret map[string]interface{} - return ret - } - return o.AccessToken -} - -// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsentRequestSession) GetAccessTokenOk() (map[string]interface{}, bool) { - if o == nil || o.AccessToken == nil { - return nil, false - } - return o.AccessToken, true -} - -// HasAccessToken returns a boolean if a field has been set. -func (o *ConsentRequestSession) HasAccessToken() bool { - if o != nil && o.AccessToken != nil { - return true - } - - return false -} - -// SetAccessToken gets a reference to the given map[string]interface{} and assigns it to the AccessToken field. -func (o *ConsentRequestSession) SetAccessToken(v map[string]interface{}) { - o.AccessToken = v -} - -// GetIdToken returns the IdToken field value if set, zero value otherwise. -func (o *ConsentRequestSession) GetIdToken() map[string]interface{} { - if o == nil || o.IdToken == nil { - var ret map[string]interface{} - return ret - } - return o.IdToken -} - -// GetIdTokenOk returns a tuple with the IdToken field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsentRequestSession) GetIdTokenOk() (map[string]interface{}, bool) { - if o == nil || o.IdToken == nil { - return nil, false - } - return o.IdToken, true -} - -// HasIdToken returns a boolean if a field has been set. -func (o *ConsentRequestSession) HasIdToken() bool { - if o != nil && o.IdToken != nil { - return true - } - - return false -} - -// SetIdToken gets a reference to the given map[string]interface{} and assigns it to the IdToken field. -func (o *ConsentRequestSession) SetIdToken(v map[string]interface{}) { - o.IdToken = v -} - -func (o ConsentRequestSession) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.AccessToken != nil { - toSerialize["access_token"] = o.AccessToken - } - if o.IdToken != nil { - toSerialize["id_token"] = o.IdToken - } - return json.Marshal(toSerialize) -} - -type NullableConsentRequestSession struct { - value *ConsentRequestSession - isSet bool -} - -func (v NullableConsentRequestSession) Get() *ConsentRequestSession { - return v.value -} - -func (v *NullableConsentRequestSession) Set(val *ConsentRequestSession) { - v.value = val - v.isSet = true -} - -func (v NullableConsentRequestSession) IsSet() bool { - return v.isSet -} - -func (v *NullableConsentRequestSession) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConsentRequestSession(val *ConsentRequestSession) *NullableConsentRequestSession { - return &NullableConsentRequestSession{value: val, isSet: true} -} - -func (v NullableConsentRequestSession) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConsentRequestSession) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_container_wait_ok_body_error.go b/clients/hydra/go/model_container_wait_ok_body_error.go deleted file mode 100644 index a91d0c062fb..00000000000 --- a/clients/hydra/go/model_container_wait_ok_body_error.go +++ /dev/null @@ -1,116 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// ContainerWaitOKBodyError ContainerWaitOKBodyError container waiting error, if any -type ContainerWaitOKBodyError struct { - // Details of an error - Message *string `json:"Message,omitempty"` -} - -// NewContainerWaitOKBodyError instantiates a new ContainerWaitOKBodyError object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewContainerWaitOKBodyError() *ContainerWaitOKBodyError { - this := ContainerWaitOKBodyError{} - return &this -} - -// NewContainerWaitOKBodyErrorWithDefaults instantiates a new ContainerWaitOKBodyError object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewContainerWaitOKBodyErrorWithDefaults() *ContainerWaitOKBodyError { - this := ContainerWaitOKBodyError{} - return &this -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *ContainerWaitOKBodyError) GetMessage() string { - if o == nil || o.Message == nil { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ContainerWaitOKBodyError) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *ContainerWaitOKBodyError) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ContainerWaitOKBodyError) SetMessage(v string) { - o.Message = &v -} - -func (o ContainerWaitOKBodyError) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Message != nil { - toSerialize["Message"] = o.Message - } - return json.Marshal(toSerialize) -} - -type NullableContainerWaitOKBodyError struct { - value *ContainerWaitOKBodyError - isSet bool -} - -func (v NullableContainerWaitOKBodyError) Get() *ContainerWaitOKBodyError { - return v.value -} - -func (v *NullableContainerWaitOKBodyError) Set(val *ContainerWaitOKBodyError) { - v.value = val - v.isSet = true -} - -func (v NullableContainerWaitOKBodyError) IsSet() bool { - return v.isSet -} - -func (v *NullableContainerWaitOKBodyError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableContainerWaitOKBodyError(val *ContainerWaitOKBodyError) *NullableContainerWaitOKBodyError { - return &NullableContainerWaitOKBodyError{value: val, isSet: true} -} - -func (v NullableContainerWaitOKBodyError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableContainerWaitOKBodyError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_create_json_web_key_set.go b/clients/hydra/go/model_create_json_web_key_set.go new file mode 100644 index 00000000000..49fef412004 --- /dev/null +++ b/clients/hydra/go/model_create_json_web_key_set.go @@ -0,0 +1,170 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// CreateJsonWebKeySet Create JSON Web Key Set Request Body +type CreateJsonWebKeySet struct { + // JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. + Alg string `json:"alg"` + // JSON Web Key ID The Key ID of the key to be created. + Kid string `json:"kid"` + // 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\". + Use string `json:"use"` +} + +// NewCreateJsonWebKeySet instantiates a new CreateJsonWebKeySet object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateJsonWebKeySet(alg string, kid string, use string) *CreateJsonWebKeySet { + this := CreateJsonWebKeySet{} + this.Alg = alg + this.Kid = kid + this.Use = use + return &this +} + +// NewCreateJsonWebKeySetWithDefaults instantiates a new CreateJsonWebKeySet object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateJsonWebKeySetWithDefaults() *CreateJsonWebKeySet { + this := CreateJsonWebKeySet{} + return &this +} + +// GetAlg returns the Alg field value +func (o *CreateJsonWebKeySet) GetAlg() string { + if o == nil { + var ret string + return ret + } + + return o.Alg +} + +// GetAlgOk returns a tuple with the Alg field value +// and a boolean to check if the value has been set. +func (o *CreateJsonWebKeySet) GetAlgOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Alg, true +} + +// SetAlg sets field value +func (o *CreateJsonWebKeySet) SetAlg(v string) { + o.Alg = v +} + +// GetKid returns the Kid field value +func (o *CreateJsonWebKeySet) GetKid() string { + if o == nil { + var ret string + return ret + } + + return o.Kid +} + +// GetKidOk returns a tuple with the Kid field value +// and a boolean to check if the value has been set. +func (o *CreateJsonWebKeySet) GetKidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kid, true +} + +// SetKid sets field value +func (o *CreateJsonWebKeySet) SetKid(v string) { + o.Kid = v +} + +// GetUse returns the Use field value +func (o *CreateJsonWebKeySet) GetUse() string { + if o == nil { + var ret string + return ret + } + + return o.Use +} + +// GetUseOk returns a tuple with the Use field value +// and a boolean to check if the value has been set. +func (o *CreateJsonWebKeySet) GetUseOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Use, true +} + +// SetUse sets field value +func (o *CreateJsonWebKeySet) SetUse(v string) { + o.Use = v +} + +func (o CreateJsonWebKeySet) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["alg"] = o.Alg + } + if true { + toSerialize["kid"] = o.Kid + } + if true { + toSerialize["use"] = o.Use + } + return json.Marshal(toSerialize) +} + +type NullableCreateJsonWebKeySet struct { + value *CreateJsonWebKeySet + isSet bool +} + +func (v NullableCreateJsonWebKeySet) Get() *CreateJsonWebKeySet { + return v.value +} + +func (v *NullableCreateJsonWebKeySet) Set(val *CreateJsonWebKeySet) { + v.value = val + v.isSet = true +} + +func (v NullableCreateJsonWebKeySet) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateJsonWebKeySet) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateJsonWebKeySet(val *CreateJsonWebKeySet) *NullableCreateJsonWebKeySet { + return &NullableCreateJsonWebKeySet{value: val, isSet: true} +} + +func (v NullableCreateJsonWebKeySet) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateJsonWebKeySet) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_json_error.go b/clients/hydra/go/model_error_o_auth2.go similarity index 58% rename from clients/hydra/go/model_json_error.go rename to clients/hydra/go/model_error_o_auth2.go index 35b9132baca..e44aa9a10ce 100644 --- a/clients/hydra/go/model_json_error.go +++ b/clients/hydra/go/model_error_o_auth2.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,37 +15,39 @@ import ( "encoding/json" ) -// JsonError Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. -type JsonError struct { - // Name is the error name. +// ErrorOAuth2 Error +type ErrorOAuth2 struct { + // Error Error *string `json:"error,omitempty"` - // Debug contains debug information. This is usually not available and has to be enabled. + // Error Debug Information Only available in dev mode. ErrorDebug *string `json:"error_debug,omitempty"` - // Description contains further information on the nature of the error. + // Error Description ErrorDescription *string `json:"error_description,omitempty"` - // Code represents the error status code (404, 403, 401, ...). + // Error Hint Helps the user identify the error cause. + ErrorHint *string `json:"error_hint,omitempty"` + // HTTP Status Code StatusCode *int64 `json:"status_code,omitempty"` } -// NewJsonError instantiates a new JsonError object +// NewErrorOAuth2 instantiates a new ErrorOAuth2 object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewJsonError() *JsonError { - this := JsonError{} +func NewErrorOAuth2() *ErrorOAuth2 { + this := ErrorOAuth2{} return &this } -// NewJsonErrorWithDefaults instantiates a new JsonError object +// NewErrorOAuth2WithDefaults instantiates a new ErrorOAuth2 object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewJsonErrorWithDefaults() *JsonError { - this := JsonError{} +func NewErrorOAuth2WithDefaults() *ErrorOAuth2 { + this := ErrorOAuth2{} return &this } // GetError returns the Error field value if set, zero value otherwise. -func (o *JsonError) GetError() string { +func (o *ErrorOAuth2) GetError() string { if o == nil || o.Error == nil { var ret string return ret @@ -54,7 +57,7 @@ func (o *JsonError) GetError() string { // GetErrorOk returns a tuple with the Error field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JsonError) GetErrorOk() (*string, bool) { +func (o *ErrorOAuth2) GetErrorOk() (*string, bool) { if o == nil || o.Error == nil { return nil, false } @@ -62,7 +65,7 @@ func (o *JsonError) GetErrorOk() (*string, bool) { } // HasError returns a boolean if a field has been set. -func (o *JsonError) HasError() bool { +func (o *ErrorOAuth2) HasError() bool { if o != nil && o.Error != nil { return true } @@ -71,12 +74,12 @@ func (o *JsonError) HasError() bool { } // SetError gets a reference to the given string and assigns it to the Error field. -func (o *JsonError) SetError(v string) { +func (o *ErrorOAuth2) SetError(v string) { o.Error = &v } // GetErrorDebug returns the ErrorDebug field value if set, zero value otherwise. -func (o *JsonError) GetErrorDebug() string { +func (o *ErrorOAuth2) GetErrorDebug() string { if o == nil || o.ErrorDebug == nil { var ret string return ret @@ -86,7 +89,7 @@ func (o *JsonError) GetErrorDebug() string { // GetErrorDebugOk returns a tuple with the ErrorDebug field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JsonError) GetErrorDebugOk() (*string, bool) { +func (o *ErrorOAuth2) GetErrorDebugOk() (*string, bool) { if o == nil || o.ErrorDebug == nil { return nil, false } @@ -94,7 +97,7 @@ func (o *JsonError) GetErrorDebugOk() (*string, bool) { } // HasErrorDebug returns a boolean if a field has been set. -func (o *JsonError) HasErrorDebug() bool { +func (o *ErrorOAuth2) HasErrorDebug() bool { if o != nil && o.ErrorDebug != nil { return true } @@ -103,12 +106,12 @@ func (o *JsonError) HasErrorDebug() bool { } // SetErrorDebug gets a reference to the given string and assigns it to the ErrorDebug field. -func (o *JsonError) SetErrorDebug(v string) { +func (o *ErrorOAuth2) SetErrorDebug(v string) { o.ErrorDebug = &v } // GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise. -func (o *JsonError) GetErrorDescription() string { +func (o *ErrorOAuth2) GetErrorDescription() string { if o == nil || o.ErrorDescription == nil { var ret string return ret @@ -118,7 +121,7 @@ func (o *JsonError) GetErrorDescription() string { // GetErrorDescriptionOk returns a tuple with the ErrorDescription field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JsonError) GetErrorDescriptionOk() (*string, bool) { +func (o *ErrorOAuth2) GetErrorDescriptionOk() (*string, bool) { if o == nil || o.ErrorDescription == nil { return nil, false } @@ -126,7 +129,7 @@ func (o *JsonError) GetErrorDescriptionOk() (*string, bool) { } // HasErrorDescription returns a boolean if a field has been set. -func (o *JsonError) HasErrorDescription() bool { +func (o *ErrorOAuth2) HasErrorDescription() bool { if o != nil && o.ErrorDescription != nil { return true } @@ -135,12 +138,44 @@ func (o *JsonError) HasErrorDescription() bool { } // SetErrorDescription gets a reference to the given string and assigns it to the ErrorDescription field. -func (o *JsonError) SetErrorDescription(v string) { +func (o *ErrorOAuth2) SetErrorDescription(v string) { o.ErrorDescription = &v } +// GetErrorHint returns the ErrorHint field value if set, zero value otherwise. +func (o *ErrorOAuth2) GetErrorHint() string { + if o == nil || o.ErrorHint == nil { + var ret string + return ret + } + return *o.ErrorHint +} + +// GetErrorHintOk returns a tuple with the ErrorHint field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorOAuth2) GetErrorHintOk() (*string, bool) { + if o == nil || o.ErrorHint == nil { + return nil, false + } + return o.ErrorHint, true +} + +// HasErrorHint returns a boolean if a field has been set. +func (o *ErrorOAuth2) HasErrorHint() bool { + if o != nil && o.ErrorHint != nil { + return true + } + + return false +} + +// SetErrorHint gets a reference to the given string and assigns it to the ErrorHint field. +func (o *ErrorOAuth2) SetErrorHint(v string) { + o.ErrorHint = &v +} + // GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *JsonError) GetStatusCode() int64 { +func (o *ErrorOAuth2) GetStatusCode() int64 { if o == nil || o.StatusCode == nil { var ret int64 return ret @@ -150,7 +185,7 @@ func (o *JsonError) GetStatusCode() int64 { // GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JsonError) GetStatusCodeOk() (*int64, bool) { +func (o *ErrorOAuth2) GetStatusCodeOk() (*int64, bool) { if o == nil || o.StatusCode == nil { return nil, false } @@ -158,7 +193,7 @@ func (o *JsonError) GetStatusCodeOk() (*int64, bool) { } // HasStatusCode returns a boolean if a field has been set. -func (o *JsonError) HasStatusCode() bool { +func (o *ErrorOAuth2) HasStatusCode() bool { if o != nil && o.StatusCode != nil { return true } @@ -167,11 +202,11 @@ func (o *JsonError) HasStatusCode() bool { } // SetStatusCode gets a reference to the given int64 and assigns it to the StatusCode field. -func (o *JsonError) SetStatusCode(v int64) { +func (o *ErrorOAuth2) SetStatusCode(v int64) { o.StatusCode = &v } -func (o JsonError) MarshalJSON() ([]byte, error) { +func (o ErrorOAuth2) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Error != nil { toSerialize["error"] = o.Error @@ -182,44 +217,47 @@ func (o JsonError) MarshalJSON() ([]byte, error) { if o.ErrorDescription != nil { toSerialize["error_description"] = o.ErrorDescription } + if o.ErrorHint != nil { + toSerialize["error_hint"] = o.ErrorHint + } if o.StatusCode != nil { toSerialize["status_code"] = o.StatusCode } return json.Marshal(toSerialize) } -type NullableJsonError struct { - value *JsonError +type NullableErrorOAuth2 struct { + value *ErrorOAuth2 isSet bool } -func (v NullableJsonError) Get() *JsonError { +func (v NullableErrorOAuth2) Get() *ErrorOAuth2 { return v.value } -func (v *NullableJsonError) Set(val *JsonError) { +func (v *NullableErrorOAuth2) Set(val *ErrorOAuth2) { v.value = val v.isSet = true } -func (v NullableJsonError) IsSet() bool { +func (v NullableErrorOAuth2) IsSet() bool { return v.isSet } -func (v *NullableJsonError) Unset() { +func (v *NullableErrorOAuth2) Unset() { v.value = nil v.isSet = false } -func NewNullableJsonError(val *JsonError) *NullableJsonError { - return &NullableJsonError{value: val, isSet: true} +func NewNullableErrorOAuth2(val *ErrorOAuth2) *NullableErrorOAuth2 { + return &NullableErrorOAuth2{value: val, isSet: true} } -func (v NullableJsonError) MarshalJSON() ([]byte, error) { +func (v NullableErrorOAuth2) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableJsonError) UnmarshalJSON(src []byte) error { +func (v *NullableErrorOAuth2) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_flush_inactive_o_auth2_tokens_request.go b/clients/hydra/go/model_flush_inactive_o_auth2_tokens_request.go deleted file mode 100644 index 17e06a16a55..00000000000 --- a/clients/hydra/go/model_flush_inactive_o_auth2_tokens_request.go +++ /dev/null @@ -1,117 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" - "time" -) - -// FlushInactiveOAuth2TokensRequest struct for FlushInactiveOAuth2TokensRequest -type FlushInactiveOAuth2TokensRequest struct { - // NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. - NotAfter *time.Time `json:"notAfter,omitempty"` -} - -// NewFlushInactiveOAuth2TokensRequest instantiates a new FlushInactiveOAuth2TokensRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFlushInactiveOAuth2TokensRequest() *FlushInactiveOAuth2TokensRequest { - this := FlushInactiveOAuth2TokensRequest{} - return &this -} - -// NewFlushInactiveOAuth2TokensRequestWithDefaults instantiates a new FlushInactiveOAuth2TokensRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFlushInactiveOAuth2TokensRequestWithDefaults() *FlushInactiveOAuth2TokensRequest { - this := FlushInactiveOAuth2TokensRequest{} - return &this -} - -// GetNotAfter returns the NotAfter field value if set, zero value otherwise. -func (o *FlushInactiveOAuth2TokensRequest) GetNotAfter() time.Time { - if o == nil || o.NotAfter == nil { - var ret time.Time - return ret - } - return *o.NotAfter -} - -// GetNotAfterOk returns a tuple with the NotAfter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FlushInactiveOAuth2TokensRequest) GetNotAfterOk() (*time.Time, bool) { - if o == nil || o.NotAfter == nil { - return nil, false - } - return o.NotAfter, true -} - -// HasNotAfter returns a boolean if a field has been set. -func (o *FlushInactiveOAuth2TokensRequest) HasNotAfter() bool { - if o != nil && o.NotAfter != nil { - return true - } - - return false -} - -// SetNotAfter gets a reference to the given time.Time and assigns it to the NotAfter field. -func (o *FlushInactiveOAuth2TokensRequest) SetNotAfter(v time.Time) { - o.NotAfter = &v -} - -func (o FlushInactiveOAuth2TokensRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.NotAfter != nil { - toSerialize["notAfter"] = o.NotAfter - } - return json.Marshal(toSerialize) -} - -type NullableFlushInactiveOAuth2TokensRequest struct { - value *FlushInactiveOAuth2TokensRequest - isSet bool -} - -func (v NullableFlushInactiveOAuth2TokensRequest) Get() *FlushInactiveOAuth2TokensRequest { - return v.value -} - -func (v *NullableFlushInactiveOAuth2TokensRequest) Set(val *FlushInactiveOAuth2TokensRequest) { - v.value = val - v.isSet = true -} - -func (v NullableFlushInactiveOAuth2TokensRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableFlushInactiveOAuth2TokensRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFlushInactiveOAuth2TokensRequest(val *FlushInactiveOAuth2TokensRequest) *NullableFlushInactiveOAuth2TokensRequest { - return &NullableFlushInactiveOAuth2TokensRequest{value: val, isSet: true} -} - -func (v NullableFlushInactiveOAuth2TokensRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFlushInactiveOAuth2TokensRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_generic_error.go b/clients/hydra/go/model_generic_error.go index d790d92a2b2..66a7ff992a9 100644 --- a/clients/hydra/go/model_generic_error.go +++ b/clients/hydra/go/model_generic_error.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,7 +22,7 @@ type GenericError struct { // Debug information This field is often not exposed to protect against leaking sensitive information. Debug *string `json:"debug,omitempty"` // Further error details - Details map[string]interface{} `json:"details,omitempty"` + Details interface{} `json:"details,omitempty"` // The error ID Useful when trying to identify various errors in application logic. Id *string `json:"id,omitempty"` // Error message The error's message. @@ -116,10 +117,10 @@ func (o *GenericError) SetDebug(v string) { o.Debug = &v } -// GetDetails returns the Details field value if set, zero value otherwise. -func (o *GenericError) GetDetails() map[string]interface{} { - if o == nil || o.Details == nil { - var ret map[string]interface{} +// GetDetails returns the Details field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GenericError) GetDetails() interface{} { + if o == nil { + var ret interface{} return ret } return o.Details @@ -127,11 +128,12 @@ func (o *GenericError) GetDetails() map[string]interface{} { // GetDetailsOk returns a tuple with the Details field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetDetailsOk() (map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GenericError) GetDetailsOk() (*interface{}, bool) { if o == nil || o.Details == nil { return nil, false } - return o.Details, true + return &o.Details, true } // HasDetails returns a boolean if a field has been set. @@ -143,8 +145,8 @@ func (o *GenericError) HasDetails() bool { return false } -// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field. -func (o *GenericError) SetDetails(v map[string]interface{}) { +// SetDetails gets a reference to the given interface{} and assigns it to the Details field. +func (o *GenericError) SetDetails(v interface{}) { o.Details = v } @@ -193,7 +195,7 @@ func (o *GenericError) GetMessage() string { // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. func (o *GenericError) GetMessageOk() (*string, bool) { - if o == nil { + if o == nil { return nil, false } return &o.Message, true diff --git a/clients/hydra/go/model_get_version_200_response.go b/clients/hydra/go/model_get_version_200_response.go new file mode 100644 index 00000000000..94905d394c2 --- /dev/null +++ b/clients/hydra/go/model_get_version_200_response.go @@ -0,0 +1,117 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// GetVersion200Response struct for GetVersion200Response +type GetVersion200Response struct { + // The version of Ory Hydra. + Version *string `json:"version,omitempty"` +} + +// NewGetVersion200Response instantiates a new GetVersion200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetVersion200Response() *GetVersion200Response { + this := GetVersion200Response{} + return &this +} + +// NewGetVersion200ResponseWithDefaults instantiates a new GetVersion200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetVersion200ResponseWithDefaults() *GetVersion200Response { + this := GetVersion200Response{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *GetVersion200Response) GetVersion() string { + if o == nil || o.Version == nil { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetVersion200Response) GetVersionOk() (*string, bool) { + if o == nil || o.Version == nil { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *GetVersion200Response) HasVersion() bool { + if o != nil && o.Version != nil { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *GetVersion200Response) SetVersion(v string) { + o.Version = &v +} + +func (o GetVersion200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Version != nil { + toSerialize["version"] = o.Version + } + return json.Marshal(toSerialize) +} + +type NullableGetVersion200Response struct { + value *GetVersion200Response + isSet bool +} + +func (v NullableGetVersion200Response) Get() *GetVersion200Response { + return v.value +} + +func (v *NullableGetVersion200Response) Set(val *GetVersion200Response) { + v.value = val + v.isSet = true +} + +func (v NullableGetVersion200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableGetVersion200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetVersion200Response(val *GetVersion200Response) *NullableGetVersion200Response { + return &NullableGetVersion200Response{value: val, isSet: true} +} + +func (v NullableGetVersion200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetVersion200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_health_not_ready_status.go b/clients/hydra/go/model_health_not_ready_status.go index e46f4348fb4..d7485b7c159 100644 --- a/clients/hydra/go/model_health_not_ready_status.go +++ b/clients/hydra/go/model_health_not_ready_status.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/clients/hydra/go/model_health_status.go b/clients/hydra/go/model_health_status.go index 6f699452a1d..67ff3f3a453 100644 --- a/clients/hydra/go/model_health_status.go +++ b/clients/hydra/go/model_health_status.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/clients/hydra/go/model_o_auth2_token_introspection.go b/clients/hydra/go/model_introspected_o_auth2_token.go similarity index 72% rename from clients/hydra/go/model_o_auth2_token_introspection.go rename to clients/hydra/go/model_introspected_o_auth2_token.go index d47fae933c7..e52a67137af 100644 --- a/clients/hydra/go/model_o_auth2_token_introspection.go +++ b/clients/hydra/go/model_introspected_o_auth2_token.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,8 +15,8 @@ import ( "encoding/json" ) -// OAuth2TokenIntrospection https://tools.ietf.org/html/rfc7662 -type OAuth2TokenIntrospection struct { +// IntrospectedOAuth2Token Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) +type IntrospectedOAuth2Token struct { // 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). Active bool `json:"active"` // Audience contains a list of the token's intended audiences. @@ -46,26 +47,26 @@ type OAuth2TokenIntrospection struct { Username *string `json:"username,omitempty"` } -// NewOAuth2TokenIntrospection instantiates a new OAuth2TokenIntrospection object +// NewIntrospectedOAuth2Token instantiates a new IntrospectedOAuth2Token object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewOAuth2TokenIntrospection(active bool) *OAuth2TokenIntrospection { - this := OAuth2TokenIntrospection{} +func NewIntrospectedOAuth2Token(active bool) *IntrospectedOAuth2Token { + this := IntrospectedOAuth2Token{} this.Active = active return &this } -// NewOAuth2TokenIntrospectionWithDefaults instantiates a new OAuth2TokenIntrospection object +// NewIntrospectedOAuth2TokenWithDefaults instantiates a new IntrospectedOAuth2Token object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewOAuth2TokenIntrospectionWithDefaults() *OAuth2TokenIntrospection { - this := OAuth2TokenIntrospection{} +func NewIntrospectedOAuth2TokenWithDefaults() *IntrospectedOAuth2Token { + this := IntrospectedOAuth2Token{} return &this } // GetActive returns the Active field value -func (o *OAuth2TokenIntrospection) GetActive() bool { +func (o *IntrospectedOAuth2Token) GetActive() bool { if o == nil { var ret bool return ret @@ -76,20 +77,20 @@ func (o *OAuth2TokenIntrospection) GetActive() bool { // GetActiveOk returns a tuple with the Active field value // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetActiveOk() (*bool, bool) { - if o == nil { +func (o *IntrospectedOAuth2Token) GetActiveOk() (*bool, bool) { + if o == nil { return nil, false } return &o.Active, true } // SetActive sets field value -func (o *OAuth2TokenIntrospection) SetActive(v bool) { +func (o *IntrospectedOAuth2Token) SetActive(v bool) { o.Active = v } // GetAud returns the Aud field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetAud() []string { +func (o *IntrospectedOAuth2Token) GetAud() []string { if o == nil || o.Aud == nil { var ret []string return ret @@ -99,7 +100,7 @@ func (o *OAuth2TokenIntrospection) GetAud() []string { // GetAudOk returns a tuple with the Aud field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetAudOk() ([]string, bool) { +func (o *IntrospectedOAuth2Token) GetAudOk() ([]string, bool) { if o == nil || o.Aud == nil { return nil, false } @@ -107,7 +108,7 @@ func (o *OAuth2TokenIntrospection) GetAudOk() ([]string, bool) { } // HasAud returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasAud() bool { +func (o *IntrospectedOAuth2Token) HasAud() bool { if o != nil && o.Aud != nil { return true } @@ -116,12 +117,12 @@ func (o *OAuth2TokenIntrospection) HasAud() bool { } // SetAud gets a reference to the given []string and assigns it to the Aud field. -func (o *OAuth2TokenIntrospection) SetAud(v []string) { +func (o *IntrospectedOAuth2Token) SetAud(v []string) { o.Aud = v } // GetClientId returns the ClientId field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetClientId() string { +func (o *IntrospectedOAuth2Token) GetClientId() string { if o == nil || o.ClientId == nil { var ret string return ret @@ -131,7 +132,7 @@ func (o *OAuth2TokenIntrospection) GetClientId() string { // GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetClientIdOk() (*string, bool) { +func (o *IntrospectedOAuth2Token) GetClientIdOk() (*string, bool) { if o == nil || o.ClientId == nil { return nil, false } @@ -139,7 +140,7 @@ func (o *OAuth2TokenIntrospection) GetClientIdOk() (*string, bool) { } // HasClientId returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasClientId() bool { +func (o *IntrospectedOAuth2Token) HasClientId() bool { if o != nil && o.ClientId != nil { return true } @@ -148,12 +149,12 @@ func (o *OAuth2TokenIntrospection) HasClientId() bool { } // SetClientId gets a reference to the given string and assigns it to the ClientId field. -func (o *OAuth2TokenIntrospection) SetClientId(v string) { +func (o *IntrospectedOAuth2Token) SetClientId(v string) { o.ClientId = &v } // GetExp returns the Exp field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetExp() int64 { +func (o *IntrospectedOAuth2Token) GetExp() int64 { if o == nil || o.Exp == nil { var ret int64 return ret @@ -163,7 +164,7 @@ func (o *OAuth2TokenIntrospection) GetExp() int64 { // GetExpOk returns a tuple with the Exp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetExpOk() (*int64, bool) { +func (o *IntrospectedOAuth2Token) GetExpOk() (*int64, bool) { if o == nil || o.Exp == nil { return nil, false } @@ -171,7 +172,7 @@ func (o *OAuth2TokenIntrospection) GetExpOk() (*int64, bool) { } // HasExp returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasExp() bool { +func (o *IntrospectedOAuth2Token) HasExp() bool { if o != nil && o.Exp != nil { return true } @@ -180,12 +181,12 @@ func (o *OAuth2TokenIntrospection) HasExp() bool { } // SetExp gets a reference to the given int64 and assigns it to the Exp field. -func (o *OAuth2TokenIntrospection) SetExp(v int64) { +func (o *IntrospectedOAuth2Token) SetExp(v int64) { o.Exp = &v } // GetExt returns the Ext field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetExt() map[string]interface{} { +func (o *IntrospectedOAuth2Token) GetExt() map[string]interface{} { if o == nil || o.Ext == nil { var ret map[string]interface{} return ret @@ -195,7 +196,7 @@ func (o *OAuth2TokenIntrospection) GetExt() map[string]interface{} { // GetExtOk returns a tuple with the Ext field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetExtOk() (map[string]interface{}, bool) { +func (o *IntrospectedOAuth2Token) GetExtOk() (map[string]interface{}, bool) { if o == nil || o.Ext == nil { return nil, false } @@ -203,7 +204,7 @@ func (o *OAuth2TokenIntrospection) GetExtOk() (map[string]interface{}, bool) { } // HasExt returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasExt() bool { +func (o *IntrospectedOAuth2Token) HasExt() bool { if o != nil && o.Ext != nil { return true } @@ -212,12 +213,12 @@ func (o *OAuth2TokenIntrospection) HasExt() bool { } // SetExt gets a reference to the given map[string]interface{} and assigns it to the Ext field. -func (o *OAuth2TokenIntrospection) SetExt(v map[string]interface{}) { +func (o *IntrospectedOAuth2Token) SetExt(v map[string]interface{}) { o.Ext = v } // GetIat returns the Iat field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetIat() int64 { +func (o *IntrospectedOAuth2Token) GetIat() int64 { if o == nil || o.Iat == nil { var ret int64 return ret @@ -227,7 +228,7 @@ func (o *OAuth2TokenIntrospection) GetIat() int64 { // GetIatOk returns a tuple with the Iat field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetIatOk() (*int64, bool) { +func (o *IntrospectedOAuth2Token) GetIatOk() (*int64, bool) { if o == nil || o.Iat == nil { return nil, false } @@ -235,7 +236,7 @@ func (o *OAuth2TokenIntrospection) GetIatOk() (*int64, bool) { } // HasIat returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasIat() bool { +func (o *IntrospectedOAuth2Token) HasIat() bool { if o != nil && o.Iat != nil { return true } @@ -244,12 +245,12 @@ func (o *OAuth2TokenIntrospection) HasIat() bool { } // SetIat gets a reference to the given int64 and assigns it to the Iat field. -func (o *OAuth2TokenIntrospection) SetIat(v int64) { +func (o *IntrospectedOAuth2Token) SetIat(v int64) { o.Iat = &v } // GetIss returns the Iss field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetIss() string { +func (o *IntrospectedOAuth2Token) GetIss() string { if o == nil || o.Iss == nil { var ret string return ret @@ -259,7 +260,7 @@ func (o *OAuth2TokenIntrospection) GetIss() string { // GetIssOk returns a tuple with the Iss field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetIssOk() (*string, bool) { +func (o *IntrospectedOAuth2Token) GetIssOk() (*string, bool) { if o == nil || o.Iss == nil { return nil, false } @@ -267,7 +268,7 @@ func (o *OAuth2TokenIntrospection) GetIssOk() (*string, bool) { } // HasIss returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasIss() bool { +func (o *IntrospectedOAuth2Token) HasIss() bool { if o != nil && o.Iss != nil { return true } @@ -276,12 +277,12 @@ func (o *OAuth2TokenIntrospection) HasIss() bool { } // SetIss gets a reference to the given string and assigns it to the Iss field. -func (o *OAuth2TokenIntrospection) SetIss(v string) { +func (o *IntrospectedOAuth2Token) SetIss(v string) { o.Iss = &v } // GetNbf returns the Nbf field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetNbf() int64 { +func (o *IntrospectedOAuth2Token) GetNbf() int64 { if o == nil || o.Nbf == nil { var ret int64 return ret @@ -291,7 +292,7 @@ func (o *OAuth2TokenIntrospection) GetNbf() int64 { // GetNbfOk returns a tuple with the Nbf field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetNbfOk() (*int64, bool) { +func (o *IntrospectedOAuth2Token) GetNbfOk() (*int64, bool) { if o == nil || o.Nbf == nil { return nil, false } @@ -299,7 +300,7 @@ func (o *OAuth2TokenIntrospection) GetNbfOk() (*int64, bool) { } // HasNbf returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasNbf() bool { +func (o *IntrospectedOAuth2Token) HasNbf() bool { if o != nil && o.Nbf != nil { return true } @@ -308,12 +309,12 @@ func (o *OAuth2TokenIntrospection) HasNbf() bool { } // SetNbf gets a reference to the given int64 and assigns it to the Nbf field. -func (o *OAuth2TokenIntrospection) SetNbf(v int64) { +func (o *IntrospectedOAuth2Token) SetNbf(v int64) { o.Nbf = &v } // GetObfuscatedSubject returns the ObfuscatedSubject field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetObfuscatedSubject() string { +func (o *IntrospectedOAuth2Token) GetObfuscatedSubject() string { if o == nil || o.ObfuscatedSubject == nil { var ret string return ret @@ -323,7 +324,7 @@ func (o *OAuth2TokenIntrospection) GetObfuscatedSubject() string { // GetObfuscatedSubjectOk returns a tuple with the ObfuscatedSubject field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetObfuscatedSubjectOk() (*string, bool) { +func (o *IntrospectedOAuth2Token) GetObfuscatedSubjectOk() (*string, bool) { if o == nil || o.ObfuscatedSubject == nil { return nil, false } @@ -331,7 +332,7 @@ func (o *OAuth2TokenIntrospection) GetObfuscatedSubjectOk() (*string, bool) { } // HasObfuscatedSubject returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasObfuscatedSubject() bool { +func (o *IntrospectedOAuth2Token) HasObfuscatedSubject() bool { if o != nil && o.ObfuscatedSubject != nil { return true } @@ -340,12 +341,12 @@ func (o *OAuth2TokenIntrospection) HasObfuscatedSubject() bool { } // SetObfuscatedSubject gets a reference to the given string and assigns it to the ObfuscatedSubject field. -func (o *OAuth2TokenIntrospection) SetObfuscatedSubject(v string) { +func (o *IntrospectedOAuth2Token) SetObfuscatedSubject(v string) { o.ObfuscatedSubject = &v } // GetScope returns the Scope field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetScope() string { +func (o *IntrospectedOAuth2Token) GetScope() string { if o == nil || o.Scope == nil { var ret string return ret @@ -355,7 +356,7 @@ func (o *OAuth2TokenIntrospection) GetScope() string { // GetScopeOk returns a tuple with the Scope field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetScopeOk() (*string, bool) { +func (o *IntrospectedOAuth2Token) GetScopeOk() (*string, bool) { if o == nil || o.Scope == nil { return nil, false } @@ -363,7 +364,7 @@ func (o *OAuth2TokenIntrospection) GetScopeOk() (*string, bool) { } // HasScope returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasScope() bool { +func (o *IntrospectedOAuth2Token) HasScope() bool { if o != nil && o.Scope != nil { return true } @@ -372,12 +373,12 @@ func (o *OAuth2TokenIntrospection) HasScope() bool { } // SetScope gets a reference to the given string and assigns it to the Scope field. -func (o *OAuth2TokenIntrospection) SetScope(v string) { +func (o *IntrospectedOAuth2Token) SetScope(v string) { o.Scope = &v } // GetSub returns the Sub field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetSub() string { +func (o *IntrospectedOAuth2Token) GetSub() string { if o == nil || o.Sub == nil { var ret string return ret @@ -387,7 +388,7 @@ func (o *OAuth2TokenIntrospection) GetSub() string { // GetSubOk returns a tuple with the Sub field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetSubOk() (*string, bool) { +func (o *IntrospectedOAuth2Token) GetSubOk() (*string, bool) { if o == nil || o.Sub == nil { return nil, false } @@ -395,7 +396,7 @@ func (o *OAuth2TokenIntrospection) GetSubOk() (*string, bool) { } // HasSub returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasSub() bool { +func (o *IntrospectedOAuth2Token) HasSub() bool { if o != nil && o.Sub != nil { return true } @@ -404,12 +405,12 @@ func (o *OAuth2TokenIntrospection) HasSub() bool { } // SetSub gets a reference to the given string and assigns it to the Sub field. -func (o *OAuth2TokenIntrospection) SetSub(v string) { +func (o *IntrospectedOAuth2Token) SetSub(v string) { o.Sub = &v } // GetTokenType returns the TokenType field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetTokenType() string { +func (o *IntrospectedOAuth2Token) GetTokenType() string { if o == nil || o.TokenType == nil { var ret string return ret @@ -419,7 +420,7 @@ func (o *OAuth2TokenIntrospection) GetTokenType() string { // GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetTokenTypeOk() (*string, bool) { +func (o *IntrospectedOAuth2Token) GetTokenTypeOk() (*string, bool) { if o == nil || o.TokenType == nil { return nil, false } @@ -427,7 +428,7 @@ func (o *OAuth2TokenIntrospection) GetTokenTypeOk() (*string, bool) { } // HasTokenType returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasTokenType() bool { +func (o *IntrospectedOAuth2Token) HasTokenType() bool { if o != nil && o.TokenType != nil { return true } @@ -436,12 +437,12 @@ func (o *OAuth2TokenIntrospection) HasTokenType() bool { } // SetTokenType gets a reference to the given string and assigns it to the TokenType field. -func (o *OAuth2TokenIntrospection) SetTokenType(v string) { +func (o *IntrospectedOAuth2Token) SetTokenType(v string) { o.TokenType = &v } // GetTokenUse returns the TokenUse field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetTokenUse() string { +func (o *IntrospectedOAuth2Token) GetTokenUse() string { if o == nil || o.TokenUse == nil { var ret string return ret @@ -451,7 +452,7 @@ func (o *OAuth2TokenIntrospection) GetTokenUse() string { // GetTokenUseOk returns a tuple with the TokenUse field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetTokenUseOk() (*string, bool) { +func (o *IntrospectedOAuth2Token) GetTokenUseOk() (*string, bool) { if o == nil || o.TokenUse == nil { return nil, false } @@ -459,7 +460,7 @@ func (o *OAuth2TokenIntrospection) GetTokenUseOk() (*string, bool) { } // HasTokenUse returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasTokenUse() bool { +func (o *IntrospectedOAuth2Token) HasTokenUse() bool { if o != nil && o.TokenUse != nil { return true } @@ -468,12 +469,12 @@ func (o *OAuth2TokenIntrospection) HasTokenUse() bool { } // SetTokenUse gets a reference to the given string and assigns it to the TokenUse field. -func (o *OAuth2TokenIntrospection) SetTokenUse(v string) { +func (o *IntrospectedOAuth2Token) SetTokenUse(v string) { o.TokenUse = &v } // GetUsername returns the Username field value if set, zero value otherwise. -func (o *OAuth2TokenIntrospection) GetUsername() string { +func (o *IntrospectedOAuth2Token) GetUsername() string { if o == nil || o.Username == nil { var ret string return ret @@ -483,7 +484,7 @@ func (o *OAuth2TokenIntrospection) GetUsername() string { // GetUsernameOk returns a tuple with the Username field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2TokenIntrospection) GetUsernameOk() (*string, bool) { +func (o *IntrospectedOAuth2Token) GetUsernameOk() (*string, bool) { if o == nil || o.Username == nil { return nil, false } @@ -491,7 +492,7 @@ func (o *OAuth2TokenIntrospection) GetUsernameOk() (*string, bool) { } // HasUsername returns a boolean if a field has been set. -func (o *OAuth2TokenIntrospection) HasUsername() bool { +func (o *IntrospectedOAuth2Token) HasUsername() bool { if o != nil && o.Username != nil { return true } @@ -500,11 +501,11 @@ func (o *OAuth2TokenIntrospection) HasUsername() bool { } // SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *OAuth2TokenIntrospection) SetUsername(v string) { +func (o *IntrospectedOAuth2Token) SetUsername(v string) { o.Username = &v } -func (o OAuth2TokenIntrospection) MarshalJSON() ([]byte, error) { +func (o IntrospectedOAuth2Token) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["active"] = o.Active @@ -551,38 +552,38 @@ func (o OAuth2TokenIntrospection) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableOAuth2TokenIntrospection struct { - value *OAuth2TokenIntrospection +type NullableIntrospectedOAuth2Token struct { + value *IntrospectedOAuth2Token isSet bool } -func (v NullableOAuth2TokenIntrospection) Get() *OAuth2TokenIntrospection { +func (v NullableIntrospectedOAuth2Token) Get() *IntrospectedOAuth2Token { return v.value } -func (v *NullableOAuth2TokenIntrospection) Set(val *OAuth2TokenIntrospection) { +func (v *NullableIntrospectedOAuth2Token) Set(val *IntrospectedOAuth2Token) { v.value = val v.isSet = true } -func (v NullableOAuth2TokenIntrospection) IsSet() bool { +func (v NullableIntrospectedOAuth2Token) IsSet() bool { return v.isSet } -func (v *NullableOAuth2TokenIntrospection) Unset() { +func (v *NullableIntrospectedOAuth2Token) Unset() { v.value = nil v.isSet = false } -func NewNullableOAuth2TokenIntrospection(val *OAuth2TokenIntrospection) *NullableOAuth2TokenIntrospection { - return &NullableOAuth2TokenIntrospection{value: val, isSet: true} +func NewNullableIntrospectedOAuth2Token(val *IntrospectedOAuth2Token) *NullableIntrospectedOAuth2Token { + return &NullableIntrospectedOAuth2Token{value: val, isSet: true} } -func (v NullableOAuth2TokenIntrospection) MarshalJSON() ([]byte, error) { +func (v NullableIntrospectedOAuth2Token) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableOAuth2TokenIntrospection) UnmarshalJSON(src []byte) error { +func (v *NullableIntrospectedOAuth2Token) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_is_ready_200_response.go b/clients/hydra/go/model_is_ready_200_response.go new file mode 100644 index 00000000000..36ac5fab8bb --- /dev/null +++ b/clients/hydra/go/model_is_ready_200_response.go @@ -0,0 +1,117 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// IsReady200Response struct for IsReady200Response +type IsReady200Response struct { + // Always \"ok\". + Status *string `json:"status,omitempty"` +} + +// NewIsReady200Response instantiates a new IsReady200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIsReady200Response() *IsReady200Response { + this := IsReady200Response{} + return &this +} + +// NewIsReady200ResponseWithDefaults instantiates a new IsReady200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIsReady200ResponseWithDefaults() *IsReady200Response { + this := IsReady200Response{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *IsReady200Response) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IsReady200Response) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *IsReady200Response) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *IsReady200Response) SetStatus(v string) { + o.Status = &v +} + +func (o IsReady200Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + +type NullableIsReady200Response struct { + value *IsReady200Response + isSet bool +} + +func (v NullableIsReady200Response) Get() *IsReady200Response { + return v.value +} + +func (v *NullableIsReady200Response) Set(val *IsReady200Response) { + v.value = val + v.isSet = true +} + +func (v NullableIsReady200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableIsReady200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIsReady200Response(val *IsReady200Response) *NullableIsReady200Response { + return &NullableIsReady200Response{value: val, isSet: true} +} + +func (v NullableIsReady200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIsReady200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_is_ready_503_response.go b/clients/hydra/go/model_is_ready_503_response.go new file mode 100644 index 00000000000..17fa36701f3 --- /dev/null +++ b/clients/hydra/go/model_is_ready_503_response.go @@ -0,0 +1,117 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// IsReady503Response struct for IsReady503Response +type IsReady503Response struct { + // Errors contains a list of errors that caused the not ready status. + Errors *map[string]string `json:"errors,omitempty"` +} + +// NewIsReady503Response instantiates a new IsReady503Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIsReady503Response() *IsReady503Response { + this := IsReady503Response{} + return &this +} + +// NewIsReady503ResponseWithDefaults instantiates a new IsReady503Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIsReady503ResponseWithDefaults() *IsReady503Response { + this := IsReady503Response{} + return &this +} + +// GetErrors returns the Errors field value if set, zero value otherwise. +func (o *IsReady503Response) GetErrors() map[string]string { + if o == nil || o.Errors == nil { + var ret map[string]string + return ret + } + return *o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IsReady503Response) GetErrorsOk() (*map[string]string, bool) { + if o == nil || o.Errors == nil { + return nil, false + } + return o.Errors, true +} + +// HasErrors returns a boolean if a field has been set. +func (o *IsReady503Response) HasErrors() bool { + if o != nil && o.Errors != nil { + return true + } + + return false +} + +// SetErrors gets a reference to the given map[string]string and assigns it to the Errors field. +func (o *IsReady503Response) SetErrors(v map[string]string) { + o.Errors = &v +} + +func (o IsReady503Response) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Errors != nil { + toSerialize["errors"] = o.Errors + } + return json.Marshal(toSerialize) +} + +type NullableIsReady503Response struct { + value *IsReady503Response + isSet bool +} + +func (v NullableIsReady503Response) Get() *IsReady503Response { + return v.value +} + +func (v *NullableIsReady503Response) Set(val *IsReady503Response) { + v.value = val + v.isSet = true +} + +func (v NullableIsReady503Response) IsSet() bool { + return v.isSet +} + +func (v *NullableIsReady503Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIsReady503Response(val *IsReady503Response) *NullableIsReady503Response { + return &NullableIsReady503Response{value: val, isSet: true} +} + +func (v NullableIsReady503Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIsReady503Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_patch_document.go b/clients/hydra/go/model_json_patch.go similarity index 52% rename from clients/hydra/go/model_patch_document.go rename to clients/hydra/go/model_json_patch.go index 952115fccf6..c73e985ec6c 100644 --- a/clients/hydra/go/model_patch_document.go +++ b/clients/hydra/go/model_json_patch.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,39 +15,39 @@ import ( "encoding/json" ) -// PatchDocument A JSONPatch document as defined by RFC 6902 -type PatchDocument struct { - // A JSON-pointer +// JsonPatch A JSONPatch document as defined by RFC 6902 +type JsonPatch struct { + // 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). From *string `json:"from,omitempty"` - // The operation to be performed + // The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". Op string `json:"op"` - // A JSON-pointer + // The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). Path string `json:"path"` - // The value to be used within the operations - Value map[string]interface{} `json:"value,omitempty"` + // The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). + Value interface{} `json:"value,omitempty"` } -// NewPatchDocument instantiates a new PatchDocument object +// NewJsonPatch instantiates a new JsonPatch object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPatchDocument(op string, path string) *PatchDocument { - this := PatchDocument{} +func NewJsonPatch(op string, path string) *JsonPatch { + this := JsonPatch{} this.Op = op this.Path = path return &this } -// NewPatchDocumentWithDefaults instantiates a new PatchDocument object +// NewJsonPatchWithDefaults instantiates a new JsonPatch object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewPatchDocumentWithDefaults() *PatchDocument { - this := PatchDocument{} +func NewJsonPatchWithDefaults() *JsonPatch { + this := JsonPatch{} return &this } // GetFrom returns the From field value if set, zero value otherwise. -func (o *PatchDocument) GetFrom() string { +func (o *JsonPatch) GetFrom() string { if o == nil || o.From == nil { var ret string return ret @@ -56,7 +57,7 @@ func (o *PatchDocument) GetFrom() string { // GetFromOk returns a tuple with the From field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchDocument) GetFromOk() (*string, bool) { +func (o *JsonPatch) GetFromOk() (*string, bool) { if o == nil || o.From == nil { return nil, false } @@ -64,7 +65,7 @@ func (o *PatchDocument) GetFromOk() (*string, bool) { } // HasFrom returns a boolean if a field has been set. -func (o *PatchDocument) HasFrom() bool { +func (o *JsonPatch) HasFrom() bool { if o != nil && o.From != nil { return true } @@ -73,12 +74,12 @@ func (o *PatchDocument) HasFrom() bool { } // SetFrom gets a reference to the given string and assigns it to the From field. -func (o *PatchDocument) SetFrom(v string) { +func (o *JsonPatch) SetFrom(v string) { o.From = &v } // GetOp returns the Op field value -func (o *PatchDocument) GetOp() string { +func (o *JsonPatch) GetOp() string { if o == nil { var ret string return ret @@ -89,20 +90,20 @@ func (o *PatchDocument) GetOp() string { // GetOpOk returns a tuple with the Op field value // and a boolean to check if the value has been set. -func (o *PatchDocument) GetOpOk() (*string, bool) { - if o == nil { +func (o *JsonPatch) GetOpOk() (*string, bool) { + if o == nil { return nil, false } return &o.Op, true } // SetOp sets field value -func (o *PatchDocument) SetOp(v string) { +func (o *JsonPatch) SetOp(v string) { o.Op = v } // GetPath returns the Path field value -func (o *PatchDocument) GetPath() string { +func (o *JsonPatch) GetPath() string { if o == nil { var ret string return ret @@ -113,22 +114,22 @@ func (o *PatchDocument) GetPath() string { // GetPathOk returns a tuple with the Path field value // and a boolean to check if the value has been set. -func (o *PatchDocument) GetPathOk() (*string, bool) { - if o == nil { +func (o *JsonPatch) GetPathOk() (*string, bool) { + if o == nil { return nil, false } return &o.Path, true } // SetPath sets field value -func (o *PatchDocument) SetPath(v string) { +func (o *JsonPatch) SetPath(v string) { o.Path = v } -// GetValue returns the Value field value if set, zero value otherwise. -func (o *PatchDocument) GetValue() map[string]interface{} { - if o == nil || o.Value == nil { - var ret map[string]interface{} +// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *JsonPatch) GetValue() interface{} { + if o == nil { + var ret interface{} return ret } return o.Value @@ -136,15 +137,16 @@ func (o *PatchDocument) GetValue() map[string]interface{} { // GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PatchDocument) GetValueOk() (map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *JsonPatch) GetValueOk() (*interface{}, bool) { if o == nil || o.Value == nil { return nil, false } - return o.Value, true + return &o.Value, true } // HasValue returns a boolean if a field has been set. -func (o *PatchDocument) HasValue() bool { +func (o *JsonPatch) HasValue() bool { if o != nil && o.Value != nil { return true } @@ -152,12 +154,12 @@ func (o *PatchDocument) HasValue() bool { return false } -// SetValue gets a reference to the given map[string]interface{} and assigns it to the Value field. -func (o *PatchDocument) SetValue(v map[string]interface{}) { +// SetValue gets a reference to the given interface{} and assigns it to the Value field. +func (o *JsonPatch) SetValue(v interface{}) { o.Value = v } -func (o PatchDocument) MarshalJSON() ([]byte, error) { +func (o JsonPatch) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.From != nil { toSerialize["from"] = o.From @@ -174,38 +176,38 @@ func (o PatchDocument) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullablePatchDocument struct { - value *PatchDocument +type NullableJsonPatch struct { + value *JsonPatch isSet bool } -func (v NullablePatchDocument) Get() *PatchDocument { +func (v NullableJsonPatch) Get() *JsonPatch { return v.value } -func (v *NullablePatchDocument) Set(val *PatchDocument) { +func (v *NullableJsonPatch) Set(val *JsonPatch) { v.value = val v.isSet = true } -func (v NullablePatchDocument) IsSet() bool { +func (v NullableJsonPatch) IsSet() bool { return v.isSet } -func (v *NullablePatchDocument) Unset() { +func (v *NullableJsonPatch) Unset() { v.value = nil v.isSet = false } -func NewNullablePatchDocument(val *PatchDocument) *NullablePatchDocument { - return &NullablePatchDocument{value: val, isSet: true} +func NewNullableJsonPatch(val *JsonPatch) *NullableJsonPatch { + return &NullableJsonPatch{value: val, isSet: true} } -func (v NullablePatchDocument) MarshalJSON() ([]byte, error) { +func (v NullableJsonPatch) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePatchDocument) UnmarshalJSON(src []byte) error { +func (v *NullableJsonPatch) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_json_web_key.go b/clients/hydra/go/model_json_web_key.go index 547ab647aee..bd9734e7bf2 100644 --- a/clients/hydra/go/model_json_web_key.go +++ b/clients/hydra/go/model_json_web_key.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,8 +15,8 @@ import ( "encoding/json" ) -// JSONWebKey It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. -type JSONWebKey struct { +// JsonWebKey struct for JsonWebKey +type JsonWebKey struct { // 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. Alg string `json:"alg"` Crv *string `json:"crv,omitempty"` @@ -40,12 +41,12 @@ type JSONWebKey struct { Y *string `json:"y,omitempty"` } -// NewJSONWebKey instantiates a new JSONWebKey object +// NewJsonWebKey instantiates a new JsonWebKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewJSONWebKey(alg string, kid string, kty string, use string) *JSONWebKey { - this := JSONWebKey{} +func NewJsonWebKey(alg string, kid string, kty string, use string) *JsonWebKey { + this := JsonWebKey{} this.Alg = alg this.Kid = kid this.Kty = kty @@ -53,16 +54,16 @@ func NewJSONWebKey(alg string, kid string, kty string, use string) *JSONWebKey { return &this } -// NewJSONWebKeyWithDefaults instantiates a new JSONWebKey object +// NewJsonWebKeyWithDefaults instantiates a new JsonWebKey object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewJSONWebKeyWithDefaults() *JSONWebKey { - this := JSONWebKey{} +func NewJsonWebKeyWithDefaults() *JsonWebKey { + this := JsonWebKey{} return &this } // GetAlg returns the Alg field value -func (o *JSONWebKey) GetAlg() string { +func (o *JsonWebKey) GetAlg() string { if o == nil { var ret string return ret @@ -73,20 +74,20 @@ func (o *JSONWebKey) GetAlg() string { // GetAlgOk returns a tuple with the Alg field value // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetAlgOk() (*string, bool) { - if o == nil { +func (o *JsonWebKey) GetAlgOk() (*string, bool) { + if o == nil { return nil, false } return &o.Alg, true } // SetAlg sets field value -func (o *JSONWebKey) SetAlg(v string) { +func (o *JsonWebKey) SetAlg(v string) { o.Alg = v } // GetCrv returns the Crv field value if set, zero value otherwise. -func (o *JSONWebKey) GetCrv() string { +func (o *JsonWebKey) GetCrv() string { if o == nil || o.Crv == nil { var ret string return ret @@ -96,7 +97,7 @@ func (o *JSONWebKey) GetCrv() string { // GetCrvOk returns a tuple with the Crv field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetCrvOk() (*string, bool) { +func (o *JsonWebKey) GetCrvOk() (*string, bool) { if o == nil || o.Crv == nil { return nil, false } @@ -104,7 +105,7 @@ func (o *JSONWebKey) GetCrvOk() (*string, bool) { } // HasCrv returns a boolean if a field has been set. -func (o *JSONWebKey) HasCrv() bool { +func (o *JsonWebKey) HasCrv() bool { if o != nil && o.Crv != nil { return true } @@ -113,12 +114,12 @@ func (o *JSONWebKey) HasCrv() bool { } // SetCrv gets a reference to the given string and assigns it to the Crv field. -func (o *JSONWebKey) SetCrv(v string) { +func (o *JsonWebKey) SetCrv(v string) { o.Crv = &v } // GetD returns the D field value if set, zero value otherwise. -func (o *JSONWebKey) GetD() string { +func (o *JsonWebKey) GetD() string { if o == nil || o.D == nil { var ret string return ret @@ -128,7 +129,7 @@ func (o *JSONWebKey) GetD() string { // GetDOk returns a tuple with the D field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetDOk() (*string, bool) { +func (o *JsonWebKey) GetDOk() (*string, bool) { if o == nil || o.D == nil { return nil, false } @@ -136,7 +137,7 @@ func (o *JSONWebKey) GetDOk() (*string, bool) { } // HasD returns a boolean if a field has been set. -func (o *JSONWebKey) HasD() bool { +func (o *JsonWebKey) HasD() bool { if o != nil && o.D != nil { return true } @@ -145,12 +146,12 @@ func (o *JSONWebKey) HasD() bool { } // SetD gets a reference to the given string and assigns it to the D field. -func (o *JSONWebKey) SetD(v string) { +func (o *JsonWebKey) SetD(v string) { o.D = &v } // GetDp returns the Dp field value if set, zero value otherwise. -func (o *JSONWebKey) GetDp() string { +func (o *JsonWebKey) GetDp() string { if o == nil || o.Dp == nil { var ret string return ret @@ -160,7 +161,7 @@ func (o *JSONWebKey) GetDp() string { // GetDpOk returns a tuple with the Dp field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetDpOk() (*string, bool) { +func (o *JsonWebKey) GetDpOk() (*string, bool) { if o == nil || o.Dp == nil { return nil, false } @@ -168,7 +169,7 @@ func (o *JSONWebKey) GetDpOk() (*string, bool) { } // HasDp returns a boolean if a field has been set. -func (o *JSONWebKey) HasDp() bool { +func (o *JsonWebKey) HasDp() bool { if o != nil && o.Dp != nil { return true } @@ -177,12 +178,12 @@ func (o *JSONWebKey) HasDp() bool { } // SetDp gets a reference to the given string and assigns it to the Dp field. -func (o *JSONWebKey) SetDp(v string) { +func (o *JsonWebKey) SetDp(v string) { o.Dp = &v } // GetDq returns the Dq field value if set, zero value otherwise. -func (o *JSONWebKey) GetDq() string { +func (o *JsonWebKey) GetDq() string { if o == nil || o.Dq == nil { var ret string return ret @@ -192,7 +193,7 @@ func (o *JSONWebKey) GetDq() string { // GetDqOk returns a tuple with the Dq field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetDqOk() (*string, bool) { +func (o *JsonWebKey) GetDqOk() (*string, bool) { if o == nil || o.Dq == nil { return nil, false } @@ -200,7 +201,7 @@ func (o *JSONWebKey) GetDqOk() (*string, bool) { } // HasDq returns a boolean if a field has been set. -func (o *JSONWebKey) HasDq() bool { +func (o *JsonWebKey) HasDq() bool { if o != nil && o.Dq != nil { return true } @@ -209,12 +210,12 @@ func (o *JSONWebKey) HasDq() bool { } // SetDq gets a reference to the given string and assigns it to the Dq field. -func (o *JSONWebKey) SetDq(v string) { +func (o *JsonWebKey) SetDq(v string) { o.Dq = &v } // GetE returns the E field value if set, zero value otherwise. -func (o *JSONWebKey) GetE() string { +func (o *JsonWebKey) GetE() string { if o == nil || o.E == nil { var ret string return ret @@ -224,7 +225,7 @@ func (o *JSONWebKey) GetE() string { // GetEOk returns a tuple with the E field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetEOk() (*string, bool) { +func (o *JsonWebKey) GetEOk() (*string, bool) { if o == nil || o.E == nil { return nil, false } @@ -232,7 +233,7 @@ func (o *JSONWebKey) GetEOk() (*string, bool) { } // HasE returns a boolean if a field has been set. -func (o *JSONWebKey) HasE() bool { +func (o *JsonWebKey) HasE() bool { if o != nil && o.E != nil { return true } @@ -241,12 +242,12 @@ func (o *JSONWebKey) HasE() bool { } // SetE gets a reference to the given string and assigns it to the E field. -func (o *JSONWebKey) SetE(v string) { +func (o *JsonWebKey) SetE(v string) { o.E = &v } // GetK returns the K field value if set, zero value otherwise. -func (o *JSONWebKey) GetK() string { +func (o *JsonWebKey) GetK() string { if o == nil || o.K == nil { var ret string return ret @@ -256,7 +257,7 @@ func (o *JSONWebKey) GetK() string { // GetKOk returns a tuple with the K field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetKOk() (*string, bool) { +func (o *JsonWebKey) GetKOk() (*string, bool) { if o == nil || o.K == nil { return nil, false } @@ -264,7 +265,7 @@ func (o *JSONWebKey) GetKOk() (*string, bool) { } // HasK returns a boolean if a field has been set. -func (o *JSONWebKey) HasK() bool { +func (o *JsonWebKey) HasK() bool { if o != nil && o.K != nil { return true } @@ -273,12 +274,12 @@ func (o *JSONWebKey) HasK() bool { } // SetK gets a reference to the given string and assigns it to the K field. -func (o *JSONWebKey) SetK(v string) { +func (o *JsonWebKey) SetK(v string) { o.K = &v } // GetKid returns the Kid field value -func (o *JSONWebKey) GetKid() string { +func (o *JsonWebKey) GetKid() string { if o == nil { var ret string return ret @@ -289,20 +290,20 @@ func (o *JSONWebKey) GetKid() string { // GetKidOk returns a tuple with the Kid field value // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetKidOk() (*string, bool) { - if o == nil { +func (o *JsonWebKey) GetKidOk() (*string, bool) { + if o == nil { return nil, false } return &o.Kid, true } // SetKid sets field value -func (o *JSONWebKey) SetKid(v string) { +func (o *JsonWebKey) SetKid(v string) { o.Kid = v } // GetKty returns the Kty field value -func (o *JSONWebKey) GetKty() string { +func (o *JsonWebKey) GetKty() string { if o == nil { var ret string return ret @@ -313,20 +314,20 @@ func (o *JSONWebKey) GetKty() string { // GetKtyOk returns a tuple with the Kty field value // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetKtyOk() (*string, bool) { - if o == nil { +func (o *JsonWebKey) GetKtyOk() (*string, bool) { + if o == nil { return nil, false } return &o.Kty, true } // SetKty sets field value -func (o *JSONWebKey) SetKty(v string) { +func (o *JsonWebKey) SetKty(v string) { o.Kty = v } // GetN returns the N field value if set, zero value otherwise. -func (o *JSONWebKey) GetN() string { +func (o *JsonWebKey) GetN() string { if o == nil || o.N == nil { var ret string return ret @@ -336,7 +337,7 @@ func (o *JSONWebKey) GetN() string { // GetNOk returns a tuple with the N field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetNOk() (*string, bool) { +func (o *JsonWebKey) GetNOk() (*string, bool) { if o == nil || o.N == nil { return nil, false } @@ -344,7 +345,7 @@ func (o *JSONWebKey) GetNOk() (*string, bool) { } // HasN returns a boolean if a field has been set. -func (o *JSONWebKey) HasN() bool { +func (o *JsonWebKey) HasN() bool { if o != nil && o.N != nil { return true } @@ -353,12 +354,12 @@ func (o *JSONWebKey) HasN() bool { } // SetN gets a reference to the given string and assigns it to the N field. -func (o *JSONWebKey) SetN(v string) { +func (o *JsonWebKey) SetN(v string) { o.N = &v } // GetP returns the P field value if set, zero value otherwise. -func (o *JSONWebKey) GetP() string { +func (o *JsonWebKey) GetP() string { if o == nil || o.P == nil { var ret string return ret @@ -368,7 +369,7 @@ func (o *JSONWebKey) GetP() string { // GetPOk returns a tuple with the P field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetPOk() (*string, bool) { +func (o *JsonWebKey) GetPOk() (*string, bool) { if o == nil || o.P == nil { return nil, false } @@ -376,7 +377,7 @@ func (o *JSONWebKey) GetPOk() (*string, bool) { } // HasP returns a boolean if a field has been set. -func (o *JSONWebKey) HasP() bool { +func (o *JsonWebKey) HasP() bool { if o != nil && o.P != nil { return true } @@ -385,12 +386,12 @@ func (o *JSONWebKey) HasP() bool { } // SetP gets a reference to the given string and assigns it to the P field. -func (o *JSONWebKey) SetP(v string) { +func (o *JsonWebKey) SetP(v string) { o.P = &v } // GetQ returns the Q field value if set, zero value otherwise. -func (o *JSONWebKey) GetQ() string { +func (o *JsonWebKey) GetQ() string { if o == nil || o.Q == nil { var ret string return ret @@ -400,7 +401,7 @@ func (o *JSONWebKey) GetQ() string { // GetQOk returns a tuple with the Q field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetQOk() (*string, bool) { +func (o *JsonWebKey) GetQOk() (*string, bool) { if o == nil || o.Q == nil { return nil, false } @@ -408,7 +409,7 @@ func (o *JSONWebKey) GetQOk() (*string, bool) { } // HasQ returns a boolean if a field has been set. -func (o *JSONWebKey) HasQ() bool { +func (o *JsonWebKey) HasQ() bool { if o != nil && o.Q != nil { return true } @@ -417,12 +418,12 @@ func (o *JSONWebKey) HasQ() bool { } // SetQ gets a reference to the given string and assigns it to the Q field. -func (o *JSONWebKey) SetQ(v string) { +func (o *JsonWebKey) SetQ(v string) { o.Q = &v } // GetQi returns the Qi field value if set, zero value otherwise. -func (o *JSONWebKey) GetQi() string { +func (o *JsonWebKey) GetQi() string { if o == nil || o.Qi == nil { var ret string return ret @@ -432,7 +433,7 @@ func (o *JSONWebKey) GetQi() string { // GetQiOk returns a tuple with the Qi field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetQiOk() (*string, bool) { +func (o *JsonWebKey) GetQiOk() (*string, bool) { if o == nil || o.Qi == nil { return nil, false } @@ -440,7 +441,7 @@ func (o *JSONWebKey) GetQiOk() (*string, bool) { } // HasQi returns a boolean if a field has been set. -func (o *JSONWebKey) HasQi() bool { +func (o *JsonWebKey) HasQi() bool { if o != nil && o.Qi != nil { return true } @@ -449,12 +450,12 @@ func (o *JSONWebKey) HasQi() bool { } // SetQi gets a reference to the given string and assigns it to the Qi field. -func (o *JSONWebKey) SetQi(v string) { +func (o *JsonWebKey) SetQi(v string) { o.Qi = &v } // GetUse returns the Use field value -func (o *JSONWebKey) GetUse() string { +func (o *JsonWebKey) GetUse() string { if o == nil { var ret string return ret @@ -465,20 +466,20 @@ func (o *JSONWebKey) GetUse() string { // GetUseOk returns a tuple with the Use field value // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetUseOk() (*string, bool) { - if o == nil { +func (o *JsonWebKey) GetUseOk() (*string, bool) { + if o == nil { return nil, false } return &o.Use, true } // SetUse sets field value -func (o *JSONWebKey) SetUse(v string) { +func (o *JsonWebKey) SetUse(v string) { o.Use = v } // GetX returns the X field value if set, zero value otherwise. -func (o *JSONWebKey) GetX() string { +func (o *JsonWebKey) GetX() string { if o == nil || o.X == nil { var ret string return ret @@ -488,7 +489,7 @@ func (o *JSONWebKey) GetX() string { // GetXOk returns a tuple with the X field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetXOk() (*string, bool) { +func (o *JsonWebKey) GetXOk() (*string, bool) { if o == nil || o.X == nil { return nil, false } @@ -496,7 +497,7 @@ func (o *JSONWebKey) GetXOk() (*string, bool) { } // HasX returns a boolean if a field has been set. -func (o *JSONWebKey) HasX() bool { +func (o *JsonWebKey) HasX() bool { if o != nil && o.X != nil { return true } @@ -505,12 +506,12 @@ func (o *JSONWebKey) HasX() bool { } // SetX gets a reference to the given string and assigns it to the X field. -func (o *JSONWebKey) SetX(v string) { +func (o *JsonWebKey) SetX(v string) { o.X = &v } // GetX5c returns the X5c field value if set, zero value otherwise. -func (o *JSONWebKey) GetX5c() []string { +func (o *JsonWebKey) GetX5c() []string { if o == nil || o.X5c == nil { var ret []string return ret @@ -520,7 +521,7 @@ func (o *JSONWebKey) GetX5c() []string { // GetX5cOk returns a tuple with the X5c field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetX5cOk() ([]string, bool) { +func (o *JsonWebKey) GetX5cOk() ([]string, bool) { if o == nil || o.X5c == nil { return nil, false } @@ -528,7 +529,7 @@ func (o *JSONWebKey) GetX5cOk() ([]string, bool) { } // HasX5c returns a boolean if a field has been set. -func (o *JSONWebKey) HasX5c() bool { +func (o *JsonWebKey) HasX5c() bool { if o != nil && o.X5c != nil { return true } @@ -537,12 +538,12 @@ func (o *JSONWebKey) HasX5c() bool { } // SetX5c gets a reference to the given []string and assigns it to the X5c field. -func (o *JSONWebKey) SetX5c(v []string) { +func (o *JsonWebKey) SetX5c(v []string) { o.X5c = v } // GetY returns the Y field value if set, zero value otherwise. -func (o *JSONWebKey) GetY() string { +func (o *JsonWebKey) GetY() string { if o == nil || o.Y == nil { var ret string return ret @@ -552,7 +553,7 @@ func (o *JSONWebKey) GetY() string { // GetYOk returns a tuple with the Y field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKey) GetYOk() (*string, bool) { +func (o *JsonWebKey) GetYOk() (*string, bool) { if o == nil || o.Y == nil { return nil, false } @@ -560,7 +561,7 @@ func (o *JSONWebKey) GetYOk() (*string, bool) { } // HasY returns a boolean if a field has been set. -func (o *JSONWebKey) HasY() bool { +func (o *JsonWebKey) HasY() bool { if o != nil && o.Y != nil { return true } @@ -569,11 +570,11 @@ func (o *JSONWebKey) HasY() bool { } // SetY gets a reference to the given string and assigns it to the Y field. -func (o *JSONWebKey) SetY(v string) { +func (o *JsonWebKey) SetY(v string) { o.Y = &v } -func (o JSONWebKey) MarshalJSON() ([]byte, error) { +func (o JsonWebKey) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["alg"] = o.Alg @@ -629,38 +630,38 @@ func (o JSONWebKey) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableJSONWebKey struct { - value *JSONWebKey +type NullableJsonWebKey struct { + value *JsonWebKey isSet bool } -func (v NullableJSONWebKey) Get() *JSONWebKey { +func (v NullableJsonWebKey) Get() *JsonWebKey { return v.value } -func (v *NullableJSONWebKey) Set(val *JSONWebKey) { +func (v *NullableJsonWebKey) Set(val *JsonWebKey) { v.value = val v.isSet = true } -func (v NullableJSONWebKey) IsSet() bool { +func (v NullableJsonWebKey) IsSet() bool { return v.isSet } -func (v *NullableJSONWebKey) Unset() { +func (v *NullableJsonWebKey) Unset() { v.value = nil v.isSet = false } -func NewNullableJSONWebKey(val *JSONWebKey) *NullableJSONWebKey { - return &NullableJSONWebKey{value: val, isSet: true} +func NewNullableJsonWebKey(val *JsonWebKey) *NullableJsonWebKey { + return &NullableJsonWebKey{value: val, isSet: true} } -func (v NullableJSONWebKey) MarshalJSON() ([]byte, error) { +func (v NullableJsonWebKey) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableJSONWebKey) UnmarshalJSON(src []byte) error { +func (v *NullableJsonWebKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_json_web_key_set.go b/clients/hydra/go/model_json_web_key_set.go index 84f93f34308..7c1ec04d65b 100644 --- a/clients/hydra/go/model_json_web_key_set.go +++ b/clients/hydra/go/model_json_web_key_set.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,33 +15,33 @@ import ( "encoding/json" ) -// JSONWebKeySet It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. -type JSONWebKeySet struct { - // The value of the \"keys\" parameter is an array of 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. - Keys []JSONWebKey `json:"keys,omitempty"` +// JsonWebKeySet JSON Web Key Set +type JsonWebKeySet struct { + // 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. + Keys []JsonWebKey `json:"keys,omitempty"` } -// NewJSONWebKeySet instantiates a new JSONWebKeySet object +// NewJsonWebKeySet instantiates a new JsonWebKeySet object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewJSONWebKeySet() *JSONWebKeySet { - this := JSONWebKeySet{} +func NewJsonWebKeySet() *JsonWebKeySet { + this := JsonWebKeySet{} return &this } -// NewJSONWebKeySetWithDefaults instantiates a new JSONWebKeySet object +// NewJsonWebKeySetWithDefaults instantiates a new JsonWebKeySet object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewJSONWebKeySetWithDefaults() *JSONWebKeySet { - this := JSONWebKeySet{} +func NewJsonWebKeySetWithDefaults() *JsonWebKeySet { + this := JsonWebKeySet{} return &this } // GetKeys returns the Keys field value if set, zero value otherwise. -func (o *JSONWebKeySet) GetKeys() []JSONWebKey { +func (o *JsonWebKeySet) GetKeys() []JsonWebKey { if o == nil || o.Keys == nil { - var ret []JSONWebKey + var ret []JsonWebKey return ret } return o.Keys @@ -48,7 +49,7 @@ func (o *JSONWebKeySet) GetKeys() []JSONWebKey { // GetKeysOk returns a tuple with the Keys field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *JSONWebKeySet) GetKeysOk() ([]JSONWebKey, bool) { +func (o *JsonWebKeySet) GetKeysOk() ([]JsonWebKey, bool) { if o == nil || o.Keys == nil { return nil, false } @@ -56,7 +57,7 @@ func (o *JSONWebKeySet) GetKeysOk() ([]JSONWebKey, bool) { } // HasKeys returns a boolean if a field has been set. -func (o *JSONWebKeySet) HasKeys() bool { +func (o *JsonWebKeySet) HasKeys() bool { if o != nil && o.Keys != nil { return true } @@ -64,12 +65,12 @@ func (o *JSONWebKeySet) HasKeys() bool { return false } -// SetKeys gets a reference to the given []JSONWebKey and assigns it to the Keys field. -func (o *JSONWebKeySet) SetKeys(v []JSONWebKey) { +// SetKeys gets a reference to the given []JsonWebKey and assigns it to the Keys field. +func (o *JsonWebKeySet) SetKeys(v []JsonWebKey) { o.Keys = v } -func (o JSONWebKeySet) MarshalJSON() ([]byte, error) { +func (o JsonWebKeySet) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Keys != nil { toSerialize["keys"] = o.Keys @@ -77,38 +78,38 @@ func (o JSONWebKeySet) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableJSONWebKeySet struct { - value *JSONWebKeySet +type NullableJsonWebKeySet struct { + value *JsonWebKeySet isSet bool } -func (v NullableJSONWebKeySet) Get() *JSONWebKeySet { +func (v NullableJsonWebKeySet) Get() *JsonWebKeySet { return v.value } -func (v *NullableJSONWebKeySet) Set(val *JSONWebKeySet) { +func (v *NullableJsonWebKeySet) Set(val *JsonWebKeySet) { v.value = val v.isSet = true } -func (v NullableJSONWebKeySet) IsSet() bool { +func (v NullableJsonWebKeySet) IsSet() bool { return v.isSet } -func (v *NullableJSONWebKeySet) Unset() { +func (v *NullableJsonWebKeySet) Unset() { v.value = nil v.isSet = false } -func NewNullableJSONWebKeySet(val *JSONWebKeySet) *NullableJSONWebKeySet { - return &NullableJSONWebKeySet{value: val, isSet: true} +func NewNullableJsonWebKeySet(val *JsonWebKeySet) *NullableJsonWebKeySet { + return &NullableJsonWebKeySet{value: val, isSet: true} } -func (v NullableJSONWebKeySet) MarshalJSON() ([]byte, error) { +func (v NullableJsonWebKeySet) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableJSONWebKeySet) UnmarshalJSON(src []byte) error { +func (v *NullableJsonWebKeySet) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_json_web_key_set_generator_request.go b/clients/hydra/go/model_json_web_key_set_generator_request.go deleted file mode 100644 index bd119d1851d..00000000000 --- a/clients/hydra/go/model_json_web_key_set_generator_request.go +++ /dev/null @@ -1,169 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// JsonWebKeySetGeneratorRequest struct for JsonWebKeySetGeneratorRequest -type JsonWebKeySetGeneratorRequest struct { - // The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" - Alg string `json:"alg"` - // The kid of the key to be created - Kid string `json:"kid"` - // 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\". - Use string `json:"use"` -} - -// NewJsonWebKeySetGeneratorRequest instantiates a new JsonWebKeySetGeneratorRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJsonWebKeySetGeneratorRequest(alg string, kid string, use string) *JsonWebKeySetGeneratorRequest { - this := JsonWebKeySetGeneratorRequest{} - this.Alg = alg - this.Kid = kid - this.Use = use - return &this -} - -// NewJsonWebKeySetGeneratorRequestWithDefaults instantiates a new JsonWebKeySetGeneratorRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJsonWebKeySetGeneratorRequestWithDefaults() *JsonWebKeySetGeneratorRequest { - this := JsonWebKeySetGeneratorRequest{} - return &this -} - -// GetAlg returns the Alg field value -func (o *JsonWebKeySetGeneratorRequest) GetAlg() string { - if o == nil { - var ret string - return ret - } - - return o.Alg -} - -// GetAlgOk returns a tuple with the Alg field value -// and a boolean to check if the value has been set. -func (o *JsonWebKeySetGeneratorRequest) GetAlgOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Alg, true -} - -// SetAlg sets field value -func (o *JsonWebKeySetGeneratorRequest) SetAlg(v string) { - o.Alg = v -} - -// GetKid returns the Kid field value -func (o *JsonWebKeySetGeneratorRequest) GetKid() string { - if o == nil { - var ret string - return ret - } - - return o.Kid -} - -// GetKidOk returns a tuple with the Kid field value -// and a boolean to check if the value has been set. -func (o *JsonWebKeySetGeneratorRequest) GetKidOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Kid, true -} - -// SetKid sets field value -func (o *JsonWebKeySetGeneratorRequest) SetKid(v string) { - o.Kid = v -} - -// GetUse returns the Use field value -func (o *JsonWebKeySetGeneratorRequest) GetUse() string { - if o == nil { - var ret string - return ret - } - - return o.Use -} - -// GetUseOk returns a tuple with the Use field value -// and a boolean to check if the value has been set. -func (o *JsonWebKeySetGeneratorRequest) GetUseOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Use, true -} - -// SetUse sets field value -func (o *JsonWebKeySetGeneratorRequest) SetUse(v string) { - o.Use = v -} - -func (o JsonWebKeySetGeneratorRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["alg"] = o.Alg - } - if true { - toSerialize["kid"] = o.Kid - } - if true { - toSerialize["use"] = o.Use - } - return json.Marshal(toSerialize) -} - -type NullableJsonWebKeySetGeneratorRequest struct { - value *JsonWebKeySetGeneratorRequest - isSet bool -} - -func (v NullableJsonWebKeySetGeneratorRequest) Get() *JsonWebKeySetGeneratorRequest { - return v.value -} - -func (v *NullableJsonWebKeySetGeneratorRequest) Set(val *JsonWebKeySetGeneratorRequest) { - v.value = val - v.isSet = true -} - -func (v NullableJsonWebKeySetGeneratorRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableJsonWebKeySetGeneratorRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJsonWebKeySetGeneratorRequest(val *JsonWebKeySetGeneratorRequest) *NullableJsonWebKeySetGeneratorRequest { - return &NullableJsonWebKeySetGeneratorRequest{value: val, isSet: true} -} - -func (v NullableJsonWebKeySetGeneratorRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJsonWebKeySetGeneratorRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_o_auth2_client.go b/clients/hydra/go/model_o_auth2_client.go index 9daf47d54b5..173a360cd91 100644 --- a/clients/hydra/go/model_o_auth2_client.go +++ b/clients/hydra/go/model_o_auth2_client.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,67 +16,88 @@ import ( "time" ) -// OAuth2Client struct for OAuth2Client +// 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. type OAuth2Client struct { AllowedCorsOrigins []string `json:"allowed_cors_origins,omitempty"` Audience []string `json:"audience,omitempty"` - // 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. + // Specify a time duration in milliseconds, seconds, minutes, hours. + AuthorizationCodeGrantAccessTokenLifespan *string `json:"authorization_code_grant_access_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + AuthorizationCodeGrantIdTokenLifespan *string `json:"authorization_code_grant_id_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + AuthorizationCodeGrantRefreshTokenLifespan *string `json:"authorization_code_grant_refresh_token_lifespan,omitempty"` + // 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. BackchannelLogoutSessionRequired *bool `json:"backchannel_logout_session_required,omitempty"` - // RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + // 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. BackchannelLogoutUri *string `json:"backchannel_logout_uri,omitempty"` - // ID is the id for this client. + // Specify a time duration in milliseconds, seconds, minutes, hours. + ClientCredentialsGrantAccessTokenLifespan *string `json:"client_credentials_grant_access_token_lifespan,omitempty"` + // OAuth 2.0 Client ID The ID is autogenerated and immutable. ClientId *string `json:"client_id,omitempty"` - // Name is the human-readable string name of the client to be presented to the end-user during authorization. + // OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. ClientName *string `json:"client_name,omitempty"` - // Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. + // 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. ClientSecret *string `json:"client_secret,omitempty"` - // SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. + // OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. ClientSecretExpiresAt *int64 `json:"client_secret_expires_at,omitempty"` - // ClientURI is an 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. + // 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. ClientUri *string `json:"client_uri,omitempty"` Contacts []string `json:"contacts,omitempty"` - // CreatedAt returns the timestamp of the client's creation. + // OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. CreatedAt *time.Time `json:"created_at,omitempty"` - // 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. + // 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. FrontchannelLogoutSessionRequired *bool `json:"frontchannel_logout_session_required,omitempty"` - // 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. + // 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. FrontchannelLogoutUri *string `json:"frontchannel_logout_uri,omitempty"` GrantTypes []string `json:"grant_types,omitempty"` - Jwks map[string]interface{} `json:"jwks,omitempty"` - // 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. + // Specify a time duration in milliseconds, seconds, minutes, hours. + ImplicitGrantAccessTokenLifespan *string `json:"implicit_grant_access_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + ImplicitGrantIdTokenLifespan *string `json:"implicit_grant_id_token_lifespan,omitempty"` + // 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 interface{} `json:"jwks,omitempty"` + // 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. JwksUri *string `json:"jwks_uri,omitempty"` - // LogoURI is an URL string that references a logo for the client. + // Specify a time duration in milliseconds, seconds, minutes, hours. + JwtBearerGrantAccessTokenLifespan *string `json:"jwt_bearer_grant_access_token_lifespan,omitempty"` + // OAuth 2.0 Client Logo URI A URL string referencing the client's logo. LogoUri *string `json:"logo_uri,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - // Owner is a string identifying the owner of the OAuth 2.0 Client. + Metadata interface{} `json:"metadata,omitempty"` + // OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. Owner *string `json:"owner,omitempty"` - // 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. + // 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. PolicyUri *string `json:"policy_uri,omitempty"` PostLogoutRedirectUris []string `json:"post_logout_redirect_uris,omitempty"` RedirectUris []string `json:"redirect_uris,omitempty"` - // RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. + // Specify a time duration in milliseconds, seconds, minutes, hours. + RefreshTokenGrantAccessTokenLifespan *string `json:"refresh_token_grant_access_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + RefreshTokenGrantIdTokenLifespan *string `json:"refresh_token_grant_id_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + RefreshTokenGrantRefreshTokenLifespan *string `json:"refresh_token_grant_refresh_token_lifespan,omitempty"` + // 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. RegistrationAccessToken *string `json:"registration_access_token,omitempty"` - // RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + // OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. RegistrationClientUri *string `json:"registration_client_uri,omitempty"` - // 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. + // 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. RequestObjectSigningAlg *string `json:"request_object_signing_alg,omitempty"` RequestUris []string `json:"request_uris,omitempty"` ResponseTypes []string `json:"response_types,omitempty"` - // 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. Scope *string `json:"scope,omitempty"` - // 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. + // 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. SectorIdentifierUri *string `json:"sector_identifier_uri,omitempty"` - // SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + // 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`. SubjectType *string `json:"subject_type,omitempty"` - // Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. + // OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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. TokenEndpointAuthMethod *string `json:"token_endpoint_auth_method,omitempty"` - // Requested Client Authentication signing algorithm for the Token Endpoint. + // OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. TokenEndpointAuthSigningAlg *string `json:"token_endpoint_auth_signing_alg,omitempty"` - // TermsOfServiceURI is a URL string that points 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 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. TosUri *string `json:"tos_uri,omitempty"` - // UpdatedAt returns the timestamp of the last update. + // OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. UpdatedAt *time.Time `json:"updated_at,omitempty"` - // 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. + // 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. UserinfoSignedResponseAlg *string `json:"userinfo_signed_response_alg,omitempty"` } @@ -160,6 +182,102 @@ func (o *OAuth2Client) SetAudience(v []string) { o.Audience = v } +// GetAuthorizationCodeGrantAccessTokenLifespan returns the AuthorizationCodeGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetAuthorizationCodeGrantAccessTokenLifespan() string { + if o == nil || o.AuthorizationCodeGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.AuthorizationCodeGrantAccessTokenLifespan +} + +// GetAuthorizationCodeGrantAccessTokenLifespanOk returns a tuple with the AuthorizationCodeGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetAuthorizationCodeGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.AuthorizationCodeGrantAccessTokenLifespan == nil { + return nil, false + } + return o.AuthorizationCodeGrantAccessTokenLifespan, true +} + +// HasAuthorizationCodeGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasAuthorizationCodeGrantAccessTokenLifespan() bool { + if o != nil && o.AuthorizationCodeGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetAuthorizationCodeGrantAccessTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantAccessTokenLifespan field. +func (o *OAuth2Client) SetAuthorizationCodeGrantAccessTokenLifespan(v string) { + o.AuthorizationCodeGrantAccessTokenLifespan = &v +} + +// GetAuthorizationCodeGrantIdTokenLifespan returns the AuthorizationCodeGrantIdTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetAuthorizationCodeGrantIdTokenLifespan() string { + if o == nil || o.AuthorizationCodeGrantIdTokenLifespan == nil { + var ret string + return ret + } + return *o.AuthorizationCodeGrantIdTokenLifespan +} + +// GetAuthorizationCodeGrantIdTokenLifespanOk returns a tuple with the AuthorizationCodeGrantIdTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetAuthorizationCodeGrantIdTokenLifespanOk() (*string, bool) { + if o == nil || o.AuthorizationCodeGrantIdTokenLifespan == nil { + return nil, false + } + return o.AuthorizationCodeGrantIdTokenLifespan, true +} + +// HasAuthorizationCodeGrantIdTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasAuthorizationCodeGrantIdTokenLifespan() bool { + if o != nil && o.AuthorizationCodeGrantIdTokenLifespan != nil { + return true + } + + return false +} + +// SetAuthorizationCodeGrantIdTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantIdTokenLifespan field. +func (o *OAuth2Client) SetAuthorizationCodeGrantIdTokenLifespan(v string) { + o.AuthorizationCodeGrantIdTokenLifespan = &v +} + +// GetAuthorizationCodeGrantRefreshTokenLifespan returns the AuthorizationCodeGrantRefreshTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetAuthorizationCodeGrantRefreshTokenLifespan() string { + if o == nil || o.AuthorizationCodeGrantRefreshTokenLifespan == nil { + var ret string + return ret + } + return *o.AuthorizationCodeGrantRefreshTokenLifespan +} + +// GetAuthorizationCodeGrantRefreshTokenLifespanOk returns a tuple with the AuthorizationCodeGrantRefreshTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetAuthorizationCodeGrantRefreshTokenLifespanOk() (*string, bool) { + if o == nil || o.AuthorizationCodeGrantRefreshTokenLifespan == nil { + return nil, false + } + return o.AuthorizationCodeGrantRefreshTokenLifespan, true +} + +// HasAuthorizationCodeGrantRefreshTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasAuthorizationCodeGrantRefreshTokenLifespan() bool { + if o != nil && o.AuthorizationCodeGrantRefreshTokenLifespan != nil { + return true + } + + return false +} + +// SetAuthorizationCodeGrantRefreshTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantRefreshTokenLifespan field. +func (o *OAuth2Client) SetAuthorizationCodeGrantRefreshTokenLifespan(v string) { + o.AuthorizationCodeGrantRefreshTokenLifespan = &v +} + // GetBackchannelLogoutSessionRequired returns the BackchannelLogoutSessionRequired field value if set, zero value otherwise. func (o *OAuth2Client) GetBackchannelLogoutSessionRequired() bool { if o == nil || o.BackchannelLogoutSessionRequired == nil { @@ -224,6 +342,38 @@ func (o *OAuth2Client) SetBackchannelLogoutUri(v string) { o.BackchannelLogoutUri = &v } +// GetClientCredentialsGrantAccessTokenLifespan returns the ClientCredentialsGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetClientCredentialsGrantAccessTokenLifespan() string { + if o == nil || o.ClientCredentialsGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.ClientCredentialsGrantAccessTokenLifespan +} + +// GetClientCredentialsGrantAccessTokenLifespanOk returns a tuple with the ClientCredentialsGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetClientCredentialsGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.ClientCredentialsGrantAccessTokenLifespan == nil { + return nil, false + } + return o.ClientCredentialsGrantAccessTokenLifespan, true +} + +// HasClientCredentialsGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasClientCredentialsGrantAccessTokenLifespan() bool { + if o != nil && o.ClientCredentialsGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetClientCredentialsGrantAccessTokenLifespan gets a reference to the given string and assigns it to the ClientCredentialsGrantAccessTokenLifespan field. +func (o *OAuth2Client) SetClientCredentialsGrantAccessTokenLifespan(v string) { + o.ClientCredentialsGrantAccessTokenLifespan = &v +} + // GetClientId returns the ClientId field value if set, zero value otherwise. func (o *OAuth2Client) GetClientId() string { if o == nil || o.ClientId == nil { @@ -544,10 +694,74 @@ func (o *OAuth2Client) SetGrantTypes(v []string) { o.GrantTypes = v } -// GetJwks returns the Jwks field value if set, zero value otherwise. -func (o *OAuth2Client) GetJwks() map[string]interface{} { - if o == nil || o.Jwks == nil { - var ret map[string]interface{} +// GetImplicitGrantAccessTokenLifespan returns the ImplicitGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetImplicitGrantAccessTokenLifespan() string { + if o == nil || o.ImplicitGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.ImplicitGrantAccessTokenLifespan +} + +// GetImplicitGrantAccessTokenLifespanOk returns a tuple with the ImplicitGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetImplicitGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.ImplicitGrantAccessTokenLifespan == nil { + return nil, false + } + return o.ImplicitGrantAccessTokenLifespan, true +} + +// HasImplicitGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasImplicitGrantAccessTokenLifespan() bool { + if o != nil && o.ImplicitGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetImplicitGrantAccessTokenLifespan gets a reference to the given string and assigns it to the ImplicitGrantAccessTokenLifespan field. +func (o *OAuth2Client) SetImplicitGrantAccessTokenLifespan(v string) { + o.ImplicitGrantAccessTokenLifespan = &v +} + +// GetImplicitGrantIdTokenLifespan returns the ImplicitGrantIdTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetImplicitGrantIdTokenLifespan() string { + if o == nil || o.ImplicitGrantIdTokenLifespan == nil { + var ret string + return ret + } + return *o.ImplicitGrantIdTokenLifespan +} + +// GetImplicitGrantIdTokenLifespanOk returns a tuple with the ImplicitGrantIdTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetImplicitGrantIdTokenLifespanOk() (*string, bool) { + if o == nil || o.ImplicitGrantIdTokenLifespan == nil { + return nil, false + } + return o.ImplicitGrantIdTokenLifespan, true +} + +// HasImplicitGrantIdTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasImplicitGrantIdTokenLifespan() bool { + if o != nil && o.ImplicitGrantIdTokenLifespan != nil { + return true + } + + return false +} + +// SetImplicitGrantIdTokenLifespan gets a reference to the given string and assigns it to the ImplicitGrantIdTokenLifespan field. +func (o *OAuth2Client) SetImplicitGrantIdTokenLifespan(v string) { + o.ImplicitGrantIdTokenLifespan = &v +} + +// GetJwks returns the Jwks field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OAuth2Client) GetJwks() interface{} { + if o == nil { + var ret interface{} return ret } return o.Jwks @@ -555,11 +769,12 @@ func (o *OAuth2Client) GetJwks() map[string]interface{} { // GetJwksOk returns a tuple with the Jwks field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2Client) GetJwksOk() (map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OAuth2Client) GetJwksOk() (*interface{}, bool) { if o == nil || o.Jwks == nil { return nil, false } - return o.Jwks, true + return &o.Jwks, true } // HasJwks returns a boolean if a field has been set. @@ -571,8 +786,8 @@ func (o *OAuth2Client) HasJwks() bool { return false } -// SetJwks gets a reference to the given map[string]interface{} and assigns it to the Jwks field. -func (o *OAuth2Client) SetJwks(v map[string]interface{}) { +// SetJwks gets a reference to the given interface{} and assigns it to the Jwks field. +func (o *OAuth2Client) SetJwks(v interface{}) { o.Jwks = v } @@ -608,6 +823,38 @@ func (o *OAuth2Client) SetJwksUri(v string) { o.JwksUri = &v } +// GetJwtBearerGrantAccessTokenLifespan returns the JwtBearerGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetJwtBearerGrantAccessTokenLifespan() string { + if o == nil || o.JwtBearerGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.JwtBearerGrantAccessTokenLifespan +} + +// GetJwtBearerGrantAccessTokenLifespanOk returns a tuple with the JwtBearerGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetJwtBearerGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.JwtBearerGrantAccessTokenLifespan == nil { + return nil, false + } + return o.JwtBearerGrantAccessTokenLifespan, true +} + +// HasJwtBearerGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasJwtBearerGrantAccessTokenLifespan() bool { + if o != nil && o.JwtBearerGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetJwtBearerGrantAccessTokenLifespan gets a reference to the given string and assigns it to the JwtBearerGrantAccessTokenLifespan field. +func (o *OAuth2Client) SetJwtBearerGrantAccessTokenLifespan(v string) { + o.JwtBearerGrantAccessTokenLifespan = &v +} + // GetLogoUri returns the LogoUri field value if set, zero value otherwise. func (o *OAuth2Client) GetLogoUri() string { if o == nil || o.LogoUri == nil { @@ -640,10 +887,10 @@ func (o *OAuth2Client) SetLogoUri(v string) { o.LogoUri = &v } -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *OAuth2Client) GetMetadata() map[string]interface{} { - if o == nil || o.Metadata == nil { - var ret map[string]interface{} +// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OAuth2Client) GetMetadata() interface{} { + if o == nil { + var ret interface{} return ret } return o.Metadata @@ -651,11 +898,12 @@ func (o *OAuth2Client) GetMetadata() map[string]interface{} { // GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OAuth2Client) GetMetadataOk() (map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OAuth2Client) GetMetadataOk() (*interface{}, bool) { if o == nil || o.Metadata == nil { return nil, false } - return o.Metadata, true + return &o.Metadata, true } // HasMetadata returns a boolean if a field has been set. @@ -667,8 +915,8 @@ func (o *OAuth2Client) HasMetadata() bool { return false } -// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. -func (o *OAuth2Client) SetMetadata(v map[string]interface{}) { +// SetMetadata gets a reference to the given interface{} and assigns it to the Metadata field. +func (o *OAuth2Client) SetMetadata(v interface{}) { o.Metadata = v } @@ -800,6 +1048,102 @@ func (o *OAuth2Client) SetRedirectUris(v []string) { o.RedirectUris = v } +// GetRefreshTokenGrantAccessTokenLifespan returns the RefreshTokenGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetRefreshTokenGrantAccessTokenLifespan() string { + if o == nil || o.RefreshTokenGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.RefreshTokenGrantAccessTokenLifespan +} + +// GetRefreshTokenGrantAccessTokenLifespanOk returns a tuple with the RefreshTokenGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetRefreshTokenGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.RefreshTokenGrantAccessTokenLifespan == nil { + return nil, false + } + return o.RefreshTokenGrantAccessTokenLifespan, true +} + +// HasRefreshTokenGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasRefreshTokenGrantAccessTokenLifespan() bool { + if o != nil && o.RefreshTokenGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetRefreshTokenGrantAccessTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantAccessTokenLifespan field. +func (o *OAuth2Client) SetRefreshTokenGrantAccessTokenLifespan(v string) { + o.RefreshTokenGrantAccessTokenLifespan = &v +} + +// GetRefreshTokenGrantIdTokenLifespan returns the RefreshTokenGrantIdTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetRefreshTokenGrantIdTokenLifespan() string { + if o == nil || o.RefreshTokenGrantIdTokenLifespan == nil { + var ret string + return ret + } + return *o.RefreshTokenGrantIdTokenLifespan +} + +// GetRefreshTokenGrantIdTokenLifespanOk returns a tuple with the RefreshTokenGrantIdTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetRefreshTokenGrantIdTokenLifespanOk() (*string, bool) { + if o == nil || o.RefreshTokenGrantIdTokenLifespan == nil { + return nil, false + } + return o.RefreshTokenGrantIdTokenLifespan, true +} + +// HasRefreshTokenGrantIdTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasRefreshTokenGrantIdTokenLifespan() bool { + if o != nil && o.RefreshTokenGrantIdTokenLifespan != nil { + return true + } + + return false +} + +// SetRefreshTokenGrantIdTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantIdTokenLifespan field. +func (o *OAuth2Client) SetRefreshTokenGrantIdTokenLifespan(v string) { + o.RefreshTokenGrantIdTokenLifespan = &v +} + +// GetRefreshTokenGrantRefreshTokenLifespan returns the RefreshTokenGrantRefreshTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2Client) GetRefreshTokenGrantRefreshTokenLifespan() string { + if o == nil || o.RefreshTokenGrantRefreshTokenLifespan == nil { + var ret string + return ret + } + return *o.RefreshTokenGrantRefreshTokenLifespan +} + +// GetRefreshTokenGrantRefreshTokenLifespanOk returns a tuple with the RefreshTokenGrantRefreshTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2Client) GetRefreshTokenGrantRefreshTokenLifespanOk() (*string, bool) { + if o == nil || o.RefreshTokenGrantRefreshTokenLifespan == nil { + return nil, false + } + return o.RefreshTokenGrantRefreshTokenLifespan, true +} + +// HasRefreshTokenGrantRefreshTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2Client) HasRefreshTokenGrantRefreshTokenLifespan() bool { + if o != nil && o.RefreshTokenGrantRefreshTokenLifespan != nil { + return true + } + + return false +} + +// SetRefreshTokenGrantRefreshTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantRefreshTokenLifespan field. +func (o *OAuth2Client) SetRefreshTokenGrantRefreshTokenLifespan(v string) { + o.RefreshTokenGrantRefreshTokenLifespan = &v +} + // GetRegistrationAccessToken returns the RegistrationAccessToken field value if set, zero value otherwise. func (o *OAuth2Client) GetRegistrationAccessToken() string { if o == nil || o.RegistrationAccessToken == nil { @@ -1224,12 +1568,24 @@ func (o OAuth2Client) MarshalJSON() ([]byte, error) { if o.Audience != nil { toSerialize["audience"] = o.Audience } + if o.AuthorizationCodeGrantAccessTokenLifespan != nil { + toSerialize["authorization_code_grant_access_token_lifespan"] = o.AuthorizationCodeGrantAccessTokenLifespan + } + if o.AuthorizationCodeGrantIdTokenLifespan != nil { + toSerialize["authorization_code_grant_id_token_lifespan"] = o.AuthorizationCodeGrantIdTokenLifespan + } + if o.AuthorizationCodeGrantRefreshTokenLifespan != nil { + toSerialize["authorization_code_grant_refresh_token_lifespan"] = o.AuthorizationCodeGrantRefreshTokenLifespan + } if o.BackchannelLogoutSessionRequired != nil { toSerialize["backchannel_logout_session_required"] = o.BackchannelLogoutSessionRequired } if o.BackchannelLogoutUri != nil { toSerialize["backchannel_logout_uri"] = o.BackchannelLogoutUri } + if o.ClientCredentialsGrantAccessTokenLifespan != nil { + toSerialize["client_credentials_grant_access_token_lifespan"] = o.ClientCredentialsGrantAccessTokenLifespan + } if o.ClientId != nil { toSerialize["client_id"] = o.ClientId } @@ -1260,12 +1616,21 @@ func (o OAuth2Client) MarshalJSON() ([]byte, error) { if o.GrantTypes != nil { toSerialize["grant_types"] = o.GrantTypes } + if o.ImplicitGrantAccessTokenLifespan != nil { + toSerialize["implicit_grant_access_token_lifespan"] = o.ImplicitGrantAccessTokenLifespan + } + if o.ImplicitGrantIdTokenLifespan != nil { + toSerialize["implicit_grant_id_token_lifespan"] = o.ImplicitGrantIdTokenLifespan + } if o.Jwks != nil { toSerialize["jwks"] = o.Jwks } if o.JwksUri != nil { toSerialize["jwks_uri"] = o.JwksUri } + if o.JwtBearerGrantAccessTokenLifespan != nil { + toSerialize["jwt_bearer_grant_access_token_lifespan"] = o.JwtBearerGrantAccessTokenLifespan + } if o.LogoUri != nil { toSerialize["logo_uri"] = o.LogoUri } @@ -1284,6 +1649,15 @@ func (o OAuth2Client) MarshalJSON() ([]byte, error) { if o.RedirectUris != nil { toSerialize["redirect_uris"] = o.RedirectUris } + if o.RefreshTokenGrantAccessTokenLifespan != nil { + toSerialize["refresh_token_grant_access_token_lifespan"] = o.RefreshTokenGrantAccessTokenLifespan + } + if o.RefreshTokenGrantIdTokenLifespan != nil { + toSerialize["refresh_token_grant_id_token_lifespan"] = o.RefreshTokenGrantIdTokenLifespan + } + if o.RefreshTokenGrantRefreshTokenLifespan != nil { + toSerialize["refresh_token_grant_refresh_token_lifespan"] = o.RefreshTokenGrantRefreshTokenLifespan + } if o.RegistrationAccessToken != nil { toSerialize["registration_access_token"] = o.RegistrationAccessToken } diff --git a/clients/hydra/go/model_o_auth2_client_token_lifespans.go b/clients/hydra/go/model_o_auth2_client_token_lifespans.go new file mode 100644 index 00000000000..37766db1680 --- /dev/null +++ b/clients/hydra/go/model_o_auth2_client_token_lifespans.go @@ -0,0 +1,450 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// OAuth2ClientTokenLifespans Lifespans of different token types issued for this OAuth 2.0 Client. +type OAuth2ClientTokenLifespans struct { + // Specify a time duration in milliseconds, seconds, minutes, hours. + AuthorizationCodeGrantAccessTokenLifespan *string `json:"authorization_code_grant_access_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + AuthorizationCodeGrantIdTokenLifespan *string `json:"authorization_code_grant_id_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + AuthorizationCodeGrantRefreshTokenLifespan *string `json:"authorization_code_grant_refresh_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + ClientCredentialsGrantAccessTokenLifespan *string `json:"client_credentials_grant_access_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + ImplicitGrantAccessTokenLifespan *string `json:"implicit_grant_access_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + ImplicitGrantIdTokenLifespan *string `json:"implicit_grant_id_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + JwtBearerGrantAccessTokenLifespan *string `json:"jwt_bearer_grant_access_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + RefreshTokenGrantAccessTokenLifespan *string `json:"refresh_token_grant_access_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + RefreshTokenGrantIdTokenLifespan *string `json:"refresh_token_grant_id_token_lifespan,omitempty"` + // Specify a time duration in milliseconds, seconds, minutes, hours. + RefreshTokenGrantRefreshTokenLifespan *string `json:"refresh_token_grant_refresh_token_lifespan,omitempty"` +} + +// NewOAuth2ClientTokenLifespans instantiates a new OAuth2ClientTokenLifespans object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOAuth2ClientTokenLifespans() *OAuth2ClientTokenLifespans { + this := OAuth2ClientTokenLifespans{} + return &this +} + +// NewOAuth2ClientTokenLifespansWithDefaults instantiates a new OAuth2ClientTokenLifespans object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOAuth2ClientTokenLifespansWithDefaults() *OAuth2ClientTokenLifespans { + this := OAuth2ClientTokenLifespans{} + return &this +} + +// GetAuthorizationCodeGrantAccessTokenLifespan returns the AuthorizationCodeGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantAccessTokenLifespan() string { + if o == nil || o.AuthorizationCodeGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.AuthorizationCodeGrantAccessTokenLifespan +} + +// GetAuthorizationCodeGrantAccessTokenLifespanOk returns a tuple with the AuthorizationCodeGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.AuthorizationCodeGrantAccessTokenLifespan == nil { + return nil, false + } + return o.AuthorizationCodeGrantAccessTokenLifespan, true +} + +// HasAuthorizationCodeGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasAuthorizationCodeGrantAccessTokenLifespan() bool { + if o != nil && o.AuthorizationCodeGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetAuthorizationCodeGrantAccessTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantAccessTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetAuthorizationCodeGrantAccessTokenLifespan(v string) { + o.AuthorizationCodeGrantAccessTokenLifespan = &v +} + +// GetAuthorizationCodeGrantIdTokenLifespan returns the AuthorizationCodeGrantIdTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantIdTokenLifespan() string { + if o == nil || o.AuthorizationCodeGrantIdTokenLifespan == nil { + var ret string + return ret + } + return *o.AuthorizationCodeGrantIdTokenLifespan +} + +// GetAuthorizationCodeGrantIdTokenLifespanOk returns a tuple with the AuthorizationCodeGrantIdTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantIdTokenLifespanOk() (*string, bool) { + if o == nil || o.AuthorizationCodeGrantIdTokenLifespan == nil { + return nil, false + } + return o.AuthorizationCodeGrantIdTokenLifespan, true +} + +// HasAuthorizationCodeGrantIdTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasAuthorizationCodeGrantIdTokenLifespan() bool { + if o != nil && o.AuthorizationCodeGrantIdTokenLifespan != nil { + return true + } + + return false +} + +// SetAuthorizationCodeGrantIdTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantIdTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetAuthorizationCodeGrantIdTokenLifespan(v string) { + o.AuthorizationCodeGrantIdTokenLifespan = &v +} + +// GetAuthorizationCodeGrantRefreshTokenLifespan returns the AuthorizationCodeGrantRefreshTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantRefreshTokenLifespan() string { + if o == nil || o.AuthorizationCodeGrantRefreshTokenLifespan == nil { + var ret string + return ret + } + return *o.AuthorizationCodeGrantRefreshTokenLifespan +} + +// GetAuthorizationCodeGrantRefreshTokenLifespanOk returns a tuple with the AuthorizationCodeGrantRefreshTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetAuthorizationCodeGrantRefreshTokenLifespanOk() (*string, bool) { + if o == nil || o.AuthorizationCodeGrantRefreshTokenLifespan == nil { + return nil, false + } + return o.AuthorizationCodeGrantRefreshTokenLifespan, true +} + +// HasAuthorizationCodeGrantRefreshTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasAuthorizationCodeGrantRefreshTokenLifespan() bool { + if o != nil && o.AuthorizationCodeGrantRefreshTokenLifespan != nil { + return true + } + + return false +} + +// SetAuthorizationCodeGrantRefreshTokenLifespan gets a reference to the given string and assigns it to the AuthorizationCodeGrantRefreshTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetAuthorizationCodeGrantRefreshTokenLifespan(v string) { + o.AuthorizationCodeGrantRefreshTokenLifespan = &v +} + +// GetClientCredentialsGrantAccessTokenLifespan returns the ClientCredentialsGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetClientCredentialsGrantAccessTokenLifespan() string { + if o == nil || o.ClientCredentialsGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.ClientCredentialsGrantAccessTokenLifespan +} + +// GetClientCredentialsGrantAccessTokenLifespanOk returns a tuple with the ClientCredentialsGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetClientCredentialsGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.ClientCredentialsGrantAccessTokenLifespan == nil { + return nil, false + } + return o.ClientCredentialsGrantAccessTokenLifespan, true +} + +// HasClientCredentialsGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasClientCredentialsGrantAccessTokenLifespan() bool { + if o != nil && o.ClientCredentialsGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetClientCredentialsGrantAccessTokenLifespan gets a reference to the given string and assigns it to the ClientCredentialsGrantAccessTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetClientCredentialsGrantAccessTokenLifespan(v string) { + o.ClientCredentialsGrantAccessTokenLifespan = &v +} + +// GetImplicitGrantAccessTokenLifespan returns the ImplicitGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetImplicitGrantAccessTokenLifespan() string { + if o == nil || o.ImplicitGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.ImplicitGrantAccessTokenLifespan +} + +// GetImplicitGrantAccessTokenLifespanOk returns a tuple with the ImplicitGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetImplicitGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.ImplicitGrantAccessTokenLifespan == nil { + return nil, false + } + return o.ImplicitGrantAccessTokenLifespan, true +} + +// HasImplicitGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasImplicitGrantAccessTokenLifespan() bool { + if o != nil && o.ImplicitGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetImplicitGrantAccessTokenLifespan gets a reference to the given string and assigns it to the ImplicitGrantAccessTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetImplicitGrantAccessTokenLifespan(v string) { + o.ImplicitGrantAccessTokenLifespan = &v +} + +// GetImplicitGrantIdTokenLifespan returns the ImplicitGrantIdTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetImplicitGrantIdTokenLifespan() string { + if o == nil || o.ImplicitGrantIdTokenLifespan == nil { + var ret string + return ret + } + return *o.ImplicitGrantIdTokenLifespan +} + +// GetImplicitGrantIdTokenLifespanOk returns a tuple with the ImplicitGrantIdTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetImplicitGrantIdTokenLifespanOk() (*string, bool) { + if o == nil || o.ImplicitGrantIdTokenLifespan == nil { + return nil, false + } + return o.ImplicitGrantIdTokenLifespan, true +} + +// HasImplicitGrantIdTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasImplicitGrantIdTokenLifespan() bool { + if o != nil && o.ImplicitGrantIdTokenLifespan != nil { + return true + } + + return false +} + +// SetImplicitGrantIdTokenLifespan gets a reference to the given string and assigns it to the ImplicitGrantIdTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetImplicitGrantIdTokenLifespan(v string) { + o.ImplicitGrantIdTokenLifespan = &v +} + +// GetJwtBearerGrantAccessTokenLifespan returns the JwtBearerGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetJwtBearerGrantAccessTokenLifespan() string { + if o == nil || o.JwtBearerGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.JwtBearerGrantAccessTokenLifespan +} + +// GetJwtBearerGrantAccessTokenLifespanOk returns a tuple with the JwtBearerGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetJwtBearerGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.JwtBearerGrantAccessTokenLifespan == nil { + return nil, false + } + return o.JwtBearerGrantAccessTokenLifespan, true +} + +// HasJwtBearerGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasJwtBearerGrantAccessTokenLifespan() bool { + if o != nil && o.JwtBearerGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetJwtBearerGrantAccessTokenLifespan gets a reference to the given string and assigns it to the JwtBearerGrantAccessTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetJwtBearerGrantAccessTokenLifespan(v string) { + o.JwtBearerGrantAccessTokenLifespan = &v +} + +// GetRefreshTokenGrantAccessTokenLifespan returns the RefreshTokenGrantAccessTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantAccessTokenLifespan() string { + if o == nil || o.RefreshTokenGrantAccessTokenLifespan == nil { + var ret string + return ret + } + return *o.RefreshTokenGrantAccessTokenLifespan +} + +// GetRefreshTokenGrantAccessTokenLifespanOk returns a tuple with the RefreshTokenGrantAccessTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantAccessTokenLifespanOk() (*string, bool) { + if o == nil || o.RefreshTokenGrantAccessTokenLifespan == nil { + return nil, false + } + return o.RefreshTokenGrantAccessTokenLifespan, true +} + +// HasRefreshTokenGrantAccessTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasRefreshTokenGrantAccessTokenLifespan() bool { + if o != nil && o.RefreshTokenGrantAccessTokenLifespan != nil { + return true + } + + return false +} + +// SetRefreshTokenGrantAccessTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantAccessTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetRefreshTokenGrantAccessTokenLifespan(v string) { + o.RefreshTokenGrantAccessTokenLifespan = &v +} + +// GetRefreshTokenGrantIdTokenLifespan returns the RefreshTokenGrantIdTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantIdTokenLifespan() string { + if o == nil || o.RefreshTokenGrantIdTokenLifespan == nil { + var ret string + return ret + } + return *o.RefreshTokenGrantIdTokenLifespan +} + +// GetRefreshTokenGrantIdTokenLifespanOk returns a tuple with the RefreshTokenGrantIdTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantIdTokenLifespanOk() (*string, bool) { + if o == nil || o.RefreshTokenGrantIdTokenLifespan == nil { + return nil, false + } + return o.RefreshTokenGrantIdTokenLifespan, true +} + +// HasRefreshTokenGrantIdTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasRefreshTokenGrantIdTokenLifespan() bool { + if o != nil && o.RefreshTokenGrantIdTokenLifespan != nil { + return true + } + + return false +} + +// SetRefreshTokenGrantIdTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantIdTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetRefreshTokenGrantIdTokenLifespan(v string) { + o.RefreshTokenGrantIdTokenLifespan = &v +} + +// GetRefreshTokenGrantRefreshTokenLifespan returns the RefreshTokenGrantRefreshTokenLifespan field value if set, zero value otherwise. +func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantRefreshTokenLifespan() string { + if o == nil || o.RefreshTokenGrantRefreshTokenLifespan == nil { + var ret string + return ret + } + return *o.RefreshTokenGrantRefreshTokenLifespan +} + +// GetRefreshTokenGrantRefreshTokenLifespanOk returns a tuple with the RefreshTokenGrantRefreshTokenLifespan field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ClientTokenLifespans) GetRefreshTokenGrantRefreshTokenLifespanOk() (*string, bool) { + if o == nil || o.RefreshTokenGrantRefreshTokenLifespan == nil { + return nil, false + } + return o.RefreshTokenGrantRefreshTokenLifespan, true +} + +// HasRefreshTokenGrantRefreshTokenLifespan returns a boolean if a field has been set. +func (o *OAuth2ClientTokenLifespans) HasRefreshTokenGrantRefreshTokenLifespan() bool { + if o != nil && o.RefreshTokenGrantRefreshTokenLifespan != nil { + return true + } + + return false +} + +// SetRefreshTokenGrantRefreshTokenLifespan gets a reference to the given string and assigns it to the RefreshTokenGrantRefreshTokenLifespan field. +func (o *OAuth2ClientTokenLifespans) SetRefreshTokenGrantRefreshTokenLifespan(v string) { + o.RefreshTokenGrantRefreshTokenLifespan = &v +} + +func (o OAuth2ClientTokenLifespans) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AuthorizationCodeGrantAccessTokenLifespan != nil { + toSerialize["authorization_code_grant_access_token_lifespan"] = o.AuthorizationCodeGrantAccessTokenLifespan + } + if o.AuthorizationCodeGrantIdTokenLifespan != nil { + toSerialize["authorization_code_grant_id_token_lifespan"] = o.AuthorizationCodeGrantIdTokenLifespan + } + if o.AuthorizationCodeGrantRefreshTokenLifespan != nil { + toSerialize["authorization_code_grant_refresh_token_lifespan"] = o.AuthorizationCodeGrantRefreshTokenLifespan + } + if o.ClientCredentialsGrantAccessTokenLifespan != nil { + toSerialize["client_credentials_grant_access_token_lifespan"] = o.ClientCredentialsGrantAccessTokenLifespan + } + if o.ImplicitGrantAccessTokenLifespan != nil { + toSerialize["implicit_grant_access_token_lifespan"] = o.ImplicitGrantAccessTokenLifespan + } + if o.ImplicitGrantIdTokenLifespan != nil { + toSerialize["implicit_grant_id_token_lifespan"] = o.ImplicitGrantIdTokenLifespan + } + if o.JwtBearerGrantAccessTokenLifespan != nil { + toSerialize["jwt_bearer_grant_access_token_lifespan"] = o.JwtBearerGrantAccessTokenLifespan + } + if o.RefreshTokenGrantAccessTokenLifespan != nil { + toSerialize["refresh_token_grant_access_token_lifespan"] = o.RefreshTokenGrantAccessTokenLifespan + } + if o.RefreshTokenGrantIdTokenLifespan != nil { + toSerialize["refresh_token_grant_id_token_lifespan"] = o.RefreshTokenGrantIdTokenLifespan + } + if o.RefreshTokenGrantRefreshTokenLifespan != nil { + toSerialize["refresh_token_grant_refresh_token_lifespan"] = o.RefreshTokenGrantRefreshTokenLifespan + } + return json.Marshal(toSerialize) +} + +type NullableOAuth2ClientTokenLifespans struct { + value *OAuth2ClientTokenLifespans + isSet bool +} + +func (v NullableOAuth2ClientTokenLifespans) Get() *OAuth2ClientTokenLifespans { + return v.value +} + +func (v *NullableOAuth2ClientTokenLifespans) Set(val *OAuth2ClientTokenLifespans) { + v.value = val + v.isSet = true +} + +func (v NullableOAuth2ClientTokenLifespans) IsSet() bool { + return v.isSet +} + +func (v *NullableOAuth2ClientTokenLifespans) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOAuth2ClientTokenLifespans(val *OAuth2ClientTokenLifespans) *NullableOAuth2ClientTokenLifespans { + return &NullableOAuth2ClientTokenLifespans{value: val, isSet: true} +} + +func (v NullableOAuth2ClientTokenLifespans) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOAuth2ClientTokenLifespans) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_consent_request.go b/clients/hydra/go/model_o_auth2_consent_request.go similarity index 70% rename from clients/hydra/go/model_consent_request.go rename to clients/hydra/go/model_o_auth2_consent_request.go index f7a958978bd..985c022a9f0 100644 --- a/clients/hydra/go/model_consent_request.go +++ b/clients/hydra/go/model_o_auth2_consent_request.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,20 +15,20 @@ import ( "encoding/json" ) -// ConsentRequest struct for ConsentRequest -type ConsentRequest struct { +// OAuth2ConsentRequest struct for OAuth2ConsentRequest +type OAuth2ConsentRequest struct { // 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. Acr *string `json:"acr,omitempty"` Amr []string `json:"amr,omitempty"` // ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. Challenge string `json:"challenge"` Client *OAuth2Client `json:"client,omitempty"` - Context map[string]interface{} `json:"context,omitempty"` + Context interface{} `json:"context,omitempty"` // 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. LoginChallenge *string `json:"login_challenge,omitempty"` // 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. LoginSessionId *string `json:"login_session_id,omitempty"` - OidcContext *OpenIDConnectContext `json:"oidc_context,omitempty"` + OidcContext *OAuth2ConsentRequestOpenIDConnectContext `json:"oidc_context,omitempty"` // 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 *string `json:"request_url,omitempty"` RequestedAccessTokenAudience []string `json:"requested_access_token_audience,omitempty"` @@ -38,26 +39,26 @@ type ConsentRequest struct { Subject *string `json:"subject,omitempty"` } -// NewConsentRequest instantiates a new ConsentRequest object +// NewOAuth2ConsentRequest instantiates a new OAuth2ConsentRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewConsentRequest(challenge string) *ConsentRequest { - this := ConsentRequest{} +func NewOAuth2ConsentRequest(challenge string) *OAuth2ConsentRequest { + this := OAuth2ConsentRequest{} this.Challenge = challenge return &this } -// NewConsentRequestWithDefaults instantiates a new ConsentRequest object +// NewOAuth2ConsentRequestWithDefaults instantiates a new OAuth2ConsentRequest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewConsentRequestWithDefaults() *ConsentRequest { - this := ConsentRequest{} +func NewOAuth2ConsentRequestWithDefaults() *OAuth2ConsentRequest { + this := OAuth2ConsentRequest{} return &this } // GetAcr returns the Acr field value if set, zero value otherwise. -func (o *ConsentRequest) GetAcr() string { +func (o *OAuth2ConsentRequest) GetAcr() string { if o == nil || o.Acr == nil { var ret string return ret @@ -67,7 +68,7 @@ func (o *ConsentRequest) GetAcr() string { // GetAcrOk returns a tuple with the Acr field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetAcrOk() (*string, bool) { +func (o *OAuth2ConsentRequest) GetAcrOk() (*string, bool) { if o == nil || o.Acr == nil { return nil, false } @@ -75,7 +76,7 @@ func (o *ConsentRequest) GetAcrOk() (*string, bool) { } // HasAcr returns a boolean if a field has been set. -func (o *ConsentRequest) HasAcr() bool { +func (o *OAuth2ConsentRequest) HasAcr() bool { if o != nil && o.Acr != nil { return true } @@ -84,12 +85,12 @@ func (o *ConsentRequest) HasAcr() bool { } // SetAcr gets a reference to the given string and assigns it to the Acr field. -func (o *ConsentRequest) SetAcr(v string) { +func (o *OAuth2ConsentRequest) SetAcr(v string) { o.Acr = &v } // GetAmr returns the Amr field value if set, zero value otherwise. -func (o *ConsentRequest) GetAmr() []string { +func (o *OAuth2ConsentRequest) GetAmr() []string { if o == nil || o.Amr == nil { var ret []string return ret @@ -99,7 +100,7 @@ func (o *ConsentRequest) GetAmr() []string { // GetAmrOk returns a tuple with the Amr field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetAmrOk() ([]string, bool) { +func (o *OAuth2ConsentRequest) GetAmrOk() ([]string, bool) { if o == nil || o.Amr == nil { return nil, false } @@ -107,7 +108,7 @@ func (o *ConsentRequest) GetAmrOk() ([]string, bool) { } // HasAmr returns a boolean if a field has been set. -func (o *ConsentRequest) HasAmr() bool { +func (o *OAuth2ConsentRequest) HasAmr() bool { if o != nil && o.Amr != nil { return true } @@ -116,12 +117,12 @@ func (o *ConsentRequest) HasAmr() bool { } // SetAmr gets a reference to the given []string and assigns it to the Amr field. -func (o *ConsentRequest) SetAmr(v []string) { +func (o *OAuth2ConsentRequest) SetAmr(v []string) { o.Amr = v } // GetChallenge returns the Challenge field value -func (o *ConsentRequest) GetChallenge() string { +func (o *OAuth2ConsentRequest) GetChallenge() string { if o == nil { var ret string return ret @@ -132,20 +133,20 @@ func (o *ConsentRequest) GetChallenge() string { // GetChallengeOk returns a tuple with the Challenge field value // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetChallengeOk() (*string, bool) { - if o == nil { +func (o *OAuth2ConsentRequest) GetChallengeOk() (*string, bool) { + if o == nil { return nil, false } return &o.Challenge, true } // SetChallenge sets field value -func (o *ConsentRequest) SetChallenge(v string) { +func (o *OAuth2ConsentRequest) SetChallenge(v string) { o.Challenge = v } // GetClient returns the Client field value if set, zero value otherwise. -func (o *ConsentRequest) GetClient() OAuth2Client { +func (o *OAuth2ConsentRequest) GetClient() OAuth2Client { if o == nil || o.Client == nil { var ret OAuth2Client return ret @@ -155,7 +156,7 @@ func (o *ConsentRequest) GetClient() OAuth2Client { // GetClientOk returns a tuple with the Client field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetClientOk() (*OAuth2Client, bool) { +func (o *OAuth2ConsentRequest) GetClientOk() (*OAuth2Client, bool) { if o == nil || o.Client == nil { return nil, false } @@ -163,7 +164,7 @@ func (o *ConsentRequest) GetClientOk() (*OAuth2Client, bool) { } // HasClient returns a boolean if a field has been set. -func (o *ConsentRequest) HasClient() bool { +func (o *OAuth2ConsentRequest) HasClient() bool { if o != nil && o.Client != nil { return true } @@ -172,14 +173,14 @@ func (o *ConsentRequest) HasClient() bool { } // SetClient gets a reference to the given OAuth2Client and assigns it to the Client field. -func (o *ConsentRequest) SetClient(v OAuth2Client) { +func (o *OAuth2ConsentRequest) SetClient(v OAuth2Client) { o.Client = &v } -// GetContext returns the Context field value if set, zero value otherwise. -func (o *ConsentRequest) GetContext() map[string]interface{} { - if o == nil || o.Context == nil { - var ret map[string]interface{} +// GetContext returns the Context field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OAuth2ConsentRequest) GetContext() interface{} { + if o == nil { + var ret interface{} return ret } return o.Context @@ -187,15 +188,16 @@ func (o *ConsentRequest) GetContext() map[string]interface{} { // GetContextOk returns a tuple with the Context field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetContextOk() (map[string]interface{}, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OAuth2ConsentRequest) GetContextOk() (*interface{}, bool) { if o == nil || o.Context == nil { return nil, false } - return o.Context, true + return &o.Context, true } // HasContext returns a boolean if a field has been set. -func (o *ConsentRequest) HasContext() bool { +func (o *OAuth2ConsentRequest) HasContext() bool { if o != nil && o.Context != nil { return true } @@ -203,13 +205,13 @@ func (o *ConsentRequest) HasContext() bool { return false } -// SetContext gets a reference to the given map[string]interface{} and assigns it to the Context field. -func (o *ConsentRequest) SetContext(v map[string]interface{}) { +// SetContext gets a reference to the given interface{} and assigns it to the Context field. +func (o *OAuth2ConsentRequest) SetContext(v interface{}) { o.Context = v } // GetLoginChallenge returns the LoginChallenge field value if set, zero value otherwise. -func (o *ConsentRequest) GetLoginChallenge() string { +func (o *OAuth2ConsentRequest) GetLoginChallenge() string { if o == nil || o.LoginChallenge == nil { var ret string return ret @@ -219,7 +221,7 @@ func (o *ConsentRequest) GetLoginChallenge() string { // GetLoginChallengeOk returns a tuple with the LoginChallenge field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetLoginChallengeOk() (*string, bool) { +func (o *OAuth2ConsentRequest) GetLoginChallengeOk() (*string, bool) { if o == nil || o.LoginChallenge == nil { return nil, false } @@ -227,7 +229,7 @@ func (o *ConsentRequest) GetLoginChallengeOk() (*string, bool) { } // HasLoginChallenge returns a boolean if a field has been set. -func (o *ConsentRequest) HasLoginChallenge() bool { +func (o *OAuth2ConsentRequest) HasLoginChallenge() bool { if o != nil && o.LoginChallenge != nil { return true } @@ -236,12 +238,12 @@ func (o *ConsentRequest) HasLoginChallenge() bool { } // SetLoginChallenge gets a reference to the given string and assigns it to the LoginChallenge field. -func (o *ConsentRequest) SetLoginChallenge(v string) { +func (o *OAuth2ConsentRequest) SetLoginChallenge(v string) { o.LoginChallenge = &v } // GetLoginSessionId returns the LoginSessionId field value if set, zero value otherwise. -func (o *ConsentRequest) GetLoginSessionId() string { +func (o *OAuth2ConsentRequest) GetLoginSessionId() string { if o == nil || o.LoginSessionId == nil { var ret string return ret @@ -251,7 +253,7 @@ func (o *ConsentRequest) GetLoginSessionId() string { // GetLoginSessionIdOk returns a tuple with the LoginSessionId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetLoginSessionIdOk() (*string, bool) { +func (o *OAuth2ConsentRequest) GetLoginSessionIdOk() (*string, bool) { if o == nil || o.LoginSessionId == nil { return nil, false } @@ -259,7 +261,7 @@ func (o *ConsentRequest) GetLoginSessionIdOk() (*string, bool) { } // HasLoginSessionId returns a boolean if a field has been set. -func (o *ConsentRequest) HasLoginSessionId() bool { +func (o *OAuth2ConsentRequest) HasLoginSessionId() bool { if o != nil && o.LoginSessionId != nil { return true } @@ -268,14 +270,14 @@ func (o *ConsentRequest) HasLoginSessionId() bool { } // SetLoginSessionId gets a reference to the given string and assigns it to the LoginSessionId field. -func (o *ConsentRequest) SetLoginSessionId(v string) { +func (o *OAuth2ConsentRequest) SetLoginSessionId(v string) { o.LoginSessionId = &v } // GetOidcContext returns the OidcContext field value if set, zero value otherwise. -func (o *ConsentRequest) GetOidcContext() OpenIDConnectContext { +func (o *OAuth2ConsentRequest) GetOidcContext() OAuth2ConsentRequestOpenIDConnectContext { if o == nil || o.OidcContext == nil { - var ret OpenIDConnectContext + var ret OAuth2ConsentRequestOpenIDConnectContext return ret } return *o.OidcContext @@ -283,7 +285,7 @@ func (o *ConsentRequest) GetOidcContext() OpenIDConnectContext { // GetOidcContextOk returns a tuple with the OidcContext field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetOidcContextOk() (*OpenIDConnectContext, bool) { +func (o *OAuth2ConsentRequest) GetOidcContextOk() (*OAuth2ConsentRequestOpenIDConnectContext, bool) { if o == nil || o.OidcContext == nil { return nil, false } @@ -291,7 +293,7 @@ func (o *ConsentRequest) GetOidcContextOk() (*OpenIDConnectContext, bool) { } // HasOidcContext returns a boolean if a field has been set. -func (o *ConsentRequest) HasOidcContext() bool { +func (o *OAuth2ConsentRequest) HasOidcContext() bool { if o != nil && o.OidcContext != nil { return true } @@ -299,13 +301,13 @@ func (o *ConsentRequest) HasOidcContext() bool { return false } -// SetOidcContext gets a reference to the given OpenIDConnectContext and assigns it to the OidcContext field. -func (o *ConsentRequest) SetOidcContext(v OpenIDConnectContext) { +// SetOidcContext gets a reference to the given OAuth2ConsentRequestOpenIDConnectContext and assigns it to the OidcContext field. +func (o *OAuth2ConsentRequest) SetOidcContext(v OAuth2ConsentRequestOpenIDConnectContext) { o.OidcContext = &v } // GetRequestUrl returns the RequestUrl field value if set, zero value otherwise. -func (o *ConsentRequest) GetRequestUrl() string { +func (o *OAuth2ConsentRequest) GetRequestUrl() string { if o == nil || o.RequestUrl == nil { var ret string return ret @@ -315,7 +317,7 @@ func (o *ConsentRequest) GetRequestUrl() string { // GetRequestUrlOk returns a tuple with the RequestUrl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetRequestUrlOk() (*string, bool) { +func (o *OAuth2ConsentRequest) GetRequestUrlOk() (*string, bool) { if o == nil || o.RequestUrl == nil { return nil, false } @@ -323,7 +325,7 @@ func (o *ConsentRequest) GetRequestUrlOk() (*string, bool) { } // HasRequestUrl returns a boolean if a field has been set. -func (o *ConsentRequest) HasRequestUrl() bool { +func (o *OAuth2ConsentRequest) HasRequestUrl() bool { if o != nil && o.RequestUrl != nil { return true } @@ -332,12 +334,12 @@ func (o *ConsentRequest) HasRequestUrl() bool { } // SetRequestUrl gets a reference to the given string and assigns it to the RequestUrl field. -func (o *ConsentRequest) SetRequestUrl(v string) { +func (o *OAuth2ConsentRequest) SetRequestUrl(v string) { o.RequestUrl = &v } // GetRequestedAccessTokenAudience returns the RequestedAccessTokenAudience field value if set, zero value otherwise. -func (o *ConsentRequest) GetRequestedAccessTokenAudience() []string { +func (o *OAuth2ConsentRequest) GetRequestedAccessTokenAudience() []string { if o == nil || o.RequestedAccessTokenAudience == nil { var ret []string return ret @@ -347,7 +349,7 @@ func (o *ConsentRequest) GetRequestedAccessTokenAudience() []string { // GetRequestedAccessTokenAudienceOk returns a tuple with the RequestedAccessTokenAudience field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetRequestedAccessTokenAudienceOk() ([]string, bool) { +func (o *OAuth2ConsentRequest) GetRequestedAccessTokenAudienceOk() ([]string, bool) { if o == nil || o.RequestedAccessTokenAudience == nil { return nil, false } @@ -355,7 +357,7 @@ func (o *ConsentRequest) GetRequestedAccessTokenAudienceOk() ([]string, bool) { } // HasRequestedAccessTokenAudience returns a boolean if a field has been set. -func (o *ConsentRequest) HasRequestedAccessTokenAudience() bool { +func (o *OAuth2ConsentRequest) HasRequestedAccessTokenAudience() bool { if o != nil && o.RequestedAccessTokenAudience != nil { return true } @@ -364,12 +366,12 @@ func (o *ConsentRequest) HasRequestedAccessTokenAudience() bool { } // SetRequestedAccessTokenAudience gets a reference to the given []string and assigns it to the RequestedAccessTokenAudience field. -func (o *ConsentRequest) SetRequestedAccessTokenAudience(v []string) { +func (o *OAuth2ConsentRequest) SetRequestedAccessTokenAudience(v []string) { o.RequestedAccessTokenAudience = v } // GetRequestedScope returns the RequestedScope field value if set, zero value otherwise. -func (o *ConsentRequest) GetRequestedScope() []string { +func (o *OAuth2ConsentRequest) GetRequestedScope() []string { if o == nil || o.RequestedScope == nil { var ret []string return ret @@ -379,7 +381,7 @@ func (o *ConsentRequest) GetRequestedScope() []string { // GetRequestedScopeOk returns a tuple with the RequestedScope field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetRequestedScopeOk() ([]string, bool) { +func (o *OAuth2ConsentRequest) GetRequestedScopeOk() ([]string, bool) { if o == nil || o.RequestedScope == nil { return nil, false } @@ -387,7 +389,7 @@ func (o *ConsentRequest) GetRequestedScopeOk() ([]string, bool) { } // HasRequestedScope returns a boolean if a field has been set. -func (o *ConsentRequest) HasRequestedScope() bool { +func (o *OAuth2ConsentRequest) HasRequestedScope() bool { if o != nil && o.RequestedScope != nil { return true } @@ -396,12 +398,12 @@ func (o *ConsentRequest) HasRequestedScope() bool { } // SetRequestedScope gets a reference to the given []string and assigns it to the RequestedScope field. -func (o *ConsentRequest) SetRequestedScope(v []string) { +func (o *OAuth2ConsentRequest) SetRequestedScope(v []string) { o.RequestedScope = v } // GetSkip returns the Skip field value if set, zero value otherwise. -func (o *ConsentRequest) GetSkip() bool { +func (o *OAuth2ConsentRequest) GetSkip() bool { if o == nil || o.Skip == nil { var ret bool return ret @@ -411,7 +413,7 @@ func (o *ConsentRequest) GetSkip() bool { // GetSkipOk returns a tuple with the Skip field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetSkipOk() (*bool, bool) { +func (o *OAuth2ConsentRequest) GetSkipOk() (*bool, bool) { if o == nil || o.Skip == nil { return nil, false } @@ -419,7 +421,7 @@ func (o *ConsentRequest) GetSkipOk() (*bool, bool) { } // HasSkip returns a boolean if a field has been set. -func (o *ConsentRequest) HasSkip() bool { +func (o *OAuth2ConsentRequest) HasSkip() bool { if o != nil && o.Skip != nil { return true } @@ -428,12 +430,12 @@ func (o *ConsentRequest) HasSkip() bool { } // SetSkip gets a reference to the given bool and assigns it to the Skip field. -func (o *ConsentRequest) SetSkip(v bool) { +func (o *OAuth2ConsentRequest) SetSkip(v bool) { o.Skip = &v } // GetSubject returns the Subject field value if set, zero value otherwise. -func (o *ConsentRequest) GetSubject() string { +func (o *OAuth2ConsentRequest) GetSubject() string { if o == nil || o.Subject == nil { var ret string return ret @@ -443,7 +445,7 @@ func (o *ConsentRequest) GetSubject() string { // GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ConsentRequest) GetSubjectOk() (*string, bool) { +func (o *OAuth2ConsentRequest) GetSubjectOk() (*string, bool) { if o == nil || o.Subject == nil { return nil, false } @@ -451,7 +453,7 @@ func (o *ConsentRequest) GetSubjectOk() (*string, bool) { } // HasSubject returns a boolean if a field has been set. -func (o *ConsentRequest) HasSubject() bool { +func (o *OAuth2ConsentRequest) HasSubject() bool { if o != nil && o.Subject != nil { return true } @@ -460,11 +462,11 @@ func (o *ConsentRequest) HasSubject() bool { } // SetSubject gets a reference to the given string and assigns it to the Subject field. -func (o *ConsentRequest) SetSubject(v string) { +func (o *OAuth2ConsentRequest) SetSubject(v string) { o.Subject = &v } -func (o ConsentRequest) MarshalJSON() ([]byte, error) { +func (o OAuth2ConsentRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Acr != nil { toSerialize["acr"] = o.Acr @@ -508,38 +510,38 @@ func (o ConsentRequest) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableConsentRequest struct { - value *ConsentRequest +type NullableOAuth2ConsentRequest struct { + value *OAuth2ConsentRequest isSet bool } -func (v NullableConsentRequest) Get() *ConsentRequest { +func (v NullableOAuth2ConsentRequest) Get() *OAuth2ConsentRequest { return v.value } -func (v *NullableConsentRequest) Set(val *ConsentRequest) { +func (v *NullableOAuth2ConsentRequest) Set(val *OAuth2ConsentRequest) { v.value = val v.isSet = true } -func (v NullableConsentRequest) IsSet() bool { +func (v NullableOAuth2ConsentRequest) IsSet() bool { return v.isSet } -func (v *NullableConsentRequest) Unset() { +func (v *NullableOAuth2ConsentRequest) Unset() { v.value = nil v.isSet = false } -func NewNullableConsentRequest(val *ConsentRequest) *NullableConsentRequest { - return &NullableConsentRequest{value: val, isSet: true} +func NewNullableOAuth2ConsentRequest(val *OAuth2ConsentRequest) *NullableOAuth2ConsentRequest { + return &NullableOAuth2ConsentRequest{value: val, isSet: true} } -func (v NullableConsentRequest) MarshalJSON() ([]byte, error) { +func (v NullableOAuth2ConsentRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableConsentRequest) UnmarshalJSON(src []byte) error { +func (v *NullableOAuth2ConsentRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_open_id_connect_context.go b/clients/hydra/go/model_o_auth2_consent_request_open_id_connect_context.go similarity index 69% rename from clients/hydra/go/model_open_id_connect_context.go rename to clients/hydra/go/model_o_auth2_consent_request_open_id_connect_context.go index 6f1e4038e42..56f04420b6a 100644 --- a/clients/hydra/go/model_open_id_connect_context.go +++ b/clients/hydra/go/model_o_auth2_consent_request_open_id_connect_context.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,8 +15,8 @@ import ( "encoding/json" ) -// OpenIDConnectContext struct for OpenIDConnectContext -type OpenIDConnectContext struct { +// OAuth2ConsentRequestOpenIDConnectContext struct for OAuth2ConsentRequestOpenIDConnectContext +type OAuth2ConsentRequestOpenIDConnectContext struct { // 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. AcrValues []string `json:"acr_values,omitempty"` // 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. @@ -28,25 +29,25 @@ type OpenIDConnectContext struct { UiLocales []string `json:"ui_locales,omitempty"` } -// NewOpenIDConnectContext instantiates a new OpenIDConnectContext object +// NewOAuth2ConsentRequestOpenIDConnectContext instantiates a new OAuth2ConsentRequestOpenIDConnectContext object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewOpenIDConnectContext() *OpenIDConnectContext { - this := OpenIDConnectContext{} +func NewOAuth2ConsentRequestOpenIDConnectContext() *OAuth2ConsentRequestOpenIDConnectContext { + this := OAuth2ConsentRequestOpenIDConnectContext{} return &this } -// NewOpenIDConnectContextWithDefaults instantiates a new OpenIDConnectContext object +// NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults instantiates a new OAuth2ConsentRequestOpenIDConnectContext object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewOpenIDConnectContextWithDefaults() *OpenIDConnectContext { - this := OpenIDConnectContext{} +func NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults() *OAuth2ConsentRequestOpenIDConnectContext { + this := OAuth2ConsentRequestOpenIDConnectContext{} return &this } // GetAcrValues returns the AcrValues field value if set, zero value otherwise. -func (o *OpenIDConnectContext) GetAcrValues() []string { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValues() []string { if o == nil || o.AcrValues == nil { var ret []string return ret @@ -56,7 +57,7 @@ func (o *OpenIDConnectContext) GetAcrValues() []string { // GetAcrValuesOk returns a tuple with the AcrValues field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OpenIDConnectContext) GetAcrValuesOk() ([]string, bool) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValuesOk() ([]string, bool) { if o == nil || o.AcrValues == nil { return nil, false } @@ -64,7 +65,7 @@ func (o *OpenIDConnectContext) GetAcrValuesOk() ([]string, bool) { } // HasAcrValues returns a boolean if a field has been set. -func (o *OpenIDConnectContext) HasAcrValues() bool { +func (o *OAuth2ConsentRequestOpenIDConnectContext) HasAcrValues() bool { if o != nil && o.AcrValues != nil { return true } @@ -73,12 +74,12 @@ func (o *OpenIDConnectContext) HasAcrValues() bool { } // SetAcrValues gets a reference to the given []string and assigns it to the AcrValues field. -func (o *OpenIDConnectContext) SetAcrValues(v []string) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) SetAcrValues(v []string) { o.AcrValues = v } // GetDisplay returns the Display field value if set, zero value otherwise. -func (o *OpenIDConnectContext) GetDisplay() string { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplay() string { if o == nil || o.Display == nil { var ret string return ret @@ -88,7 +89,7 @@ func (o *OpenIDConnectContext) GetDisplay() string { // GetDisplayOk returns a tuple with the Display field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OpenIDConnectContext) GetDisplayOk() (*string, bool) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplayOk() (*string, bool) { if o == nil || o.Display == nil { return nil, false } @@ -96,7 +97,7 @@ func (o *OpenIDConnectContext) GetDisplayOk() (*string, bool) { } // HasDisplay returns a boolean if a field has been set. -func (o *OpenIDConnectContext) HasDisplay() bool { +func (o *OAuth2ConsentRequestOpenIDConnectContext) HasDisplay() bool { if o != nil && o.Display != nil { return true } @@ -105,12 +106,12 @@ func (o *OpenIDConnectContext) HasDisplay() bool { } // SetDisplay gets a reference to the given string and assigns it to the Display field. -func (o *OpenIDConnectContext) SetDisplay(v string) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) SetDisplay(v string) { o.Display = &v } // GetIdTokenHintClaims returns the IdTokenHintClaims field value if set, zero value otherwise. -func (o *OpenIDConnectContext) GetIdTokenHintClaims() map[string]interface{} { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaims() map[string]interface{} { if o == nil || o.IdTokenHintClaims == nil { var ret map[string]interface{} return ret @@ -120,7 +121,7 @@ func (o *OpenIDConnectContext) GetIdTokenHintClaims() map[string]interface{} { // GetIdTokenHintClaimsOk returns a tuple with the IdTokenHintClaims field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OpenIDConnectContext) GetIdTokenHintClaimsOk() (map[string]interface{}, bool) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaimsOk() (map[string]interface{}, bool) { if o == nil || o.IdTokenHintClaims == nil { return nil, false } @@ -128,7 +129,7 @@ func (o *OpenIDConnectContext) GetIdTokenHintClaimsOk() (map[string]interface{}, } // HasIdTokenHintClaims returns a boolean if a field has been set. -func (o *OpenIDConnectContext) HasIdTokenHintClaims() bool { +func (o *OAuth2ConsentRequestOpenIDConnectContext) HasIdTokenHintClaims() bool { if o != nil && o.IdTokenHintClaims != nil { return true } @@ -137,12 +138,12 @@ func (o *OpenIDConnectContext) HasIdTokenHintClaims() bool { } // SetIdTokenHintClaims gets a reference to the given map[string]interface{} and assigns it to the IdTokenHintClaims field. -func (o *OpenIDConnectContext) SetIdTokenHintClaims(v map[string]interface{}) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) SetIdTokenHintClaims(v map[string]interface{}) { o.IdTokenHintClaims = v } // GetLoginHint returns the LoginHint field value if set, zero value otherwise. -func (o *OpenIDConnectContext) GetLoginHint() string { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHint() string { if o == nil || o.LoginHint == nil { var ret string return ret @@ -152,7 +153,7 @@ func (o *OpenIDConnectContext) GetLoginHint() string { // GetLoginHintOk returns a tuple with the LoginHint field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OpenIDConnectContext) GetLoginHintOk() (*string, bool) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHintOk() (*string, bool) { if o == nil || o.LoginHint == nil { return nil, false } @@ -160,7 +161,7 @@ func (o *OpenIDConnectContext) GetLoginHintOk() (*string, bool) { } // HasLoginHint returns a boolean if a field has been set. -func (o *OpenIDConnectContext) HasLoginHint() bool { +func (o *OAuth2ConsentRequestOpenIDConnectContext) HasLoginHint() bool { if o != nil && o.LoginHint != nil { return true } @@ -169,12 +170,12 @@ func (o *OpenIDConnectContext) HasLoginHint() bool { } // SetLoginHint gets a reference to the given string and assigns it to the LoginHint field. -func (o *OpenIDConnectContext) SetLoginHint(v string) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) SetLoginHint(v string) { o.LoginHint = &v } // GetUiLocales returns the UiLocales field value if set, zero value otherwise. -func (o *OpenIDConnectContext) GetUiLocales() []string { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocales() []string { if o == nil || o.UiLocales == nil { var ret []string return ret @@ -184,7 +185,7 @@ func (o *OpenIDConnectContext) GetUiLocales() []string { // GetUiLocalesOk returns a tuple with the UiLocales field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OpenIDConnectContext) GetUiLocalesOk() ([]string, bool) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocalesOk() ([]string, bool) { if o == nil || o.UiLocales == nil { return nil, false } @@ -192,7 +193,7 @@ func (o *OpenIDConnectContext) GetUiLocalesOk() ([]string, bool) { } // HasUiLocales returns a boolean if a field has been set. -func (o *OpenIDConnectContext) HasUiLocales() bool { +func (o *OAuth2ConsentRequestOpenIDConnectContext) HasUiLocales() bool { if o != nil && o.UiLocales != nil { return true } @@ -201,11 +202,11 @@ func (o *OpenIDConnectContext) HasUiLocales() bool { } // SetUiLocales gets a reference to the given []string and assigns it to the UiLocales field. -func (o *OpenIDConnectContext) SetUiLocales(v []string) { +func (o *OAuth2ConsentRequestOpenIDConnectContext) SetUiLocales(v []string) { o.UiLocales = v } -func (o OpenIDConnectContext) MarshalJSON() ([]byte, error) { +func (o OAuth2ConsentRequestOpenIDConnectContext) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.AcrValues != nil { toSerialize["acr_values"] = o.AcrValues @@ -225,38 +226,38 @@ func (o OpenIDConnectContext) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableOpenIDConnectContext struct { - value *OpenIDConnectContext +type NullableOAuth2ConsentRequestOpenIDConnectContext struct { + value *OAuth2ConsentRequestOpenIDConnectContext isSet bool } -func (v NullableOpenIDConnectContext) Get() *OpenIDConnectContext { +func (v NullableOAuth2ConsentRequestOpenIDConnectContext) Get() *OAuth2ConsentRequestOpenIDConnectContext { return v.value } -func (v *NullableOpenIDConnectContext) Set(val *OpenIDConnectContext) { +func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) Set(val *OAuth2ConsentRequestOpenIDConnectContext) { v.value = val v.isSet = true } -func (v NullableOpenIDConnectContext) IsSet() bool { +func (v NullableOAuth2ConsentRequestOpenIDConnectContext) IsSet() bool { return v.isSet } -func (v *NullableOpenIDConnectContext) Unset() { +func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) Unset() { v.value = nil v.isSet = false } -func NewNullableOpenIDConnectContext(val *OpenIDConnectContext) *NullableOpenIDConnectContext { - return &NullableOpenIDConnectContext{value: val, isSet: true} +func NewNullableOAuth2ConsentRequestOpenIDConnectContext(val *OAuth2ConsentRequestOpenIDConnectContext) *NullableOAuth2ConsentRequestOpenIDConnectContext { + return &NullableOAuth2ConsentRequestOpenIDConnectContext{value: val, isSet: true} } -func (v NullableOpenIDConnectContext) MarshalJSON() ([]byte, error) { +func (v NullableOAuth2ConsentRequestOpenIDConnectContext) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableOpenIDConnectContext) UnmarshalJSON(src []byte) error { +func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_previous_consent_session.go b/clients/hydra/go/model_o_auth2_consent_session.go similarity index 55% rename from clients/hydra/go/model_previous_consent_session.go rename to clients/hydra/go/model_o_auth2_consent_session.go index cee65dc18c8..79212417ea9 100644 --- a/clients/hydra/go/model_previous_consent_session.go +++ b/clients/hydra/go/model_o_auth2_consent_session.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,40 +16,41 @@ import ( "time" ) -// PreviousConsentSession The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json -type PreviousConsentSession struct { - ConsentRequest *ConsentRequest `json:"consent_request,omitempty"` +// OAuth2ConsentSession A completed OAuth 2.0 Consent Session. +type OAuth2ConsentSession struct { + ConsentRequest *OAuth2ConsentRequest `json:"consent_request,omitempty"` + ExpiresAt *OAuth2ConsentSessionExpiresAt `json:"expires_at,omitempty"` GrantAccessTokenAudience []string `json:"grant_access_token_audience,omitempty"` GrantScope []string `json:"grant_scope,omitempty"` HandledAt *time.Time `json:"handled_at,omitempty"` - // 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 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 *bool `json:"remember,omitempty"` - // RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + // 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. RememberFor *int64 `json:"remember_for,omitempty"` - Session *ConsentRequestSession `json:"session,omitempty"` + Session *AcceptOAuth2ConsentRequestSession `json:"session,omitempty"` } -// NewPreviousConsentSession instantiates a new PreviousConsentSession object +// NewOAuth2ConsentSession instantiates a new OAuth2ConsentSession object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPreviousConsentSession() *PreviousConsentSession { - this := PreviousConsentSession{} +func NewOAuth2ConsentSession() *OAuth2ConsentSession { + this := OAuth2ConsentSession{} return &this } -// NewPreviousConsentSessionWithDefaults instantiates a new PreviousConsentSession object +// NewOAuth2ConsentSessionWithDefaults instantiates a new OAuth2ConsentSession object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewPreviousConsentSessionWithDefaults() *PreviousConsentSession { - this := PreviousConsentSession{} +func NewOAuth2ConsentSessionWithDefaults() *OAuth2ConsentSession { + this := OAuth2ConsentSession{} return &this } // GetConsentRequest returns the ConsentRequest field value if set, zero value otherwise. -func (o *PreviousConsentSession) GetConsentRequest() ConsentRequest { +func (o *OAuth2ConsentSession) GetConsentRequest() OAuth2ConsentRequest { if o == nil || o.ConsentRequest == nil { - var ret ConsentRequest + var ret OAuth2ConsentRequest return ret } return *o.ConsentRequest @@ -56,7 +58,7 @@ func (o *PreviousConsentSession) GetConsentRequest() ConsentRequest { // GetConsentRequestOk returns a tuple with the ConsentRequest field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PreviousConsentSession) GetConsentRequestOk() (*ConsentRequest, bool) { +func (o *OAuth2ConsentSession) GetConsentRequestOk() (*OAuth2ConsentRequest, bool) { if o == nil || o.ConsentRequest == nil { return nil, false } @@ -64,7 +66,7 @@ func (o *PreviousConsentSession) GetConsentRequestOk() (*ConsentRequest, bool) { } // HasConsentRequest returns a boolean if a field has been set. -func (o *PreviousConsentSession) HasConsentRequest() bool { +func (o *OAuth2ConsentSession) HasConsentRequest() bool { if o != nil && o.ConsentRequest != nil { return true } @@ -72,13 +74,45 @@ func (o *PreviousConsentSession) HasConsentRequest() bool { return false } -// SetConsentRequest gets a reference to the given ConsentRequest and assigns it to the ConsentRequest field. -func (o *PreviousConsentSession) SetConsentRequest(v ConsentRequest) { +// SetConsentRequest gets a reference to the given OAuth2ConsentRequest and assigns it to the ConsentRequest field. +func (o *OAuth2ConsentSession) SetConsentRequest(v OAuth2ConsentRequest) { o.ConsentRequest = &v } +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. +func (o *OAuth2ConsentSession) GetExpiresAt() OAuth2ConsentSessionExpiresAt { + if o == nil || o.ExpiresAt == nil { + var ret OAuth2ConsentSessionExpiresAt + return ret + } + return *o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ConsentSession) GetExpiresAtOk() (*OAuth2ConsentSessionExpiresAt, bool) { + if o == nil || o.ExpiresAt == nil { + return nil, false + } + return o.ExpiresAt, true +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *OAuth2ConsentSession) HasExpiresAt() bool { + if o != nil && o.ExpiresAt != nil { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given OAuth2ConsentSessionExpiresAt and assigns it to the ExpiresAt field. +func (o *OAuth2ConsentSession) SetExpiresAt(v OAuth2ConsentSessionExpiresAt) { + o.ExpiresAt = &v +} + // GetGrantAccessTokenAudience returns the GrantAccessTokenAudience field value if set, zero value otherwise. -func (o *PreviousConsentSession) GetGrantAccessTokenAudience() []string { +func (o *OAuth2ConsentSession) GetGrantAccessTokenAudience() []string { if o == nil || o.GrantAccessTokenAudience == nil { var ret []string return ret @@ -88,7 +122,7 @@ func (o *PreviousConsentSession) GetGrantAccessTokenAudience() []string { // GetGrantAccessTokenAudienceOk returns a tuple with the GrantAccessTokenAudience field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PreviousConsentSession) GetGrantAccessTokenAudienceOk() ([]string, bool) { +func (o *OAuth2ConsentSession) GetGrantAccessTokenAudienceOk() ([]string, bool) { if o == nil || o.GrantAccessTokenAudience == nil { return nil, false } @@ -96,7 +130,7 @@ func (o *PreviousConsentSession) GetGrantAccessTokenAudienceOk() ([]string, bool } // HasGrantAccessTokenAudience returns a boolean if a field has been set. -func (o *PreviousConsentSession) HasGrantAccessTokenAudience() bool { +func (o *OAuth2ConsentSession) HasGrantAccessTokenAudience() bool { if o != nil && o.GrantAccessTokenAudience != nil { return true } @@ -105,12 +139,12 @@ func (o *PreviousConsentSession) HasGrantAccessTokenAudience() bool { } // SetGrantAccessTokenAudience gets a reference to the given []string and assigns it to the GrantAccessTokenAudience field. -func (o *PreviousConsentSession) SetGrantAccessTokenAudience(v []string) { +func (o *OAuth2ConsentSession) SetGrantAccessTokenAudience(v []string) { o.GrantAccessTokenAudience = v } // GetGrantScope returns the GrantScope field value if set, zero value otherwise. -func (o *PreviousConsentSession) GetGrantScope() []string { +func (o *OAuth2ConsentSession) GetGrantScope() []string { if o == nil || o.GrantScope == nil { var ret []string return ret @@ -120,7 +154,7 @@ func (o *PreviousConsentSession) GetGrantScope() []string { // GetGrantScopeOk returns a tuple with the GrantScope field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PreviousConsentSession) GetGrantScopeOk() ([]string, bool) { +func (o *OAuth2ConsentSession) GetGrantScopeOk() ([]string, bool) { if o == nil || o.GrantScope == nil { return nil, false } @@ -128,7 +162,7 @@ func (o *PreviousConsentSession) GetGrantScopeOk() ([]string, bool) { } // HasGrantScope returns a boolean if a field has been set. -func (o *PreviousConsentSession) HasGrantScope() bool { +func (o *OAuth2ConsentSession) HasGrantScope() bool { if o != nil && o.GrantScope != nil { return true } @@ -137,12 +171,12 @@ func (o *PreviousConsentSession) HasGrantScope() bool { } // SetGrantScope gets a reference to the given []string and assigns it to the GrantScope field. -func (o *PreviousConsentSession) SetGrantScope(v []string) { +func (o *OAuth2ConsentSession) SetGrantScope(v []string) { o.GrantScope = v } // GetHandledAt returns the HandledAt field value if set, zero value otherwise. -func (o *PreviousConsentSession) GetHandledAt() time.Time { +func (o *OAuth2ConsentSession) GetHandledAt() time.Time { if o == nil || o.HandledAt == nil { var ret time.Time return ret @@ -152,7 +186,7 @@ func (o *PreviousConsentSession) GetHandledAt() time.Time { // GetHandledAtOk returns a tuple with the HandledAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PreviousConsentSession) GetHandledAtOk() (*time.Time, bool) { +func (o *OAuth2ConsentSession) GetHandledAtOk() (*time.Time, bool) { if o == nil || o.HandledAt == nil { return nil, false } @@ -160,7 +194,7 @@ func (o *PreviousConsentSession) GetHandledAtOk() (*time.Time, bool) { } // HasHandledAt returns a boolean if a field has been set. -func (o *PreviousConsentSession) HasHandledAt() bool { +func (o *OAuth2ConsentSession) HasHandledAt() bool { if o != nil && o.HandledAt != nil { return true } @@ -169,12 +203,12 @@ func (o *PreviousConsentSession) HasHandledAt() bool { } // SetHandledAt gets a reference to the given time.Time and assigns it to the HandledAt field. -func (o *PreviousConsentSession) SetHandledAt(v time.Time) { +func (o *OAuth2ConsentSession) SetHandledAt(v time.Time) { o.HandledAt = &v } // GetRemember returns the Remember field value if set, zero value otherwise. -func (o *PreviousConsentSession) GetRemember() bool { +func (o *OAuth2ConsentSession) GetRemember() bool { if o == nil || o.Remember == nil { var ret bool return ret @@ -184,7 +218,7 @@ func (o *PreviousConsentSession) GetRemember() bool { // GetRememberOk returns a tuple with the Remember field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PreviousConsentSession) GetRememberOk() (*bool, bool) { +func (o *OAuth2ConsentSession) GetRememberOk() (*bool, bool) { if o == nil || o.Remember == nil { return nil, false } @@ -192,7 +226,7 @@ func (o *PreviousConsentSession) GetRememberOk() (*bool, bool) { } // HasRemember returns a boolean if a field has been set. -func (o *PreviousConsentSession) HasRemember() bool { +func (o *OAuth2ConsentSession) HasRemember() bool { if o != nil && o.Remember != nil { return true } @@ -201,12 +235,12 @@ func (o *PreviousConsentSession) HasRemember() bool { } // SetRemember gets a reference to the given bool and assigns it to the Remember field. -func (o *PreviousConsentSession) SetRemember(v bool) { +func (o *OAuth2ConsentSession) SetRemember(v bool) { o.Remember = &v } // GetRememberFor returns the RememberFor field value if set, zero value otherwise. -func (o *PreviousConsentSession) GetRememberFor() int64 { +func (o *OAuth2ConsentSession) GetRememberFor() int64 { if o == nil || o.RememberFor == nil { var ret int64 return ret @@ -216,7 +250,7 @@ func (o *PreviousConsentSession) GetRememberFor() int64 { // GetRememberForOk returns a tuple with the RememberFor field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PreviousConsentSession) GetRememberForOk() (*int64, bool) { +func (o *OAuth2ConsentSession) GetRememberForOk() (*int64, bool) { if o == nil || o.RememberFor == nil { return nil, false } @@ -224,7 +258,7 @@ func (o *PreviousConsentSession) GetRememberForOk() (*int64, bool) { } // HasRememberFor returns a boolean if a field has been set. -func (o *PreviousConsentSession) HasRememberFor() bool { +func (o *OAuth2ConsentSession) HasRememberFor() bool { if o != nil && o.RememberFor != nil { return true } @@ -233,14 +267,14 @@ func (o *PreviousConsentSession) HasRememberFor() bool { } // SetRememberFor gets a reference to the given int64 and assigns it to the RememberFor field. -func (o *PreviousConsentSession) SetRememberFor(v int64) { +func (o *OAuth2ConsentSession) SetRememberFor(v int64) { o.RememberFor = &v } // GetSession returns the Session field value if set, zero value otherwise. -func (o *PreviousConsentSession) GetSession() ConsentRequestSession { +func (o *OAuth2ConsentSession) GetSession() AcceptOAuth2ConsentRequestSession { if o == nil || o.Session == nil { - var ret ConsentRequestSession + var ret AcceptOAuth2ConsentRequestSession return ret } return *o.Session @@ -248,7 +282,7 @@ func (o *PreviousConsentSession) GetSession() ConsentRequestSession { // GetSessionOk returns a tuple with the Session field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PreviousConsentSession) GetSessionOk() (*ConsentRequestSession, bool) { +func (o *OAuth2ConsentSession) GetSessionOk() (*AcceptOAuth2ConsentRequestSession, bool) { if o == nil || o.Session == nil { return nil, false } @@ -256,7 +290,7 @@ func (o *PreviousConsentSession) GetSessionOk() (*ConsentRequestSession, bool) { } // HasSession returns a boolean if a field has been set. -func (o *PreviousConsentSession) HasSession() bool { +func (o *OAuth2ConsentSession) HasSession() bool { if o != nil && o.Session != nil { return true } @@ -264,16 +298,19 @@ func (o *PreviousConsentSession) HasSession() bool { return false } -// SetSession gets a reference to the given ConsentRequestSession and assigns it to the Session field. -func (o *PreviousConsentSession) SetSession(v ConsentRequestSession) { +// SetSession gets a reference to the given AcceptOAuth2ConsentRequestSession and assigns it to the Session field. +func (o *OAuth2ConsentSession) SetSession(v AcceptOAuth2ConsentRequestSession) { o.Session = &v } -func (o PreviousConsentSession) MarshalJSON() ([]byte, error) { +func (o OAuth2ConsentSession) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ConsentRequest != nil { toSerialize["consent_request"] = o.ConsentRequest } + if o.ExpiresAt != nil { + toSerialize["expires_at"] = o.ExpiresAt + } if o.GrantAccessTokenAudience != nil { toSerialize["grant_access_token_audience"] = o.GrantAccessTokenAudience } @@ -295,38 +332,38 @@ func (o PreviousConsentSession) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullablePreviousConsentSession struct { - value *PreviousConsentSession +type NullableOAuth2ConsentSession struct { + value *OAuth2ConsentSession isSet bool } -func (v NullablePreviousConsentSession) Get() *PreviousConsentSession { +func (v NullableOAuth2ConsentSession) Get() *OAuth2ConsentSession { return v.value } -func (v *NullablePreviousConsentSession) Set(val *PreviousConsentSession) { +func (v *NullableOAuth2ConsentSession) Set(val *OAuth2ConsentSession) { v.value = val v.isSet = true } -func (v NullablePreviousConsentSession) IsSet() bool { +func (v NullableOAuth2ConsentSession) IsSet() bool { return v.isSet } -func (v *NullablePreviousConsentSession) Unset() { +func (v *NullableOAuth2ConsentSession) Unset() { v.value = nil v.isSet = false } -func NewNullablePreviousConsentSession(val *PreviousConsentSession) *NullablePreviousConsentSession { - return &NullablePreviousConsentSession{value: val, isSet: true} +func NewNullableOAuth2ConsentSession(val *OAuth2ConsentSession) *NullableOAuth2ConsentSession { + return &NullableOAuth2ConsentSession{value: val, isSet: true} } -func (v NullablePreviousConsentSession) MarshalJSON() ([]byte, error) { +func (v NullableOAuth2ConsentSession) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullablePreviousConsentSession) UnmarshalJSON(src []byte) error { +func (v *NullableOAuth2ConsentSession) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } 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 new file mode 100644 index 00000000000..bd31c097dd5 --- /dev/null +++ b/clients/hydra/go/model_o_auth2_consent_session_expires_at.go @@ -0,0 +1,261 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" + "time" +) + +// OAuth2ConsentSessionExpiresAt struct for OAuth2ConsentSessionExpiresAt +type OAuth2ConsentSessionExpiresAt struct { + AccessToken *time.Time `json:"access_token,omitempty"` + AuthorizeCode *time.Time `json:"authorize_code,omitempty"` + IdToken *time.Time `json:"id_token,omitempty"` + ParContext *time.Time `json:"par_context,omitempty"` + RefreshToken *time.Time `json:"refresh_token,omitempty"` +} + +// NewOAuth2ConsentSessionExpiresAt instantiates a new OAuth2ConsentSessionExpiresAt object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOAuth2ConsentSessionExpiresAt() *OAuth2ConsentSessionExpiresAt { + this := OAuth2ConsentSessionExpiresAt{} + return &this +} + +// NewOAuth2ConsentSessionExpiresAtWithDefaults instantiates a new OAuth2ConsentSessionExpiresAt object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOAuth2ConsentSessionExpiresAtWithDefaults() *OAuth2ConsentSessionExpiresAt { + this := OAuth2ConsentSessionExpiresAt{} + return &this +} + +// GetAccessToken returns the AccessToken field value if set, zero value otherwise. +func (o *OAuth2ConsentSessionExpiresAt) GetAccessToken() time.Time { + if o == nil || o.AccessToken == nil { + var ret time.Time + return ret + } + return *o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ConsentSessionExpiresAt) GetAccessTokenOk() (*time.Time, bool) { + if o == nil || o.AccessToken == nil { + return nil, false + } + return o.AccessToken, true +} + +// HasAccessToken returns a boolean if a field has been set. +func (o *OAuth2ConsentSessionExpiresAt) HasAccessToken() bool { + if o != nil && o.AccessToken != nil { + return true + } + + return false +} + +// SetAccessToken gets a reference to the given time.Time and assigns it to the AccessToken field. +func (o *OAuth2ConsentSessionExpiresAt) SetAccessToken(v time.Time) { + o.AccessToken = &v +} + +// GetAuthorizeCode returns the AuthorizeCode field value if set, zero value otherwise. +func (o *OAuth2ConsentSessionExpiresAt) GetAuthorizeCode() time.Time { + if o == nil || o.AuthorizeCode == nil { + var ret time.Time + return ret + } + return *o.AuthorizeCode +} + +// GetAuthorizeCodeOk returns a tuple with the AuthorizeCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ConsentSessionExpiresAt) GetAuthorizeCodeOk() (*time.Time, bool) { + if o == nil || o.AuthorizeCode == nil { + return nil, false + } + return o.AuthorizeCode, true +} + +// HasAuthorizeCode returns a boolean if a field has been set. +func (o *OAuth2ConsentSessionExpiresAt) HasAuthorizeCode() bool { + if o != nil && o.AuthorizeCode != nil { + return true + } + + return false +} + +// SetAuthorizeCode gets a reference to the given time.Time and assigns it to the AuthorizeCode field. +func (o *OAuth2ConsentSessionExpiresAt) SetAuthorizeCode(v time.Time) { + o.AuthorizeCode = &v +} + +// GetIdToken returns the IdToken field value if set, zero value otherwise. +func (o *OAuth2ConsentSessionExpiresAt) GetIdToken() time.Time { + if o == nil || o.IdToken == nil { + var ret time.Time + return ret + } + return *o.IdToken +} + +// GetIdTokenOk returns a tuple with the IdToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ConsentSessionExpiresAt) GetIdTokenOk() (*time.Time, bool) { + if o == nil || o.IdToken == nil { + return nil, false + } + return o.IdToken, true +} + +// HasIdToken returns a boolean if a field has been set. +func (o *OAuth2ConsentSessionExpiresAt) HasIdToken() bool { + if o != nil && o.IdToken != nil { + return true + } + + return false +} + +// SetIdToken gets a reference to the given time.Time and assigns it to the IdToken field. +func (o *OAuth2ConsentSessionExpiresAt) SetIdToken(v time.Time) { + o.IdToken = &v +} + +// GetParContext returns the ParContext field value if set, zero value otherwise. +func (o *OAuth2ConsentSessionExpiresAt) GetParContext() time.Time { + if o == nil || o.ParContext == nil { + var ret time.Time + return ret + } + return *o.ParContext +} + +// GetParContextOk returns a tuple with the ParContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ConsentSessionExpiresAt) GetParContextOk() (*time.Time, bool) { + if o == nil || o.ParContext == nil { + return nil, false + } + return o.ParContext, true +} + +// HasParContext returns a boolean if a field has been set. +func (o *OAuth2ConsentSessionExpiresAt) HasParContext() bool { + if o != nil && o.ParContext != nil { + return true + } + + return false +} + +// SetParContext gets a reference to the given time.Time and assigns it to the ParContext field. +func (o *OAuth2ConsentSessionExpiresAt) SetParContext(v time.Time) { + o.ParContext = &v +} + +// GetRefreshToken returns the RefreshToken field value if set, zero value otherwise. +func (o *OAuth2ConsentSessionExpiresAt) GetRefreshToken() time.Time { + if o == nil || o.RefreshToken == nil { + var ret time.Time + return ret + } + return *o.RefreshToken +} + +// GetRefreshTokenOk returns a tuple with the RefreshToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OAuth2ConsentSessionExpiresAt) GetRefreshTokenOk() (*time.Time, bool) { + if o == nil || o.RefreshToken == nil { + return nil, false + } + return o.RefreshToken, true +} + +// HasRefreshToken returns a boolean if a field has been set. +func (o *OAuth2ConsentSessionExpiresAt) HasRefreshToken() bool { + if o != nil && o.RefreshToken != nil { + return true + } + + return false +} + +// SetRefreshToken gets a reference to the given time.Time and assigns it to the RefreshToken field. +func (o *OAuth2ConsentSessionExpiresAt) SetRefreshToken(v time.Time) { + o.RefreshToken = &v +} + +func (o OAuth2ConsentSessionExpiresAt) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AccessToken != nil { + toSerialize["access_token"] = o.AccessToken + } + if o.AuthorizeCode != nil { + toSerialize["authorize_code"] = o.AuthorizeCode + } + if o.IdToken != nil { + toSerialize["id_token"] = o.IdToken + } + if o.ParContext != nil { + toSerialize["par_context"] = o.ParContext + } + if o.RefreshToken != nil { + toSerialize["refresh_token"] = o.RefreshToken + } + return json.Marshal(toSerialize) +} + +type NullableOAuth2ConsentSessionExpiresAt struct { + value *OAuth2ConsentSessionExpiresAt + isSet bool +} + +func (v NullableOAuth2ConsentSessionExpiresAt) Get() *OAuth2ConsentSessionExpiresAt { + return v.value +} + +func (v *NullableOAuth2ConsentSessionExpiresAt) Set(val *OAuth2ConsentSessionExpiresAt) { + v.value = val + v.isSet = true +} + +func (v NullableOAuth2ConsentSessionExpiresAt) IsSet() bool { + return v.isSet +} + +func (v *NullableOAuth2ConsentSessionExpiresAt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOAuth2ConsentSessionExpiresAt(val *OAuth2ConsentSessionExpiresAt) *NullableOAuth2ConsentSessionExpiresAt { + return &NullableOAuth2ConsentSessionExpiresAt{value: val, isSet: true} +} + +func (v NullableOAuth2ConsentSessionExpiresAt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOAuth2ConsentSessionExpiresAt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_login_request.go b/clients/hydra/go/model_o_auth2_login_request.go similarity index 67% rename from clients/hydra/go/model_login_request.go rename to clients/hydra/go/model_o_auth2_login_request.go index bf02c29cd27..317695a2c37 100644 --- a/clients/hydra/go/model_login_request.go +++ b/clients/hydra/go/model_o_auth2_login_request.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,12 +15,12 @@ import ( "encoding/json" ) -// LoginRequest struct for LoginRequest -type LoginRequest struct { +// OAuth2LoginRequest struct for OAuth2LoginRequest +type OAuth2LoginRequest struct { // ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. Challenge string `json:"challenge"` Client OAuth2Client `json:"client"` - OidcContext *OpenIDConnectContext `json:"oidc_context,omitempty"` + OidcContext *OAuth2ConsentRequestOpenIDConnectContext `json:"oidc_context,omitempty"` // 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 string `json:"request_url"` RequestedAccessTokenAudience []string `json:"requested_access_token_audience"` @@ -32,12 +33,12 @@ type LoginRequest struct { Subject string `json:"subject"` } -// NewLoginRequest instantiates a new LoginRequest object +// NewOAuth2LoginRequest instantiates a new OAuth2LoginRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewLoginRequest(challenge string, client OAuth2Client, requestUrl string, requestedAccessTokenAudience []string, requestedScope []string, skip bool, subject string) *LoginRequest { - this := LoginRequest{} +func NewOAuth2LoginRequest(challenge string, client OAuth2Client, requestUrl string, requestedAccessTokenAudience []string, requestedScope []string, skip bool, subject string) *OAuth2LoginRequest { + this := OAuth2LoginRequest{} this.Challenge = challenge this.Client = client this.RequestUrl = requestUrl @@ -48,16 +49,16 @@ func NewLoginRequest(challenge string, client OAuth2Client, requestUrl string, r return &this } -// NewLoginRequestWithDefaults instantiates a new LoginRequest object +// NewOAuth2LoginRequestWithDefaults instantiates a new OAuth2LoginRequest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewLoginRequestWithDefaults() *LoginRequest { - this := LoginRequest{} +func NewOAuth2LoginRequestWithDefaults() *OAuth2LoginRequest { + this := OAuth2LoginRequest{} return &this } // GetChallenge returns the Challenge field value -func (o *LoginRequest) GetChallenge() string { +func (o *OAuth2LoginRequest) GetChallenge() string { if o == nil { var ret string return ret @@ -68,20 +69,20 @@ func (o *LoginRequest) GetChallenge() string { // GetChallengeOk returns a tuple with the Challenge field value // and a boolean to check if the value has been set. -func (o *LoginRequest) GetChallengeOk() (*string, bool) { - if o == nil { +func (o *OAuth2LoginRequest) GetChallengeOk() (*string, bool) { + if o == nil { return nil, false } return &o.Challenge, true } // SetChallenge sets field value -func (o *LoginRequest) SetChallenge(v string) { +func (o *OAuth2LoginRequest) SetChallenge(v string) { o.Challenge = v } // GetClient returns the Client field value -func (o *LoginRequest) GetClient() OAuth2Client { +func (o *OAuth2LoginRequest) GetClient() OAuth2Client { if o == nil { var ret OAuth2Client return ret @@ -92,22 +93,22 @@ func (o *LoginRequest) GetClient() OAuth2Client { // GetClientOk returns a tuple with the Client field value // and a boolean to check if the value has been set. -func (o *LoginRequest) GetClientOk() (*OAuth2Client, bool) { - if o == nil { +func (o *OAuth2LoginRequest) GetClientOk() (*OAuth2Client, bool) { + if o == nil { return nil, false } return &o.Client, true } // SetClient sets field value -func (o *LoginRequest) SetClient(v OAuth2Client) { +func (o *OAuth2LoginRequest) SetClient(v OAuth2Client) { o.Client = v } // GetOidcContext returns the OidcContext field value if set, zero value otherwise. -func (o *LoginRequest) GetOidcContext() OpenIDConnectContext { +func (o *OAuth2LoginRequest) GetOidcContext() OAuth2ConsentRequestOpenIDConnectContext { if o == nil || o.OidcContext == nil { - var ret OpenIDConnectContext + var ret OAuth2ConsentRequestOpenIDConnectContext return ret } return *o.OidcContext @@ -115,7 +116,7 @@ func (o *LoginRequest) GetOidcContext() OpenIDConnectContext { // GetOidcContextOk returns a tuple with the OidcContext field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoginRequest) GetOidcContextOk() (*OpenIDConnectContext, bool) { +func (o *OAuth2LoginRequest) GetOidcContextOk() (*OAuth2ConsentRequestOpenIDConnectContext, bool) { if o == nil || o.OidcContext == nil { return nil, false } @@ -123,7 +124,7 @@ func (o *LoginRequest) GetOidcContextOk() (*OpenIDConnectContext, bool) { } // HasOidcContext returns a boolean if a field has been set. -func (o *LoginRequest) HasOidcContext() bool { +func (o *OAuth2LoginRequest) HasOidcContext() bool { if o != nil && o.OidcContext != nil { return true } @@ -131,13 +132,13 @@ func (o *LoginRequest) HasOidcContext() bool { return false } -// SetOidcContext gets a reference to the given OpenIDConnectContext and assigns it to the OidcContext field. -func (o *LoginRequest) SetOidcContext(v OpenIDConnectContext) { +// SetOidcContext gets a reference to the given OAuth2ConsentRequestOpenIDConnectContext and assigns it to the OidcContext field. +func (o *OAuth2LoginRequest) SetOidcContext(v OAuth2ConsentRequestOpenIDConnectContext) { o.OidcContext = &v } // GetRequestUrl returns the RequestUrl field value -func (o *LoginRequest) GetRequestUrl() string { +func (o *OAuth2LoginRequest) GetRequestUrl() string { if o == nil { var ret string return ret @@ -148,20 +149,20 @@ func (o *LoginRequest) GetRequestUrl() string { // GetRequestUrlOk returns a tuple with the RequestUrl field value // and a boolean to check if the value has been set. -func (o *LoginRequest) GetRequestUrlOk() (*string, bool) { - if o == nil { +func (o *OAuth2LoginRequest) GetRequestUrlOk() (*string, bool) { + if o == nil { return nil, false } return &o.RequestUrl, true } // SetRequestUrl sets field value -func (o *LoginRequest) SetRequestUrl(v string) { +func (o *OAuth2LoginRequest) SetRequestUrl(v string) { o.RequestUrl = v } // GetRequestedAccessTokenAudience returns the RequestedAccessTokenAudience field value -func (o *LoginRequest) GetRequestedAccessTokenAudience() []string { +func (o *OAuth2LoginRequest) GetRequestedAccessTokenAudience() []string { if o == nil { var ret []string return ret @@ -172,20 +173,20 @@ func (o *LoginRequest) GetRequestedAccessTokenAudience() []string { // GetRequestedAccessTokenAudienceOk returns a tuple with the RequestedAccessTokenAudience field value // and a boolean to check if the value has been set. -func (o *LoginRequest) GetRequestedAccessTokenAudienceOk() ([]string, bool) { - if o == nil { +func (o *OAuth2LoginRequest) GetRequestedAccessTokenAudienceOk() ([]string, bool) { + if o == nil { return nil, false } return o.RequestedAccessTokenAudience, true } // SetRequestedAccessTokenAudience sets field value -func (o *LoginRequest) SetRequestedAccessTokenAudience(v []string) { +func (o *OAuth2LoginRequest) SetRequestedAccessTokenAudience(v []string) { o.RequestedAccessTokenAudience = v } // GetRequestedScope returns the RequestedScope field value -func (o *LoginRequest) GetRequestedScope() []string { +func (o *OAuth2LoginRequest) GetRequestedScope() []string { if o == nil { var ret []string return ret @@ -196,20 +197,20 @@ func (o *LoginRequest) GetRequestedScope() []string { // GetRequestedScopeOk returns a tuple with the RequestedScope field value // and a boolean to check if the value has been set. -func (o *LoginRequest) GetRequestedScopeOk() ([]string, bool) { - if o == nil { +func (o *OAuth2LoginRequest) GetRequestedScopeOk() ([]string, bool) { + if o == nil { return nil, false } return o.RequestedScope, true } // SetRequestedScope sets field value -func (o *LoginRequest) SetRequestedScope(v []string) { +func (o *OAuth2LoginRequest) SetRequestedScope(v []string) { o.RequestedScope = v } // GetSessionId returns the SessionId field value if set, zero value otherwise. -func (o *LoginRequest) GetSessionId() string { +func (o *OAuth2LoginRequest) GetSessionId() string { if o == nil || o.SessionId == nil { var ret string return ret @@ -219,7 +220,7 @@ func (o *LoginRequest) GetSessionId() string { // GetSessionIdOk returns a tuple with the SessionId field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LoginRequest) GetSessionIdOk() (*string, bool) { +func (o *OAuth2LoginRequest) GetSessionIdOk() (*string, bool) { if o == nil || o.SessionId == nil { return nil, false } @@ -227,7 +228,7 @@ func (o *LoginRequest) GetSessionIdOk() (*string, bool) { } // HasSessionId returns a boolean if a field has been set. -func (o *LoginRequest) HasSessionId() bool { +func (o *OAuth2LoginRequest) HasSessionId() bool { if o != nil && o.SessionId != nil { return true } @@ -236,12 +237,12 @@ func (o *LoginRequest) HasSessionId() bool { } // SetSessionId gets a reference to the given string and assigns it to the SessionId field. -func (o *LoginRequest) SetSessionId(v string) { +func (o *OAuth2LoginRequest) SetSessionId(v string) { o.SessionId = &v } // GetSkip returns the Skip field value -func (o *LoginRequest) GetSkip() bool { +func (o *OAuth2LoginRequest) GetSkip() bool { if o == nil { var ret bool return ret @@ -252,20 +253,20 @@ func (o *LoginRequest) GetSkip() bool { // GetSkipOk returns a tuple with the Skip field value // and a boolean to check if the value has been set. -func (o *LoginRequest) GetSkipOk() (*bool, bool) { - if o == nil { +func (o *OAuth2LoginRequest) GetSkipOk() (*bool, bool) { + if o == nil { return nil, false } return &o.Skip, true } // SetSkip sets field value -func (o *LoginRequest) SetSkip(v bool) { +func (o *OAuth2LoginRequest) SetSkip(v bool) { o.Skip = v } // GetSubject returns the Subject field value -func (o *LoginRequest) GetSubject() string { +func (o *OAuth2LoginRequest) GetSubject() string { if o == nil { var ret string return ret @@ -276,19 +277,19 @@ func (o *LoginRequest) GetSubject() string { // GetSubjectOk returns a tuple with the Subject field value // and a boolean to check if the value has been set. -func (o *LoginRequest) GetSubjectOk() (*string, bool) { - if o == nil { +func (o *OAuth2LoginRequest) GetSubjectOk() (*string, bool) { + if o == nil { return nil, false } return &o.Subject, true } // SetSubject sets field value -func (o *LoginRequest) SetSubject(v string) { +func (o *OAuth2LoginRequest) SetSubject(v string) { o.Subject = v } -func (o LoginRequest) MarshalJSON() ([]byte, error) { +func (o OAuth2LoginRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["challenge"] = o.Challenge @@ -320,38 +321,38 @@ func (o LoginRequest) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableLoginRequest struct { - value *LoginRequest +type NullableOAuth2LoginRequest struct { + value *OAuth2LoginRequest isSet bool } -func (v NullableLoginRequest) Get() *LoginRequest { +func (v NullableOAuth2LoginRequest) Get() *OAuth2LoginRequest { return v.value } -func (v *NullableLoginRequest) Set(val *LoginRequest) { +func (v *NullableOAuth2LoginRequest) Set(val *OAuth2LoginRequest) { v.value = val v.isSet = true } -func (v NullableLoginRequest) IsSet() bool { +func (v NullableOAuth2LoginRequest) IsSet() bool { return v.isSet } -func (v *NullableLoginRequest) Unset() { +func (v *NullableOAuth2LoginRequest) Unset() { v.value = nil v.isSet = false } -func NewNullableLoginRequest(val *LoginRequest) *NullableLoginRequest { - return &NullableLoginRequest{value: val, isSet: true} +func NewNullableOAuth2LoginRequest(val *OAuth2LoginRequest) *NullableOAuth2LoginRequest { + return &NullableOAuth2LoginRequest{value: val, isSet: true} } -func (v NullableLoginRequest) MarshalJSON() ([]byte, error) { +func (v NullableOAuth2LoginRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableLoginRequest) UnmarshalJSON(src []byte) error { +func (v *NullableOAuth2LoginRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_logout_request.go b/clients/hydra/go/model_o_auth2_logout_request.go similarity index 69% rename from clients/hydra/go/model_logout_request.go rename to clients/hydra/go/model_o_auth2_logout_request.go index e28e3698d44..2c2a7bc6e74 100644 --- a/clients/hydra/go/model_logout_request.go +++ b/clients/hydra/go/model_o_auth2_logout_request.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,8 +15,8 @@ import ( "encoding/json" ) -// LogoutRequest struct for LogoutRequest -type LogoutRequest struct { +// OAuth2LogoutRequest struct for OAuth2LogoutRequest +type OAuth2LogoutRequest struct { // Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. Challenge *string `json:"challenge,omitempty"` Client *OAuth2Client `json:"client,omitempty"` @@ -29,25 +30,25 @@ type LogoutRequest struct { Subject *string `json:"subject,omitempty"` } -// NewLogoutRequest instantiates a new LogoutRequest object +// NewOAuth2LogoutRequest instantiates a new OAuth2LogoutRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewLogoutRequest() *LogoutRequest { - this := LogoutRequest{} +func NewOAuth2LogoutRequest() *OAuth2LogoutRequest { + this := OAuth2LogoutRequest{} return &this } -// NewLogoutRequestWithDefaults instantiates a new LogoutRequest object +// NewOAuth2LogoutRequestWithDefaults instantiates a new OAuth2LogoutRequest object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewLogoutRequestWithDefaults() *LogoutRequest { - this := LogoutRequest{} +func NewOAuth2LogoutRequestWithDefaults() *OAuth2LogoutRequest { + this := OAuth2LogoutRequest{} return &this } // GetChallenge returns the Challenge field value if set, zero value otherwise. -func (o *LogoutRequest) GetChallenge() string { +func (o *OAuth2LogoutRequest) GetChallenge() string { if o == nil || o.Challenge == nil { var ret string return ret @@ -57,7 +58,7 @@ func (o *LogoutRequest) GetChallenge() string { // GetChallengeOk returns a tuple with the Challenge field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LogoutRequest) GetChallengeOk() (*string, bool) { +func (o *OAuth2LogoutRequest) GetChallengeOk() (*string, bool) { if o == nil || o.Challenge == nil { return nil, false } @@ -65,7 +66,7 @@ func (o *LogoutRequest) GetChallengeOk() (*string, bool) { } // HasChallenge returns a boolean if a field has been set. -func (o *LogoutRequest) HasChallenge() bool { +func (o *OAuth2LogoutRequest) HasChallenge() bool { if o != nil && o.Challenge != nil { return true } @@ -74,12 +75,12 @@ func (o *LogoutRequest) HasChallenge() bool { } // SetChallenge gets a reference to the given string and assigns it to the Challenge field. -func (o *LogoutRequest) SetChallenge(v string) { +func (o *OAuth2LogoutRequest) SetChallenge(v string) { o.Challenge = &v } // GetClient returns the Client field value if set, zero value otherwise. -func (o *LogoutRequest) GetClient() OAuth2Client { +func (o *OAuth2LogoutRequest) GetClient() OAuth2Client { if o == nil || o.Client == nil { var ret OAuth2Client return ret @@ -89,7 +90,7 @@ func (o *LogoutRequest) GetClient() OAuth2Client { // GetClientOk returns a tuple with the Client field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LogoutRequest) GetClientOk() (*OAuth2Client, bool) { +func (o *OAuth2LogoutRequest) GetClientOk() (*OAuth2Client, bool) { if o == nil || o.Client == nil { return nil, false } @@ -97,7 +98,7 @@ func (o *LogoutRequest) GetClientOk() (*OAuth2Client, bool) { } // HasClient returns a boolean if a field has been set. -func (o *LogoutRequest) HasClient() bool { +func (o *OAuth2LogoutRequest) HasClient() bool { if o != nil && o.Client != nil { return true } @@ -106,12 +107,12 @@ func (o *LogoutRequest) HasClient() bool { } // SetClient gets a reference to the given OAuth2Client and assigns it to the Client field. -func (o *LogoutRequest) SetClient(v OAuth2Client) { +func (o *OAuth2LogoutRequest) SetClient(v OAuth2Client) { o.Client = &v } // GetRequestUrl returns the RequestUrl field value if set, zero value otherwise. -func (o *LogoutRequest) GetRequestUrl() string { +func (o *OAuth2LogoutRequest) GetRequestUrl() string { if o == nil || o.RequestUrl == nil { var ret string return ret @@ -121,7 +122,7 @@ func (o *LogoutRequest) GetRequestUrl() string { // GetRequestUrlOk returns a tuple with the RequestUrl field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LogoutRequest) GetRequestUrlOk() (*string, bool) { +func (o *OAuth2LogoutRequest) GetRequestUrlOk() (*string, bool) { if o == nil || o.RequestUrl == nil { return nil, false } @@ -129,7 +130,7 @@ func (o *LogoutRequest) GetRequestUrlOk() (*string, bool) { } // HasRequestUrl returns a boolean if a field has been set. -func (o *LogoutRequest) HasRequestUrl() bool { +func (o *OAuth2LogoutRequest) HasRequestUrl() bool { if o != nil && o.RequestUrl != nil { return true } @@ -138,12 +139,12 @@ func (o *LogoutRequest) HasRequestUrl() bool { } // SetRequestUrl gets a reference to the given string and assigns it to the RequestUrl field. -func (o *LogoutRequest) SetRequestUrl(v string) { +func (o *OAuth2LogoutRequest) SetRequestUrl(v string) { o.RequestUrl = &v } // GetRpInitiated returns the RpInitiated field value if set, zero value otherwise. -func (o *LogoutRequest) GetRpInitiated() bool { +func (o *OAuth2LogoutRequest) GetRpInitiated() bool { if o == nil || o.RpInitiated == nil { var ret bool return ret @@ -153,7 +154,7 @@ func (o *LogoutRequest) GetRpInitiated() bool { // GetRpInitiatedOk returns a tuple with the RpInitiated field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LogoutRequest) GetRpInitiatedOk() (*bool, bool) { +func (o *OAuth2LogoutRequest) GetRpInitiatedOk() (*bool, bool) { if o == nil || o.RpInitiated == nil { return nil, false } @@ -161,7 +162,7 @@ func (o *LogoutRequest) GetRpInitiatedOk() (*bool, bool) { } // HasRpInitiated returns a boolean if a field has been set. -func (o *LogoutRequest) HasRpInitiated() bool { +func (o *OAuth2LogoutRequest) HasRpInitiated() bool { if o != nil && o.RpInitiated != nil { return true } @@ -170,12 +171,12 @@ func (o *LogoutRequest) HasRpInitiated() bool { } // SetRpInitiated gets a reference to the given bool and assigns it to the RpInitiated field. -func (o *LogoutRequest) SetRpInitiated(v bool) { +func (o *OAuth2LogoutRequest) SetRpInitiated(v bool) { o.RpInitiated = &v } // GetSid returns the Sid field value if set, zero value otherwise. -func (o *LogoutRequest) GetSid() string { +func (o *OAuth2LogoutRequest) GetSid() string { if o == nil || o.Sid == nil { var ret string return ret @@ -185,7 +186,7 @@ func (o *LogoutRequest) GetSid() string { // GetSidOk returns a tuple with the Sid field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LogoutRequest) GetSidOk() (*string, bool) { +func (o *OAuth2LogoutRequest) GetSidOk() (*string, bool) { if o == nil || o.Sid == nil { return nil, false } @@ -193,7 +194,7 @@ func (o *LogoutRequest) GetSidOk() (*string, bool) { } // HasSid returns a boolean if a field has been set. -func (o *LogoutRequest) HasSid() bool { +func (o *OAuth2LogoutRequest) HasSid() bool { if o != nil && o.Sid != nil { return true } @@ -202,12 +203,12 @@ func (o *LogoutRequest) HasSid() bool { } // SetSid gets a reference to the given string and assigns it to the Sid field. -func (o *LogoutRequest) SetSid(v string) { +func (o *OAuth2LogoutRequest) SetSid(v string) { o.Sid = &v } // GetSubject returns the Subject field value if set, zero value otherwise. -func (o *LogoutRequest) GetSubject() string { +func (o *OAuth2LogoutRequest) GetSubject() string { if o == nil || o.Subject == nil { var ret string return ret @@ -217,7 +218,7 @@ func (o *LogoutRequest) GetSubject() string { // GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *LogoutRequest) GetSubjectOk() (*string, bool) { +func (o *OAuth2LogoutRequest) GetSubjectOk() (*string, bool) { if o == nil || o.Subject == nil { return nil, false } @@ -225,7 +226,7 @@ func (o *LogoutRequest) GetSubjectOk() (*string, bool) { } // HasSubject returns a boolean if a field has been set. -func (o *LogoutRequest) HasSubject() bool { +func (o *OAuth2LogoutRequest) HasSubject() bool { if o != nil && o.Subject != nil { return true } @@ -234,11 +235,11 @@ func (o *LogoutRequest) HasSubject() bool { } // SetSubject gets a reference to the given string and assigns it to the Subject field. -func (o *LogoutRequest) SetSubject(v string) { +func (o *OAuth2LogoutRequest) SetSubject(v string) { o.Subject = &v } -func (o LogoutRequest) MarshalJSON() ([]byte, error) { +func (o OAuth2LogoutRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Challenge != nil { toSerialize["challenge"] = o.Challenge @@ -261,38 +262,38 @@ func (o LogoutRequest) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableLogoutRequest struct { - value *LogoutRequest +type NullableOAuth2LogoutRequest struct { + value *OAuth2LogoutRequest isSet bool } -func (v NullableLogoutRequest) Get() *LogoutRequest { +func (v NullableOAuth2LogoutRequest) Get() *OAuth2LogoutRequest { return v.value } -func (v *NullableLogoutRequest) Set(val *LogoutRequest) { +func (v *NullableOAuth2LogoutRequest) Set(val *OAuth2LogoutRequest) { v.value = val v.isSet = true } -func (v NullableLogoutRequest) IsSet() bool { +func (v NullableOAuth2LogoutRequest) IsSet() bool { return v.isSet } -func (v *NullableLogoutRequest) Unset() { +func (v *NullableOAuth2LogoutRequest) Unset() { v.value = nil v.isSet = false } -func NewNullableLogoutRequest(val *LogoutRequest) *NullableLogoutRequest { - return &NullableLogoutRequest{value: val, isSet: true} +func NewNullableOAuth2LogoutRequest(val *OAuth2LogoutRequest) *NullableOAuth2LogoutRequest { + return &NullableOAuth2LogoutRequest{value: val, isSet: true} } -func (v NullableLogoutRequest) MarshalJSON() ([]byte, error) { +func (v NullableOAuth2LogoutRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableLogoutRequest) UnmarshalJSON(src []byte) error { +func (v *NullableOAuth2LogoutRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_o_auth2_redirect_to.go b/clients/hydra/go/model_o_auth2_redirect_to.go new file mode 100644 index 00000000000..8d4927fbe04 --- /dev/null +++ b/clients/hydra/go/model_o_auth2_redirect_to.go @@ -0,0 +1,110 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// OAuth2RedirectTo Contains a redirect URL used to complete a login, consent, or logout request. +type OAuth2RedirectTo struct { + // RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. + RedirectTo string `json:"redirect_to"` +} + +// NewOAuth2RedirectTo instantiates a new OAuth2RedirectTo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOAuth2RedirectTo(redirectTo string) *OAuth2RedirectTo { + this := OAuth2RedirectTo{} + this.RedirectTo = redirectTo + return &this +} + +// NewOAuth2RedirectToWithDefaults instantiates a new OAuth2RedirectTo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOAuth2RedirectToWithDefaults() *OAuth2RedirectTo { + this := OAuth2RedirectTo{} + return &this +} + +// GetRedirectTo returns the RedirectTo field value +func (o *OAuth2RedirectTo) GetRedirectTo() string { + if o == nil { + var ret string + return ret + } + + return o.RedirectTo +} + +// GetRedirectToOk returns a tuple with the RedirectTo field value +// and a boolean to check if the value has been set. +func (o *OAuth2RedirectTo) GetRedirectToOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RedirectTo, true +} + +// SetRedirectTo sets field value +func (o *OAuth2RedirectTo) SetRedirectTo(v string) { + o.RedirectTo = v +} + +func (o OAuth2RedirectTo) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["redirect_to"] = o.RedirectTo + } + return json.Marshal(toSerialize) +} + +type NullableOAuth2RedirectTo struct { + value *OAuth2RedirectTo + isSet bool +} + +func (v NullableOAuth2RedirectTo) Get() *OAuth2RedirectTo { + return v.value +} + +func (v *NullableOAuth2RedirectTo) Set(val *OAuth2RedirectTo) { + v.value = val + v.isSet = true +} + +func (v NullableOAuth2RedirectTo) IsSet() bool { + return v.isSet +} + +func (v *NullableOAuth2RedirectTo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOAuth2RedirectTo(val *OAuth2RedirectTo) *NullableOAuth2RedirectTo { + return &NullableOAuth2RedirectTo{value: val, isSet: true} +} + +func (v NullableOAuth2RedirectTo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOAuth2RedirectTo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_oauth2_token_response.go b/clients/hydra/go/model_o_auth2_token_exchange.go similarity index 61% rename from clients/hydra/go/model_oauth2_token_response.go rename to clients/hydra/go/model_o_auth2_token_exchange.go index 1f5ca8ee6bf..cf861737289 100644 --- a/clients/hydra/go/model_oauth2_token_response.go +++ b/clients/hydra/go/model_o_auth2_token_exchange.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,35 +15,41 @@ import ( "encoding/json" ) -// Oauth2TokenResponse The Access Token Response -type Oauth2TokenResponse struct { +// OAuth2TokenExchange OAuth2 Token Exchange Result +type OAuth2TokenExchange struct { + // The access token issued by the authorization server. AccessToken *string `json:"access_token,omitempty"` + // 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. ExpiresIn *int64 `json:"expires_in,omitempty"` - IdToken *string `json:"id_token,omitempty"` + // To retrieve a refresh token request the id_token scope. + IdToken *int64 `json:"id_token,omitempty"` + // The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. RefreshToken *string `json:"refresh_token,omitempty"` - Scope *string `json:"scope,omitempty"` + // The scope of the access token + Scope *int64 `json:"scope,omitempty"` + // The type of the token issued TokenType *string `json:"token_type,omitempty"` } -// NewOauth2TokenResponse instantiates a new Oauth2TokenResponse object +// NewOAuth2TokenExchange instantiates a new OAuth2TokenExchange object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewOauth2TokenResponse() *Oauth2TokenResponse { - this := Oauth2TokenResponse{} +func NewOAuth2TokenExchange() *OAuth2TokenExchange { + this := OAuth2TokenExchange{} return &this } -// NewOauth2TokenResponseWithDefaults instantiates a new Oauth2TokenResponse object +// NewOAuth2TokenExchangeWithDefaults instantiates a new OAuth2TokenExchange object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewOauth2TokenResponseWithDefaults() *Oauth2TokenResponse { - this := Oauth2TokenResponse{} +func NewOAuth2TokenExchangeWithDefaults() *OAuth2TokenExchange { + this := OAuth2TokenExchange{} return &this } // GetAccessToken returns the AccessToken field value if set, zero value otherwise. -func (o *Oauth2TokenResponse) GetAccessToken() string { +func (o *OAuth2TokenExchange) GetAccessToken() string { if o == nil || o.AccessToken == nil { var ret string return ret @@ -52,7 +59,7 @@ func (o *Oauth2TokenResponse) GetAccessToken() string { // GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Oauth2TokenResponse) GetAccessTokenOk() (*string, bool) { +func (o *OAuth2TokenExchange) GetAccessTokenOk() (*string, bool) { if o == nil || o.AccessToken == nil { return nil, false } @@ -60,7 +67,7 @@ func (o *Oauth2TokenResponse) GetAccessTokenOk() (*string, bool) { } // HasAccessToken returns a boolean if a field has been set. -func (o *Oauth2TokenResponse) HasAccessToken() bool { +func (o *OAuth2TokenExchange) HasAccessToken() bool { if o != nil && o.AccessToken != nil { return true } @@ -69,12 +76,12 @@ func (o *Oauth2TokenResponse) HasAccessToken() bool { } // SetAccessToken gets a reference to the given string and assigns it to the AccessToken field. -func (o *Oauth2TokenResponse) SetAccessToken(v string) { +func (o *OAuth2TokenExchange) SetAccessToken(v string) { o.AccessToken = &v } // GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise. -func (o *Oauth2TokenResponse) GetExpiresIn() int64 { +func (o *OAuth2TokenExchange) GetExpiresIn() int64 { if o == nil || o.ExpiresIn == nil { var ret int64 return ret @@ -84,7 +91,7 @@ func (o *Oauth2TokenResponse) GetExpiresIn() int64 { // GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Oauth2TokenResponse) GetExpiresInOk() (*int64, bool) { +func (o *OAuth2TokenExchange) GetExpiresInOk() (*int64, bool) { if o == nil || o.ExpiresIn == nil { return nil, false } @@ -92,7 +99,7 @@ func (o *Oauth2TokenResponse) GetExpiresInOk() (*int64, bool) { } // HasExpiresIn returns a boolean if a field has been set. -func (o *Oauth2TokenResponse) HasExpiresIn() bool { +func (o *OAuth2TokenExchange) HasExpiresIn() bool { if o != nil && o.ExpiresIn != nil { return true } @@ -101,14 +108,14 @@ func (o *Oauth2TokenResponse) HasExpiresIn() bool { } // SetExpiresIn gets a reference to the given int64 and assigns it to the ExpiresIn field. -func (o *Oauth2TokenResponse) SetExpiresIn(v int64) { +func (o *OAuth2TokenExchange) SetExpiresIn(v int64) { o.ExpiresIn = &v } // GetIdToken returns the IdToken field value if set, zero value otherwise. -func (o *Oauth2TokenResponse) GetIdToken() string { +func (o *OAuth2TokenExchange) GetIdToken() int64 { if o == nil || o.IdToken == nil { - var ret string + var ret int64 return ret } return *o.IdToken @@ -116,7 +123,7 @@ func (o *Oauth2TokenResponse) GetIdToken() string { // GetIdTokenOk returns a tuple with the IdToken field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Oauth2TokenResponse) GetIdTokenOk() (*string, bool) { +func (o *OAuth2TokenExchange) GetIdTokenOk() (*int64, bool) { if o == nil || o.IdToken == nil { return nil, false } @@ -124,7 +131,7 @@ func (o *Oauth2TokenResponse) GetIdTokenOk() (*string, bool) { } // HasIdToken returns a boolean if a field has been set. -func (o *Oauth2TokenResponse) HasIdToken() bool { +func (o *OAuth2TokenExchange) HasIdToken() bool { if o != nil && o.IdToken != nil { return true } @@ -132,13 +139,13 @@ func (o *Oauth2TokenResponse) HasIdToken() bool { return false } -// SetIdToken gets a reference to the given string and assigns it to the IdToken field. -func (o *Oauth2TokenResponse) SetIdToken(v string) { +// SetIdToken gets a reference to the given int64 and assigns it to the IdToken field. +func (o *OAuth2TokenExchange) SetIdToken(v int64) { o.IdToken = &v } // GetRefreshToken returns the RefreshToken field value if set, zero value otherwise. -func (o *Oauth2TokenResponse) GetRefreshToken() string { +func (o *OAuth2TokenExchange) GetRefreshToken() string { if o == nil || o.RefreshToken == nil { var ret string return ret @@ -148,7 +155,7 @@ func (o *Oauth2TokenResponse) GetRefreshToken() string { // GetRefreshTokenOk returns a tuple with the RefreshToken field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Oauth2TokenResponse) GetRefreshTokenOk() (*string, bool) { +func (o *OAuth2TokenExchange) GetRefreshTokenOk() (*string, bool) { if o == nil || o.RefreshToken == nil { return nil, false } @@ -156,7 +163,7 @@ func (o *Oauth2TokenResponse) GetRefreshTokenOk() (*string, bool) { } // HasRefreshToken returns a boolean if a field has been set. -func (o *Oauth2TokenResponse) HasRefreshToken() bool { +func (o *OAuth2TokenExchange) HasRefreshToken() bool { if o != nil && o.RefreshToken != nil { return true } @@ -165,14 +172,14 @@ func (o *Oauth2TokenResponse) HasRefreshToken() bool { } // SetRefreshToken gets a reference to the given string and assigns it to the RefreshToken field. -func (o *Oauth2TokenResponse) SetRefreshToken(v string) { +func (o *OAuth2TokenExchange) SetRefreshToken(v string) { o.RefreshToken = &v } // GetScope returns the Scope field value if set, zero value otherwise. -func (o *Oauth2TokenResponse) GetScope() string { +func (o *OAuth2TokenExchange) GetScope() int64 { if o == nil || o.Scope == nil { - var ret string + var ret int64 return ret } return *o.Scope @@ -180,7 +187,7 @@ func (o *Oauth2TokenResponse) GetScope() string { // GetScopeOk returns a tuple with the Scope field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Oauth2TokenResponse) GetScopeOk() (*string, bool) { +func (o *OAuth2TokenExchange) GetScopeOk() (*int64, bool) { if o == nil || o.Scope == nil { return nil, false } @@ -188,7 +195,7 @@ func (o *Oauth2TokenResponse) GetScopeOk() (*string, bool) { } // HasScope returns a boolean if a field has been set. -func (o *Oauth2TokenResponse) HasScope() bool { +func (o *OAuth2TokenExchange) HasScope() bool { if o != nil && o.Scope != nil { return true } @@ -196,13 +203,13 @@ func (o *Oauth2TokenResponse) HasScope() bool { return false } -// SetScope gets a reference to the given string and assigns it to the Scope field. -func (o *Oauth2TokenResponse) SetScope(v string) { +// SetScope gets a reference to the given int64 and assigns it to the Scope field. +func (o *OAuth2TokenExchange) SetScope(v int64) { o.Scope = &v } // GetTokenType returns the TokenType field value if set, zero value otherwise. -func (o *Oauth2TokenResponse) GetTokenType() string { +func (o *OAuth2TokenExchange) GetTokenType() string { if o == nil || o.TokenType == nil { var ret string return ret @@ -212,7 +219,7 @@ func (o *Oauth2TokenResponse) GetTokenType() string { // GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Oauth2TokenResponse) GetTokenTypeOk() (*string, bool) { +func (o *OAuth2TokenExchange) GetTokenTypeOk() (*string, bool) { if o == nil || o.TokenType == nil { return nil, false } @@ -220,7 +227,7 @@ func (o *Oauth2TokenResponse) GetTokenTypeOk() (*string, bool) { } // HasTokenType returns a boolean if a field has been set. -func (o *Oauth2TokenResponse) HasTokenType() bool { +func (o *OAuth2TokenExchange) HasTokenType() bool { if o != nil && o.TokenType != nil { return true } @@ -229,11 +236,11 @@ func (o *Oauth2TokenResponse) HasTokenType() bool { } // SetTokenType gets a reference to the given string and assigns it to the TokenType field. -func (o *Oauth2TokenResponse) SetTokenType(v string) { +func (o *OAuth2TokenExchange) SetTokenType(v string) { o.TokenType = &v } -func (o Oauth2TokenResponse) MarshalJSON() ([]byte, error) { +func (o OAuth2TokenExchange) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.AccessToken != nil { toSerialize["access_token"] = o.AccessToken @@ -256,38 +263,38 @@ func (o Oauth2TokenResponse) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableOauth2TokenResponse struct { - value *Oauth2TokenResponse +type NullableOAuth2TokenExchange struct { + value *OAuth2TokenExchange isSet bool } -func (v NullableOauth2TokenResponse) Get() *Oauth2TokenResponse { +func (v NullableOAuth2TokenExchange) Get() *OAuth2TokenExchange { return v.value } -func (v *NullableOauth2TokenResponse) Set(val *Oauth2TokenResponse) { +func (v *NullableOAuth2TokenExchange) Set(val *OAuth2TokenExchange) { v.value = val v.isSet = true } -func (v NullableOauth2TokenResponse) IsSet() bool { +func (v NullableOAuth2TokenExchange) IsSet() bool { return v.isSet } -func (v *NullableOauth2TokenResponse) Unset() { +func (v *NullableOAuth2TokenExchange) Unset() { v.value = nil v.isSet = false } -func NewNullableOauth2TokenResponse(val *Oauth2TokenResponse) *NullableOauth2TokenResponse { - return &NullableOauth2TokenResponse{value: val, isSet: true} +func NewNullableOAuth2TokenExchange(val *OAuth2TokenExchange) *NullableOAuth2TokenExchange { + return &NullableOAuth2TokenExchange{value: val, isSet: true} } -func (v NullableOauth2TokenResponse) MarshalJSON() ([]byte, error) { +func (v NullableOAuth2TokenExchange) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableOauth2TokenResponse) UnmarshalJSON(src []byte) error { +func (v *NullableOAuth2TokenExchange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_well_known.go b/clients/hydra/go/model_oidc_configuration.go similarity index 62% rename from clients/hydra/go/model_well_known.go rename to clients/hydra/go/model_oidc_configuration.go index 82d008fddbb..1a0de6d5d28 100644 --- a/clients/hydra/go/model_well_known.go +++ b/clients/hydra/go/model_oidc_configuration.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,90 +15,96 @@ import ( "encoding/json" ) -// WellKnown It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. -type WellKnown struct { - // URL of the OP's OAuth 2.0 Authorization Endpoint. +// OidcConfiguration Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. +type OidcConfiguration struct { + // OAuth 2.0 Authorization Endpoint URL AuthorizationEndpoint string `json:"authorization_endpoint"` - // 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 + // 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 BackchannelLogoutSessionSupported *bool `json:"backchannel_logout_session_supported,omitempty"` - // Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + // OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. BackchannelLogoutSupported *bool `json:"backchannel_logout_supported,omitempty"` - // Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + // OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. ClaimsParameterSupported *bool `json:"claims_parameter_supported,omitempty"` - // 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. + // 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. ClaimsSupported []string `json:"claims_supported,omitempty"` - // JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. + // 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. CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported,omitempty"` - // URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + // 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. EndSessionEndpoint *string `json:"end_session_endpoint,omitempty"` - // 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. + // 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. FrontchannelLogoutSessionSupported *bool `json:"frontchannel_logout_session_supported,omitempty"` - // Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + // OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. FrontchannelLogoutSupported *bool `json:"frontchannel_logout_supported,omitempty"` - // JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + // OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. GrantTypesSupported []string `json:"grant_types_supported,omitempty"` - // 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 Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. + IdTokenSignedResponseAlg []string `json:"id_token_signed_response_alg"` + // 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. IdTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"` - // 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. Issuer string `json:"issuer"` - // 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. JwksUri string `json:"jwks_uri"` - // URL of the OP's Dynamic Client Registration Endpoint. + // OpenID Connect Dynamic Client Registration Endpoint URL RegistrationEndpoint *string `json:"registration_endpoint,omitempty"` - // 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). + // 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). RequestObjectSigningAlgValuesSupported []string `json:"request_object_signing_alg_values_supported,omitempty"` - // Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + // OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. RequestParameterSupported *bool `json:"request_parameter_supported,omitempty"` - // Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + // OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. RequestUriParameterSupported *bool `json:"request_uri_parameter_supported,omitempty"` - // Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. + // 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. RequireRequestUriRegistration *bool `json:"require_request_uri_registration,omitempty"` - // JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + // OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. ResponseModesSupported []string `json:"response_modes_supported,omitempty"` - // 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. ResponseTypesSupported []string `json:"response_types_supported"` - // URL of the authorization server's OAuth 2.0 revocation endpoint. + // OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. RevocationEndpoint *string `json:"revocation_endpoint,omitempty"` - // SON 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 + // 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 ScopesSupported []string `json:"scopes_supported,omitempty"` - // 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. SubjectTypesSupported []string `json:"subject_types_supported"` - // URL of the OP's OAuth 2.0 Token Endpoint + // OAuth 2.0 Token Endpoint URL TokenEndpoint string `json:"token_endpoint"` - // 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 + // 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 TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported,omitempty"` - // URL of the OP's UserInfo Endpoint. + // OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. UserinfoEndpoint *string `json:"userinfo_endpoint,omitempty"` - // 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]. + // OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. + UserinfoSignedResponseAlg []string `json:"userinfo_signed_response_alg"` + // 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]. UserinfoSigningAlgValuesSupported []string `json:"userinfo_signing_alg_values_supported,omitempty"` } -// NewWellKnown instantiates a new WellKnown object +// NewOidcConfiguration instantiates a new OidcConfiguration object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewWellKnown(authorizationEndpoint string, idTokenSigningAlgValuesSupported []string, issuer string, jwksUri string, responseTypesSupported []string, subjectTypesSupported []string, tokenEndpoint string) *WellKnown { - this := WellKnown{} +func NewOidcConfiguration(authorizationEndpoint string, idTokenSignedResponseAlg []string, idTokenSigningAlgValuesSupported []string, issuer string, jwksUri string, responseTypesSupported []string, subjectTypesSupported []string, tokenEndpoint string, userinfoSignedResponseAlg []string) *OidcConfiguration { + this := OidcConfiguration{} this.AuthorizationEndpoint = authorizationEndpoint + this.IdTokenSignedResponseAlg = idTokenSignedResponseAlg this.IdTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported this.Issuer = issuer this.JwksUri = jwksUri this.ResponseTypesSupported = responseTypesSupported this.SubjectTypesSupported = subjectTypesSupported this.TokenEndpoint = tokenEndpoint + this.UserinfoSignedResponseAlg = userinfoSignedResponseAlg return &this } -// NewWellKnownWithDefaults instantiates a new WellKnown object +// NewOidcConfigurationWithDefaults instantiates a new OidcConfiguration object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewWellKnownWithDefaults() *WellKnown { - this := WellKnown{} +func NewOidcConfigurationWithDefaults() *OidcConfiguration { + this := OidcConfiguration{} return &this } // GetAuthorizationEndpoint returns the AuthorizationEndpoint field value -func (o *WellKnown) GetAuthorizationEndpoint() string { +func (o *OidcConfiguration) GetAuthorizationEndpoint() string { if o == nil { var ret string return ret @@ -108,20 +115,20 @@ func (o *WellKnown) GetAuthorizationEndpoint() string { // GetAuthorizationEndpointOk returns a tuple with the AuthorizationEndpoint field value // and a boolean to check if the value has been set. -func (o *WellKnown) GetAuthorizationEndpointOk() (*string, bool) { - if o == nil { +func (o *OidcConfiguration) GetAuthorizationEndpointOk() (*string, bool) { + if o == nil { return nil, false } return &o.AuthorizationEndpoint, true } // SetAuthorizationEndpoint sets field value -func (o *WellKnown) SetAuthorizationEndpoint(v string) { +func (o *OidcConfiguration) SetAuthorizationEndpoint(v string) { o.AuthorizationEndpoint = v } // GetBackchannelLogoutSessionSupported returns the BackchannelLogoutSessionSupported field value if set, zero value otherwise. -func (o *WellKnown) GetBackchannelLogoutSessionSupported() bool { +func (o *OidcConfiguration) GetBackchannelLogoutSessionSupported() bool { if o == nil || o.BackchannelLogoutSessionSupported == nil { var ret bool return ret @@ -131,7 +138,7 @@ func (o *WellKnown) GetBackchannelLogoutSessionSupported() bool { // GetBackchannelLogoutSessionSupportedOk returns a tuple with the BackchannelLogoutSessionSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetBackchannelLogoutSessionSupportedOk() (*bool, bool) { +func (o *OidcConfiguration) GetBackchannelLogoutSessionSupportedOk() (*bool, bool) { if o == nil || o.BackchannelLogoutSessionSupported == nil { return nil, false } @@ -139,7 +146,7 @@ func (o *WellKnown) GetBackchannelLogoutSessionSupportedOk() (*bool, bool) { } // HasBackchannelLogoutSessionSupported returns a boolean if a field has been set. -func (o *WellKnown) HasBackchannelLogoutSessionSupported() bool { +func (o *OidcConfiguration) HasBackchannelLogoutSessionSupported() bool { if o != nil && o.BackchannelLogoutSessionSupported != nil { return true } @@ -148,12 +155,12 @@ func (o *WellKnown) HasBackchannelLogoutSessionSupported() bool { } // SetBackchannelLogoutSessionSupported gets a reference to the given bool and assigns it to the BackchannelLogoutSessionSupported field. -func (o *WellKnown) SetBackchannelLogoutSessionSupported(v bool) { +func (o *OidcConfiguration) SetBackchannelLogoutSessionSupported(v bool) { o.BackchannelLogoutSessionSupported = &v } // GetBackchannelLogoutSupported returns the BackchannelLogoutSupported field value if set, zero value otherwise. -func (o *WellKnown) GetBackchannelLogoutSupported() bool { +func (o *OidcConfiguration) GetBackchannelLogoutSupported() bool { if o == nil || o.BackchannelLogoutSupported == nil { var ret bool return ret @@ -163,7 +170,7 @@ func (o *WellKnown) GetBackchannelLogoutSupported() bool { // GetBackchannelLogoutSupportedOk returns a tuple with the BackchannelLogoutSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetBackchannelLogoutSupportedOk() (*bool, bool) { +func (o *OidcConfiguration) GetBackchannelLogoutSupportedOk() (*bool, bool) { if o == nil || o.BackchannelLogoutSupported == nil { return nil, false } @@ -171,7 +178,7 @@ func (o *WellKnown) GetBackchannelLogoutSupportedOk() (*bool, bool) { } // HasBackchannelLogoutSupported returns a boolean if a field has been set. -func (o *WellKnown) HasBackchannelLogoutSupported() bool { +func (o *OidcConfiguration) HasBackchannelLogoutSupported() bool { if o != nil && o.BackchannelLogoutSupported != nil { return true } @@ -180,12 +187,12 @@ func (o *WellKnown) HasBackchannelLogoutSupported() bool { } // SetBackchannelLogoutSupported gets a reference to the given bool and assigns it to the BackchannelLogoutSupported field. -func (o *WellKnown) SetBackchannelLogoutSupported(v bool) { +func (o *OidcConfiguration) SetBackchannelLogoutSupported(v bool) { o.BackchannelLogoutSupported = &v } // GetClaimsParameterSupported returns the ClaimsParameterSupported field value if set, zero value otherwise. -func (o *WellKnown) GetClaimsParameterSupported() bool { +func (o *OidcConfiguration) GetClaimsParameterSupported() bool { if o == nil || o.ClaimsParameterSupported == nil { var ret bool return ret @@ -195,7 +202,7 @@ func (o *WellKnown) GetClaimsParameterSupported() bool { // GetClaimsParameterSupportedOk returns a tuple with the ClaimsParameterSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetClaimsParameterSupportedOk() (*bool, bool) { +func (o *OidcConfiguration) GetClaimsParameterSupportedOk() (*bool, bool) { if o == nil || o.ClaimsParameterSupported == nil { return nil, false } @@ -203,7 +210,7 @@ func (o *WellKnown) GetClaimsParameterSupportedOk() (*bool, bool) { } // HasClaimsParameterSupported returns a boolean if a field has been set. -func (o *WellKnown) HasClaimsParameterSupported() bool { +func (o *OidcConfiguration) HasClaimsParameterSupported() bool { if o != nil && o.ClaimsParameterSupported != nil { return true } @@ -212,12 +219,12 @@ func (o *WellKnown) HasClaimsParameterSupported() bool { } // SetClaimsParameterSupported gets a reference to the given bool and assigns it to the ClaimsParameterSupported field. -func (o *WellKnown) SetClaimsParameterSupported(v bool) { +func (o *OidcConfiguration) SetClaimsParameterSupported(v bool) { o.ClaimsParameterSupported = &v } // GetClaimsSupported returns the ClaimsSupported field value if set, zero value otherwise. -func (o *WellKnown) GetClaimsSupported() []string { +func (o *OidcConfiguration) GetClaimsSupported() []string { if o == nil || o.ClaimsSupported == nil { var ret []string return ret @@ -227,7 +234,7 @@ func (o *WellKnown) GetClaimsSupported() []string { // GetClaimsSupportedOk returns a tuple with the ClaimsSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetClaimsSupportedOk() ([]string, bool) { +func (o *OidcConfiguration) GetClaimsSupportedOk() ([]string, bool) { if o == nil || o.ClaimsSupported == nil { return nil, false } @@ -235,7 +242,7 @@ func (o *WellKnown) GetClaimsSupportedOk() ([]string, bool) { } // HasClaimsSupported returns a boolean if a field has been set. -func (o *WellKnown) HasClaimsSupported() bool { +func (o *OidcConfiguration) HasClaimsSupported() bool { if o != nil && o.ClaimsSupported != nil { return true } @@ -244,12 +251,12 @@ func (o *WellKnown) HasClaimsSupported() bool { } // SetClaimsSupported gets a reference to the given []string and assigns it to the ClaimsSupported field. -func (o *WellKnown) SetClaimsSupported(v []string) { +func (o *OidcConfiguration) SetClaimsSupported(v []string) { o.ClaimsSupported = v } // GetCodeChallengeMethodsSupported returns the CodeChallengeMethodsSupported field value if set, zero value otherwise. -func (o *WellKnown) GetCodeChallengeMethodsSupported() []string { +func (o *OidcConfiguration) GetCodeChallengeMethodsSupported() []string { if o == nil || o.CodeChallengeMethodsSupported == nil { var ret []string return ret @@ -259,7 +266,7 @@ func (o *WellKnown) GetCodeChallengeMethodsSupported() []string { // GetCodeChallengeMethodsSupportedOk returns a tuple with the CodeChallengeMethodsSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetCodeChallengeMethodsSupportedOk() ([]string, bool) { +func (o *OidcConfiguration) GetCodeChallengeMethodsSupportedOk() ([]string, bool) { if o == nil || o.CodeChallengeMethodsSupported == nil { return nil, false } @@ -267,7 +274,7 @@ func (o *WellKnown) GetCodeChallengeMethodsSupportedOk() ([]string, bool) { } // HasCodeChallengeMethodsSupported returns a boolean if a field has been set. -func (o *WellKnown) HasCodeChallengeMethodsSupported() bool { +func (o *OidcConfiguration) HasCodeChallengeMethodsSupported() bool { if o != nil && o.CodeChallengeMethodsSupported != nil { return true } @@ -276,12 +283,12 @@ func (o *WellKnown) HasCodeChallengeMethodsSupported() bool { } // SetCodeChallengeMethodsSupported gets a reference to the given []string and assigns it to the CodeChallengeMethodsSupported field. -func (o *WellKnown) SetCodeChallengeMethodsSupported(v []string) { +func (o *OidcConfiguration) SetCodeChallengeMethodsSupported(v []string) { o.CodeChallengeMethodsSupported = v } // GetEndSessionEndpoint returns the EndSessionEndpoint field value if set, zero value otherwise. -func (o *WellKnown) GetEndSessionEndpoint() string { +func (o *OidcConfiguration) GetEndSessionEndpoint() string { if o == nil || o.EndSessionEndpoint == nil { var ret string return ret @@ -291,7 +298,7 @@ func (o *WellKnown) GetEndSessionEndpoint() string { // GetEndSessionEndpointOk returns a tuple with the EndSessionEndpoint field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetEndSessionEndpointOk() (*string, bool) { +func (o *OidcConfiguration) GetEndSessionEndpointOk() (*string, bool) { if o == nil || o.EndSessionEndpoint == nil { return nil, false } @@ -299,7 +306,7 @@ func (o *WellKnown) GetEndSessionEndpointOk() (*string, bool) { } // HasEndSessionEndpoint returns a boolean if a field has been set. -func (o *WellKnown) HasEndSessionEndpoint() bool { +func (o *OidcConfiguration) HasEndSessionEndpoint() bool { if o != nil && o.EndSessionEndpoint != nil { return true } @@ -308,12 +315,12 @@ func (o *WellKnown) HasEndSessionEndpoint() bool { } // SetEndSessionEndpoint gets a reference to the given string and assigns it to the EndSessionEndpoint field. -func (o *WellKnown) SetEndSessionEndpoint(v string) { +func (o *OidcConfiguration) SetEndSessionEndpoint(v string) { o.EndSessionEndpoint = &v } // GetFrontchannelLogoutSessionSupported returns the FrontchannelLogoutSessionSupported field value if set, zero value otherwise. -func (o *WellKnown) GetFrontchannelLogoutSessionSupported() bool { +func (o *OidcConfiguration) GetFrontchannelLogoutSessionSupported() bool { if o == nil || o.FrontchannelLogoutSessionSupported == nil { var ret bool return ret @@ -323,7 +330,7 @@ func (o *WellKnown) GetFrontchannelLogoutSessionSupported() bool { // GetFrontchannelLogoutSessionSupportedOk returns a tuple with the FrontchannelLogoutSessionSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetFrontchannelLogoutSessionSupportedOk() (*bool, bool) { +func (o *OidcConfiguration) GetFrontchannelLogoutSessionSupportedOk() (*bool, bool) { if o == nil || o.FrontchannelLogoutSessionSupported == nil { return nil, false } @@ -331,7 +338,7 @@ func (o *WellKnown) GetFrontchannelLogoutSessionSupportedOk() (*bool, bool) { } // HasFrontchannelLogoutSessionSupported returns a boolean if a field has been set. -func (o *WellKnown) HasFrontchannelLogoutSessionSupported() bool { +func (o *OidcConfiguration) HasFrontchannelLogoutSessionSupported() bool { if o != nil && o.FrontchannelLogoutSessionSupported != nil { return true } @@ -340,12 +347,12 @@ func (o *WellKnown) HasFrontchannelLogoutSessionSupported() bool { } // SetFrontchannelLogoutSessionSupported gets a reference to the given bool and assigns it to the FrontchannelLogoutSessionSupported field. -func (o *WellKnown) SetFrontchannelLogoutSessionSupported(v bool) { +func (o *OidcConfiguration) SetFrontchannelLogoutSessionSupported(v bool) { o.FrontchannelLogoutSessionSupported = &v } // GetFrontchannelLogoutSupported returns the FrontchannelLogoutSupported field value if set, zero value otherwise. -func (o *WellKnown) GetFrontchannelLogoutSupported() bool { +func (o *OidcConfiguration) GetFrontchannelLogoutSupported() bool { if o == nil || o.FrontchannelLogoutSupported == nil { var ret bool return ret @@ -355,7 +362,7 @@ func (o *WellKnown) GetFrontchannelLogoutSupported() bool { // GetFrontchannelLogoutSupportedOk returns a tuple with the FrontchannelLogoutSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetFrontchannelLogoutSupportedOk() (*bool, bool) { +func (o *OidcConfiguration) GetFrontchannelLogoutSupportedOk() (*bool, bool) { if o == nil || o.FrontchannelLogoutSupported == nil { return nil, false } @@ -363,7 +370,7 @@ func (o *WellKnown) GetFrontchannelLogoutSupportedOk() (*bool, bool) { } // HasFrontchannelLogoutSupported returns a boolean if a field has been set. -func (o *WellKnown) HasFrontchannelLogoutSupported() bool { +func (o *OidcConfiguration) HasFrontchannelLogoutSupported() bool { if o != nil && o.FrontchannelLogoutSupported != nil { return true } @@ -372,12 +379,12 @@ func (o *WellKnown) HasFrontchannelLogoutSupported() bool { } // SetFrontchannelLogoutSupported gets a reference to the given bool and assigns it to the FrontchannelLogoutSupported field. -func (o *WellKnown) SetFrontchannelLogoutSupported(v bool) { +func (o *OidcConfiguration) SetFrontchannelLogoutSupported(v bool) { o.FrontchannelLogoutSupported = &v } // GetGrantTypesSupported returns the GrantTypesSupported field value if set, zero value otherwise. -func (o *WellKnown) GetGrantTypesSupported() []string { +func (o *OidcConfiguration) GetGrantTypesSupported() []string { if o == nil || o.GrantTypesSupported == nil { var ret []string return ret @@ -387,7 +394,7 @@ func (o *WellKnown) GetGrantTypesSupported() []string { // GetGrantTypesSupportedOk returns a tuple with the GrantTypesSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetGrantTypesSupportedOk() ([]string, bool) { +func (o *OidcConfiguration) GetGrantTypesSupportedOk() ([]string, bool) { if o == nil || o.GrantTypesSupported == nil { return nil, false } @@ -395,7 +402,7 @@ func (o *WellKnown) GetGrantTypesSupportedOk() ([]string, bool) { } // HasGrantTypesSupported returns a boolean if a field has been set. -func (o *WellKnown) HasGrantTypesSupported() bool { +func (o *OidcConfiguration) HasGrantTypesSupported() bool { if o != nil && o.GrantTypesSupported != nil { return true } @@ -404,12 +411,36 @@ func (o *WellKnown) HasGrantTypesSupported() bool { } // SetGrantTypesSupported gets a reference to the given []string and assigns it to the GrantTypesSupported field. -func (o *WellKnown) SetGrantTypesSupported(v []string) { +func (o *OidcConfiguration) SetGrantTypesSupported(v []string) { o.GrantTypesSupported = v } +// GetIdTokenSignedResponseAlg returns the IdTokenSignedResponseAlg field value +func (o *OidcConfiguration) GetIdTokenSignedResponseAlg() []string { + if o == nil { + var ret []string + return ret + } + + return o.IdTokenSignedResponseAlg +} + +// GetIdTokenSignedResponseAlgOk returns a tuple with the IdTokenSignedResponseAlg field value +// and a boolean to check if the value has been set. +func (o *OidcConfiguration) GetIdTokenSignedResponseAlgOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.IdTokenSignedResponseAlg, true +} + +// SetIdTokenSignedResponseAlg sets field value +func (o *OidcConfiguration) SetIdTokenSignedResponseAlg(v []string) { + o.IdTokenSignedResponseAlg = v +} + // GetIdTokenSigningAlgValuesSupported returns the IdTokenSigningAlgValuesSupported field value -func (o *WellKnown) GetIdTokenSigningAlgValuesSupported() []string { +func (o *OidcConfiguration) GetIdTokenSigningAlgValuesSupported() []string { if o == nil { var ret []string return ret @@ -420,20 +451,20 @@ func (o *WellKnown) GetIdTokenSigningAlgValuesSupported() []string { // GetIdTokenSigningAlgValuesSupportedOk returns a tuple with the IdTokenSigningAlgValuesSupported field value // and a boolean to check if the value has been set. -func (o *WellKnown) GetIdTokenSigningAlgValuesSupportedOk() ([]string, bool) { - if o == nil { +func (o *OidcConfiguration) GetIdTokenSigningAlgValuesSupportedOk() ([]string, bool) { + if o == nil { return nil, false } return o.IdTokenSigningAlgValuesSupported, true } // SetIdTokenSigningAlgValuesSupported sets field value -func (o *WellKnown) SetIdTokenSigningAlgValuesSupported(v []string) { +func (o *OidcConfiguration) SetIdTokenSigningAlgValuesSupported(v []string) { o.IdTokenSigningAlgValuesSupported = v } // GetIssuer returns the Issuer field value -func (o *WellKnown) GetIssuer() string { +func (o *OidcConfiguration) GetIssuer() string { if o == nil { var ret string return ret @@ -444,20 +475,20 @@ func (o *WellKnown) GetIssuer() string { // GetIssuerOk returns a tuple with the Issuer field value // and a boolean to check if the value has been set. -func (o *WellKnown) GetIssuerOk() (*string, bool) { - if o == nil { +func (o *OidcConfiguration) GetIssuerOk() (*string, bool) { + if o == nil { return nil, false } return &o.Issuer, true } // SetIssuer sets field value -func (o *WellKnown) SetIssuer(v string) { +func (o *OidcConfiguration) SetIssuer(v string) { o.Issuer = v } // GetJwksUri returns the JwksUri field value -func (o *WellKnown) GetJwksUri() string { +func (o *OidcConfiguration) GetJwksUri() string { if o == nil { var ret string return ret @@ -468,20 +499,20 @@ func (o *WellKnown) GetJwksUri() string { // GetJwksUriOk returns a tuple with the JwksUri field value // and a boolean to check if the value has been set. -func (o *WellKnown) GetJwksUriOk() (*string, bool) { - if o == nil { +func (o *OidcConfiguration) GetJwksUriOk() (*string, bool) { + if o == nil { return nil, false } return &o.JwksUri, true } // SetJwksUri sets field value -func (o *WellKnown) SetJwksUri(v string) { +func (o *OidcConfiguration) SetJwksUri(v string) { o.JwksUri = v } // GetRegistrationEndpoint returns the RegistrationEndpoint field value if set, zero value otherwise. -func (o *WellKnown) GetRegistrationEndpoint() string { +func (o *OidcConfiguration) GetRegistrationEndpoint() string { if o == nil || o.RegistrationEndpoint == nil { var ret string return ret @@ -491,7 +522,7 @@ func (o *WellKnown) GetRegistrationEndpoint() string { // GetRegistrationEndpointOk returns a tuple with the RegistrationEndpoint field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetRegistrationEndpointOk() (*string, bool) { +func (o *OidcConfiguration) GetRegistrationEndpointOk() (*string, bool) { if o == nil || o.RegistrationEndpoint == nil { return nil, false } @@ -499,7 +530,7 @@ func (o *WellKnown) GetRegistrationEndpointOk() (*string, bool) { } // HasRegistrationEndpoint returns a boolean if a field has been set. -func (o *WellKnown) HasRegistrationEndpoint() bool { +func (o *OidcConfiguration) HasRegistrationEndpoint() bool { if o != nil && o.RegistrationEndpoint != nil { return true } @@ -508,12 +539,12 @@ func (o *WellKnown) HasRegistrationEndpoint() bool { } // SetRegistrationEndpoint gets a reference to the given string and assigns it to the RegistrationEndpoint field. -func (o *WellKnown) SetRegistrationEndpoint(v string) { +func (o *OidcConfiguration) SetRegistrationEndpoint(v string) { o.RegistrationEndpoint = &v } // GetRequestObjectSigningAlgValuesSupported returns the RequestObjectSigningAlgValuesSupported field value if set, zero value otherwise. -func (o *WellKnown) GetRequestObjectSigningAlgValuesSupported() []string { +func (o *OidcConfiguration) GetRequestObjectSigningAlgValuesSupported() []string { if o == nil || o.RequestObjectSigningAlgValuesSupported == nil { var ret []string return ret @@ -523,7 +554,7 @@ func (o *WellKnown) GetRequestObjectSigningAlgValuesSupported() []string { // GetRequestObjectSigningAlgValuesSupportedOk returns a tuple with the RequestObjectSigningAlgValuesSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetRequestObjectSigningAlgValuesSupportedOk() ([]string, bool) { +func (o *OidcConfiguration) GetRequestObjectSigningAlgValuesSupportedOk() ([]string, bool) { if o == nil || o.RequestObjectSigningAlgValuesSupported == nil { return nil, false } @@ -531,7 +562,7 @@ func (o *WellKnown) GetRequestObjectSigningAlgValuesSupportedOk() ([]string, boo } // HasRequestObjectSigningAlgValuesSupported returns a boolean if a field has been set. -func (o *WellKnown) HasRequestObjectSigningAlgValuesSupported() bool { +func (o *OidcConfiguration) HasRequestObjectSigningAlgValuesSupported() bool { if o != nil && o.RequestObjectSigningAlgValuesSupported != nil { return true } @@ -540,12 +571,12 @@ func (o *WellKnown) HasRequestObjectSigningAlgValuesSupported() bool { } // SetRequestObjectSigningAlgValuesSupported gets a reference to the given []string and assigns it to the RequestObjectSigningAlgValuesSupported field. -func (o *WellKnown) SetRequestObjectSigningAlgValuesSupported(v []string) { +func (o *OidcConfiguration) SetRequestObjectSigningAlgValuesSupported(v []string) { o.RequestObjectSigningAlgValuesSupported = v } // GetRequestParameterSupported returns the RequestParameterSupported field value if set, zero value otherwise. -func (o *WellKnown) GetRequestParameterSupported() bool { +func (o *OidcConfiguration) GetRequestParameterSupported() bool { if o == nil || o.RequestParameterSupported == nil { var ret bool return ret @@ -555,7 +586,7 @@ func (o *WellKnown) GetRequestParameterSupported() bool { // GetRequestParameterSupportedOk returns a tuple with the RequestParameterSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetRequestParameterSupportedOk() (*bool, bool) { +func (o *OidcConfiguration) GetRequestParameterSupportedOk() (*bool, bool) { if o == nil || o.RequestParameterSupported == nil { return nil, false } @@ -563,7 +594,7 @@ func (o *WellKnown) GetRequestParameterSupportedOk() (*bool, bool) { } // HasRequestParameterSupported returns a boolean if a field has been set. -func (o *WellKnown) HasRequestParameterSupported() bool { +func (o *OidcConfiguration) HasRequestParameterSupported() bool { if o != nil && o.RequestParameterSupported != nil { return true } @@ -572,12 +603,12 @@ func (o *WellKnown) HasRequestParameterSupported() bool { } // SetRequestParameterSupported gets a reference to the given bool and assigns it to the RequestParameterSupported field. -func (o *WellKnown) SetRequestParameterSupported(v bool) { +func (o *OidcConfiguration) SetRequestParameterSupported(v bool) { o.RequestParameterSupported = &v } // GetRequestUriParameterSupported returns the RequestUriParameterSupported field value if set, zero value otherwise. -func (o *WellKnown) GetRequestUriParameterSupported() bool { +func (o *OidcConfiguration) GetRequestUriParameterSupported() bool { if o == nil || o.RequestUriParameterSupported == nil { var ret bool return ret @@ -587,7 +618,7 @@ func (o *WellKnown) GetRequestUriParameterSupported() bool { // GetRequestUriParameterSupportedOk returns a tuple with the RequestUriParameterSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetRequestUriParameterSupportedOk() (*bool, bool) { +func (o *OidcConfiguration) GetRequestUriParameterSupportedOk() (*bool, bool) { if o == nil || o.RequestUriParameterSupported == nil { return nil, false } @@ -595,7 +626,7 @@ func (o *WellKnown) GetRequestUriParameterSupportedOk() (*bool, bool) { } // HasRequestUriParameterSupported returns a boolean if a field has been set. -func (o *WellKnown) HasRequestUriParameterSupported() bool { +func (o *OidcConfiguration) HasRequestUriParameterSupported() bool { if o != nil && o.RequestUriParameterSupported != nil { return true } @@ -604,12 +635,12 @@ func (o *WellKnown) HasRequestUriParameterSupported() bool { } // SetRequestUriParameterSupported gets a reference to the given bool and assigns it to the RequestUriParameterSupported field. -func (o *WellKnown) SetRequestUriParameterSupported(v bool) { +func (o *OidcConfiguration) SetRequestUriParameterSupported(v bool) { o.RequestUriParameterSupported = &v } // GetRequireRequestUriRegistration returns the RequireRequestUriRegistration field value if set, zero value otherwise. -func (o *WellKnown) GetRequireRequestUriRegistration() bool { +func (o *OidcConfiguration) GetRequireRequestUriRegistration() bool { if o == nil || o.RequireRequestUriRegistration == nil { var ret bool return ret @@ -619,7 +650,7 @@ func (o *WellKnown) GetRequireRequestUriRegistration() bool { // GetRequireRequestUriRegistrationOk returns a tuple with the RequireRequestUriRegistration field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetRequireRequestUriRegistrationOk() (*bool, bool) { +func (o *OidcConfiguration) GetRequireRequestUriRegistrationOk() (*bool, bool) { if o == nil || o.RequireRequestUriRegistration == nil { return nil, false } @@ -627,7 +658,7 @@ func (o *WellKnown) GetRequireRequestUriRegistrationOk() (*bool, bool) { } // HasRequireRequestUriRegistration returns a boolean if a field has been set. -func (o *WellKnown) HasRequireRequestUriRegistration() bool { +func (o *OidcConfiguration) HasRequireRequestUriRegistration() bool { if o != nil && o.RequireRequestUriRegistration != nil { return true } @@ -636,12 +667,12 @@ func (o *WellKnown) HasRequireRequestUriRegistration() bool { } // SetRequireRequestUriRegistration gets a reference to the given bool and assigns it to the RequireRequestUriRegistration field. -func (o *WellKnown) SetRequireRequestUriRegistration(v bool) { +func (o *OidcConfiguration) SetRequireRequestUriRegistration(v bool) { o.RequireRequestUriRegistration = &v } // GetResponseModesSupported returns the ResponseModesSupported field value if set, zero value otherwise. -func (o *WellKnown) GetResponseModesSupported() []string { +func (o *OidcConfiguration) GetResponseModesSupported() []string { if o == nil || o.ResponseModesSupported == nil { var ret []string return ret @@ -651,7 +682,7 @@ func (o *WellKnown) GetResponseModesSupported() []string { // GetResponseModesSupportedOk returns a tuple with the ResponseModesSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetResponseModesSupportedOk() ([]string, bool) { +func (o *OidcConfiguration) GetResponseModesSupportedOk() ([]string, bool) { if o == nil || o.ResponseModesSupported == nil { return nil, false } @@ -659,7 +690,7 @@ func (o *WellKnown) GetResponseModesSupportedOk() ([]string, bool) { } // HasResponseModesSupported returns a boolean if a field has been set. -func (o *WellKnown) HasResponseModesSupported() bool { +func (o *OidcConfiguration) HasResponseModesSupported() bool { if o != nil && o.ResponseModesSupported != nil { return true } @@ -668,12 +699,12 @@ func (o *WellKnown) HasResponseModesSupported() bool { } // SetResponseModesSupported gets a reference to the given []string and assigns it to the ResponseModesSupported field. -func (o *WellKnown) SetResponseModesSupported(v []string) { +func (o *OidcConfiguration) SetResponseModesSupported(v []string) { o.ResponseModesSupported = v } // GetResponseTypesSupported returns the ResponseTypesSupported field value -func (o *WellKnown) GetResponseTypesSupported() []string { +func (o *OidcConfiguration) GetResponseTypesSupported() []string { if o == nil { var ret []string return ret @@ -684,20 +715,20 @@ func (o *WellKnown) GetResponseTypesSupported() []string { // GetResponseTypesSupportedOk returns a tuple with the ResponseTypesSupported field value // and a boolean to check if the value has been set. -func (o *WellKnown) GetResponseTypesSupportedOk() ([]string, bool) { - if o == nil { +func (o *OidcConfiguration) GetResponseTypesSupportedOk() ([]string, bool) { + if o == nil { return nil, false } return o.ResponseTypesSupported, true } // SetResponseTypesSupported sets field value -func (o *WellKnown) SetResponseTypesSupported(v []string) { +func (o *OidcConfiguration) SetResponseTypesSupported(v []string) { o.ResponseTypesSupported = v } // GetRevocationEndpoint returns the RevocationEndpoint field value if set, zero value otherwise. -func (o *WellKnown) GetRevocationEndpoint() string { +func (o *OidcConfiguration) GetRevocationEndpoint() string { if o == nil || o.RevocationEndpoint == nil { var ret string return ret @@ -707,7 +738,7 @@ func (o *WellKnown) GetRevocationEndpoint() string { // GetRevocationEndpointOk returns a tuple with the RevocationEndpoint field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetRevocationEndpointOk() (*string, bool) { +func (o *OidcConfiguration) GetRevocationEndpointOk() (*string, bool) { if o == nil || o.RevocationEndpoint == nil { return nil, false } @@ -715,7 +746,7 @@ func (o *WellKnown) GetRevocationEndpointOk() (*string, bool) { } // HasRevocationEndpoint returns a boolean if a field has been set. -func (o *WellKnown) HasRevocationEndpoint() bool { +func (o *OidcConfiguration) HasRevocationEndpoint() bool { if o != nil && o.RevocationEndpoint != nil { return true } @@ -724,12 +755,12 @@ func (o *WellKnown) HasRevocationEndpoint() bool { } // SetRevocationEndpoint gets a reference to the given string and assigns it to the RevocationEndpoint field. -func (o *WellKnown) SetRevocationEndpoint(v string) { +func (o *OidcConfiguration) SetRevocationEndpoint(v string) { o.RevocationEndpoint = &v } // GetScopesSupported returns the ScopesSupported field value if set, zero value otherwise. -func (o *WellKnown) GetScopesSupported() []string { +func (o *OidcConfiguration) GetScopesSupported() []string { if o == nil || o.ScopesSupported == nil { var ret []string return ret @@ -739,7 +770,7 @@ func (o *WellKnown) GetScopesSupported() []string { // GetScopesSupportedOk returns a tuple with the ScopesSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetScopesSupportedOk() ([]string, bool) { +func (o *OidcConfiguration) GetScopesSupportedOk() ([]string, bool) { if o == nil || o.ScopesSupported == nil { return nil, false } @@ -747,7 +778,7 @@ func (o *WellKnown) GetScopesSupportedOk() ([]string, bool) { } // HasScopesSupported returns a boolean if a field has been set. -func (o *WellKnown) HasScopesSupported() bool { +func (o *OidcConfiguration) HasScopesSupported() bool { if o != nil && o.ScopesSupported != nil { return true } @@ -756,12 +787,12 @@ func (o *WellKnown) HasScopesSupported() bool { } // SetScopesSupported gets a reference to the given []string and assigns it to the ScopesSupported field. -func (o *WellKnown) SetScopesSupported(v []string) { +func (o *OidcConfiguration) SetScopesSupported(v []string) { o.ScopesSupported = v } // GetSubjectTypesSupported returns the SubjectTypesSupported field value -func (o *WellKnown) GetSubjectTypesSupported() []string { +func (o *OidcConfiguration) GetSubjectTypesSupported() []string { if o == nil { var ret []string return ret @@ -772,20 +803,20 @@ func (o *WellKnown) GetSubjectTypesSupported() []string { // GetSubjectTypesSupportedOk returns a tuple with the SubjectTypesSupported field value // and a boolean to check if the value has been set. -func (o *WellKnown) GetSubjectTypesSupportedOk() ([]string, bool) { - if o == nil { +func (o *OidcConfiguration) GetSubjectTypesSupportedOk() ([]string, bool) { + if o == nil { return nil, false } return o.SubjectTypesSupported, true } // SetSubjectTypesSupported sets field value -func (o *WellKnown) SetSubjectTypesSupported(v []string) { +func (o *OidcConfiguration) SetSubjectTypesSupported(v []string) { o.SubjectTypesSupported = v } // GetTokenEndpoint returns the TokenEndpoint field value -func (o *WellKnown) GetTokenEndpoint() string { +func (o *OidcConfiguration) GetTokenEndpoint() string { if o == nil { var ret string return ret @@ -796,20 +827,20 @@ func (o *WellKnown) GetTokenEndpoint() string { // GetTokenEndpointOk returns a tuple with the TokenEndpoint field value // and a boolean to check if the value has been set. -func (o *WellKnown) GetTokenEndpointOk() (*string, bool) { - if o == nil { +func (o *OidcConfiguration) GetTokenEndpointOk() (*string, bool) { + if o == nil { return nil, false } return &o.TokenEndpoint, true } // SetTokenEndpoint sets field value -func (o *WellKnown) SetTokenEndpoint(v string) { +func (o *OidcConfiguration) SetTokenEndpoint(v string) { o.TokenEndpoint = v } // GetTokenEndpointAuthMethodsSupported returns the TokenEndpointAuthMethodsSupported field value if set, zero value otherwise. -func (o *WellKnown) GetTokenEndpointAuthMethodsSupported() []string { +func (o *OidcConfiguration) GetTokenEndpointAuthMethodsSupported() []string { if o == nil || o.TokenEndpointAuthMethodsSupported == nil { var ret []string return ret @@ -819,7 +850,7 @@ func (o *WellKnown) GetTokenEndpointAuthMethodsSupported() []string { // GetTokenEndpointAuthMethodsSupportedOk returns a tuple with the TokenEndpointAuthMethodsSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetTokenEndpointAuthMethodsSupportedOk() ([]string, bool) { +func (o *OidcConfiguration) GetTokenEndpointAuthMethodsSupportedOk() ([]string, bool) { if o == nil || o.TokenEndpointAuthMethodsSupported == nil { return nil, false } @@ -827,7 +858,7 @@ func (o *WellKnown) GetTokenEndpointAuthMethodsSupportedOk() ([]string, bool) { } // HasTokenEndpointAuthMethodsSupported returns a boolean if a field has been set. -func (o *WellKnown) HasTokenEndpointAuthMethodsSupported() bool { +func (o *OidcConfiguration) HasTokenEndpointAuthMethodsSupported() bool { if o != nil && o.TokenEndpointAuthMethodsSupported != nil { return true } @@ -836,12 +867,12 @@ func (o *WellKnown) HasTokenEndpointAuthMethodsSupported() bool { } // SetTokenEndpointAuthMethodsSupported gets a reference to the given []string and assigns it to the TokenEndpointAuthMethodsSupported field. -func (o *WellKnown) SetTokenEndpointAuthMethodsSupported(v []string) { +func (o *OidcConfiguration) SetTokenEndpointAuthMethodsSupported(v []string) { o.TokenEndpointAuthMethodsSupported = v } // GetUserinfoEndpoint returns the UserinfoEndpoint field value if set, zero value otherwise. -func (o *WellKnown) GetUserinfoEndpoint() string { +func (o *OidcConfiguration) GetUserinfoEndpoint() string { if o == nil || o.UserinfoEndpoint == nil { var ret string return ret @@ -851,7 +882,7 @@ func (o *WellKnown) GetUserinfoEndpoint() string { // GetUserinfoEndpointOk returns a tuple with the UserinfoEndpoint field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetUserinfoEndpointOk() (*string, bool) { +func (o *OidcConfiguration) GetUserinfoEndpointOk() (*string, bool) { if o == nil || o.UserinfoEndpoint == nil { return nil, false } @@ -859,7 +890,7 @@ func (o *WellKnown) GetUserinfoEndpointOk() (*string, bool) { } // HasUserinfoEndpoint returns a boolean if a field has been set. -func (o *WellKnown) HasUserinfoEndpoint() bool { +func (o *OidcConfiguration) HasUserinfoEndpoint() bool { if o != nil && o.UserinfoEndpoint != nil { return true } @@ -868,12 +899,36 @@ func (o *WellKnown) HasUserinfoEndpoint() bool { } // SetUserinfoEndpoint gets a reference to the given string and assigns it to the UserinfoEndpoint field. -func (o *WellKnown) SetUserinfoEndpoint(v string) { +func (o *OidcConfiguration) SetUserinfoEndpoint(v string) { o.UserinfoEndpoint = &v } +// GetUserinfoSignedResponseAlg returns the UserinfoSignedResponseAlg field value +func (o *OidcConfiguration) GetUserinfoSignedResponseAlg() []string { + if o == nil { + var ret []string + return ret + } + + return o.UserinfoSignedResponseAlg +} + +// GetUserinfoSignedResponseAlgOk returns a tuple with the UserinfoSignedResponseAlg field value +// and a boolean to check if the value has been set. +func (o *OidcConfiguration) GetUserinfoSignedResponseAlgOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.UserinfoSignedResponseAlg, true +} + +// SetUserinfoSignedResponseAlg sets field value +func (o *OidcConfiguration) SetUserinfoSignedResponseAlg(v []string) { + o.UserinfoSignedResponseAlg = v +} + // GetUserinfoSigningAlgValuesSupported returns the UserinfoSigningAlgValuesSupported field value if set, zero value otherwise. -func (o *WellKnown) GetUserinfoSigningAlgValuesSupported() []string { +func (o *OidcConfiguration) GetUserinfoSigningAlgValuesSupported() []string { if o == nil || o.UserinfoSigningAlgValuesSupported == nil { var ret []string return ret @@ -883,7 +938,7 @@ func (o *WellKnown) GetUserinfoSigningAlgValuesSupported() []string { // GetUserinfoSigningAlgValuesSupportedOk returns a tuple with the UserinfoSigningAlgValuesSupported field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WellKnown) GetUserinfoSigningAlgValuesSupportedOk() ([]string, bool) { +func (o *OidcConfiguration) GetUserinfoSigningAlgValuesSupportedOk() ([]string, bool) { if o == nil || o.UserinfoSigningAlgValuesSupported == nil { return nil, false } @@ -891,7 +946,7 @@ func (o *WellKnown) GetUserinfoSigningAlgValuesSupportedOk() ([]string, bool) { } // HasUserinfoSigningAlgValuesSupported returns a boolean if a field has been set. -func (o *WellKnown) HasUserinfoSigningAlgValuesSupported() bool { +func (o *OidcConfiguration) HasUserinfoSigningAlgValuesSupported() bool { if o != nil && o.UserinfoSigningAlgValuesSupported != nil { return true } @@ -900,11 +955,11 @@ func (o *WellKnown) HasUserinfoSigningAlgValuesSupported() bool { } // SetUserinfoSigningAlgValuesSupported gets a reference to the given []string and assigns it to the UserinfoSigningAlgValuesSupported field. -func (o *WellKnown) SetUserinfoSigningAlgValuesSupported(v []string) { +func (o *OidcConfiguration) SetUserinfoSigningAlgValuesSupported(v []string) { o.UserinfoSigningAlgValuesSupported = v } -func (o WellKnown) MarshalJSON() ([]byte, error) { +func (o OidcConfiguration) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["authorization_endpoint"] = o.AuthorizationEndpoint @@ -936,6 +991,9 @@ func (o WellKnown) MarshalJSON() ([]byte, error) { if o.GrantTypesSupported != nil { toSerialize["grant_types_supported"] = o.GrantTypesSupported } + if true { + toSerialize["id_token_signed_response_alg"] = o.IdTokenSignedResponseAlg + } if true { toSerialize["id_token_signing_alg_values_supported"] = o.IdTokenSigningAlgValuesSupported } @@ -984,44 +1042,47 @@ func (o WellKnown) MarshalJSON() ([]byte, error) { if o.UserinfoEndpoint != nil { toSerialize["userinfo_endpoint"] = o.UserinfoEndpoint } + if true { + toSerialize["userinfo_signed_response_alg"] = o.UserinfoSignedResponseAlg + } if o.UserinfoSigningAlgValuesSupported != nil { toSerialize["userinfo_signing_alg_values_supported"] = o.UserinfoSigningAlgValuesSupported } return json.Marshal(toSerialize) } -type NullableWellKnown struct { - value *WellKnown +type NullableOidcConfiguration struct { + value *OidcConfiguration isSet bool } -func (v NullableWellKnown) Get() *WellKnown { +func (v NullableOidcConfiguration) Get() *OidcConfiguration { return v.value } -func (v *NullableWellKnown) Set(val *WellKnown) { +func (v *NullableOidcConfiguration) Set(val *OidcConfiguration) { v.value = val v.isSet = true } -func (v NullableWellKnown) IsSet() bool { +func (v NullableOidcConfiguration) IsSet() bool { return v.isSet } -func (v *NullableWellKnown) Unset() { +func (v *NullableOidcConfiguration) Unset() { v.value = nil v.isSet = false } -func NewNullableWellKnown(val *WellKnown) *NullableWellKnown { - return &NullableWellKnown{value: val, isSet: true} +func NewNullableOidcConfiguration(val *OidcConfiguration) *NullableOidcConfiguration { + return &NullableOidcConfiguration{value: val, isSet: true} } -func (v NullableWellKnown) MarshalJSON() ([]byte, error) { +func (v NullableOidcConfiguration) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableWellKnown) UnmarshalJSON(src []byte) error { +func (v *NullableOidcConfiguration) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_userinfo_response.go b/clients/hydra/go/model_oidc_user_info.go similarity index 79% rename from clients/hydra/go/model_userinfo_response.go rename to clients/hydra/go/model_oidc_user_info.go index 0cf1229b1ee..c8c12dc7205 100644 --- a/clients/hydra/go/model_userinfo_response.go +++ b/clients/hydra/go/model_oidc_user_info.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,8 +15,8 @@ import ( "encoding/json" ) -// UserinfoResponse The userinfo response -type UserinfoResponse struct { +// OidcUserInfo OpenID Connect Userinfo +type OidcUserInfo struct { // 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. Birthdate *string `json:"birthdate,omitempty"` // 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. @@ -56,25 +57,25 @@ type UserinfoResponse struct { Zoneinfo *string `json:"zoneinfo,omitempty"` } -// NewUserinfoResponse instantiates a new UserinfoResponse object +// NewOidcUserInfo instantiates a new OidcUserInfo object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUserinfoResponse() *UserinfoResponse { - this := UserinfoResponse{} +func NewOidcUserInfo() *OidcUserInfo { + this := OidcUserInfo{} return &this } -// NewUserinfoResponseWithDefaults instantiates a new UserinfoResponse object +// NewOidcUserInfoWithDefaults instantiates a new OidcUserInfo object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewUserinfoResponseWithDefaults() *UserinfoResponse { - this := UserinfoResponse{} +func NewOidcUserInfoWithDefaults() *OidcUserInfo { + this := OidcUserInfo{} return &this } // GetBirthdate returns the Birthdate field value if set, zero value otherwise. -func (o *UserinfoResponse) GetBirthdate() string { +func (o *OidcUserInfo) GetBirthdate() string { if o == nil || o.Birthdate == nil { var ret string return ret @@ -84,7 +85,7 @@ func (o *UserinfoResponse) GetBirthdate() string { // GetBirthdateOk returns a tuple with the Birthdate field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetBirthdateOk() (*string, bool) { +func (o *OidcUserInfo) GetBirthdateOk() (*string, bool) { if o == nil || o.Birthdate == nil { return nil, false } @@ -92,7 +93,7 @@ func (o *UserinfoResponse) GetBirthdateOk() (*string, bool) { } // HasBirthdate returns a boolean if a field has been set. -func (o *UserinfoResponse) HasBirthdate() bool { +func (o *OidcUserInfo) HasBirthdate() bool { if o != nil && o.Birthdate != nil { return true } @@ -101,12 +102,12 @@ func (o *UserinfoResponse) HasBirthdate() bool { } // SetBirthdate gets a reference to the given string and assigns it to the Birthdate field. -func (o *UserinfoResponse) SetBirthdate(v string) { +func (o *OidcUserInfo) SetBirthdate(v string) { o.Birthdate = &v } // GetEmail returns the Email field value if set, zero value otherwise. -func (o *UserinfoResponse) GetEmail() string { +func (o *OidcUserInfo) GetEmail() string { if o == nil || o.Email == nil { var ret string return ret @@ -116,7 +117,7 @@ func (o *UserinfoResponse) GetEmail() string { // GetEmailOk returns a tuple with the Email field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetEmailOk() (*string, bool) { +func (o *OidcUserInfo) GetEmailOk() (*string, bool) { if o == nil || o.Email == nil { return nil, false } @@ -124,7 +125,7 @@ func (o *UserinfoResponse) GetEmailOk() (*string, bool) { } // HasEmail returns a boolean if a field has been set. -func (o *UserinfoResponse) HasEmail() bool { +func (o *OidcUserInfo) HasEmail() bool { if o != nil && o.Email != nil { return true } @@ -133,12 +134,12 @@ func (o *UserinfoResponse) HasEmail() bool { } // SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *UserinfoResponse) SetEmail(v string) { +func (o *OidcUserInfo) SetEmail(v string) { o.Email = &v } // GetEmailVerified returns the EmailVerified field value if set, zero value otherwise. -func (o *UserinfoResponse) GetEmailVerified() bool { +func (o *OidcUserInfo) GetEmailVerified() bool { if o == nil || o.EmailVerified == nil { var ret bool return ret @@ -148,7 +149,7 @@ func (o *UserinfoResponse) GetEmailVerified() bool { // GetEmailVerifiedOk returns a tuple with the EmailVerified field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetEmailVerifiedOk() (*bool, bool) { +func (o *OidcUserInfo) GetEmailVerifiedOk() (*bool, bool) { if o == nil || o.EmailVerified == nil { return nil, false } @@ -156,7 +157,7 @@ func (o *UserinfoResponse) GetEmailVerifiedOk() (*bool, bool) { } // HasEmailVerified returns a boolean if a field has been set. -func (o *UserinfoResponse) HasEmailVerified() bool { +func (o *OidcUserInfo) HasEmailVerified() bool { if o != nil && o.EmailVerified != nil { return true } @@ -165,12 +166,12 @@ func (o *UserinfoResponse) HasEmailVerified() bool { } // SetEmailVerified gets a reference to the given bool and assigns it to the EmailVerified field. -func (o *UserinfoResponse) SetEmailVerified(v bool) { +func (o *OidcUserInfo) SetEmailVerified(v bool) { o.EmailVerified = &v } // GetFamilyName returns the FamilyName field value if set, zero value otherwise. -func (o *UserinfoResponse) GetFamilyName() string { +func (o *OidcUserInfo) GetFamilyName() string { if o == nil || o.FamilyName == nil { var ret string return ret @@ -180,7 +181,7 @@ func (o *UserinfoResponse) GetFamilyName() string { // GetFamilyNameOk returns a tuple with the FamilyName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetFamilyNameOk() (*string, bool) { +func (o *OidcUserInfo) GetFamilyNameOk() (*string, bool) { if o == nil || o.FamilyName == nil { return nil, false } @@ -188,7 +189,7 @@ func (o *UserinfoResponse) GetFamilyNameOk() (*string, bool) { } // HasFamilyName returns a boolean if a field has been set. -func (o *UserinfoResponse) HasFamilyName() bool { +func (o *OidcUserInfo) HasFamilyName() bool { if o != nil && o.FamilyName != nil { return true } @@ -197,12 +198,12 @@ func (o *UserinfoResponse) HasFamilyName() bool { } // SetFamilyName gets a reference to the given string and assigns it to the FamilyName field. -func (o *UserinfoResponse) SetFamilyName(v string) { +func (o *OidcUserInfo) SetFamilyName(v string) { o.FamilyName = &v } // GetGender returns the Gender field value if set, zero value otherwise. -func (o *UserinfoResponse) GetGender() string { +func (o *OidcUserInfo) GetGender() string { if o == nil || o.Gender == nil { var ret string return ret @@ -212,7 +213,7 @@ func (o *UserinfoResponse) GetGender() string { // GetGenderOk returns a tuple with the Gender field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetGenderOk() (*string, bool) { +func (o *OidcUserInfo) GetGenderOk() (*string, bool) { if o == nil || o.Gender == nil { return nil, false } @@ -220,7 +221,7 @@ func (o *UserinfoResponse) GetGenderOk() (*string, bool) { } // HasGender returns a boolean if a field has been set. -func (o *UserinfoResponse) HasGender() bool { +func (o *OidcUserInfo) HasGender() bool { if o != nil && o.Gender != nil { return true } @@ -229,12 +230,12 @@ func (o *UserinfoResponse) HasGender() bool { } // SetGender gets a reference to the given string and assigns it to the Gender field. -func (o *UserinfoResponse) SetGender(v string) { +func (o *OidcUserInfo) SetGender(v string) { o.Gender = &v } // GetGivenName returns the GivenName field value if set, zero value otherwise. -func (o *UserinfoResponse) GetGivenName() string { +func (o *OidcUserInfo) GetGivenName() string { if o == nil || o.GivenName == nil { var ret string return ret @@ -244,7 +245,7 @@ func (o *UserinfoResponse) GetGivenName() string { // GetGivenNameOk returns a tuple with the GivenName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetGivenNameOk() (*string, bool) { +func (o *OidcUserInfo) GetGivenNameOk() (*string, bool) { if o == nil || o.GivenName == nil { return nil, false } @@ -252,7 +253,7 @@ func (o *UserinfoResponse) GetGivenNameOk() (*string, bool) { } // HasGivenName returns a boolean if a field has been set. -func (o *UserinfoResponse) HasGivenName() bool { +func (o *OidcUserInfo) HasGivenName() bool { if o != nil && o.GivenName != nil { return true } @@ -261,12 +262,12 @@ func (o *UserinfoResponse) HasGivenName() bool { } // SetGivenName gets a reference to the given string and assigns it to the GivenName field. -func (o *UserinfoResponse) SetGivenName(v string) { +func (o *OidcUserInfo) SetGivenName(v string) { o.GivenName = &v } // GetLocale returns the Locale field value if set, zero value otherwise. -func (o *UserinfoResponse) GetLocale() string { +func (o *OidcUserInfo) GetLocale() string { if o == nil || o.Locale == nil { var ret string return ret @@ -276,7 +277,7 @@ func (o *UserinfoResponse) GetLocale() string { // GetLocaleOk returns a tuple with the Locale field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetLocaleOk() (*string, bool) { +func (o *OidcUserInfo) GetLocaleOk() (*string, bool) { if o == nil || o.Locale == nil { return nil, false } @@ -284,7 +285,7 @@ func (o *UserinfoResponse) GetLocaleOk() (*string, bool) { } // HasLocale returns a boolean if a field has been set. -func (o *UserinfoResponse) HasLocale() bool { +func (o *OidcUserInfo) HasLocale() bool { if o != nil && o.Locale != nil { return true } @@ -293,12 +294,12 @@ func (o *UserinfoResponse) HasLocale() bool { } // SetLocale gets a reference to the given string and assigns it to the Locale field. -func (o *UserinfoResponse) SetLocale(v string) { +func (o *OidcUserInfo) SetLocale(v string) { o.Locale = &v } // GetMiddleName returns the MiddleName field value if set, zero value otherwise. -func (o *UserinfoResponse) GetMiddleName() string { +func (o *OidcUserInfo) GetMiddleName() string { if o == nil || o.MiddleName == nil { var ret string return ret @@ -308,7 +309,7 @@ func (o *UserinfoResponse) GetMiddleName() string { // GetMiddleNameOk returns a tuple with the MiddleName field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetMiddleNameOk() (*string, bool) { +func (o *OidcUserInfo) GetMiddleNameOk() (*string, bool) { if o == nil || o.MiddleName == nil { return nil, false } @@ -316,7 +317,7 @@ func (o *UserinfoResponse) GetMiddleNameOk() (*string, bool) { } // HasMiddleName returns a boolean if a field has been set. -func (o *UserinfoResponse) HasMiddleName() bool { +func (o *OidcUserInfo) HasMiddleName() bool { if o != nil && o.MiddleName != nil { return true } @@ -325,12 +326,12 @@ func (o *UserinfoResponse) HasMiddleName() bool { } // SetMiddleName gets a reference to the given string and assigns it to the MiddleName field. -func (o *UserinfoResponse) SetMiddleName(v string) { +func (o *OidcUserInfo) SetMiddleName(v string) { o.MiddleName = &v } // GetName returns the Name field value if set, zero value otherwise. -func (o *UserinfoResponse) GetName() string { +func (o *OidcUserInfo) GetName() string { if o == nil || o.Name == nil { var ret string return ret @@ -340,7 +341,7 @@ func (o *UserinfoResponse) GetName() string { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetNameOk() (*string, bool) { +func (o *OidcUserInfo) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { return nil, false } @@ -348,7 +349,7 @@ func (o *UserinfoResponse) GetNameOk() (*string, bool) { } // HasName returns a boolean if a field has been set. -func (o *UserinfoResponse) HasName() bool { +func (o *OidcUserInfo) HasName() bool { if o != nil && o.Name != nil { return true } @@ -357,12 +358,12 @@ func (o *UserinfoResponse) HasName() bool { } // SetName gets a reference to the given string and assigns it to the Name field. -func (o *UserinfoResponse) SetName(v string) { +func (o *OidcUserInfo) SetName(v string) { o.Name = &v } // GetNickname returns the Nickname field value if set, zero value otherwise. -func (o *UserinfoResponse) GetNickname() string { +func (o *OidcUserInfo) GetNickname() string { if o == nil || o.Nickname == nil { var ret string return ret @@ -372,7 +373,7 @@ func (o *UserinfoResponse) GetNickname() string { // GetNicknameOk returns a tuple with the Nickname field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetNicknameOk() (*string, bool) { +func (o *OidcUserInfo) GetNicknameOk() (*string, bool) { if o == nil || o.Nickname == nil { return nil, false } @@ -380,7 +381,7 @@ func (o *UserinfoResponse) GetNicknameOk() (*string, bool) { } // HasNickname returns a boolean if a field has been set. -func (o *UserinfoResponse) HasNickname() bool { +func (o *OidcUserInfo) HasNickname() bool { if o != nil && o.Nickname != nil { return true } @@ -389,12 +390,12 @@ func (o *UserinfoResponse) HasNickname() bool { } // SetNickname gets a reference to the given string and assigns it to the Nickname field. -func (o *UserinfoResponse) SetNickname(v string) { +func (o *OidcUserInfo) SetNickname(v string) { o.Nickname = &v } // GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise. -func (o *UserinfoResponse) GetPhoneNumber() string { +func (o *OidcUserInfo) GetPhoneNumber() string { if o == nil || o.PhoneNumber == nil { var ret string return ret @@ -404,7 +405,7 @@ func (o *UserinfoResponse) GetPhoneNumber() string { // GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetPhoneNumberOk() (*string, bool) { +func (o *OidcUserInfo) GetPhoneNumberOk() (*string, bool) { if o == nil || o.PhoneNumber == nil { return nil, false } @@ -412,7 +413,7 @@ func (o *UserinfoResponse) GetPhoneNumberOk() (*string, bool) { } // HasPhoneNumber returns a boolean if a field has been set. -func (o *UserinfoResponse) HasPhoneNumber() bool { +func (o *OidcUserInfo) HasPhoneNumber() bool { if o != nil && o.PhoneNumber != nil { return true } @@ -421,12 +422,12 @@ func (o *UserinfoResponse) HasPhoneNumber() bool { } // SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field. -func (o *UserinfoResponse) SetPhoneNumber(v string) { +func (o *OidcUserInfo) SetPhoneNumber(v string) { o.PhoneNumber = &v } // GetPhoneNumberVerified returns the PhoneNumberVerified field value if set, zero value otherwise. -func (o *UserinfoResponse) GetPhoneNumberVerified() bool { +func (o *OidcUserInfo) GetPhoneNumberVerified() bool { if o == nil || o.PhoneNumberVerified == nil { var ret bool return ret @@ -436,7 +437,7 @@ func (o *UserinfoResponse) GetPhoneNumberVerified() bool { // GetPhoneNumberVerifiedOk returns a tuple with the PhoneNumberVerified field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetPhoneNumberVerifiedOk() (*bool, bool) { +func (o *OidcUserInfo) GetPhoneNumberVerifiedOk() (*bool, bool) { if o == nil || o.PhoneNumberVerified == nil { return nil, false } @@ -444,7 +445,7 @@ func (o *UserinfoResponse) GetPhoneNumberVerifiedOk() (*bool, bool) { } // HasPhoneNumberVerified returns a boolean if a field has been set. -func (o *UserinfoResponse) HasPhoneNumberVerified() bool { +func (o *OidcUserInfo) HasPhoneNumberVerified() bool { if o != nil && o.PhoneNumberVerified != nil { return true } @@ -453,12 +454,12 @@ func (o *UserinfoResponse) HasPhoneNumberVerified() bool { } // SetPhoneNumberVerified gets a reference to the given bool and assigns it to the PhoneNumberVerified field. -func (o *UserinfoResponse) SetPhoneNumberVerified(v bool) { +func (o *OidcUserInfo) SetPhoneNumberVerified(v bool) { o.PhoneNumberVerified = &v } // GetPicture returns the Picture field value if set, zero value otherwise. -func (o *UserinfoResponse) GetPicture() string { +func (o *OidcUserInfo) GetPicture() string { if o == nil || o.Picture == nil { var ret string return ret @@ -468,7 +469,7 @@ func (o *UserinfoResponse) GetPicture() string { // GetPictureOk returns a tuple with the Picture field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetPictureOk() (*string, bool) { +func (o *OidcUserInfo) GetPictureOk() (*string, bool) { if o == nil || o.Picture == nil { return nil, false } @@ -476,7 +477,7 @@ func (o *UserinfoResponse) GetPictureOk() (*string, bool) { } // HasPicture returns a boolean if a field has been set. -func (o *UserinfoResponse) HasPicture() bool { +func (o *OidcUserInfo) HasPicture() bool { if o != nil && o.Picture != nil { return true } @@ -485,12 +486,12 @@ func (o *UserinfoResponse) HasPicture() bool { } // SetPicture gets a reference to the given string and assigns it to the Picture field. -func (o *UserinfoResponse) SetPicture(v string) { +func (o *OidcUserInfo) SetPicture(v string) { o.Picture = &v } // GetPreferredUsername returns the PreferredUsername field value if set, zero value otherwise. -func (o *UserinfoResponse) GetPreferredUsername() string { +func (o *OidcUserInfo) GetPreferredUsername() string { if o == nil || o.PreferredUsername == nil { var ret string return ret @@ -500,7 +501,7 @@ func (o *UserinfoResponse) GetPreferredUsername() string { // GetPreferredUsernameOk returns a tuple with the PreferredUsername field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetPreferredUsernameOk() (*string, bool) { +func (o *OidcUserInfo) GetPreferredUsernameOk() (*string, bool) { if o == nil || o.PreferredUsername == nil { return nil, false } @@ -508,7 +509,7 @@ func (o *UserinfoResponse) GetPreferredUsernameOk() (*string, bool) { } // HasPreferredUsername returns a boolean if a field has been set. -func (o *UserinfoResponse) HasPreferredUsername() bool { +func (o *OidcUserInfo) HasPreferredUsername() bool { if o != nil && o.PreferredUsername != nil { return true } @@ -517,12 +518,12 @@ func (o *UserinfoResponse) HasPreferredUsername() bool { } // SetPreferredUsername gets a reference to the given string and assigns it to the PreferredUsername field. -func (o *UserinfoResponse) SetPreferredUsername(v string) { +func (o *OidcUserInfo) SetPreferredUsername(v string) { o.PreferredUsername = &v } // GetProfile returns the Profile field value if set, zero value otherwise. -func (o *UserinfoResponse) GetProfile() string { +func (o *OidcUserInfo) GetProfile() string { if o == nil || o.Profile == nil { var ret string return ret @@ -532,7 +533,7 @@ func (o *UserinfoResponse) GetProfile() string { // GetProfileOk returns a tuple with the Profile field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetProfileOk() (*string, bool) { +func (o *OidcUserInfo) GetProfileOk() (*string, bool) { if o == nil || o.Profile == nil { return nil, false } @@ -540,7 +541,7 @@ func (o *UserinfoResponse) GetProfileOk() (*string, bool) { } // HasProfile returns a boolean if a field has been set. -func (o *UserinfoResponse) HasProfile() bool { +func (o *OidcUserInfo) HasProfile() bool { if o != nil && o.Profile != nil { return true } @@ -549,12 +550,12 @@ func (o *UserinfoResponse) HasProfile() bool { } // SetProfile gets a reference to the given string and assigns it to the Profile field. -func (o *UserinfoResponse) SetProfile(v string) { +func (o *OidcUserInfo) SetProfile(v string) { o.Profile = &v } // GetSub returns the Sub field value if set, zero value otherwise. -func (o *UserinfoResponse) GetSub() string { +func (o *OidcUserInfo) GetSub() string { if o == nil || o.Sub == nil { var ret string return ret @@ -564,7 +565,7 @@ func (o *UserinfoResponse) GetSub() string { // GetSubOk returns a tuple with the Sub field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetSubOk() (*string, bool) { +func (o *OidcUserInfo) GetSubOk() (*string, bool) { if o == nil || o.Sub == nil { return nil, false } @@ -572,7 +573,7 @@ func (o *UserinfoResponse) GetSubOk() (*string, bool) { } // HasSub returns a boolean if a field has been set. -func (o *UserinfoResponse) HasSub() bool { +func (o *OidcUserInfo) HasSub() bool { if o != nil && o.Sub != nil { return true } @@ -581,12 +582,12 @@ func (o *UserinfoResponse) HasSub() bool { } // SetSub gets a reference to the given string and assigns it to the Sub field. -func (o *UserinfoResponse) SetSub(v string) { +func (o *OidcUserInfo) SetSub(v string) { o.Sub = &v } // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *UserinfoResponse) GetUpdatedAt() int64 { +func (o *OidcUserInfo) GetUpdatedAt() int64 { if o == nil || o.UpdatedAt == nil { var ret int64 return ret @@ -596,7 +597,7 @@ func (o *UserinfoResponse) GetUpdatedAt() int64 { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetUpdatedAtOk() (*int64, bool) { +func (o *OidcUserInfo) GetUpdatedAtOk() (*int64, bool) { if o == nil || o.UpdatedAt == nil { return nil, false } @@ -604,7 +605,7 @@ func (o *UserinfoResponse) GetUpdatedAtOk() (*int64, bool) { } // HasUpdatedAt returns a boolean if a field has been set. -func (o *UserinfoResponse) HasUpdatedAt() bool { +func (o *OidcUserInfo) HasUpdatedAt() bool { if o != nil && o.UpdatedAt != nil { return true } @@ -613,12 +614,12 @@ func (o *UserinfoResponse) HasUpdatedAt() bool { } // SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field. -func (o *UserinfoResponse) SetUpdatedAt(v int64) { +func (o *OidcUserInfo) SetUpdatedAt(v int64) { o.UpdatedAt = &v } // GetWebsite returns the Website field value if set, zero value otherwise. -func (o *UserinfoResponse) GetWebsite() string { +func (o *OidcUserInfo) GetWebsite() string { if o == nil || o.Website == nil { var ret string return ret @@ -628,7 +629,7 @@ func (o *UserinfoResponse) GetWebsite() string { // GetWebsiteOk returns a tuple with the Website field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetWebsiteOk() (*string, bool) { +func (o *OidcUserInfo) GetWebsiteOk() (*string, bool) { if o == nil || o.Website == nil { return nil, false } @@ -636,7 +637,7 @@ func (o *UserinfoResponse) GetWebsiteOk() (*string, bool) { } // HasWebsite returns a boolean if a field has been set. -func (o *UserinfoResponse) HasWebsite() bool { +func (o *OidcUserInfo) HasWebsite() bool { if o != nil && o.Website != nil { return true } @@ -645,12 +646,12 @@ func (o *UserinfoResponse) HasWebsite() bool { } // SetWebsite gets a reference to the given string and assigns it to the Website field. -func (o *UserinfoResponse) SetWebsite(v string) { +func (o *OidcUserInfo) SetWebsite(v string) { o.Website = &v } // GetZoneinfo returns the Zoneinfo field value if set, zero value otherwise. -func (o *UserinfoResponse) GetZoneinfo() string { +func (o *OidcUserInfo) GetZoneinfo() string { if o == nil || o.Zoneinfo == nil { var ret string return ret @@ -660,7 +661,7 @@ func (o *UserinfoResponse) GetZoneinfo() string { // GetZoneinfoOk returns a tuple with the Zoneinfo field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UserinfoResponse) GetZoneinfoOk() (*string, bool) { +func (o *OidcUserInfo) GetZoneinfoOk() (*string, bool) { if o == nil || o.Zoneinfo == nil { return nil, false } @@ -668,7 +669,7 @@ func (o *UserinfoResponse) GetZoneinfoOk() (*string, bool) { } // HasZoneinfo returns a boolean if a field has been set. -func (o *UserinfoResponse) HasZoneinfo() bool { +func (o *OidcUserInfo) HasZoneinfo() bool { if o != nil && o.Zoneinfo != nil { return true } @@ -677,11 +678,11 @@ func (o *UserinfoResponse) HasZoneinfo() bool { } // SetZoneinfo gets a reference to the given string and assigns it to the Zoneinfo field. -func (o *UserinfoResponse) SetZoneinfo(v string) { +func (o *OidcUserInfo) SetZoneinfo(v string) { o.Zoneinfo = &v } -func (o UserinfoResponse) MarshalJSON() ([]byte, error) { +func (o OidcUserInfo) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Birthdate != nil { toSerialize["birthdate"] = o.Birthdate @@ -743,38 +744,38 @@ func (o UserinfoResponse) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableUserinfoResponse struct { - value *UserinfoResponse +type NullableOidcUserInfo struct { + value *OidcUserInfo isSet bool } -func (v NullableUserinfoResponse) Get() *UserinfoResponse { +func (v NullableOidcUserInfo) Get() *OidcUserInfo { return v.value } -func (v *NullableUserinfoResponse) Set(val *UserinfoResponse) { +func (v *NullableOidcUserInfo) Set(val *OidcUserInfo) { v.value = val v.isSet = true } -func (v NullableUserinfoResponse) IsSet() bool { +func (v NullableOidcUserInfo) IsSet() bool { return v.isSet } -func (v *NullableUserinfoResponse) Unset() { +func (v *NullableOidcUserInfo) Unset() { v.value = nil v.isSet = false } -func NewNullableUserinfoResponse(val *UserinfoResponse) *NullableUserinfoResponse { - return &NullableUserinfoResponse{value: val, isSet: true} +func NewNullableOidcUserInfo(val *OidcUserInfo) *NullableOidcUserInfo { + return &NullableOidcUserInfo{value: val, isSet: true} } -func (v NullableUserinfoResponse) MarshalJSON() ([]byte, error) { +func (v NullableOidcUserInfo) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableUserinfoResponse) UnmarshalJSON(src []byte) error { +func (v *NullableOidcUserInfo) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_pagination.go b/clients/hydra/go/model_pagination.go new file mode 100644 index 00000000000..f9aed863309 --- /dev/null +++ b/clients/hydra/go/model_pagination.go @@ -0,0 +1,162 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// Pagination struct for Pagination +type Pagination struct { + // 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). + PageSize *int64 `json:"page_size,omitempty"` + // 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). + PageToken *string `json:"page_token,omitempty"` +} + +// NewPagination instantiates a new Pagination object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPagination() *Pagination { + this := Pagination{} + var pageSize int64 = 250 + this.PageSize = &pageSize + var pageToken string = "1" + this.PageToken = &pageToken + return &this +} + +// NewPaginationWithDefaults instantiates a new Pagination object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginationWithDefaults() *Pagination { + this := Pagination{} + var pageSize int64 = 250 + this.PageSize = &pageSize + var pageToken string = "1" + this.PageToken = &pageToken + return &this +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *Pagination) GetPageSize() int64 { + if o == nil || o.PageSize == nil { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Pagination) GetPageSizeOk() (*int64, bool) { + if o == nil || o.PageSize == nil { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *Pagination) HasPageSize() bool { + if o != nil && o.PageSize != nil { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *Pagination) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetPageToken returns the PageToken field value if set, zero value otherwise. +func (o *Pagination) GetPageToken() string { + if o == nil || o.PageToken == nil { + var ret string + return ret + } + return *o.PageToken +} + +// GetPageTokenOk returns a tuple with the PageToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Pagination) GetPageTokenOk() (*string, bool) { + if o == nil || o.PageToken == nil { + return nil, false + } + return o.PageToken, true +} + +// HasPageToken returns a boolean if a field has been set. +func (o *Pagination) HasPageToken() bool { + if o != nil && o.PageToken != nil { + return true + } + + return false +} + +// SetPageToken gets a reference to the given string and assigns it to the PageToken field. +func (o *Pagination) SetPageToken(v string) { + o.PageToken = &v +} + +func (o Pagination) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.PageSize != nil { + toSerialize["page_size"] = o.PageSize + } + if o.PageToken != nil { + toSerialize["page_token"] = o.PageToken + } + return json.Marshal(toSerialize) +} + +type NullablePagination struct { + value *Pagination + isSet bool +} + +func (v NullablePagination) Get() *Pagination { + return v.value +} + +func (v *NullablePagination) Set(val *Pagination) { + v.value = val + v.isSet = true +} + +func (v NullablePagination) IsSet() bool { + return v.isSet +} + +func (v *NullablePagination) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePagination(val *Pagination) *NullablePagination { + return &NullablePagination{value: val, isSet: true} +} + +func (v NullablePagination) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePagination) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_pagination_headers.go b/clients/hydra/go/model_pagination_headers.go new file mode 100644 index 00000000000..874dcc39ef0 --- /dev/null +++ b/clients/hydra/go/model_pagination_headers.go @@ -0,0 +1,154 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// PaginationHeaders struct for PaginationHeaders +type PaginationHeaders struct { + // 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 + Link *string `json:"link,omitempty"` + // The total number of clients. in: header + XTotalCount *string `json:"x-total-count,omitempty"` +} + +// NewPaginationHeaders instantiates a new PaginationHeaders object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginationHeaders() *PaginationHeaders { + this := PaginationHeaders{} + return &this +} + +// NewPaginationHeadersWithDefaults instantiates a new PaginationHeaders object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginationHeadersWithDefaults() *PaginationHeaders { + this := PaginationHeaders{} + return &this +} + +// GetLink returns the Link field value if set, zero value otherwise. +func (o *PaginationHeaders) GetLink() string { + if o == nil || o.Link == nil { + var ret string + return ret + } + return *o.Link +} + +// GetLinkOk returns a tuple with the Link field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginationHeaders) GetLinkOk() (*string, bool) { + if o == nil || o.Link == nil { + return nil, false + } + return o.Link, true +} + +// HasLink returns a boolean if a field has been set. +func (o *PaginationHeaders) HasLink() bool { + if o != nil && o.Link != nil { + return true + } + + return false +} + +// SetLink gets a reference to the given string and assigns it to the Link field. +func (o *PaginationHeaders) SetLink(v string) { + o.Link = &v +} + +// GetXTotalCount returns the XTotalCount field value if set, zero value otherwise. +func (o *PaginationHeaders) GetXTotalCount() string { + if o == nil || o.XTotalCount == nil { + var ret string + return ret + } + return *o.XTotalCount +} + +// GetXTotalCountOk returns a tuple with the XTotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginationHeaders) GetXTotalCountOk() (*string, bool) { + if o == nil || o.XTotalCount == nil { + return nil, false + } + return o.XTotalCount, true +} + +// HasXTotalCount returns a boolean if a field has been set. +func (o *PaginationHeaders) HasXTotalCount() bool { + if o != nil && o.XTotalCount != nil { + return true + } + + return false +} + +// SetXTotalCount gets a reference to the given string and assigns it to the XTotalCount field. +func (o *PaginationHeaders) SetXTotalCount(v string) { + o.XTotalCount = &v +} + +func (o PaginationHeaders) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Link != nil { + toSerialize["link"] = o.Link + } + if o.XTotalCount != nil { + toSerialize["x-total-count"] = o.XTotalCount + } + return json.Marshal(toSerialize) +} + +type NullablePaginationHeaders struct { + value *PaginationHeaders + isSet bool +} + +func (v NullablePaginationHeaders) Get() *PaginationHeaders { + return v.value +} + +func (v *NullablePaginationHeaders) Set(val *PaginationHeaders) { + v.value = val + v.isSet = true +} + +func (v NullablePaginationHeaders) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginationHeaders) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginationHeaders(val *PaginationHeaders) *NullablePaginationHeaders { + return &NullablePaginationHeaders{value: val, isSet: true} +} + +func (v NullablePaginationHeaders) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginationHeaders) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_plugin_config.go b/clients/hydra/go/model_plugin_config.go deleted file mode 100644 index 3cc7f4951a5..00000000000 --- a/clients/hydra/go/model_plugin_config.go +++ /dev/null @@ -1,574 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginConfig struct for PluginConfig -type PluginConfig struct { - Args PluginConfigArgs `json:"Args"` - // description - Description string `json:"Description"` - // Docker Version used to create the plugin - DockerVersion *string `json:"DockerVersion,omitempty"` - // documentation - Documentation string `json:"Documentation"` - // entrypoint - Entrypoint []string `json:"Entrypoint"` - // env - Env []PluginEnv `json:"Env"` - Interface PluginConfigInterface `json:"Interface"` - // ipc host - IpcHost bool `json:"IpcHost"` - Linux PluginConfigLinux `json:"Linux"` - // mounts - Mounts []PluginMount `json:"Mounts"` - Network PluginConfigNetwork `json:"Network"` - // pid host - PidHost bool `json:"PidHost"` - // propagated mount - PropagatedMount string `json:"PropagatedMount"` - User *PluginConfigUser `json:"User,omitempty"` - // work dir - WorkDir string `json:"WorkDir"` - Rootfs *PluginConfigRootfs `json:"rootfs,omitempty"` -} - -// NewPluginConfig instantiates a new PluginConfig object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginConfig(args PluginConfigArgs, description string, documentation string, entrypoint []string, env []PluginEnv, interface_ PluginConfigInterface, ipcHost bool, linux PluginConfigLinux, mounts []PluginMount, network PluginConfigNetwork, pidHost bool, propagatedMount string, workDir string) *PluginConfig { - this := PluginConfig{} - this.Args = args - this.Description = description - this.Documentation = documentation - this.Entrypoint = entrypoint - this.Env = env - this.Interface = interface_ - this.IpcHost = ipcHost - this.Linux = linux - this.Mounts = mounts - this.Network = network - this.PidHost = pidHost - this.PropagatedMount = propagatedMount - this.WorkDir = workDir - return &this -} - -// NewPluginConfigWithDefaults instantiates a new PluginConfig object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginConfigWithDefaults() *PluginConfig { - this := PluginConfig{} - return &this -} - -// GetArgs returns the Args field value -func (o *PluginConfig) GetArgs() PluginConfigArgs { - if o == nil { - var ret PluginConfigArgs - return ret - } - - return o.Args -} - -// GetArgsOk returns a tuple with the Args field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetArgsOk() (*PluginConfigArgs, bool) { - if o == nil { - return nil, false - } - return &o.Args, true -} - -// SetArgs sets field value -func (o *PluginConfig) SetArgs(v PluginConfigArgs) { - o.Args = v -} - -// GetDescription returns the Description field value -func (o *PluginConfig) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *PluginConfig) SetDescription(v string) { - o.Description = v -} - -// GetDockerVersion returns the DockerVersion field value if set, zero value otherwise. -func (o *PluginConfig) GetDockerVersion() string { - if o == nil || o.DockerVersion == nil { - var ret string - return ret - } - return *o.DockerVersion -} - -// GetDockerVersionOk returns a tuple with the DockerVersion field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetDockerVersionOk() (*string, bool) { - if o == nil || o.DockerVersion == nil { - return nil, false - } - return o.DockerVersion, true -} - -// HasDockerVersion returns a boolean if a field has been set. -func (o *PluginConfig) HasDockerVersion() bool { - if o != nil && o.DockerVersion != nil { - return true - } - - return false -} - -// SetDockerVersion gets a reference to the given string and assigns it to the DockerVersion field. -func (o *PluginConfig) SetDockerVersion(v string) { - o.DockerVersion = &v -} - -// GetDocumentation returns the Documentation field value -func (o *PluginConfig) GetDocumentation() string { - if o == nil { - var ret string - return ret - } - - return o.Documentation -} - -// GetDocumentationOk returns a tuple with the Documentation field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetDocumentationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Documentation, true -} - -// SetDocumentation sets field value -func (o *PluginConfig) SetDocumentation(v string) { - o.Documentation = v -} - -// GetEntrypoint returns the Entrypoint field value -func (o *PluginConfig) GetEntrypoint() []string { - if o == nil { - var ret []string - return ret - } - - return o.Entrypoint -} - -// GetEntrypointOk returns a tuple with the Entrypoint field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetEntrypointOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Entrypoint, true -} - -// SetEntrypoint sets field value -func (o *PluginConfig) SetEntrypoint(v []string) { - o.Entrypoint = v -} - -// GetEnv returns the Env field value -func (o *PluginConfig) GetEnv() []PluginEnv { - if o == nil { - var ret []PluginEnv - return ret - } - - return o.Env -} - -// GetEnvOk returns a tuple with the Env field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetEnvOk() ([]PluginEnv, bool) { - if o == nil { - return nil, false - } - return o.Env, true -} - -// SetEnv sets field value -func (o *PluginConfig) SetEnv(v []PluginEnv) { - o.Env = v -} - -// GetInterface returns the Interface field value -func (o *PluginConfig) GetInterface() PluginConfigInterface { - if o == nil { - var ret PluginConfigInterface - return ret - } - - return o.Interface -} - -// GetInterfaceOk returns a tuple with the Interface field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetInterfaceOk() (*PluginConfigInterface, bool) { - if o == nil { - return nil, false - } - return &o.Interface, true -} - -// SetInterface sets field value -func (o *PluginConfig) SetInterface(v PluginConfigInterface) { - o.Interface = v -} - -// GetIpcHost returns the IpcHost field value -func (o *PluginConfig) GetIpcHost() bool { - if o == nil { - var ret bool - return ret - } - - return o.IpcHost -} - -// GetIpcHostOk returns a tuple with the IpcHost field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetIpcHostOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.IpcHost, true -} - -// SetIpcHost sets field value -func (o *PluginConfig) SetIpcHost(v bool) { - o.IpcHost = v -} - -// GetLinux returns the Linux field value -func (o *PluginConfig) GetLinux() PluginConfigLinux { - if o == nil { - var ret PluginConfigLinux - return ret - } - - return o.Linux -} - -// GetLinuxOk returns a tuple with the Linux field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetLinuxOk() (*PluginConfigLinux, bool) { - if o == nil { - return nil, false - } - return &o.Linux, true -} - -// SetLinux sets field value -func (o *PluginConfig) SetLinux(v PluginConfigLinux) { - o.Linux = v -} - -// GetMounts returns the Mounts field value -func (o *PluginConfig) GetMounts() []PluginMount { - if o == nil { - var ret []PluginMount - return ret - } - - return o.Mounts -} - -// GetMountsOk returns a tuple with the Mounts field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetMountsOk() ([]PluginMount, bool) { - if o == nil { - return nil, false - } - return o.Mounts, true -} - -// SetMounts sets field value -func (o *PluginConfig) SetMounts(v []PluginMount) { - o.Mounts = v -} - -// GetNetwork returns the Network field value -func (o *PluginConfig) GetNetwork() PluginConfigNetwork { - if o == nil { - var ret PluginConfigNetwork - return ret - } - - return o.Network -} - -// GetNetworkOk returns a tuple with the Network field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetNetworkOk() (*PluginConfigNetwork, bool) { - if o == nil { - return nil, false - } - return &o.Network, true -} - -// SetNetwork sets field value -func (o *PluginConfig) SetNetwork(v PluginConfigNetwork) { - o.Network = v -} - -// GetPidHost returns the PidHost field value -func (o *PluginConfig) GetPidHost() bool { - if o == nil { - var ret bool - return ret - } - - return o.PidHost -} - -// GetPidHostOk returns a tuple with the PidHost field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetPidHostOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.PidHost, true -} - -// SetPidHost sets field value -func (o *PluginConfig) SetPidHost(v bool) { - o.PidHost = v -} - -// GetPropagatedMount returns the PropagatedMount field value -func (o *PluginConfig) GetPropagatedMount() string { - if o == nil { - var ret string - return ret - } - - return o.PropagatedMount -} - -// GetPropagatedMountOk returns a tuple with the PropagatedMount field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetPropagatedMountOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PropagatedMount, true -} - -// SetPropagatedMount sets field value -func (o *PluginConfig) SetPropagatedMount(v string) { - o.PropagatedMount = v -} - -// GetUser returns the User field value if set, zero value otherwise. -func (o *PluginConfig) GetUser() PluginConfigUser { - if o == nil || o.User == nil { - var ret PluginConfigUser - return ret - } - return *o.User -} - -// GetUserOk returns a tuple with the User field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetUserOk() (*PluginConfigUser, bool) { - if o == nil || o.User == nil { - return nil, false - } - return o.User, true -} - -// HasUser returns a boolean if a field has been set. -func (o *PluginConfig) HasUser() bool { - if o != nil && o.User != nil { - return true - } - - return false -} - -// SetUser gets a reference to the given PluginConfigUser and assigns it to the User field. -func (o *PluginConfig) SetUser(v PluginConfigUser) { - o.User = &v -} - -// GetWorkDir returns the WorkDir field value -func (o *PluginConfig) GetWorkDir() string { - if o == nil { - var ret string - return ret - } - - return o.WorkDir -} - -// GetWorkDirOk returns a tuple with the WorkDir field value -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetWorkDirOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.WorkDir, true -} - -// SetWorkDir sets field value -func (o *PluginConfig) SetWorkDir(v string) { - o.WorkDir = v -} - -// GetRootfs returns the Rootfs field value if set, zero value otherwise. -func (o *PluginConfig) GetRootfs() PluginConfigRootfs { - if o == nil || o.Rootfs == nil { - var ret PluginConfigRootfs - return ret - } - return *o.Rootfs -} - -// GetRootfsOk returns a tuple with the Rootfs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PluginConfig) GetRootfsOk() (*PluginConfigRootfs, bool) { - if o == nil || o.Rootfs == nil { - return nil, false - } - return o.Rootfs, true -} - -// HasRootfs returns a boolean if a field has been set. -func (o *PluginConfig) HasRootfs() bool { - if o != nil && o.Rootfs != nil { - return true - } - - return false -} - -// SetRootfs gets a reference to the given PluginConfigRootfs and assigns it to the Rootfs field. -func (o *PluginConfig) SetRootfs(v PluginConfigRootfs) { - o.Rootfs = &v -} - -func (o PluginConfig) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["Args"] = o.Args - } - if true { - toSerialize["Description"] = o.Description - } - if o.DockerVersion != nil { - toSerialize["DockerVersion"] = o.DockerVersion - } - if true { - toSerialize["Documentation"] = o.Documentation - } - if true { - toSerialize["Entrypoint"] = o.Entrypoint - } - if true { - toSerialize["Env"] = o.Env - } - if true { - toSerialize["Interface"] = o.Interface - } - if true { - toSerialize["IpcHost"] = o.IpcHost - } - if true { - toSerialize["Linux"] = o.Linux - } - if true { - toSerialize["Mounts"] = o.Mounts - } - if true { - toSerialize["Network"] = o.Network - } - if true { - toSerialize["PidHost"] = o.PidHost - } - if true { - toSerialize["PropagatedMount"] = o.PropagatedMount - } - if o.User != nil { - toSerialize["User"] = o.User - } - if true { - toSerialize["WorkDir"] = o.WorkDir - } - if o.Rootfs != nil { - toSerialize["rootfs"] = o.Rootfs - } - return json.Marshal(toSerialize) -} - -type NullablePluginConfig struct { - value *PluginConfig - isSet bool -} - -func (v NullablePluginConfig) Get() *PluginConfig { - return v.value -} - -func (v *NullablePluginConfig) Set(val *PluginConfig) { - v.value = val - v.isSet = true -} - -func (v NullablePluginConfig) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginConfig) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginConfig(val *PluginConfig) *NullablePluginConfig { - return &NullablePluginConfig{value: val, isSet: true} -} - -func (v NullablePluginConfig) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginConfig) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_config_args.go b/clients/hydra/go/model_plugin_config_args.go deleted file mode 100644 index bc7b5e3ac4c..00000000000 --- a/clients/hydra/go/model_plugin_config_args.go +++ /dev/null @@ -1,199 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginConfigArgs PluginConfigArgs plugin config args -type PluginConfigArgs struct { - // description - Description string `json:"Description"` - // name - Name string `json:"Name"` - // settable - Settable []string `json:"Settable"` - // value - Value []string `json:"Value"` -} - -// NewPluginConfigArgs instantiates a new PluginConfigArgs object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginConfigArgs(description string, name string, settable []string, value []string) *PluginConfigArgs { - this := PluginConfigArgs{} - this.Description = description - this.Name = name - this.Settable = settable - this.Value = value - return &this -} - -// NewPluginConfigArgsWithDefaults instantiates a new PluginConfigArgs object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginConfigArgsWithDefaults() *PluginConfigArgs { - this := PluginConfigArgs{} - return &this -} - -// GetDescription returns the Description field value -func (o *PluginConfigArgs) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *PluginConfigArgs) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *PluginConfigArgs) SetDescription(v string) { - o.Description = v -} - -// GetName returns the Name field value -func (o *PluginConfigArgs) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *PluginConfigArgs) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *PluginConfigArgs) SetName(v string) { - o.Name = v -} - -// GetSettable returns the Settable field value -func (o *PluginConfigArgs) GetSettable() []string { - if o == nil { - var ret []string - return ret - } - - return o.Settable -} - -// GetSettableOk returns a tuple with the Settable field value -// and a boolean to check if the value has been set. -func (o *PluginConfigArgs) GetSettableOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Settable, true -} - -// SetSettable sets field value -func (o *PluginConfigArgs) SetSettable(v []string) { - o.Settable = v -} - -// GetValue returns the Value field value -func (o *PluginConfigArgs) GetValue() []string { - if o == nil { - var ret []string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *PluginConfigArgs) GetValueOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Value, true -} - -// SetValue sets field value -func (o *PluginConfigArgs) SetValue(v []string) { - o.Value = v -} - -func (o PluginConfigArgs) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["Description"] = o.Description - } - if true { - toSerialize["Name"] = o.Name - } - if true { - toSerialize["Settable"] = o.Settable - } - if true { - toSerialize["Value"] = o.Value - } - return json.Marshal(toSerialize) -} - -type NullablePluginConfigArgs struct { - value *PluginConfigArgs - isSet bool -} - -func (v NullablePluginConfigArgs) Get() *PluginConfigArgs { - return v.value -} - -func (v *NullablePluginConfigArgs) Set(val *PluginConfigArgs) { - v.value = val - v.isSet = true -} - -func (v NullablePluginConfigArgs) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginConfigArgs) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginConfigArgs(val *PluginConfigArgs) *NullablePluginConfigArgs { - return &NullablePluginConfigArgs{value: val, isSet: true} -} - -func (v NullablePluginConfigArgs) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginConfigArgs) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_config_interface.go b/clients/hydra/go/model_plugin_config_interface.go deleted file mode 100644 index 3cf272ee088..00000000000 --- a/clients/hydra/go/model_plugin_config_interface.go +++ /dev/null @@ -1,176 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginConfigInterface PluginConfigInterface The interface between Docker and the plugin -type PluginConfigInterface struct { - // Protocol to use for clients connecting to the plugin. - ProtocolScheme *string `json:"ProtocolScheme,omitempty"` - // socket - Socket string `json:"Socket"` - // types - Types []PluginInterfaceType `json:"Types"` -} - -// NewPluginConfigInterface instantiates a new PluginConfigInterface object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginConfigInterface(socket string, types []PluginInterfaceType) *PluginConfigInterface { - this := PluginConfigInterface{} - this.Socket = socket - this.Types = types - return &this -} - -// NewPluginConfigInterfaceWithDefaults instantiates a new PluginConfigInterface object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginConfigInterfaceWithDefaults() *PluginConfigInterface { - this := PluginConfigInterface{} - return &this -} - -// GetProtocolScheme returns the ProtocolScheme field value if set, zero value otherwise. -func (o *PluginConfigInterface) GetProtocolScheme() string { - if o == nil || o.ProtocolScheme == nil { - var ret string - return ret - } - return *o.ProtocolScheme -} - -// GetProtocolSchemeOk returns a tuple with the ProtocolScheme field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PluginConfigInterface) GetProtocolSchemeOk() (*string, bool) { - if o == nil || o.ProtocolScheme == nil { - return nil, false - } - return o.ProtocolScheme, true -} - -// HasProtocolScheme returns a boolean if a field has been set. -func (o *PluginConfigInterface) HasProtocolScheme() bool { - if o != nil && o.ProtocolScheme != nil { - return true - } - - return false -} - -// SetProtocolScheme gets a reference to the given string and assigns it to the ProtocolScheme field. -func (o *PluginConfigInterface) SetProtocolScheme(v string) { - o.ProtocolScheme = &v -} - -// GetSocket returns the Socket field value -func (o *PluginConfigInterface) GetSocket() string { - if o == nil { - var ret string - return ret - } - - return o.Socket -} - -// GetSocketOk returns a tuple with the Socket field value -// and a boolean to check if the value has been set. -func (o *PluginConfigInterface) GetSocketOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Socket, true -} - -// SetSocket sets field value -func (o *PluginConfigInterface) SetSocket(v string) { - o.Socket = v -} - -// GetTypes returns the Types field value -func (o *PluginConfigInterface) GetTypes() []PluginInterfaceType { - if o == nil { - var ret []PluginInterfaceType - return ret - } - - return o.Types -} - -// GetTypesOk returns a tuple with the Types field value -// and a boolean to check if the value has been set. -func (o *PluginConfigInterface) GetTypesOk() ([]PluginInterfaceType, bool) { - if o == nil { - return nil, false - } - return o.Types, true -} - -// SetTypes sets field value -func (o *PluginConfigInterface) SetTypes(v []PluginInterfaceType) { - o.Types = v -} - -func (o PluginConfigInterface) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.ProtocolScheme != nil { - toSerialize["ProtocolScheme"] = o.ProtocolScheme - } - if true { - toSerialize["Socket"] = o.Socket - } - if true { - toSerialize["Types"] = o.Types - } - return json.Marshal(toSerialize) -} - -type NullablePluginConfigInterface struct { - value *PluginConfigInterface - isSet bool -} - -func (v NullablePluginConfigInterface) Get() *PluginConfigInterface { - return v.value -} - -func (v *NullablePluginConfigInterface) Set(val *PluginConfigInterface) { - v.value = val - v.isSet = true -} - -func (v NullablePluginConfigInterface) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginConfigInterface) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginConfigInterface(val *PluginConfigInterface) *NullablePluginConfigInterface { - return &NullablePluginConfigInterface{value: val, isSet: true} -} - -func (v NullablePluginConfigInterface) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginConfigInterface) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_config_linux_.go b/clients/hydra/go/model_plugin_config_linux_.go deleted file mode 100644 index 61b8c118080..00000000000 --- a/clients/hydra/go/model_plugin_config_linux_.go +++ /dev/null @@ -1,169 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginConfigLinux PluginConfigLinux plugin config linux -type PluginConfigLinux struct { - // allow all devices - AllowAllDevices bool `json:"AllowAllDevices"` - // capabilities - Capabilities []string `json:"Capabilities"` - // devices - Devices []PluginDevice `json:"Devices"` -} - -// NewPluginConfigLinux instantiates a new PluginConfigLinux object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginConfigLinux(allowAllDevices bool, capabilities []string, devices []PluginDevice) *PluginConfigLinux { - this := PluginConfigLinux{} - this.AllowAllDevices = allowAllDevices - this.Capabilities = capabilities - this.Devices = devices - return &this -} - -// NewPluginConfigLinuxWithDefaults instantiates a new PluginConfigLinux object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginConfigLinuxWithDefaults() *PluginConfigLinux { - this := PluginConfigLinux{} - return &this -} - -// GetAllowAllDevices returns the AllowAllDevices field value -func (o *PluginConfigLinux) GetAllowAllDevices() bool { - if o == nil { - var ret bool - return ret - } - - return o.AllowAllDevices -} - -// GetAllowAllDevicesOk returns a tuple with the AllowAllDevices field value -// and a boolean to check if the value has been set. -func (o *PluginConfigLinux) GetAllowAllDevicesOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.AllowAllDevices, true -} - -// SetAllowAllDevices sets field value -func (o *PluginConfigLinux) SetAllowAllDevices(v bool) { - o.AllowAllDevices = v -} - -// GetCapabilities returns the Capabilities field value -func (o *PluginConfigLinux) GetCapabilities() []string { - if o == nil { - var ret []string - return ret - } - - return o.Capabilities -} - -// GetCapabilitiesOk returns a tuple with the Capabilities field value -// and a boolean to check if the value has been set. -func (o *PluginConfigLinux) GetCapabilitiesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Capabilities, true -} - -// SetCapabilities sets field value -func (o *PluginConfigLinux) SetCapabilities(v []string) { - o.Capabilities = v -} - -// GetDevices returns the Devices field value -func (o *PluginConfigLinux) GetDevices() []PluginDevice { - if o == nil { - var ret []PluginDevice - return ret - } - - return o.Devices -} - -// GetDevicesOk returns a tuple with the Devices field value -// and a boolean to check if the value has been set. -func (o *PluginConfigLinux) GetDevicesOk() ([]PluginDevice, bool) { - if o == nil { - return nil, false - } - return o.Devices, true -} - -// SetDevices sets field value -func (o *PluginConfigLinux) SetDevices(v []PluginDevice) { - o.Devices = v -} - -func (o PluginConfigLinux) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["AllowAllDevices"] = o.AllowAllDevices - } - if true { - toSerialize["Capabilities"] = o.Capabilities - } - if true { - toSerialize["Devices"] = o.Devices - } - return json.Marshal(toSerialize) -} - -type NullablePluginConfigLinux struct { - value *PluginConfigLinux - isSet bool -} - -func (v NullablePluginConfigLinux) Get() *PluginConfigLinux { - return v.value -} - -func (v *NullablePluginConfigLinux) Set(val *PluginConfigLinux) { - v.value = val - v.isSet = true -} - -func (v NullablePluginConfigLinux) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginConfigLinux) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginConfigLinux(val *PluginConfigLinux) *NullablePluginConfigLinux { - return &NullablePluginConfigLinux{value: val, isSet: true} -} - -func (v NullablePluginConfigLinux) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginConfigLinux) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_config_network.go b/clients/hydra/go/model_plugin_config_network.go deleted file mode 100644 index 7b93efb1a5d..00000000000 --- a/clients/hydra/go/model_plugin_config_network.go +++ /dev/null @@ -1,109 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginConfigNetwork PluginConfigNetwork plugin config network -type PluginConfigNetwork struct { - // type - Type string `json:"Type"` -} - -// NewPluginConfigNetwork instantiates a new PluginConfigNetwork object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginConfigNetwork(type_ string) *PluginConfigNetwork { - this := PluginConfigNetwork{} - this.Type = type_ - return &this -} - -// NewPluginConfigNetworkWithDefaults instantiates a new PluginConfigNetwork object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginConfigNetworkWithDefaults() *PluginConfigNetwork { - this := PluginConfigNetwork{} - return &this -} - -// GetType returns the Type field value -func (o *PluginConfigNetwork) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *PluginConfigNetwork) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *PluginConfigNetwork) SetType(v string) { - o.Type = v -} - -func (o PluginConfigNetwork) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["Type"] = o.Type - } - return json.Marshal(toSerialize) -} - -type NullablePluginConfigNetwork struct { - value *PluginConfigNetwork - isSet bool -} - -func (v NullablePluginConfigNetwork) Get() *PluginConfigNetwork { - return v.value -} - -func (v *NullablePluginConfigNetwork) Set(val *PluginConfigNetwork) { - v.value = val - v.isSet = true -} - -func (v NullablePluginConfigNetwork) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginConfigNetwork) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginConfigNetwork(val *PluginConfigNetwork) *NullablePluginConfigNetwork { - return &NullablePluginConfigNetwork{value: val, isSet: true} -} - -func (v NullablePluginConfigNetwork) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginConfigNetwork) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_config_rootfs.go b/clients/hydra/go/model_plugin_config_rootfs.go deleted file mode 100644 index 11d9ed8b313..00000000000 --- a/clients/hydra/go/model_plugin_config_rootfs.go +++ /dev/null @@ -1,153 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginConfigRootfs PluginConfigRootfs plugin config rootfs -type PluginConfigRootfs struct { - // diff ids - DiffIds []string `json:"diff_ids,omitempty"` - // type - Type *string `json:"type,omitempty"` -} - -// NewPluginConfigRootfs instantiates a new PluginConfigRootfs object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginConfigRootfs() *PluginConfigRootfs { - this := PluginConfigRootfs{} - return &this -} - -// NewPluginConfigRootfsWithDefaults instantiates a new PluginConfigRootfs object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginConfigRootfsWithDefaults() *PluginConfigRootfs { - this := PluginConfigRootfs{} - return &this -} - -// GetDiffIds returns the DiffIds field value if set, zero value otherwise. -func (o *PluginConfigRootfs) GetDiffIds() []string { - if o == nil || o.DiffIds == nil { - var ret []string - return ret - } - return o.DiffIds -} - -// GetDiffIdsOk returns a tuple with the DiffIds field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PluginConfigRootfs) GetDiffIdsOk() ([]string, bool) { - if o == nil || o.DiffIds == nil { - return nil, false - } - return o.DiffIds, true -} - -// HasDiffIds returns a boolean if a field has been set. -func (o *PluginConfigRootfs) HasDiffIds() bool { - if o != nil && o.DiffIds != nil { - return true - } - - return false -} - -// SetDiffIds gets a reference to the given []string and assigns it to the DiffIds field. -func (o *PluginConfigRootfs) SetDiffIds(v []string) { - o.DiffIds = v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *PluginConfigRootfs) GetType() string { - if o == nil || o.Type == nil { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PluginConfigRootfs) GetTypeOk() (*string, bool) { - if o == nil || o.Type == nil { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *PluginConfigRootfs) HasType() bool { - if o != nil && o.Type != nil { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *PluginConfigRootfs) SetType(v string) { - o.Type = &v -} - -func (o PluginConfigRootfs) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.DiffIds != nil { - toSerialize["diff_ids"] = o.DiffIds - } - if o.Type != nil { - toSerialize["type"] = o.Type - } - return json.Marshal(toSerialize) -} - -type NullablePluginConfigRootfs struct { - value *PluginConfigRootfs - isSet bool -} - -func (v NullablePluginConfigRootfs) Get() *PluginConfigRootfs { - return v.value -} - -func (v *NullablePluginConfigRootfs) Set(val *PluginConfigRootfs) { - v.value = val - v.isSet = true -} - -func (v NullablePluginConfigRootfs) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginConfigRootfs) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginConfigRootfs(val *PluginConfigRootfs) *NullablePluginConfigRootfs { - return &NullablePluginConfigRootfs{value: val, isSet: true} -} - -func (v NullablePluginConfigRootfs) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginConfigRootfs) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_config_user.go b/clients/hydra/go/model_plugin_config_user.go deleted file mode 100644 index 4919eb1739b..00000000000 --- a/clients/hydra/go/model_plugin_config_user.go +++ /dev/null @@ -1,153 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginConfigUser PluginConfigUser plugin config user -type PluginConfigUser struct { - // g ID - GID *int32 `json:"GID,omitempty"` - // UID - UID *int32 `json:"UID,omitempty"` -} - -// NewPluginConfigUser instantiates a new PluginConfigUser object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginConfigUser() *PluginConfigUser { - this := PluginConfigUser{} - return &this -} - -// NewPluginConfigUserWithDefaults instantiates a new PluginConfigUser object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginConfigUserWithDefaults() *PluginConfigUser { - this := PluginConfigUser{} - return &this -} - -// GetGID returns the GID field value if set, zero value otherwise. -func (o *PluginConfigUser) GetGID() int32 { - if o == nil || o.GID == nil { - var ret int32 - return ret - } - return *o.GID -} - -// GetGIDOk returns a tuple with the GID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PluginConfigUser) GetGIDOk() (*int32, bool) { - if o == nil || o.GID == nil { - return nil, false - } - return o.GID, true -} - -// HasGID returns a boolean if a field has been set. -func (o *PluginConfigUser) HasGID() bool { - if o != nil && o.GID != nil { - return true - } - - return false -} - -// SetGID gets a reference to the given int32 and assigns it to the GID field. -func (o *PluginConfigUser) SetGID(v int32) { - o.GID = &v -} - -// GetUID returns the UID field value if set, zero value otherwise. -func (o *PluginConfigUser) GetUID() int32 { - if o == nil || o.UID == nil { - var ret int32 - return ret - } - return *o.UID -} - -// GetUIDOk returns a tuple with the UID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PluginConfigUser) GetUIDOk() (*int32, bool) { - if o == nil || o.UID == nil { - return nil, false - } - return o.UID, true -} - -// HasUID returns a boolean if a field has been set. -func (o *PluginConfigUser) HasUID() bool { - if o != nil && o.UID != nil { - return true - } - - return false -} - -// SetUID gets a reference to the given int32 and assigns it to the UID field. -func (o *PluginConfigUser) SetUID(v int32) { - o.UID = &v -} - -func (o PluginConfigUser) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.GID != nil { - toSerialize["GID"] = o.GID - } - if o.UID != nil { - toSerialize["UID"] = o.UID - } - return json.Marshal(toSerialize) -} - -type NullablePluginConfigUser struct { - value *PluginConfigUser - isSet bool -} - -func (v NullablePluginConfigUser) Get() *PluginConfigUser { - return v.value -} - -func (v *NullablePluginConfigUser) Set(val *PluginConfigUser) { - v.value = val - v.isSet = true -} - -func (v NullablePluginConfigUser) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginConfigUser) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginConfigUser(val *PluginConfigUser) *NullablePluginConfigUser { - return &NullablePluginConfigUser{value: val, isSet: true} -} - -func (v NullablePluginConfigUser) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginConfigUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_device.go b/clients/hydra/go/model_plugin_device.go deleted file mode 100644 index b4aa0435d49..00000000000 --- a/clients/hydra/go/model_plugin_device.go +++ /dev/null @@ -1,199 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginDevice PluginDevice plugin device -type PluginDevice struct { - // description - Description string `json:"Description"` - // name - Name string `json:"Name"` - // path - Path string `json:"Path"` - // settable - Settable []string `json:"Settable"` -} - -// NewPluginDevice instantiates a new PluginDevice object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginDevice(description string, name string, path string, settable []string) *PluginDevice { - this := PluginDevice{} - this.Description = description - this.Name = name - this.Path = path - this.Settable = settable - return &this -} - -// NewPluginDeviceWithDefaults instantiates a new PluginDevice object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginDeviceWithDefaults() *PluginDevice { - this := PluginDevice{} - return &this -} - -// GetDescription returns the Description field value -func (o *PluginDevice) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *PluginDevice) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *PluginDevice) SetDescription(v string) { - o.Description = v -} - -// GetName returns the Name field value -func (o *PluginDevice) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *PluginDevice) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *PluginDevice) SetName(v string) { - o.Name = v -} - -// GetPath returns the Path field value -func (o *PluginDevice) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *PluginDevice) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *PluginDevice) SetPath(v string) { - o.Path = v -} - -// GetSettable returns the Settable field value -func (o *PluginDevice) GetSettable() []string { - if o == nil { - var ret []string - return ret - } - - return o.Settable -} - -// GetSettableOk returns a tuple with the Settable field value -// and a boolean to check if the value has been set. -func (o *PluginDevice) GetSettableOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Settable, true -} - -// SetSettable sets field value -func (o *PluginDevice) SetSettable(v []string) { - o.Settable = v -} - -func (o PluginDevice) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["Description"] = o.Description - } - if true { - toSerialize["Name"] = o.Name - } - if true { - toSerialize["Path"] = o.Path - } - if true { - toSerialize["Settable"] = o.Settable - } - return json.Marshal(toSerialize) -} - -type NullablePluginDevice struct { - value *PluginDevice - isSet bool -} - -func (v NullablePluginDevice) Get() *PluginDevice { - return v.value -} - -func (v *NullablePluginDevice) Set(val *PluginDevice) { - v.value = val - v.isSet = true -} - -func (v NullablePluginDevice) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginDevice) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginDevice(val *PluginDevice) *NullablePluginDevice { - return &NullablePluginDevice{value: val, isSet: true} -} - -func (v NullablePluginDevice) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginDevice) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_env.go b/clients/hydra/go/model_plugin_env.go deleted file mode 100644 index 1697314a812..00000000000 --- a/clients/hydra/go/model_plugin_env.go +++ /dev/null @@ -1,199 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginEnv PluginEnv plugin env -type PluginEnv struct { - // description - Description string `json:"Description"` - // name - Name string `json:"Name"` - // settable - Settable []string `json:"Settable"` - // value - Value string `json:"Value"` -} - -// NewPluginEnv instantiates a new PluginEnv object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginEnv(description string, name string, settable []string, value string) *PluginEnv { - this := PluginEnv{} - this.Description = description - this.Name = name - this.Settable = settable - this.Value = value - return &this -} - -// NewPluginEnvWithDefaults instantiates a new PluginEnv object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginEnvWithDefaults() *PluginEnv { - this := PluginEnv{} - return &this -} - -// GetDescription returns the Description field value -func (o *PluginEnv) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *PluginEnv) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *PluginEnv) SetDescription(v string) { - o.Description = v -} - -// GetName returns the Name field value -func (o *PluginEnv) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *PluginEnv) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *PluginEnv) SetName(v string) { - o.Name = v -} - -// GetSettable returns the Settable field value -func (o *PluginEnv) GetSettable() []string { - if o == nil { - var ret []string - return ret - } - - return o.Settable -} - -// GetSettableOk returns a tuple with the Settable field value -// and a boolean to check if the value has been set. -func (o *PluginEnv) GetSettableOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Settable, true -} - -// SetSettable sets field value -func (o *PluginEnv) SetSettable(v []string) { - o.Settable = v -} - -// GetValue returns the Value field value -func (o *PluginEnv) GetValue() string { - if o == nil { - var ret string - return ret - } - - return o.Value -} - -// GetValueOk returns a tuple with the Value field value -// and a boolean to check if the value has been set. -func (o *PluginEnv) GetValueOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Value, true -} - -// SetValue sets field value -func (o *PluginEnv) SetValue(v string) { - o.Value = v -} - -func (o PluginEnv) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["Description"] = o.Description - } - if true { - toSerialize["Name"] = o.Name - } - if true { - toSerialize["Settable"] = o.Settable - } - if true { - toSerialize["Value"] = o.Value - } - return json.Marshal(toSerialize) -} - -type NullablePluginEnv struct { - value *PluginEnv - isSet bool -} - -func (v NullablePluginEnv) Get() *PluginEnv { - return v.value -} - -func (v *NullablePluginEnv) Set(val *PluginEnv) { - v.value = val - v.isSet = true -} - -func (v NullablePluginEnv) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginEnv) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginEnv(val *PluginEnv) *NullablePluginEnv { - return &NullablePluginEnv{value: val, isSet: true} -} - -func (v NullablePluginEnv) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginEnv) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_interface_type.go b/clients/hydra/go/model_plugin_interface_type.go deleted file mode 100644 index ab45fc3a3a4..00000000000 --- a/clients/hydra/go/model_plugin_interface_type.go +++ /dev/null @@ -1,169 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginInterfaceType PluginInterfaceType plugin interface type -type PluginInterfaceType struct { - // capability - Capability string `json:"Capability"` - // prefix - Prefix string `json:"Prefix"` - // version - Version string `json:"Version"` -} - -// NewPluginInterfaceType instantiates a new PluginInterfaceType object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginInterfaceType(capability string, prefix string, version string) *PluginInterfaceType { - this := PluginInterfaceType{} - this.Capability = capability - this.Prefix = prefix - this.Version = version - return &this -} - -// NewPluginInterfaceTypeWithDefaults instantiates a new PluginInterfaceType object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginInterfaceTypeWithDefaults() *PluginInterfaceType { - this := PluginInterfaceType{} - return &this -} - -// GetCapability returns the Capability field value -func (o *PluginInterfaceType) GetCapability() string { - if o == nil { - var ret string - return ret - } - - return o.Capability -} - -// GetCapabilityOk returns a tuple with the Capability field value -// and a boolean to check if the value has been set. -func (o *PluginInterfaceType) GetCapabilityOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Capability, true -} - -// SetCapability sets field value -func (o *PluginInterfaceType) SetCapability(v string) { - o.Capability = v -} - -// GetPrefix returns the Prefix field value -func (o *PluginInterfaceType) GetPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *PluginInterfaceType) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Prefix, true -} - -// SetPrefix sets field value -func (o *PluginInterfaceType) SetPrefix(v string) { - o.Prefix = v -} - -// GetVersion returns the Version field value -func (o *PluginInterfaceType) GetVersion() string { - if o == nil { - var ret string - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *PluginInterfaceType) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *PluginInterfaceType) SetVersion(v string) { - o.Version = v -} - -func (o PluginInterfaceType) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["Capability"] = o.Capability - } - if true { - toSerialize["Prefix"] = o.Prefix - } - if true { - toSerialize["Version"] = o.Version - } - return json.Marshal(toSerialize) -} - -type NullablePluginInterfaceType struct { - value *PluginInterfaceType - isSet bool -} - -func (v NullablePluginInterfaceType) Get() *PluginInterfaceType { - return v.value -} - -func (v *NullablePluginInterfaceType) Set(val *PluginInterfaceType) { - v.value = val - v.isSet = true -} - -func (v NullablePluginInterfaceType) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginInterfaceType) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginInterfaceType(val *PluginInterfaceType) *NullablePluginInterfaceType { - return &NullablePluginInterfaceType{value: val, isSet: true} -} - -func (v NullablePluginInterfaceType) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginInterfaceType) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_mount.go b/clients/hydra/go/model_plugin_mount.go deleted file mode 100644 index 10723b32e2b..00000000000 --- a/clients/hydra/go/model_plugin_mount.go +++ /dev/null @@ -1,289 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginMount PluginMount plugin mount -type PluginMount struct { - // description - Description string `json:"Description"` - // destination - Destination string `json:"Destination"` - // name - Name string `json:"Name"` - // options - Options []string `json:"Options"` - // settable - Settable []string `json:"Settable"` - // source - Source string `json:"Source"` - // type - Type string `json:"Type"` -} - -// NewPluginMount instantiates a new PluginMount object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginMount(description string, destination string, name string, options []string, settable []string, source string, type_ string) *PluginMount { - this := PluginMount{} - this.Description = description - this.Destination = destination - this.Name = name - this.Options = options - this.Settable = settable - this.Source = source - this.Type = type_ - return &this -} - -// NewPluginMountWithDefaults instantiates a new PluginMount object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginMountWithDefaults() *PluginMount { - this := PluginMount{} - return &this -} - -// GetDescription returns the Description field value -func (o *PluginMount) GetDescription() string { - if o == nil { - var ret string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *PluginMount) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Description, true -} - -// SetDescription sets field value -func (o *PluginMount) SetDescription(v string) { - o.Description = v -} - -// GetDestination returns the Destination field value -func (o *PluginMount) GetDestination() string { - if o == nil { - var ret string - return ret - } - - return o.Destination -} - -// GetDestinationOk returns a tuple with the Destination field value -// and a boolean to check if the value has been set. -func (o *PluginMount) GetDestinationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Destination, true -} - -// SetDestination sets field value -func (o *PluginMount) SetDestination(v string) { - o.Destination = v -} - -// GetName returns the Name field value -func (o *PluginMount) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *PluginMount) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *PluginMount) SetName(v string) { - o.Name = v -} - -// GetOptions returns the Options field value -func (o *PluginMount) GetOptions() []string { - if o == nil { - var ret []string - return ret - } - - return o.Options -} - -// GetOptionsOk returns a tuple with the Options field value -// and a boolean to check if the value has been set. -func (o *PluginMount) GetOptionsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Options, true -} - -// SetOptions sets field value -func (o *PluginMount) SetOptions(v []string) { - o.Options = v -} - -// GetSettable returns the Settable field value -func (o *PluginMount) GetSettable() []string { - if o == nil { - var ret []string - return ret - } - - return o.Settable -} - -// GetSettableOk returns a tuple with the Settable field value -// and a boolean to check if the value has been set. -func (o *PluginMount) GetSettableOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Settable, true -} - -// SetSettable sets field value -func (o *PluginMount) SetSettable(v []string) { - o.Settable = v -} - -// GetSource returns the Source field value -func (o *PluginMount) GetSource() string { - if o == nil { - var ret string - return ret - } - - return o.Source -} - -// GetSourceOk returns a tuple with the Source field value -// and a boolean to check if the value has been set. -func (o *PluginMount) GetSourceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Source, true -} - -// SetSource sets field value -func (o *PluginMount) SetSource(v string) { - o.Source = v -} - -// GetType returns the Type field value -func (o *PluginMount) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *PluginMount) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *PluginMount) SetType(v string) { - o.Type = v -} - -func (o PluginMount) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["Description"] = o.Description - } - if true { - toSerialize["Destination"] = o.Destination - } - if true { - toSerialize["Name"] = o.Name - } - if true { - toSerialize["Options"] = o.Options - } - if true { - toSerialize["Settable"] = o.Settable - } - if true { - toSerialize["Source"] = o.Source - } - if true { - toSerialize["Type"] = o.Type - } - return json.Marshal(toSerialize) -} - -type NullablePluginMount struct { - value *PluginMount - isSet bool -} - -func (v NullablePluginMount) Get() *PluginMount { - return v.value -} - -func (v *NullablePluginMount) Set(val *PluginMount) { - v.value = val - v.isSet = true -} - -func (v NullablePluginMount) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginMount) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginMount(val *PluginMount) *NullablePluginMount { - return &NullablePluginMount{value: val, isSet: true} -} - -func (v NullablePluginMount) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginMount) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_plugin_settings.go b/clients/hydra/go/model_plugin_settings.go deleted file mode 100644 index 8019bd78101..00000000000 --- a/clients/hydra/go/model_plugin_settings.go +++ /dev/null @@ -1,199 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PluginSettings struct for PluginSettings -type PluginSettings struct { - // args - Args []string `json:"Args"` - // devices - Devices []PluginDevice `json:"Devices"` - // env - Env []string `json:"Env"` - // mounts - Mounts []PluginMount `json:"Mounts"` -} - -// NewPluginSettings instantiates a new PluginSettings object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPluginSettings(args []string, devices []PluginDevice, env []string, mounts []PluginMount) *PluginSettings { - this := PluginSettings{} - this.Args = args - this.Devices = devices - this.Env = env - this.Mounts = mounts - return &this -} - -// NewPluginSettingsWithDefaults instantiates a new PluginSettings object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPluginSettingsWithDefaults() *PluginSettings { - this := PluginSettings{} - return &this -} - -// GetArgs returns the Args field value -func (o *PluginSettings) GetArgs() []string { - if o == nil { - var ret []string - return ret - } - - return o.Args -} - -// GetArgsOk returns a tuple with the Args field value -// and a boolean to check if the value has been set. -func (o *PluginSettings) GetArgsOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Args, true -} - -// SetArgs sets field value -func (o *PluginSettings) SetArgs(v []string) { - o.Args = v -} - -// GetDevices returns the Devices field value -func (o *PluginSettings) GetDevices() []PluginDevice { - if o == nil { - var ret []PluginDevice - return ret - } - - return o.Devices -} - -// GetDevicesOk returns a tuple with the Devices field value -// and a boolean to check if the value has been set. -func (o *PluginSettings) GetDevicesOk() ([]PluginDevice, bool) { - if o == nil { - return nil, false - } - return o.Devices, true -} - -// SetDevices sets field value -func (o *PluginSettings) SetDevices(v []PluginDevice) { - o.Devices = v -} - -// GetEnv returns the Env field value -func (o *PluginSettings) GetEnv() []string { - if o == nil { - var ret []string - return ret - } - - return o.Env -} - -// GetEnvOk returns a tuple with the Env field value -// and a boolean to check if the value has been set. -func (o *PluginSettings) GetEnvOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Env, true -} - -// SetEnv sets field value -func (o *PluginSettings) SetEnv(v []string) { - o.Env = v -} - -// GetMounts returns the Mounts field value -func (o *PluginSettings) GetMounts() []PluginMount { - if o == nil { - var ret []PluginMount - return ret - } - - return o.Mounts -} - -// GetMountsOk returns a tuple with the Mounts field value -// and a boolean to check if the value has been set. -func (o *PluginSettings) GetMountsOk() ([]PluginMount, bool) { - if o == nil { - return nil, false - } - return o.Mounts, true -} - -// SetMounts sets field value -func (o *PluginSettings) SetMounts(v []PluginMount) { - o.Mounts = v -} - -func (o PluginSettings) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["Args"] = o.Args - } - if true { - toSerialize["Devices"] = o.Devices - } - if true { - toSerialize["Env"] = o.Env - } - if true { - toSerialize["Mounts"] = o.Mounts - } - return json.Marshal(toSerialize) -} - -type NullablePluginSettings struct { - value *PluginSettings - isSet bool -} - -func (v NullablePluginSettings) Get() *PluginSettings { - return v.value -} - -func (v *NullablePluginSettings) Set(val *PluginSettings) { - v.value = val - v.isSet = true -} - -func (v NullablePluginSettings) IsSet() bool { - return v.isSet -} - -func (v *NullablePluginSettings) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePluginSettings(val *PluginSettings) *NullablePluginSettings { - return &NullablePluginSettings{value: val, isSet: true} -} - -func (v NullablePluginSettings) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePluginSettings) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_reject_request.go b/clients/hydra/go/model_reject_o_auth2_request.go similarity index 69% rename from clients/hydra/go/model_reject_request.go rename to clients/hydra/go/model_reject_o_auth2_request.go index 9abd39063c9..41384324a98 100644 --- a/clients/hydra/go/model_reject_request.go +++ b/clients/hydra/go/model_reject_o_auth2_request.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,8 +15,8 @@ import ( "encoding/json" ) -// RejectRequest struct for RejectRequest -type RejectRequest struct { +// RejectOAuth2Request struct for RejectOAuth2Request +type RejectOAuth2Request struct { // The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. Error *string `json:"error,omitempty"` // Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs. @@ -28,25 +29,25 @@ type RejectRequest struct { StatusCode *int64 `json:"status_code,omitempty"` } -// NewRejectRequest instantiates a new RejectRequest object +// NewRejectOAuth2Request instantiates a new RejectOAuth2Request object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewRejectRequest() *RejectRequest { - this := RejectRequest{} +func NewRejectOAuth2Request() *RejectOAuth2Request { + this := RejectOAuth2Request{} return &this } -// NewRejectRequestWithDefaults instantiates a new RejectRequest object +// NewRejectOAuth2RequestWithDefaults instantiates a new RejectOAuth2Request object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewRejectRequestWithDefaults() *RejectRequest { - this := RejectRequest{} +func NewRejectOAuth2RequestWithDefaults() *RejectOAuth2Request { + this := RejectOAuth2Request{} return &this } // GetError returns the Error field value if set, zero value otherwise. -func (o *RejectRequest) GetError() string { +func (o *RejectOAuth2Request) GetError() string { if o == nil || o.Error == nil { var ret string return ret @@ -56,7 +57,7 @@ func (o *RejectRequest) GetError() string { // GetErrorOk returns a tuple with the Error field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RejectRequest) GetErrorOk() (*string, bool) { +func (o *RejectOAuth2Request) GetErrorOk() (*string, bool) { if o == nil || o.Error == nil { return nil, false } @@ -64,7 +65,7 @@ func (o *RejectRequest) GetErrorOk() (*string, bool) { } // HasError returns a boolean if a field has been set. -func (o *RejectRequest) HasError() bool { +func (o *RejectOAuth2Request) HasError() bool { if o != nil && o.Error != nil { return true } @@ -73,12 +74,12 @@ func (o *RejectRequest) HasError() bool { } // SetError gets a reference to the given string and assigns it to the Error field. -func (o *RejectRequest) SetError(v string) { +func (o *RejectOAuth2Request) SetError(v string) { o.Error = &v } // GetErrorDebug returns the ErrorDebug field value if set, zero value otherwise. -func (o *RejectRequest) GetErrorDebug() string { +func (o *RejectOAuth2Request) GetErrorDebug() string { if o == nil || o.ErrorDebug == nil { var ret string return ret @@ -88,7 +89,7 @@ func (o *RejectRequest) GetErrorDebug() string { // GetErrorDebugOk returns a tuple with the ErrorDebug field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RejectRequest) GetErrorDebugOk() (*string, bool) { +func (o *RejectOAuth2Request) GetErrorDebugOk() (*string, bool) { if o == nil || o.ErrorDebug == nil { return nil, false } @@ -96,7 +97,7 @@ func (o *RejectRequest) GetErrorDebugOk() (*string, bool) { } // HasErrorDebug returns a boolean if a field has been set. -func (o *RejectRequest) HasErrorDebug() bool { +func (o *RejectOAuth2Request) HasErrorDebug() bool { if o != nil && o.ErrorDebug != nil { return true } @@ -105,12 +106,12 @@ func (o *RejectRequest) HasErrorDebug() bool { } // SetErrorDebug gets a reference to the given string and assigns it to the ErrorDebug field. -func (o *RejectRequest) SetErrorDebug(v string) { +func (o *RejectOAuth2Request) SetErrorDebug(v string) { o.ErrorDebug = &v } // GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise. -func (o *RejectRequest) GetErrorDescription() string { +func (o *RejectOAuth2Request) GetErrorDescription() string { if o == nil || o.ErrorDescription == nil { var ret string return ret @@ -120,7 +121,7 @@ func (o *RejectRequest) GetErrorDescription() string { // GetErrorDescriptionOk returns a tuple with the ErrorDescription field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RejectRequest) GetErrorDescriptionOk() (*string, bool) { +func (o *RejectOAuth2Request) GetErrorDescriptionOk() (*string, bool) { if o == nil || o.ErrorDescription == nil { return nil, false } @@ -128,7 +129,7 @@ func (o *RejectRequest) GetErrorDescriptionOk() (*string, bool) { } // HasErrorDescription returns a boolean if a field has been set. -func (o *RejectRequest) HasErrorDescription() bool { +func (o *RejectOAuth2Request) HasErrorDescription() bool { if o != nil && o.ErrorDescription != nil { return true } @@ -137,12 +138,12 @@ func (o *RejectRequest) HasErrorDescription() bool { } // SetErrorDescription gets a reference to the given string and assigns it to the ErrorDescription field. -func (o *RejectRequest) SetErrorDescription(v string) { +func (o *RejectOAuth2Request) SetErrorDescription(v string) { o.ErrorDescription = &v } // GetErrorHint returns the ErrorHint field value if set, zero value otherwise. -func (o *RejectRequest) GetErrorHint() string { +func (o *RejectOAuth2Request) GetErrorHint() string { if o == nil || o.ErrorHint == nil { var ret string return ret @@ -152,7 +153,7 @@ func (o *RejectRequest) GetErrorHint() string { // GetErrorHintOk returns a tuple with the ErrorHint field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RejectRequest) GetErrorHintOk() (*string, bool) { +func (o *RejectOAuth2Request) GetErrorHintOk() (*string, bool) { if o == nil || o.ErrorHint == nil { return nil, false } @@ -160,7 +161,7 @@ func (o *RejectRequest) GetErrorHintOk() (*string, bool) { } // HasErrorHint returns a boolean if a field has been set. -func (o *RejectRequest) HasErrorHint() bool { +func (o *RejectOAuth2Request) HasErrorHint() bool { if o != nil && o.ErrorHint != nil { return true } @@ -169,12 +170,12 @@ func (o *RejectRequest) HasErrorHint() bool { } // SetErrorHint gets a reference to the given string and assigns it to the ErrorHint field. -func (o *RejectRequest) SetErrorHint(v string) { +func (o *RejectOAuth2Request) SetErrorHint(v string) { o.ErrorHint = &v } // GetStatusCode returns the StatusCode field value if set, zero value otherwise. -func (o *RejectRequest) GetStatusCode() int64 { +func (o *RejectOAuth2Request) GetStatusCode() int64 { if o == nil || o.StatusCode == nil { var ret int64 return ret @@ -184,7 +185,7 @@ func (o *RejectRequest) GetStatusCode() int64 { // GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RejectRequest) GetStatusCodeOk() (*int64, bool) { +func (o *RejectOAuth2Request) GetStatusCodeOk() (*int64, bool) { if o == nil || o.StatusCode == nil { return nil, false } @@ -192,7 +193,7 @@ func (o *RejectRequest) GetStatusCodeOk() (*int64, bool) { } // HasStatusCode returns a boolean if a field has been set. -func (o *RejectRequest) HasStatusCode() bool { +func (o *RejectOAuth2Request) HasStatusCode() bool { if o != nil && o.StatusCode != nil { return true } @@ -201,11 +202,11 @@ func (o *RejectRequest) HasStatusCode() bool { } // SetStatusCode gets a reference to the given int64 and assigns it to the StatusCode field. -func (o *RejectRequest) SetStatusCode(v int64) { +func (o *RejectOAuth2Request) SetStatusCode(v int64) { o.StatusCode = &v } -func (o RejectRequest) MarshalJSON() ([]byte, error) { +func (o RejectOAuth2Request) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Error != nil { toSerialize["error"] = o.Error @@ -225,38 +226,38 @@ func (o RejectRequest) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableRejectRequest struct { - value *RejectRequest +type NullableRejectOAuth2Request struct { + value *RejectOAuth2Request isSet bool } -func (v NullableRejectRequest) Get() *RejectRequest { +func (v NullableRejectOAuth2Request) Get() *RejectOAuth2Request { return v.value } -func (v *NullableRejectRequest) Set(val *RejectRequest) { +func (v *NullableRejectOAuth2Request) Set(val *RejectOAuth2Request) { v.value = val v.isSet = true } -func (v NullableRejectRequest) IsSet() bool { +func (v NullableRejectOAuth2Request) IsSet() bool { return v.isSet } -func (v *NullableRejectRequest) Unset() { +func (v *NullableRejectOAuth2Request) Unset() { v.value = nil v.isSet = false } -func NewNullableRejectRequest(val *RejectRequest) *NullableRejectRequest { - return &NullableRejectRequest{value: val, isSet: true} +func NewNullableRejectOAuth2Request(val *RejectOAuth2Request) *NullableRejectOAuth2Request { + return &NullableRejectOAuth2Request{value: val, isSet: true} } -func (v NullableRejectRequest) MarshalJSON() ([]byte, error) { +func (v NullableRejectOAuth2Request) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableRejectRequest) UnmarshalJSON(src []byte) error { +func (v *NullableRejectOAuth2Request) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_request_was_handled_response.go b/clients/hydra/go/model_request_was_handled_response.go deleted file mode 100644 index 60719003a01..00000000000 --- a/clients/hydra/go/model_request_was_handled_response.go +++ /dev/null @@ -1,109 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// RequestWasHandledResponse struct for RequestWasHandledResponse -type RequestWasHandledResponse struct { - // Original request URL to which you should redirect the user if request was already handled. - RedirectTo string `json:"redirect_to"` -} - -// NewRequestWasHandledResponse instantiates a new RequestWasHandledResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRequestWasHandledResponse(redirectTo string) *RequestWasHandledResponse { - this := RequestWasHandledResponse{} - this.RedirectTo = redirectTo - return &this -} - -// NewRequestWasHandledResponseWithDefaults instantiates a new RequestWasHandledResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRequestWasHandledResponseWithDefaults() *RequestWasHandledResponse { - this := RequestWasHandledResponse{} - return &this -} - -// GetRedirectTo returns the RedirectTo field value -func (o *RequestWasHandledResponse) GetRedirectTo() string { - if o == nil { - var ret string - return ret - } - - return o.RedirectTo -} - -// GetRedirectToOk returns a tuple with the RedirectTo field value -// and a boolean to check if the value has been set. -func (o *RequestWasHandledResponse) GetRedirectToOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RedirectTo, true -} - -// SetRedirectTo sets field value -func (o *RequestWasHandledResponse) SetRedirectTo(v string) { - o.RedirectTo = v -} - -func (o RequestWasHandledResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["redirect_to"] = o.RedirectTo - } - return json.Marshal(toSerialize) -} - -type NullableRequestWasHandledResponse struct { - value *RequestWasHandledResponse - isSet bool -} - -func (v NullableRequestWasHandledResponse) Get() *RequestWasHandledResponse { - return v.value -} - -func (v *NullableRequestWasHandledResponse) Set(val *RequestWasHandledResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRequestWasHandledResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRequestWasHandledResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRequestWasHandledResponse(val *RequestWasHandledResponse) *NullableRequestWasHandledResponse { - return &NullableRequestWasHandledResponse{value: val, isSet: true} -} - -func (v NullableRequestWasHandledResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRequestWasHandledResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_token_pagination.go b/clients/hydra/go/model_token_pagination.go new file mode 100644 index 00000000000..b5433ce7236 --- /dev/null +++ b/clients/hydra/go/model_token_pagination.go @@ -0,0 +1,162 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// TokenPagination struct for TokenPagination +type TokenPagination struct { + // 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). + PageSize *int64 `json:"page_size,omitempty"` + // 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). + PageToken *string `json:"page_token,omitempty"` +} + +// NewTokenPagination instantiates a new TokenPagination object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTokenPagination() *TokenPagination { + this := TokenPagination{} + var pageSize int64 = 250 + this.PageSize = &pageSize + var pageToken string = "1" + this.PageToken = &pageToken + return &this +} + +// NewTokenPaginationWithDefaults instantiates a new TokenPagination object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenPaginationWithDefaults() *TokenPagination { + this := TokenPagination{} + var pageSize int64 = 250 + this.PageSize = &pageSize + var pageToken string = "1" + this.PageToken = &pageToken + return &this +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *TokenPagination) GetPageSize() int64 { + if o == nil || o.PageSize == nil { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenPagination) GetPageSizeOk() (*int64, bool) { + if o == nil || o.PageSize == nil { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *TokenPagination) HasPageSize() bool { + if o != nil && o.PageSize != nil { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *TokenPagination) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetPageToken returns the PageToken field value if set, zero value otherwise. +func (o *TokenPagination) GetPageToken() string { + if o == nil || o.PageToken == nil { + var ret string + return ret + } + return *o.PageToken +} + +// GetPageTokenOk returns a tuple with the PageToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenPagination) GetPageTokenOk() (*string, bool) { + if o == nil || o.PageToken == nil { + return nil, false + } + return o.PageToken, true +} + +// HasPageToken returns a boolean if a field has been set. +func (o *TokenPagination) HasPageToken() bool { + if o != nil && o.PageToken != nil { + return true + } + + return false +} + +// SetPageToken gets a reference to the given string and assigns it to the PageToken field. +func (o *TokenPagination) SetPageToken(v string) { + o.PageToken = &v +} + +func (o TokenPagination) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.PageSize != nil { + toSerialize["page_size"] = o.PageSize + } + if o.PageToken != nil { + toSerialize["page_token"] = o.PageToken + } + return json.Marshal(toSerialize) +} + +type NullableTokenPagination struct { + value *TokenPagination + isSet bool +} + +func (v NullableTokenPagination) Get() *TokenPagination { + return v.value +} + +func (v *NullableTokenPagination) Set(val *TokenPagination) { + v.value = val + v.isSet = true +} + +func (v NullableTokenPagination) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenPagination) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenPagination(val *TokenPagination) *NullableTokenPagination { + return &NullableTokenPagination{value: val, isSet: true} +} + +func (v NullableTokenPagination) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenPagination) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_token_pagination_headers.go b/clients/hydra/go/model_token_pagination_headers.go new file mode 100644 index 00000000000..f520b216766 --- /dev/null +++ b/clients/hydra/go/model_token_pagination_headers.go @@ -0,0 +1,154 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// TokenPaginationHeaders struct for TokenPaginationHeaders +type TokenPaginationHeaders struct { + // 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 + Link *string `json:"link,omitempty"` + // The total number of clients. in: header + XTotalCount *string `json:"x-total-count,omitempty"` +} + +// NewTokenPaginationHeaders instantiates a new TokenPaginationHeaders object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTokenPaginationHeaders() *TokenPaginationHeaders { + this := TokenPaginationHeaders{} + return &this +} + +// NewTokenPaginationHeadersWithDefaults instantiates a new TokenPaginationHeaders object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenPaginationHeadersWithDefaults() *TokenPaginationHeaders { + this := TokenPaginationHeaders{} + return &this +} + +// GetLink returns the Link field value if set, zero value otherwise. +func (o *TokenPaginationHeaders) GetLink() string { + if o == nil || o.Link == nil { + var ret string + return ret + } + return *o.Link +} + +// GetLinkOk returns a tuple with the Link field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenPaginationHeaders) GetLinkOk() (*string, bool) { + if o == nil || o.Link == nil { + return nil, false + } + return o.Link, true +} + +// HasLink returns a boolean if a field has been set. +func (o *TokenPaginationHeaders) HasLink() bool { + if o != nil && o.Link != nil { + return true + } + + return false +} + +// SetLink gets a reference to the given string and assigns it to the Link field. +func (o *TokenPaginationHeaders) SetLink(v string) { + o.Link = &v +} + +// GetXTotalCount returns the XTotalCount field value if set, zero value otherwise. +func (o *TokenPaginationHeaders) GetXTotalCount() string { + if o == nil || o.XTotalCount == nil { + var ret string + return ret + } + return *o.XTotalCount +} + +// GetXTotalCountOk returns a tuple with the XTotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenPaginationHeaders) GetXTotalCountOk() (*string, bool) { + if o == nil || o.XTotalCount == nil { + return nil, false + } + return o.XTotalCount, true +} + +// HasXTotalCount returns a boolean if a field has been set. +func (o *TokenPaginationHeaders) HasXTotalCount() bool { + if o != nil && o.XTotalCount != nil { + return true + } + + return false +} + +// SetXTotalCount gets a reference to the given string and assigns it to the XTotalCount field. +func (o *TokenPaginationHeaders) SetXTotalCount(v string) { + o.XTotalCount = &v +} + +func (o TokenPaginationHeaders) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Link != nil { + toSerialize["link"] = o.Link + } + if o.XTotalCount != nil { + toSerialize["x-total-count"] = o.XTotalCount + } + return json.Marshal(toSerialize) +} + +type NullableTokenPaginationHeaders struct { + value *TokenPaginationHeaders + isSet bool +} + +func (v NullableTokenPaginationHeaders) Get() *TokenPaginationHeaders { + return v.value +} + +func (v *NullableTokenPaginationHeaders) Set(val *TokenPaginationHeaders) { + v.value = val + v.isSet = true +} + +func (v NullableTokenPaginationHeaders) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenPaginationHeaders) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenPaginationHeaders(val *TokenPaginationHeaders) *NullableTokenPaginationHeaders { + return &NullableTokenPaginationHeaders{value: val, isSet: true} +} + +func (v NullableTokenPaginationHeaders) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenPaginationHeaders) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_token_pagination_request_parameters.go b/clients/hydra/go/model_token_pagination_request_parameters.go new file mode 100644 index 00000000000..f4102758955 --- /dev/null +++ b/clients/hydra/go/model_token_pagination_request_parameters.go @@ -0,0 +1,162 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// 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). +type TokenPaginationRequestParameters struct { + // 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). + PageSize *int64 `json:"page_size,omitempty"` + // 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). + PageToken *string `json:"page_token,omitempty"` +} + +// NewTokenPaginationRequestParameters instantiates a new TokenPaginationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTokenPaginationRequestParameters() *TokenPaginationRequestParameters { + this := TokenPaginationRequestParameters{} + var pageSize int64 = 250 + this.PageSize = &pageSize + var pageToken string = "1" + this.PageToken = &pageToken + return &this +} + +// NewTokenPaginationRequestParametersWithDefaults instantiates a new TokenPaginationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenPaginationRequestParametersWithDefaults() *TokenPaginationRequestParameters { + this := TokenPaginationRequestParameters{} + var pageSize int64 = 250 + this.PageSize = &pageSize + var pageToken string = "1" + this.PageToken = &pageToken + return &this +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *TokenPaginationRequestParameters) GetPageSize() int64 { + if o == nil || o.PageSize == nil { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenPaginationRequestParameters) GetPageSizeOk() (*int64, bool) { + if o == nil || o.PageSize == nil { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *TokenPaginationRequestParameters) HasPageSize() bool { + if o != nil && o.PageSize != nil { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *TokenPaginationRequestParameters) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetPageToken returns the PageToken field value if set, zero value otherwise. +func (o *TokenPaginationRequestParameters) GetPageToken() string { + if o == nil || o.PageToken == nil { + var ret string + return ret + } + return *o.PageToken +} + +// GetPageTokenOk returns a tuple with the PageToken field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenPaginationRequestParameters) GetPageTokenOk() (*string, bool) { + if o == nil || o.PageToken == nil { + return nil, false + } + return o.PageToken, true +} + +// HasPageToken returns a boolean if a field has been set. +func (o *TokenPaginationRequestParameters) HasPageToken() bool { + if o != nil && o.PageToken != nil { + return true + } + + return false +} + +// SetPageToken gets a reference to the given string and assigns it to the PageToken field. +func (o *TokenPaginationRequestParameters) SetPageToken(v string) { + o.PageToken = &v +} + +func (o TokenPaginationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.PageSize != nil { + toSerialize["page_size"] = o.PageSize + } + if o.PageToken != nil { + toSerialize["page_token"] = o.PageToken + } + return json.Marshal(toSerialize) +} + +type NullableTokenPaginationRequestParameters struct { + value *TokenPaginationRequestParameters + isSet bool +} + +func (v NullableTokenPaginationRequestParameters) Get() *TokenPaginationRequestParameters { + return v.value +} + +func (v *NullableTokenPaginationRequestParameters) Set(val *TokenPaginationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableTokenPaginationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenPaginationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenPaginationRequestParameters(val *TokenPaginationRequestParameters) *NullableTokenPaginationRequestParameters { + return &NullableTokenPaginationRequestParameters{value: val, isSet: true} +} + +func (v NullableTokenPaginationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenPaginationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_token_pagination_response_headers.go b/clients/hydra/go/model_token_pagination_response_headers.go new file mode 100644 index 00000000000..fa2fc13c662 --- /dev/null +++ b/clients/hydra/go/model_token_pagination_response_headers.go @@ -0,0 +1,154 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// 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). +type TokenPaginationResponseHeaders struct { + // 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\" + Link *string `json:"link,omitempty"` + // The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + XTotalCount *int64 `json:"x-total-count,omitempty"` +} + +// NewTokenPaginationResponseHeaders instantiates a new TokenPaginationResponseHeaders object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTokenPaginationResponseHeaders() *TokenPaginationResponseHeaders { + this := TokenPaginationResponseHeaders{} + return &this +} + +// NewTokenPaginationResponseHeadersWithDefaults instantiates a new TokenPaginationResponseHeaders object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenPaginationResponseHeadersWithDefaults() *TokenPaginationResponseHeaders { + this := TokenPaginationResponseHeaders{} + return &this +} + +// GetLink returns the Link field value if set, zero value otherwise. +func (o *TokenPaginationResponseHeaders) GetLink() string { + if o == nil || o.Link == nil { + var ret string + return ret + } + return *o.Link +} + +// GetLinkOk returns a tuple with the Link field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenPaginationResponseHeaders) GetLinkOk() (*string, bool) { + if o == nil || o.Link == nil { + return nil, false + } + return o.Link, true +} + +// HasLink returns a boolean if a field has been set. +func (o *TokenPaginationResponseHeaders) HasLink() bool { + if o != nil && o.Link != nil { + return true + } + + return false +} + +// SetLink gets a reference to the given string and assigns it to the Link field. +func (o *TokenPaginationResponseHeaders) SetLink(v string) { + o.Link = &v +} + +// GetXTotalCount returns the XTotalCount field value if set, zero value otherwise. +func (o *TokenPaginationResponseHeaders) GetXTotalCount() int64 { + if o == nil || o.XTotalCount == nil { + var ret int64 + return ret + } + return *o.XTotalCount +} + +// GetXTotalCountOk returns a tuple with the XTotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenPaginationResponseHeaders) GetXTotalCountOk() (*int64, bool) { + if o == nil || o.XTotalCount == nil { + return nil, false + } + return o.XTotalCount, true +} + +// HasXTotalCount returns a boolean if a field has been set. +func (o *TokenPaginationResponseHeaders) HasXTotalCount() bool { + if o != nil && o.XTotalCount != nil { + return true + } + + return false +} + +// SetXTotalCount gets a reference to the given int64 and assigns it to the XTotalCount field. +func (o *TokenPaginationResponseHeaders) SetXTotalCount(v int64) { + o.XTotalCount = &v +} + +func (o TokenPaginationResponseHeaders) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Link != nil { + toSerialize["link"] = o.Link + } + if o.XTotalCount != nil { + toSerialize["x-total-count"] = o.XTotalCount + } + return json.Marshal(toSerialize) +} + +type NullableTokenPaginationResponseHeaders struct { + value *TokenPaginationResponseHeaders + isSet bool +} + +func (v NullableTokenPaginationResponseHeaders) Get() *TokenPaginationResponseHeaders { + return v.value +} + +func (v *NullableTokenPaginationResponseHeaders) Set(val *TokenPaginationResponseHeaders) { + v.value = val + v.isSet = true +} + +func (v NullableTokenPaginationResponseHeaders) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenPaginationResponseHeaders) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenPaginationResponseHeaders(val *TokenPaginationResponseHeaders) *NullableTokenPaginationResponseHeaders { + return &NullableTokenPaginationResponseHeaders{value: val, isSet: true} +} + +func (v NullableTokenPaginationResponseHeaders) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenPaginationResponseHeaders) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_trust_jwt_grant_issuer_body.go b/clients/hydra/go/model_trust_jwt_grant_issuer_body.go deleted file mode 100644 index 703f229ede7..00000000000 --- a/clients/hydra/go/model_trust_jwt_grant_issuer_body.go +++ /dev/null @@ -1,229 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" - "time" -) - -// TrustJwtGrantIssuerBody struct for TrustJwtGrantIssuerBody -type TrustJwtGrantIssuerBody struct { - // The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". - ExpiresAt time.Time `json:"expires_at"` - // The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). - Issuer string `json:"issuer"` - Jwk JSONWebKey `json:"jwk"` - // The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) - Scope []string `json:"scope"` - // The \"subject\" identifies the principal that is the subject of the JWT. - Subject string `json:"subject"` -} - -// NewTrustJwtGrantIssuerBody instantiates a new TrustJwtGrantIssuerBody object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTrustJwtGrantIssuerBody(expiresAt time.Time, issuer string, jwk JSONWebKey, scope []string, subject string) *TrustJwtGrantIssuerBody { - this := TrustJwtGrantIssuerBody{} - this.ExpiresAt = expiresAt - this.Issuer = issuer - this.Jwk = jwk - this.Scope = scope - this.Subject = subject - return &this -} - -// NewTrustJwtGrantIssuerBodyWithDefaults instantiates a new TrustJwtGrantIssuerBody object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTrustJwtGrantIssuerBodyWithDefaults() *TrustJwtGrantIssuerBody { - this := TrustJwtGrantIssuerBody{} - return &this -} - -// GetExpiresAt returns the ExpiresAt field value -func (o *TrustJwtGrantIssuerBody) GetExpiresAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value -// and a boolean to check if the value has been set. -func (o *TrustJwtGrantIssuerBody) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresAt, true -} - -// SetExpiresAt sets field value -func (o *TrustJwtGrantIssuerBody) SetExpiresAt(v time.Time) { - o.ExpiresAt = v -} - -// GetIssuer returns the Issuer field value -func (o *TrustJwtGrantIssuerBody) GetIssuer() string { - if o == nil { - var ret string - return ret - } - - return o.Issuer -} - -// GetIssuerOk returns a tuple with the Issuer field value -// and a boolean to check if the value has been set. -func (o *TrustJwtGrantIssuerBody) GetIssuerOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Issuer, true -} - -// SetIssuer sets field value -func (o *TrustJwtGrantIssuerBody) SetIssuer(v string) { - o.Issuer = v -} - -// GetJwk returns the Jwk field value -func (o *TrustJwtGrantIssuerBody) GetJwk() JSONWebKey { - if o == nil { - var ret JSONWebKey - return ret - } - - return o.Jwk -} - -// GetJwkOk returns a tuple with the Jwk field value -// and a boolean to check if the value has been set. -func (o *TrustJwtGrantIssuerBody) GetJwkOk() (*JSONWebKey, bool) { - if o == nil { - return nil, false - } - return &o.Jwk, true -} - -// SetJwk sets field value -func (o *TrustJwtGrantIssuerBody) SetJwk(v JSONWebKey) { - o.Jwk = v -} - -// GetScope returns the Scope field value -func (o *TrustJwtGrantIssuerBody) GetScope() []string { - if o == nil { - var ret []string - return ret - } - - return o.Scope -} - -// GetScopeOk returns a tuple with the Scope field value -// and a boolean to check if the value has been set. -func (o *TrustJwtGrantIssuerBody) GetScopeOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.Scope, true -} - -// SetScope sets field value -func (o *TrustJwtGrantIssuerBody) SetScope(v []string) { - o.Scope = v -} - -// GetSubject returns the Subject field value -func (o *TrustJwtGrantIssuerBody) GetSubject() string { - if o == nil { - var ret string - return ret - } - - return o.Subject -} - -// GetSubjectOk returns a tuple with the Subject field value -// and a boolean to check if the value has been set. -func (o *TrustJwtGrantIssuerBody) GetSubjectOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Subject, true -} - -// SetSubject sets field value -func (o *TrustJwtGrantIssuerBody) SetSubject(v string) { - o.Subject = v -} - -func (o TrustJwtGrantIssuerBody) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["expires_at"] = o.ExpiresAt - } - if true { - toSerialize["issuer"] = o.Issuer - } - if true { - toSerialize["jwk"] = o.Jwk - } - if true { - toSerialize["scope"] = o.Scope - } - if true { - toSerialize["subject"] = o.Subject - } - return json.Marshal(toSerialize) -} - -type NullableTrustJwtGrantIssuerBody struct { - value *TrustJwtGrantIssuerBody - isSet bool -} - -func (v NullableTrustJwtGrantIssuerBody) Get() *TrustJwtGrantIssuerBody { - return v.value -} - -func (v *NullableTrustJwtGrantIssuerBody) Set(val *TrustJwtGrantIssuerBody) { - v.value = val - v.isSet = true -} - -func (v NullableTrustJwtGrantIssuerBody) IsSet() bool { - return v.isSet -} - -func (v *NullableTrustJwtGrantIssuerBody) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTrustJwtGrantIssuerBody(val *TrustJwtGrantIssuerBody) *NullableTrustJwtGrantIssuerBody { - return &NullableTrustJwtGrantIssuerBody{value: val, isSet: true} -} - -func (v NullableTrustJwtGrantIssuerBody) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTrustJwtGrantIssuerBody) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - 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 new file mode 100644 index 00000000000..2c1cc546923 --- /dev/null +++ b/clients/hydra/go/model_trust_o_auth2_jwt_grant_issuer.go @@ -0,0 +1,274 @@ +/* +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" + "time" +) + +// TrustOAuth2JwtGrantIssuer Trust OAuth2 JWT Bearer Grant Type Issuer Request Body +type TrustOAuth2JwtGrantIssuer struct { + // The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + AllowAnySubject *bool `json:"allow_any_subject,omitempty"` + // The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + ExpiresAt time.Time `json:"expires_at"` + // The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + Issuer string `json:"issuer"` + Jwk JsonWebKey `json:"jwk"` + // The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) + Scope []string `json:"scope"` + // The \"subject\" identifies the principal that is the subject of the JWT. + Subject *string `json:"subject,omitempty"` +} + +// NewTrustOAuth2JwtGrantIssuer instantiates a new TrustOAuth2JwtGrantIssuer object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTrustOAuth2JwtGrantIssuer(expiresAt time.Time, issuer string, jwk JsonWebKey, scope []string) *TrustOAuth2JwtGrantIssuer { + this := TrustOAuth2JwtGrantIssuer{} + this.ExpiresAt = expiresAt + this.Issuer = issuer + this.Jwk = jwk + this.Scope = scope + return &this +} + +// NewTrustOAuth2JwtGrantIssuerWithDefaults instantiates a new TrustOAuth2JwtGrantIssuer object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTrustOAuth2JwtGrantIssuerWithDefaults() *TrustOAuth2JwtGrantIssuer { + this := TrustOAuth2JwtGrantIssuer{} + return &this +} + +// GetAllowAnySubject returns the AllowAnySubject field value if set, zero value otherwise. +func (o *TrustOAuth2JwtGrantIssuer) GetAllowAnySubject() bool { + if o == nil || o.AllowAnySubject == nil { + var ret bool + return ret + } + return *o.AllowAnySubject +} + +// GetAllowAnySubjectOk returns a tuple with the AllowAnySubject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrustOAuth2JwtGrantIssuer) GetAllowAnySubjectOk() (*bool, bool) { + if o == nil || o.AllowAnySubject == nil { + return nil, false + } + return o.AllowAnySubject, true +} + +// HasAllowAnySubject returns a boolean if a field has been set. +func (o *TrustOAuth2JwtGrantIssuer) HasAllowAnySubject() bool { + if o != nil && o.AllowAnySubject != nil { + return true + } + + return false +} + +// SetAllowAnySubject gets a reference to the given bool and assigns it to the AllowAnySubject field. +func (o *TrustOAuth2JwtGrantIssuer) SetAllowAnySubject(v bool) { + o.AllowAnySubject = &v +} + +// GetExpiresAt returns the ExpiresAt field value +func (o *TrustOAuth2JwtGrantIssuer) GetExpiresAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.ExpiresAt +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value +// and a boolean to check if the value has been set. +func (o *TrustOAuth2JwtGrantIssuer) GetExpiresAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.ExpiresAt, true +} + +// SetExpiresAt sets field value +func (o *TrustOAuth2JwtGrantIssuer) SetExpiresAt(v time.Time) { + o.ExpiresAt = v +} + +// GetIssuer returns the Issuer field value +func (o *TrustOAuth2JwtGrantIssuer) GetIssuer() string { + if o == nil { + var ret string + return ret + } + + return o.Issuer +} + +// GetIssuerOk returns a tuple with the Issuer field value +// and a boolean to check if the value has been set. +func (o *TrustOAuth2JwtGrantIssuer) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Issuer, true +} + +// SetIssuer sets field value +func (o *TrustOAuth2JwtGrantIssuer) SetIssuer(v string) { + o.Issuer = v +} + +// GetJwk returns the Jwk field value +func (o *TrustOAuth2JwtGrantIssuer) GetJwk() JsonWebKey { + if o == nil { + var ret JsonWebKey + return ret + } + + return o.Jwk +} + +// GetJwkOk returns a tuple with the Jwk field value +// and a boolean to check if the value has been set. +func (o *TrustOAuth2JwtGrantIssuer) GetJwkOk() (*JsonWebKey, bool) { + if o == nil { + return nil, false + } + return &o.Jwk, true +} + +// SetJwk sets field value +func (o *TrustOAuth2JwtGrantIssuer) SetJwk(v JsonWebKey) { + o.Jwk = v +} + +// GetScope returns the Scope field value +func (o *TrustOAuth2JwtGrantIssuer) GetScope() []string { + if o == nil { + var ret []string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *TrustOAuth2JwtGrantIssuer) GetScopeOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Scope, true +} + +// SetScope sets field value +func (o *TrustOAuth2JwtGrantIssuer) SetScope(v []string) { + o.Scope = v +} + +// GetSubject returns the Subject field value if set, zero value otherwise. +func (o *TrustOAuth2JwtGrantIssuer) GetSubject() string { + if o == nil || o.Subject == nil { + var ret string + return ret + } + return *o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrustOAuth2JwtGrantIssuer) GetSubjectOk() (*string, bool) { + if o == nil || o.Subject == nil { + return nil, false + } + return o.Subject, true +} + +// HasSubject returns a boolean if a field has been set. +func (o *TrustOAuth2JwtGrantIssuer) HasSubject() bool { + if o != nil && o.Subject != nil { + return true + } + + return false +} + +// SetSubject gets a reference to the given string and assigns it to the Subject field. +func (o *TrustOAuth2JwtGrantIssuer) SetSubject(v string) { + o.Subject = &v +} + +func (o TrustOAuth2JwtGrantIssuer) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.AllowAnySubject != nil { + toSerialize["allow_any_subject"] = o.AllowAnySubject + } + if true { + toSerialize["expires_at"] = o.ExpiresAt + } + if true { + toSerialize["issuer"] = o.Issuer + } + if true { + toSerialize["jwk"] = o.Jwk + } + if true { + toSerialize["scope"] = o.Scope + } + if o.Subject != nil { + toSerialize["subject"] = o.Subject + } + return json.Marshal(toSerialize) +} + +type NullableTrustOAuth2JwtGrantIssuer struct { + value *TrustOAuth2JwtGrantIssuer + isSet bool +} + +func (v NullableTrustOAuth2JwtGrantIssuer) Get() *TrustOAuth2JwtGrantIssuer { + return v.value +} + +func (v *NullableTrustOAuth2JwtGrantIssuer) Set(val *TrustOAuth2JwtGrantIssuer) { + v.value = val + v.isSet = true +} + +func (v NullableTrustOAuth2JwtGrantIssuer) IsSet() bool { + return v.isSet +} + +func (v *NullableTrustOAuth2JwtGrantIssuer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTrustOAuth2JwtGrantIssuer(val *TrustOAuth2JwtGrantIssuer) *NullableTrustOAuth2JwtGrantIssuer { + return &NullableTrustOAuth2JwtGrantIssuer{value: val, isSet: true} +} + +func (v NullableTrustOAuth2JwtGrantIssuer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTrustOAuth2JwtGrantIssuer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/clients/hydra/go/model_trusted_jwt_grant_issuer.go b/clients/hydra/go/model_trusted_o_auth2_jwt_grant_issuer.go similarity index 56% rename from clients/hydra/go/model_trusted_jwt_grant_issuer.go rename to clients/hydra/go/model_trusted_o_auth2_jwt_grant_issuer.go index 8955c95af95..981d8315b92 100644 --- a/clients/hydra/go/model_trusted_jwt_grant_issuer.go +++ b/clients/hydra/go/model_trusted_o_auth2_jwt_grant_issuer.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,8 +16,10 @@ import ( "time" ) -// TrustedJwtGrantIssuer struct for TrustedJwtGrantIssuer -type TrustedJwtGrantIssuer struct { +// TrustedOAuth2JwtGrantIssuer OAuth2 JWT Bearer Grant Type Issuer Trust Relationship +type TrustedOAuth2JwtGrantIssuer struct { + // The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + AllowAnySubject *bool `json:"allow_any_subject,omitempty"` // The \"created_at\" indicates, when grant was created. CreatedAt *time.Time `json:"created_at,omitempty"` // The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". @@ -24,32 +27,64 @@ type TrustedJwtGrantIssuer struct { Id *string `json:"id,omitempty"` // The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). Issuer *string `json:"issuer,omitempty"` - PublicKey *TrustedJsonWebKey `json:"public_key,omitempty"` + PublicKey *TrustedOAuth2JwtGrantJsonWebKey `json:"public_key,omitempty"` // The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) Scope []string `json:"scope,omitempty"` // The \"subject\" identifies the principal that is the subject of the JWT. Subject *string `json:"subject,omitempty"` } -// NewTrustedJwtGrantIssuer instantiates a new TrustedJwtGrantIssuer object +// NewTrustedOAuth2JwtGrantIssuer instantiates a new TrustedOAuth2JwtGrantIssuer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTrustedJwtGrantIssuer() *TrustedJwtGrantIssuer { - this := TrustedJwtGrantIssuer{} +func NewTrustedOAuth2JwtGrantIssuer() *TrustedOAuth2JwtGrantIssuer { + this := TrustedOAuth2JwtGrantIssuer{} return &this } -// NewTrustedJwtGrantIssuerWithDefaults instantiates a new TrustedJwtGrantIssuer object +// NewTrustedOAuth2JwtGrantIssuerWithDefaults instantiates a new TrustedOAuth2JwtGrantIssuer object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewTrustedJwtGrantIssuerWithDefaults() *TrustedJwtGrantIssuer { - this := TrustedJwtGrantIssuer{} +func NewTrustedOAuth2JwtGrantIssuerWithDefaults() *TrustedOAuth2JwtGrantIssuer { + this := TrustedOAuth2JwtGrantIssuer{} return &this } +// GetAllowAnySubject returns the AllowAnySubject field value if set, zero value otherwise. +func (o *TrustedOAuth2JwtGrantIssuer) GetAllowAnySubject() bool { + if o == nil || o.AllowAnySubject == nil { + var ret bool + return ret + } + return *o.AllowAnySubject +} + +// GetAllowAnySubjectOk returns a tuple with the AllowAnySubject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TrustedOAuth2JwtGrantIssuer) GetAllowAnySubjectOk() (*bool, bool) { + if o == nil || o.AllowAnySubject == nil { + return nil, false + } + return o.AllowAnySubject, true +} + +// HasAllowAnySubject returns a boolean if a field has been set. +func (o *TrustedOAuth2JwtGrantIssuer) HasAllowAnySubject() bool { + if o != nil && o.AllowAnySubject != nil { + return true + } + + return false +} + +// SetAllowAnySubject gets a reference to the given bool and assigns it to the AllowAnySubject field. +func (o *TrustedOAuth2JwtGrantIssuer) SetAllowAnySubject(v bool) { + o.AllowAnySubject = &v +} + // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *TrustedJwtGrantIssuer) GetCreatedAt() time.Time { +func (o *TrustedOAuth2JwtGrantIssuer) GetCreatedAt() time.Time { if o == nil || o.CreatedAt == nil { var ret time.Time return ret @@ -59,7 +94,7 @@ func (o *TrustedJwtGrantIssuer) GetCreatedAt() time.Time { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrustedJwtGrantIssuer) GetCreatedAtOk() (*time.Time, bool) { +func (o *TrustedOAuth2JwtGrantIssuer) GetCreatedAtOk() (*time.Time, bool) { if o == nil || o.CreatedAt == nil { return nil, false } @@ -67,7 +102,7 @@ func (o *TrustedJwtGrantIssuer) GetCreatedAtOk() (*time.Time, bool) { } // HasCreatedAt returns a boolean if a field has been set. -func (o *TrustedJwtGrantIssuer) HasCreatedAt() bool { +func (o *TrustedOAuth2JwtGrantIssuer) HasCreatedAt() bool { if o != nil && o.CreatedAt != nil { return true } @@ -76,12 +111,12 @@ func (o *TrustedJwtGrantIssuer) HasCreatedAt() bool { } // SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. -func (o *TrustedJwtGrantIssuer) SetCreatedAt(v time.Time) { +func (o *TrustedOAuth2JwtGrantIssuer) SetCreatedAt(v time.Time) { o.CreatedAt = &v } // GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. -func (o *TrustedJwtGrantIssuer) GetExpiresAt() time.Time { +func (o *TrustedOAuth2JwtGrantIssuer) GetExpiresAt() time.Time { if o == nil || o.ExpiresAt == nil { var ret time.Time return ret @@ -91,7 +126,7 @@ func (o *TrustedJwtGrantIssuer) GetExpiresAt() time.Time { // GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrustedJwtGrantIssuer) GetExpiresAtOk() (*time.Time, bool) { +func (o *TrustedOAuth2JwtGrantIssuer) GetExpiresAtOk() (*time.Time, bool) { if o == nil || o.ExpiresAt == nil { return nil, false } @@ -99,7 +134,7 @@ func (o *TrustedJwtGrantIssuer) GetExpiresAtOk() (*time.Time, bool) { } // HasExpiresAt returns a boolean if a field has been set. -func (o *TrustedJwtGrantIssuer) HasExpiresAt() bool { +func (o *TrustedOAuth2JwtGrantIssuer) HasExpiresAt() bool { if o != nil && o.ExpiresAt != nil { return true } @@ -108,12 +143,12 @@ func (o *TrustedJwtGrantIssuer) HasExpiresAt() bool { } // SetExpiresAt gets a reference to the given time.Time and assigns it to the ExpiresAt field. -func (o *TrustedJwtGrantIssuer) SetExpiresAt(v time.Time) { +func (o *TrustedOAuth2JwtGrantIssuer) SetExpiresAt(v time.Time) { o.ExpiresAt = &v } // GetId returns the Id field value if set, zero value otherwise. -func (o *TrustedJwtGrantIssuer) GetId() string { +func (o *TrustedOAuth2JwtGrantIssuer) GetId() string { if o == nil || o.Id == nil { var ret string return ret @@ -123,7 +158,7 @@ func (o *TrustedJwtGrantIssuer) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrustedJwtGrantIssuer) GetIdOk() (*string, bool) { +func (o *TrustedOAuth2JwtGrantIssuer) GetIdOk() (*string, bool) { if o == nil || o.Id == nil { return nil, false } @@ -131,7 +166,7 @@ func (o *TrustedJwtGrantIssuer) GetIdOk() (*string, bool) { } // HasId returns a boolean if a field has been set. -func (o *TrustedJwtGrantIssuer) HasId() bool { +func (o *TrustedOAuth2JwtGrantIssuer) HasId() bool { if o != nil && o.Id != nil { return true } @@ -140,12 +175,12 @@ func (o *TrustedJwtGrantIssuer) HasId() bool { } // SetId gets a reference to the given string and assigns it to the Id field. -func (o *TrustedJwtGrantIssuer) SetId(v string) { +func (o *TrustedOAuth2JwtGrantIssuer) SetId(v string) { o.Id = &v } // GetIssuer returns the Issuer field value if set, zero value otherwise. -func (o *TrustedJwtGrantIssuer) GetIssuer() string { +func (o *TrustedOAuth2JwtGrantIssuer) GetIssuer() string { if o == nil || o.Issuer == nil { var ret string return ret @@ -155,7 +190,7 @@ func (o *TrustedJwtGrantIssuer) GetIssuer() string { // GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrustedJwtGrantIssuer) GetIssuerOk() (*string, bool) { +func (o *TrustedOAuth2JwtGrantIssuer) GetIssuerOk() (*string, bool) { if o == nil || o.Issuer == nil { return nil, false } @@ -163,7 +198,7 @@ func (o *TrustedJwtGrantIssuer) GetIssuerOk() (*string, bool) { } // HasIssuer returns a boolean if a field has been set. -func (o *TrustedJwtGrantIssuer) HasIssuer() bool { +func (o *TrustedOAuth2JwtGrantIssuer) HasIssuer() bool { if o != nil && o.Issuer != nil { return true } @@ -172,14 +207,14 @@ func (o *TrustedJwtGrantIssuer) HasIssuer() bool { } // SetIssuer gets a reference to the given string and assigns it to the Issuer field. -func (o *TrustedJwtGrantIssuer) SetIssuer(v string) { +func (o *TrustedOAuth2JwtGrantIssuer) SetIssuer(v string) { o.Issuer = &v } // GetPublicKey returns the PublicKey field value if set, zero value otherwise. -func (o *TrustedJwtGrantIssuer) GetPublicKey() TrustedJsonWebKey { +func (o *TrustedOAuth2JwtGrantIssuer) GetPublicKey() TrustedOAuth2JwtGrantJsonWebKey { if o == nil || o.PublicKey == nil { - var ret TrustedJsonWebKey + var ret TrustedOAuth2JwtGrantJsonWebKey return ret } return *o.PublicKey @@ -187,7 +222,7 @@ func (o *TrustedJwtGrantIssuer) GetPublicKey() TrustedJsonWebKey { // GetPublicKeyOk returns a tuple with the PublicKey field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrustedJwtGrantIssuer) GetPublicKeyOk() (*TrustedJsonWebKey, bool) { +func (o *TrustedOAuth2JwtGrantIssuer) GetPublicKeyOk() (*TrustedOAuth2JwtGrantJsonWebKey, bool) { if o == nil || o.PublicKey == nil { return nil, false } @@ -195,7 +230,7 @@ func (o *TrustedJwtGrantIssuer) GetPublicKeyOk() (*TrustedJsonWebKey, bool) { } // HasPublicKey returns a boolean if a field has been set. -func (o *TrustedJwtGrantIssuer) HasPublicKey() bool { +func (o *TrustedOAuth2JwtGrantIssuer) HasPublicKey() bool { if o != nil && o.PublicKey != nil { return true } @@ -203,13 +238,13 @@ func (o *TrustedJwtGrantIssuer) HasPublicKey() bool { return false } -// SetPublicKey gets a reference to the given TrustedJsonWebKey and assigns it to the PublicKey field. -func (o *TrustedJwtGrantIssuer) SetPublicKey(v TrustedJsonWebKey) { +// SetPublicKey gets a reference to the given TrustedOAuth2JwtGrantJsonWebKey and assigns it to the PublicKey field. +func (o *TrustedOAuth2JwtGrantIssuer) SetPublicKey(v TrustedOAuth2JwtGrantJsonWebKey) { o.PublicKey = &v } // GetScope returns the Scope field value if set, zero value otherwise. -func (o *TrustedJwtGrantIssuer) GetScope() []string { +func (o *TrustedOAuth2JwtGrantIssuer) GetScope() []string { if o == nil || o.Scope == nil { var ret []string return ret @@ -219,7 +254,7 @@ func (o *TrustedJwtGrantIssuer) GetScope() []string { // GetScopeOk returns a tuple with the Scope field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrustedJwtGrantIssuer) GetScopeOk() ([]string, bool) { +func (o *TrustedOAuth2JwtGrantIssuer) GetScopeOk() ([]string, bool) { if o == nil || o.Scope == nil { return nil, false } @@ -227,7 +262,7 @@ func (o *TrustedJwtGrantIssuer) GetScopeOk() ([]string, bool) { } // HasScope returns a boolean if a field has been set. -func (o *TrustedJwtGrantIssuer) HasScope() bool { +func (o *TrustedOAuth2JwtGrantIssuer) HasScope() bool { if o != nil && o.Scope != nil { return true } @@ -236,12 +271,12 @@ func (o *TrustedJwtGrantIssuer) HasScope() bool { } // SetScope gets a reference to the given []string and assigns it to the Scope field. -func (o *TrustedJwtGrantIssuer) SetScope(v []string) { +func (o *TrustedOAuth2JwtGrantIssuer) SetScope(v []string) { o.Scope = v } // GetSubject returns the Subject field value if set, zero value otherwise. -func (o *TrustedJwtGrantIssuer) GetSubject() string { +func (o *TrustedOAuth2JwtGrantIssuer) GetSubject() string { if o == nil || o.Subject == nil { var ret string return ret @@ -251,7 +286,7 @@ func (o *TrustedJwtGrantIssuer) GetSubject() string { // GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrustedJwtGrantIssuer) GetSubjectOk() (*string, bool) { +func (o *TrustedOAuth2JwtGrantIssuer) GetSubjectOk() (*string, bool) { if o == nil || o.Subject == nil { return nil, false } @@ -259,7 +294,7 @@ func (o *TrustedJwtGrantIssuer) GetSubjectOk() (*string, bool) { } // HasSubject returns a boolean if a field has been set. -func (o *TrustedJwtGrantIssuer) HasSubject() bool { +func (o *TrustedOAuth2JwtGrantIssuer) HasSubject() bool { if o != nil && o.Subject != nil { return true } @@ -268,12 +303,15 @@ func (o *TrustedJwtGrantIssuer) HasSubject() bool { } // SetSubject gets a reference to the given string and assigns it to the Subject field. -func (o *TrustedJwtGrantIssuer) SetSubject(v string) { +func (o *TrustedOAuth2JwtGrantIssuer) SetSubject(v string) { o.Subject = &v } -func (o TrustedJwtGrantIssuer) MarshalJSON() ([]byte, error) { +func (o TrustedOAuth2JwtGrantIssuer) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.AllowAnySubject != nil { + toSerialize["allow_any_subject"] = o.AllowAnySubject + } if o.CreatedAt != nil { toSerialize["created_at"] = o.CreatedAt } @@ -298,38 +336,38 @@ func (o TrustedJwtGrantIssuer) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableTrustedJwtGrantIssuer struct { - value *TrustedJwtGrantIssuer +type NullableTrustedOAuth2JwtGrantIssuer struct { + value *TrustedOAuth2JwtGrantIssuer isSet bool } -func (v NullableTrustedJwtGrantIssuer) Get() *TrustedJwtGrantIssuer { +func (v NullableTrustedOAuth2JwtGrantIssuer) Get() *TrustedOAuth2JwtGrantIssuer { return v.value } -func (v *NullableTrustedJwtGrantIssuer) Set(val *TrustedJwtGrantIssuer) { +func (v *NullableTrustedOAuth2JwtGrantIssuer) Set(val *TrustedOAuth2JwtGrantIssuer) { v.value = val v.isSet = true } -func (v NullableTrustedJwtGrantIssuer) IsSet() bool { +func (v NullableTrustedOAuth2JwtGrantIssuer) IsSet() bool { return v.isSet } -func (v *NullableTrustedJwtGrantIssuer) Unset() { +func (v *NullableTrustedOAuth2JwtGrantIssuer) Unset() { v.value = nil v.isSet = false } -func NewNullableTrustedJwtGrantIssuer(val *TrustedJwtGrantIssuer) *NullableTrustedJwtGrantIssuer { - return &NullableTrustedJwtGrantIssuer{value: val, isSet: true} +func NewNullableTrustedOAuth2JwtGrantIssuer(val *TrustedOAuth2JwtGrantIssuer) *NullableTrustedOAuth2JwtGrantIssuer { + return &NullableTrustedOAuth2JwtGrantIssuer{value: val, isSet: true} } -func (v NullableTrustedJwtGrantIssuer) MarshalJSON() ([]byte, error) { +func (v NullableTrustedOAuth2JwtGrantIssuer) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableTrustedJwtGrantIssuer) UnmarshalJSON(src []byte) error { +func (v *NullableTrustedOAuth2JwtGrantIssuer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_trusted_json_web_key.go b/clients/hydra/go/model_trusted_o_auth2_jwt_grant_json_web_key.go similarity index 53% rename from clients/hydra/go/model_trusted_json_web_key.go rename to clients/hydra/go/model_trusted_o_auth2_jwt_grant_json_web_key.go index 84b8c292a4e..c09b682ae75 100644 --- a/clients/hydra/go/model_trusted_json_web_key.go +++ b/clients/hydra/go/model_trusted_o_auth2_jwt_grant_json_web_key.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,33 +15,33 @@ import ( "encoding/json" ) -// TrustedJsonWebKey struct for TrustedJsonWebKey -type TrustedJsonWebKey struct { +// TrustedOAuth2JwtGrantJsonWebKey OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key +type TrustedOAuth2JwtGrantJsonWebKey struct { // The \"key_id\" is key unique identifier (same as kid header in jws/jwt). Kid *string `json:"kid,omitempty"` // The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. Set *string `json:"set,omitempty"` } -// NewTrustedJsonWebKey instantiates a new TrustedJsonWebKey object +// NewTrustedOAuth2JwtGrantJsonWebKey instantiates a new TrustedOAuth2JwtGrantJsonWebKey object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewTrustedJsonWebKey() *TrustedJsonWebKey { - this := TrustedJsonWebKey{} +func NewTrustedOAuth2JwtGrantJsonWebKey() *TrustedOAuth2JwtGrantJsonWebKey { + this := TrustedOAuth2JwtGrantJsonWebKey{} return &this } -// NewTrustedJsonWebKeyWithDefaults instantiates a new TrustedJsonWebKey object +// NewTrustedOAuth2JwtGrantJsonWebKeyWithDefaults instantiates a new TrustedOAuth2JwtGrantJsonWebKey object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewTrustedJsonWebKeyWithDefaults() *TrustedJsonWebKey { - this := TrustedJsonWebKey{} +func NewTrustedOAuth2JwtGrantJsonWebKeyWithDefaults() *TrustedOAuth2JwtGrantJsonWebKey { + this := TrustedOAuth2JwtGrantJsonWebKey{} return &this } // GetKid returns the Kid field value if set, zero value otherwise. -func (o *TrustedJsonWebKey) GetKid() string { +func (o *TrustedOAuth2JwtGrantJsonWebKey) GetKid() string { if o == nil || o.Kid == nil { var ret string return ret @@ -50,7 +51,7 @@ func (o *TrustedJsonWebKey) GetKid() string { // GetKidOk returns a tuple with the Kid field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrustedJsonWebKey) GetKidOk() (*string, bool) { +func (o *TrustedOAuth2JwtGrantJsonWebKey) GetKidOk() (*string, bool) { if o == nil || o.Kid == nil { return nil, false } @@ -58,7 +59,7 @@ func (o *TrustedJsonWebKey) GetKidOk() (*string, bool) { } // HasKid returns a boolean if a field has been set. -func (o *TrustedJsonWebKey) HasKid() bool { +func (o *TrustedOAuth2JwtGrantJsonWebKey) HasKid() bool { if o != nil && o.Kid != nil { return true } @@ -67,12 +68,12 @@ func (o *TrustedJsonWebKey) HasKid() bool { } // SetKid gets a reference to the given string and assigns it to the Kid field. -func (o *TrustedJsonWebKey) SetKid(v string) { +func (o *TrustedOAuth2JwtGrantJsonWebKey) SetKid(v string) { o.Kid = &v } // GetSet returns the Set field value if set, zero value otherwise. -func (o *TrustedJsonWebKey) GetSet() string { +func (o *TrustedOAuth2JwtGrantJsonWebKey) GetSet() string { if o == nil || o.Set == nil { var ret string return ret @@ -82,7 +83,7 @@ func (o *TrustedJsonWebKey) GetSet() string { // GetSetOk returns a tuple with the Set field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TrustedJsonWebKey) GetSetOk() (*string, bool) { +func (o *TrustedOAuth2JwtGrantJsonWebKey) GetSetOk() (*string, bool) { if o == nil || o.Set == nil { return nil, false } @@ -90,7 +91,7 @@ func (o *TrustedJsonWebKey) GetSetOk() (*string, bool) { } // HasSet returns a boolean if a field has been set. -func (o *TrustedJsonWebKey) HasSet() bool { +func (o *TrustedOAuth2JwtGrantJsonWebKey) HasSet() bool { if o != nil && o.Set != nil { return true } @@ -99,11 +100,11 @@ func (o *TrustedJsonWebKey) HasSet() bool { } // SetSet gets a reference to the given string and assigns it to the Set field. -func (o *TrustedJsonWebKey) SetSet(v string) { +func (o *TrustedOAuth2JwtGrantJsonWebKey) SetSet(v string) { o.Set = &v } -func (o TrustedJsonWebKey) MarshalJSON() ([]byte, error) { +func (o TrustedOAuth2JwtGrantJsonWebKey) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Kid != nil { toSerialize["kid"] = o.Kid @@ -114,38 +115,38 @@ func (o TrustedJsonWebKey) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableTrustedJsonWebKey struct { - value *TrustedJsonWebKey +type NullableTrustedOAuth2JwtGrantJsonWebKey struct { + value *TrustedOAuth2JwtGrantJsonWebKey isSet bool } -func (v NullableTrustedJsonWebKey) Get() *TrustedJsonWebKey { +func (v NullableTrustedOAuth2JwtGrantJsonWebKey) Get() *TrustedOAuth2JwtGrantJsonWebKey { return v.value } -func (v *NullableTrustedJsonWebKey) Set(val *TrustedJsonWebKey) { +func (v *NullableTrustedOAuth2JwtGrantJsonWebKey) Set(val *TrustedOAuth2JwtGrantJsonWebKey) { v.value = val v.isSet = true } -func (v NullableTrustedJsonWebKey) IsSet() bool { +func (v NullableTrustedOAuth2JwtGrantJsonWebKey) IsSet() bool { return v.isSet } -func (v *NullableTrustedJsonWebKey) Unset() { +func (v *NullableTrustedOAuth2JwtGrantJsonWebKey) Unset() { v.value = nil v.isSet = false } -func NewNullableTrustedJsonWebKey(val *TrustedJsonWebKey) *NullableTrustedJsonWebKey { - return &NullableTrustedJsonWebKey{value: val, isSet: true} +func NewNullableTrustedOAuth2JwtGrantJsonWebKey(val *TrustedOAuth2JwtGrantJsonWebKey) *NullableTrustedOAuth2JwtGrantJsonWebKey { + return &NullableTrustedOAuth2JwtGrantJsonWebKey{value: val, isSet: true} } -func (v NullableTrustedJsonWebKey) MarshalJSON() ([]byte, error) { +func (v NullableTrustedOAuth2JwtGrantJsonWebKey) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableTrustedJsonWebKey) UnmarshalJSON(src []byte) error { +func (v *NullableTrustedOAuth2JwtGrantJsonWebKey) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/clients/hydra/go/model_version.go b/clients/hydra/go/model_version.go index 64cb9036bec..640fb9563d4 100644 --- a/clients/hydra/go/model_version.go +++ b/clients/hydra/go/model_version.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/clients/hydra/go/model_volume.go b/clients/hydra/go/model_volume.go deleted file mode 100644 index e632eabc33e..00000000000 --- a/clients/hydra/go/model_volume.go +++ /dev/null @@ -1,369 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// Volume Volume volume -type Volume struct { - // Date/Time the volume was created. - CreatedAt *string `json:"CreatedAt,omitempty"` - // Name of the volume driver used by the volume. - Driver string `json:"Driver"` - // User-defined key/value metadata. - Labels map[string]string `json:"Labels"` - // Mount path of the volume on the host. - Mountpoint string `json:"Mountpoint"` - // Name of the volume. - Name string `json:"Name"` - // The driver specific options used when creating the volume. - Options map[string]string `json:"Options"` - // The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - Scope string `json:"Scope"` - // Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - Status map[string]interface{} `json:"Status,omitempty"` - UsageData *VolumeUsageData `json:"UsageData,omitempty"` -} - -// NewVolume instantiates a new Volume object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewVolume(driver string, labels map[string]string, mountpoint string, name string, options map[string]string, scope string) *Volume { - this := Volume{} - this.Driver = driver - this.Labels = labels - this.Mountpoint = mountpoint - this.Name = name - this.Options = options - this.Scope = scope - return &this -} - -// NewVolumeWithDefaults instantiates a new Volume object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewVolumeWithDefaults() *Volume { - this := Volume{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *Volume) GetCreatedAt() string { - if o == nil || o.CreatedAt == nil { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Volume) GetCreatedAtOk() (*string, bool) { - if o == nil || o.CreatedAt == nil { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *Volume) HasCreatedAt() bool { - if o != nil && o.CreatedAt != nil { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *Volume) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetDriver returns the Driver field value -func (o *Volume) GetDriver() string { - if o == nil { - var ret string - return ret - } - - return o.Driver -} - -// GetDriverOk returns a tuple with the Driver field value -// and a boolean to check if the value has been set. -func (o *Volume) GetDriverOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Driver, true -} - -// SetDriver sets field value -func (o *Volume) SetDriver(v string) { - o.Driver = v -} - -// GetLabels returns the Labels field value -func (o *Volume) GetLabels() map[string]string { - if o == nil { - var ret map[string]string - return ret - } - - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value -// and a boolean to check if the value has been set. -func (o *Volume) GetLabelsOk() (*map[string]string, bool) { - if o == nil { - return nil, false - } - return &o.Labels, true -} - -// SetLabels sets field value -func (o *Volume) SetLabels(v map[string]string) { - o.Labels = v -} - -// GetMountpoint returns the Mountpoint field value -func (o *Volume) GetMountpoint() string { - if o == nil { - var ret string - return ret - } - - return o.Mountpoint -} - -// GetMountpointOk returns a tuple with the Mountpoint field value -// and a boolean to check if the value has been set. -func (o *Volume) GetMountpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Mountpoint, true -} - -// SetMountpoint sets field value -func (o *Volume) SetMountpoint(v string) { - o.Mountpoint = v -} - -// GetName returns the Name field value -func (o *Volume) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *Volume) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *Volume) SetName(v string) { - o.Name = v -} - -// GetOptions returns the Options field value -func (o *Volume) GetOptions() map[string]string { - if o == nil { - var ret map[string]string - return ret - } - - return o.Options -} - -// GetOptionsOk returns a tuple with the Options field value -// and a boolean to check if the value has been set. -func (o *Volume) GetOptionsOk() (*map[string]string, bool) { - if o == nil { - return nil, false - } - return &o.Options, true -} - -// SetOptions sets field value -func (o *Volume) SetOptions(v map[string]string) { - o.Options = v -} - -// GetScope returns the Scope field value -func (o *Volume) GetScope() string { - if o == nil { - var ret string - return ret - } - - return o.Scope -} - -// GetScopeOk returns a tuple with the Scope field value -// and a boolean to check if the value has been set. -func (o *Volume) GetScopeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Scope, true -} - -// SetScope sets field value -func (o *Volume) SetScope(v string) { - o.Scope = v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *Volume) GetStatus() map[string]interface{} { - if o == nil || o.Status == nil { - var ret map[string]interface{} - return ret - } - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Volume) GetStatusOk() (map[string]interface{}, bool) { - if o == nil || o.Status == nil { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *Volume) HasStatus() bool { - if o != nil && o.Status != nil { - return true - } - - return false -} - -// SetStatus gets a reference to the given map[string]interface{} and assigns it to the Status field. -func (o *Volume) SetStatus(v map[string]interface{}) { - o.Status = v -} - -// GetUsageData returns the UsageData field value if set, zero value otherwise. -func (o *Volume) GetUsageData() VolumeUsageData { - if o == nil || o.UsageData == nil { - var ret VolumeUsageData - return ret - } - return *o.UsageData -} - -// GetUsageDataOk returns a tuple with the UsageData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Volume) GetUsageDataOk() (*VolumeUsageData, bool) { - if o == nil || o.UsageData == nil { - return nil, false - } - return o.UsageData, true -} - -// HasUsageData returns a boolean if a field has been set. -func (o *Volume) HasUsageData() bool { - if o != nil && o.UsageData != nil { - return true - } - - return false -} - -// SetUsageData gets a reference to the given VolumeUsageData and assigns it to the UsageData field. -func (o *Volume) SetUsageData(v VolumeUsageData) { - o.UsageData = &v -} - -func (o Volume) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.CreatedAt != nil { - toSerialize["CreatedAt"] = o.CreatedAt - } - if true { - toSerialize["Driver"] = o.Driver - } - if true { - toSerialize["Labels"] = o.Labels - } - if true { - toSerialize["Mountpoint"] = o.Mountpoint - } - if true { - toSerialize["Name"] = o.Name - } - if true { - toSerialize["Options"] = o.Options - } - if true { - toSerialize["Scope"] = o.Scope - } - if o.Status != nil { - toSerialize["Status"] = o.Status - } - if o.UsageData != nil { - toSerialize["UsageData"] = o.UsageData - } - return json.Marshal(toSerialize) -} - -type NullableVolume struct { - value *Volume - isSet bool -} - -func (v NullableVolume) Get() *Volume { - return v.value -} - -func (v *NullableVolume) Set(val *Volume) { - v.value = val - v.isSet = true -} - -func (v NullableVolume) IsSet() bool { - return v.isSet -} - -func (v *NullableVolume) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVolume(val *Volume) *NullableVolume { - return &NullableVolume{value: val, isSet: true} -} - -func (v NullableVolume) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVolume) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/model_volume_usage_data.go b/clients/hydra/go/model_volume_usage_data.go deleted file mode 100644 index b7adf422b4a..00000000000 --- a/clients/hydra/go/model_volume_usage_data.go +++ /dev/null @@ -1,139 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// VolumeUsageData VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. -type VolumeUsageData struct { - // The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - RefCount int64 `json:"RefCount"` - // Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - Size int64 `json:"Size"` -} - -// NewVolumeUsageData instantiates a new VolumeUsageData object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewVolumeUsageData(refCount int64, size int64) *VolumeUsageData { - this := VolumeUsageData{} - this.RefCount = refCount - this.Size = size - return &this -} - -// NewVolumeUsageDataWithDefaults instantiates a new VolumeUsageData object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewVolumeUsageDataWithDefaults() *VolumeUsageData { - this := VolumeUsageData{} - return &this -} - -// GetRefCount returns the RefCount field value -func (o *VolumeUsageData) GetRefCount() int64 { - if o == nil { - var ret int64 - return ret - } - - return o.RefCount -} - -// GetRefCountOk returns a tuple with the RefCount field value -// and a boolean to check if the value has been set. -func (o *VolumeUsageData) GetRefCountOk() (*int64, bool) { - if o == nil { - return nil, false - } - return &o.RefCount, true -} - -// SetRefCount sets field value -func (o *VolumeUsageData) SetRefCount(v int64) { - o.RefCount = v -} - -// GetSize returns the Size field value -func (o *VolumeUsageData) GetSize() int64 { - if o == nil { - var ret int64 - return ret - } - - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value -// and a boolean to check if the value has been set. -func (o *VolumeUsageData) GetSizeOk() (*int64, bool) { - if o == nil { - return nil, false - } - return &o.Size, true -} - -// SetSize sets field value -func (o *VolumeUsageData) SetSize(v int64) { - o.Size = v -} - -func (o VolumeUsageData) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["RefCount"] = o.RefCount - } - if true { - toSerialize["Size"] = o.Size - } - return json.Marshal(toSerialize) -} - -type NullableVolumeUsageData struct { - value *VolumeUsageData - isSet bool -} - -func (v NullableVolumeUsageData) Get() *VolumeUsageData { - return v.value -} - -func (v *NullableVolumeUsageData) Set(val *VolumeUsageData) { - v.value = val - v.isSet = true -} - -func (v NullableVolumeUsageData) IsSet() bool { - return v.isSet -} - -func (v *NullableVolumeUsageData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVolumeUsageData(val *VolumeUsageData) *NullableVolumeUsageData { - return &NullableVolumeUsageData{value: val, isSet: true} -} - -func (v NullableVolumeUsageData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVolumeUsageData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/clients/hydra/go/response.go b/clients/hydra/go/response.go index 08c2d99a4ae..b488f172cee 100644 --- a/clients/hydra/go/response.go +++ b/clients/hydra/go/response.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -32,7 +33,7 @@ type APIResponse struct { Payload []byte `json:"-"` } -// NewAPIResponse returns a new APIResonse object. +// NewAPIResponse returns a new APIResponse object. func NewAPIResponse(r *http.Response) *APIResponse { response := &APIResponse{Response: r} diff --git a/clients/hydra/go/utils.go b/clients/hydra/go/utils.go index 589d68c7b78..83d35b7b253 100644 --- a/clients/hydra/go/utils.go +++ b/clients/hydra/go/utils.go @@ -1,10 +1,11 @@ /* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * API version: v1.11.0 - */ +Ory Hydra API + +Documentation for all of Ory Hydra's APIs. + +API version: v2.0.1 +Contact: hi@ory.sh +*/ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/clients/hydra/java/.github/workflows/maven.yml b/clients/hydra/java/.github/workflows/maven.yml new file mode 100644 index 00000000000..5f88c8d02d3 --- /dev/null +++ b/clients/hydra/java/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build Ory Hydra API + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/clients/hydra/java/.openapi-generator/FILES b/clients/hydra/java/.openapi-generator/FILES index 34d8acbc119..5afe853863a 100644 --- a/clients/hydra/java/.openapi-generator/FILES +++ b/clients/hydra/java/.openapi-generator/FILES @@ -1,3 +1,4 @@ +.github/workflows/maven.yml .gitignore .openapi-generator-ignore .travis.yml @@ -5,53 +6,49 @@ README.md api/openapi.yaml build.gradle build.sbt -docs/AcceptConsentRequest.md -docs/AcceptLoginRequest.md -docs/AdminApi.md -docs/CompletedRequest.md -docs/ConsentRequest.md -docs/ConsentRequestSession.md -docs/ContainerWaitOKBodyError.md -docs/FlushInactiveOAuth2TokensRequest.md +docs/AcceptOAuth2ConsentRequest.md +docs/AcceptOAuth2ConsentRequestSession.md +docs/AcceptOAuth2LoginRequest.md +docs/CreateJsonWebKeySet.md +docs/ErrorOAuth2.md docs/GenericError.md +docs/GetVersion200Response.md docs/HealthNotReadyStatus.md docs/HealthStatus.md -docs/JSONWebKey.md -docs/JSONWebKeySet.md -docs/JsonError.md -docs/JsonWebKeySetGeneratorRequest.md -docs/LoginRequest.md -docs/LogoutRequest.md +docs/IntrospectedOAuth2Token.md +docs/IsReady200Response.md +docs/IsReady503Response.md +docs/JsonPatch.md +docs/JsonWebKey.md +docs/JsonWebKeySet.md +docs/JwkApi.md docs/MetadataApi.md +docs/OAuth2Api.md docs/OAuth2Client.md -docs/OAuth2TokenIntrospection.md -docs/Oauth2TokenResponse.md -docs/OpenIDConnectContext.md -docs/PatchDocument.md -docs/PluginConfig.md -docs/PluginConfigArgs.md -docs/PluginConfigInterface.md -docs/PluginConfigLinux.md -docs/PluginConfigNetwork.md -docs/PluginConfigRootfs.md -docs/PluginConfigUser.md -docs/PluginDevice.md -docs/PluginEnv.md -docs/PluginInterfaceType.md -docs/PluginMount.md -docs/PluginSettings.md -docs/PreviousConsentSession.md -docs/PublicApi.md -docs/RejectRequest.md -docs/RequestWasHandledResponse.md -docs/TrustJwtGrantIssuerBody.md -docs/TrustedJsonWebKey.md -docs/TrustedJwtGrantIssuer.md -docs/UserinfoResponse.md +docs/OAuth2ClientTokenLifespans.md +docs/OAuth2ConsentRequest.md +docs/OAuth2ConsentRequestOpenIDConnectContext.md +docs/OAuth2ConsentSession.md +docs/OAuth2ConsentSessionExpiresAt.md +docs/OAuth2LoginRequest.md +docs/OAuth2LogoutRequest.md +docs/OAuth2RedirectTo.md +docs/OAuth2TokenExchange.md +docs/OidcApi.md +docs/OidcConfiguration.md +docs/OidcUserInfo.md +docs/Pagination.md +docs/PaginationHeaders.md +docs/RejectOAuth2Request.md +docs/TokenPagination.md +docs/TokenPaginationHeaders.md +docs/TokenPaginationRequestParameters.md +docs/TokenPaginationResponseHeaders.md +docs/TrustOAuth2JwtGrantIssuer.md +docs/TrustedOAuth2JwtGrantIssuer.md +docs/TrustedOAuth2JwtGrantJsonWebKey.md docs/Version.md -docs/Volume.md -docs/VolumeUsageData.md -docs/WellKnown.md +docs/WellknownApi.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -74,9 +71,11 @@ src/main/java/sh/ory/hydra/ProgressResponseBody.java src/main/java/sh/ory/hydra/ServerConfiguration.java src/main/java/sh/ory/hydra/ServerVariable.java src/main/java/sh/ory/hydra/StringUtil.java -src/main/java/sh/ory/hydra/api/AdminApi.java +src/main/java/sh/ory/hydra/api/JwkApi.java src/main/java/sh/ory/hydra/api/MetadataApi.java -src/main/java/sh/ory/hydra/api/PublicApi.java +src/main/java/sh/ory/hydra/api/OAuth2Api.java +src/main/java/sh/ory/hydra/api/OidcApi.java +src/main/java/sh/ory/hydra/api/WellknownApi.java src/main/java/sh/ory/hydra/auth/ApiKeyAuth.java src/main/java/sh/ory/hydra/auth/Authentication.java src/main/java/sh/ory/hydra/auth/HttpBasicAuth.java @@ -85,94 +84,85 @@ src/main/java/sh/ory/hydra/auth/OAuth.java src/main/java/sh/ory/hydra/auth/OAuthFlow.java src/main/java/sh/ory/hydra/auth/OAuthOkHttpClient.java src/main/java/sh/ory/hydra/auth/RetryingOAuth.java -src/main/java/sh/ory/hydra/model/AcceptConsentRequest.java -src/main/java/sh/ory/hydra/model/AcceptLoginRequest.java -src/main/java/sh/ory/hydra/model/CompletedRequest.java -src/main/java/sh/ory/hydra/model/ConsentRequest.java -src/main/java/sh/ory/hydra/model/ConsentRequestSession.java -src/main/java/sh/ory/hydra/model/ContainerWaitOKBodyError.java -src/main/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java +src/main/java/sh/ory/hydra/model/AbstractOpenApiSchema.java +src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequest.java +src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSession.java +src/main/java/sh/ory/hydra/model/AcceptOAuth2LoginRequest.java +src/main/java/sh/ory/hydra/model/CreateJsonWebKeySet.java +src/main/java/sh/ory/hydra/model/ErrorOAuth2.java src/main/java/sh/ory/hydra/model/GenericError.java +src/main/java/sh/ory/hydra/model/GetVersion200Response.java src/main/java/sh/ory/hydra/model/HealthNotReadyStatus.java src/main/java/sh/ory/hydra/model/HealthStatus.java -src/main/java/sh/ory/hydra/model/JSONWebKey.java -src/main/java/sh/ory/hydra/model/JSONWebKeySet.java -src/main/java/sh/ory/hydra/model/JsonError.java -src/main/java/sh/ory/hydra/model/JsonWebKeySetGeneratorRequest.java -src/main/java/sh/ory/hydra/model/LoginRequest.java -src/main/java/sh/ory/hydra/model/LogoutRequest.java +src/main/java/sh/ory/hydra/model/IntrospectedOAuth2Token.java +src/main/java/sh/ory/hydra/model/IsReady200Response.java +src/main/java/sh/ory/hydra/model/IsReady503Response.java +src/main/java/sh/ory/hydra/model/JsonPatch.java +src/main/java/sh/ory/hydra/model/JsonWebKey.java +src/main/java/sh/ory/hydra/model/JsonWebKeySet.java src/main/java/sh/ory/hydra/model/OAuth2Client.java -src/main/java/sh/ory/hydra/model/OAuth2TokenIntrospection.java -src/main/java/sh/ory/hydra/model/Oauth2TokenResponse.java -src/main/java/sh/ory/hydra/model/OpenIDConnectContext.java -src/main/java/sh/ory/hydra/model/PatchDocument.java -src/main/java/sh/ory/hydra/model/PluginConfig.java -src/main/java/sh/ory/hydra/model/PluginConfigArgs.java -src/main/java/sh/ory/hydra/model/PluginConfigInterface.java -src/main/java/sh/ory/hydra/model/PluginConfigLinux.java -src/main/java/sh/ory/hydra/model/PluginConfigNetwork.java -src/main/java/sh/ory/hydra/model/PluginConfigRootfs.java -src/main/java/sh/ory/hydra/model/PluginConfigUser.java -src/main/java/sh/ory/hydra/model/PluginDevice.java -src/main/java/sh/ory/hydra/model/PluginEnv.java -src/main/java/sh/ory/hydra/model/PluginInterfaceType.java -src/main/java/sh/ory/hydra/model/PluginMount.java -src/main/java/sh/ory/hydra/model/PluginSettings.java -src/main/java/sh/ory/hydra/model/PreviousConsentSession.java -src/main/java/sh/ory/hydra/model/RejectRequest.java -src/main/java/sh/ory/hydra/model/RequestWasHandledResponse.java -src/main/java/sh/ory/hydra/model/TrustJwtGrantIssuerBody.java -src/main/java/sh/ory/hydra/model/TrustedJsonWebKey.java -src/main/java/sh/ory/hydra/model/TrustedJwtGrantIssuer.java -src/main/java/sh/ory/hydra/model/UserinfoResponse.java +src/main/java/sh/ory/hydra/model/OAuth2ClientTokenLifespans.java +src/main/java/sh/ory/hydra/model/OAuth2ConsentRequest.java +src/main/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContext.java +src/main/java/sh/ory/hydra/model/OAuth2ConsentSession.java +src/main/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAt.java +src/main/java/sh/ory/hydra/model/OAuth2LoginRequest.java +src/main/java/sh/ory/hydra/model/OAuth2LogoutRequest.java +src/main/java/sh/ory/hydra/model/OAuth2RedirectTo.java +src/main/java/sh/ory/hydra/model/OAuth2TokenExchange.java +src/main/java/sh/ory/hydra/model/OidcConfiguration.java +src/main/java/sh/ory/hydra/model/OidcUserInfo.java +src/main/java/sh/ory/hydra/model/Pagination.java +src/main/java/sh/ory/hydra/model/PaginationHeaders.java +src/main/java/sh/ory/hydra/model/RejectOAuth2Request.java +src/main/java/sh/ory/hydra/model/TokenPagination.java +src/main/java/sh/ory/hydra/model/TokenPaginationHeaders.java +src/main/java/sh/ory/hydra/model/TokenPaginationRequestParameters.java +src/main/java/sh/ory/hydra/model/TokenPaginationResponseHeaders.java +src/main/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuer.java +src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuer.java +src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKey.java src/main/java/sh/ory/hydra/model/Version.java -src/main/java/sh/ory/hydra/model/Volume.java -src/main/java/sh/ory/hydra/model/VolumeUsageData.java -src/main/java/sh/ory/hydra/model/WellKnown.java -src/test/java/sh/ory/hydra/api/AdminApiTest.java +src/test/java/sh/ory/hydra/api/JwkApiTest.java src/test/java/sh/ory/hydra/api/MetadataApiTest.java -src/test/java/sh/ory/hydra/api/PublicApiTest.java -src/test/java/sh/ory/hydra/model/AcceptConsentRequestTest.java -src/test/java/sh/ory/hydra/model/AcceptLoginRequestTest.java -src/test/java/sh/ory/hydra/model/CompletedRequestTest.java -src/test/java/sh/ory/hydra/model/ConsentRequestSessionTest.java -src/test/java/sh/ory/hydra/model/ConsentRequestTest.java -src/test/java/sh/ory/hydra/model/ContainerWaitOKBodyErrorTest.java -src/test/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequestTest.java +src/test/java/sh/ory/hydra/api/OAuth2ApiTest.java +src/test/java/sh/ory/hydra/api/OidcApiTest.java +src/test/java/sh/ory/hydra/api/WellknownApiTest.java +src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSessionTest.java +src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestTest.java +src/test/java/sh/ory/hydra/model/AcceptOAuth2LoginRequestTest.java +src/test/java/sh/ory/hydra/model/CreateJsonWebKeySetTest.java +src/test/java/sh/ory/hydra/model/ErrorOAuth2Test.java src/test/java/sh/ory/hydra/model/GenericErrorTest.java +src/test/java/sh/ory/hydra/model/GetVersion200ResponseTest.java src/test/java/sh/ory/hydra/model/HealthNotReadyStatusTest.java src/test/java/sh/ory/hydra/model/HealthStatusTest.java -src/test/java/sh/ory/hydra/model/JSONWebKeySetTest.java -src/test/java/sh/ory/hydra/model/JSONWebKeyTest.java -src/test/java/sh/ory/hydra/model/JsonErrorTest.java -src/test/java/sh/ory/hydra/model/JsonWebKeySetGeneratorRequestTest.java -src/test/java/sh/ory/hydra/model/LoginRequestTest.java -src/test/java/sh/ory/hydra/model/LogoutRequestTest.java +src/test/java/sh/ory/hydra/model/IntrospectedOAuth2TokenTest.java +src/test/java/sh/ory/hydra/model/IsReady200ResponseTest.java +src/test/java/sh/ory/hydra/model/IsReady503ResponseTest.java +src/test/java/sh/ory/hydra/model/JsonPatchTest.java +src/test/java/sh/ory/hydra/model/JsonWebKeySetTest.java +src/test/java/sh/ory/hydra/model/JsonWebKeyTest.java src/test/java/sh/ory/hydra/model/OAuth2ClientTest.java -src/test/java/sh/ory/hydra/model/OAuth2TokenIntrospectionTest.java -src/test/java/sh/ory/hydra/model/Oauth2TokenResponseTest.java -src/test/java/sh/ory/hydra/model/OpenIDConnectContextTest.java -src/test/java/sh/ory/hydra/model/PatchDocumentTest.java -src/test/java/sh/ory/hydra/model/PluginConfigArgsTest.java -src/test/java/sh/ory/hydra/model/PluginConfigInterfaceTest.java -src/test/java/sh/ory/hydra/model/PluginConfigLinuxTest.java -src/test/java/sh/ory/hydra/model/PluginConfigNetworkTest.java -src/test/java/sh/ory/hydra/model/PluginConfigRootfsTest.java -src/test/java/sh/ory/hydra/model/PluginConfigTest.java -src/test/java/sh/ory/hydra/model/PluginConfigUserTest.java -src/test/java/sh/ory/hydra/model/PluginDeviceTest.java -src/test/java/sh/ory/hydra/model/PluginEnvTest.java -src/test/java/sh/ory/hydra/model/PluginInterfaceTypeTest.java -src/test/java/sh/ory/hydra/model/PluginMountTest.java -src/test/java/sh/ory/hydra/model/PluginSettingsTest.java -src/test/java/sh/ory/hydra/model/PreviousConsentSessionTest.java -src/test/java/sh/ory/hydra/model/RejectRequestTest.java -src/test/java/sh/ory/hydra/model/RequestWasHandledResponseTest.java -src/test/java/sh/ory/hydra/model/TrustJwtGrantIssuerBodyTest.java -src/test/java/sh/ory/hydra/model/TrustedJsonWebKeyTest.java -src/test/java/sh/ory/hydra/model/TrustedJwtGrantIssuerTest.java -src/test/java/sh/ory/hydra/model/UserinfoResponseTest.java +src/test/java/sh/ory/hydra/model/OAuth2ClientTokenLifespansTest.java +src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContextTest.java +src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestTest.java +src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAtTest.java +src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionTest.java +src/test/java/sh/ory/hydra/model/OAuth2LoginRequestTest.java +src/test/java/sh/ory/hydra/model/OAuth2LogoutRequestTest.java +src/test/java/sh/ory/hydra/model/OAuth2RedirectToTest.java +src/test/java/sh/ory/hydra/model/OAuth2TokenExchangeTest.java +src/test/java/sh/ory/hydra/model/OidcConfigurationTest.java +src/test/java/sh/ory/hydra/model/OidcUserInfoTest.java +src/test/java/sh/ory/hydra/model/PaginationHeadersTest.java +src/test/java/sh/ory/hydra/model/PaginationTest.java +src/test/java/sh/ory/hydra/model/RejectOAuth2RequestTest.java +src/test/java/sh/ory/hydra/model/TokenPaginationHeadersTest.java +src/test/java/sh/ory/hydra/model/TokenPaginationRequestParametersTest.java +src/test/java/sh/ory/hydra/model/TokenPaginationResponseHeadersTest.java +src/test/java/sh/ory/hydra/model/TokenPaginationTest.java +src/test/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuerTest.java +src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuerTest.java +src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKeyTest.java src/test/java/sh/ory/hydra/model/VersionTest.java -src/test/java/sh/ory/hydra/model/VolumeTest.java -src/test/java/sh/ory/hydra/model/VolumeUsageDataTest.java -src/test/java/sh/ory/hydra/model/WellKnownTest.java diff --git a/clients/hydra/java/.openapi-generator/VERSION b/clients/hydra/java/.openapi-generator/VERSION index 1e20ec35c64..6d54bbd7751 100644 --- a/clients/hydra/java/.openapi-generator/VERSION +++ b/clients/hydra/java/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/clients/hydra/java/README.md b/clients/hydra/java/README.md index 229f92c9649..257253d3a47 100644 --- a/clients/hydra/java/README.md +++ b/clients/hydra/java/README.md @@ -1,10 +1,11 @@ # hydra-client -ORY Hydra -- API version: v1.11.0 - - Build date: 2022-05-27T08:52:01.831221547Z[Etc/UTC] +Ory Hydra API +- API version: v2.0.1 + - Build date: 2022-10-27T11:58:55.719856908Z[Etc/UTC] + +Documentation for all of Ory Hydra's APIs. -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -40,7 +41,7 @@ Add this dependency to your project's POM: sh.ory.hydra hydra-client - v1.11.0 + v2.0.1 compile ``` @@ -56,7 +57,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "sh.ory.hydra:hydra-client:v1.11.0" + implementation "sh.ory.hydra:hydra-client:v2.0.1" } ``` @@ -70,7 +71,7 @@ mvn clean package Then manually install the following JARs: -* `target/hydra-client-v1.11.0.jar` +* `target/hydra-client-v2.0.1.jar` * `target/lib/*.jar` ## Getting Started @@ -84,21 +85,21 @@ import sh.ory.hydra.ApiClient; import sh.ory.hydra.ApiException; import sh.ory.hydra.Configuration; import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; +import sh.ory.hydra.api.JwkApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost"); - AdminApi apiInstance = new AdminApi(defaultClient); - String consentChallenge = "consentChallenge_example"; // String | - AcceptConsentRequest body = new AcceptConsentRequest(); // AcceptConsentRequest | + JwkApi apiInstance = new JwkApi(defaultClient); + String set = "set_example"; // String | The JSON Web Key Set ID + CreateJsonWebKeySet createJsonWebKeySet = new CreateJsonWebKeySet(); // CreateJsonWebKeySet | try { - CompletedRequest result = apiInstance.acceptConsentRequest(consentChallenge, body); + JsonWebKeySet result = apiInstance.createJsonWebKeySet(set, createJsonWebKeySet); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#acceptConsentRequest"); + System.err.println("Exception when calling JwkApi#createJsonWebKeySet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -115,101 +116,94 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdminApi* | [**acceptConsentRequest**](docs/AdminApi.md#acceptConsentRequest) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -*AdminApi* | [**acceptLoginRequest**](docs/AdminApi.md#acceptLoginRequest) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -*AdminApi* | [**acceptLogoutRequest**](docs/AdminApi.md#acceptLogoutRequest) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -*AdminApi* | [**createJsonWebKeySet**](docs/AdminApi.md#createJsonWebKeySet) | **POST** /keys/{set} | Generate a New JSON Web Key -*AdminApi* | [**createOAuth2Client**](docs/AdminApi.md#createOAuth2Client) | **POST** /clients | Create an OAuth 2.0 Client -*AdminApi* | [**deleteJsonWebKey**](docs/AdminApi.md#deleteJsonWebKey) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -*AdminApi* | [**deleteJsonWebKeySet**](docs/AdminApi.md#deleteJsonWebKeySet) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -*AdminApi* | [**deleteOAuth2Client**](docs/AdminApi.md#deleteOAuth2Client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -*AdminApi* | [**deleteOAuth2Token**](docs/AdminApi.md#deleteOAuth2Token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -*AdminApi* | [**deleteTrustedJwtGrantIssuer**](docs/AdminApi.md#deleteTrustedJwtGrantIssuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**flushInactiveOAuth2Tokens**](docs/AdminApi.md#flushInactiveOAuth2Tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -*AdminApi* | [**getConsentRequest**](docs/AdminApi.md#getConsentRequest) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -*AdminApi* | [**getJsonWebKey**](docs/AdminApi.md#getJsonWebKey) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -*AdminApi* | [**getJsonWebKeySet**](docs/AdminApi.md#getJsonWebKeySet) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -*AdminApi* | [**getLoginRequest**](docs/AdminApi.md#getLoginRequest) | **GET** /oauth2/auth/requests/login | Get a Login Request -*AdminApi* | [**getLogoutRequest**](docs/AdminApi.md#getLogoutRequest) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -*AdminApi* | [**getOAuth2Client**](docs/AdminApi.md#getOAuth2Client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -*AdminApi* | [**getTrustedJwtGrantIssuer**](docs/AdminApi.md#getTrustedJwtGrantIssuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**getVersion**](docs/AdminApi.md#getVersion) | **GET** /version | Get Service Version -*AdminApi* | [**introspectOAuth2Token**](docs/AdminApi.md#introspectOAuth2Token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -*AdminApi* | [**isInstanceAlive**](docs/AdminApi.md#isInstanceAlive) | **GET** /health/alive | Check Alive Status -*AdminApi* | [**listOAuth2Clients**](docs/AdminApi.md#listOAuth2Clients) | **GET** /clients | List OAuth 2.0 Clients -*AdminApi* | [**listSubjectConsentSessions**](docs/AdminApi.md#listSubjectConsentSessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -*AdminApi* | [**listTrustedJwtGrantIssuers**](docs/AdminApi.md#listTrustedJwtGrantIssuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -*AdminApi* | [**patchOAuth2Client**](docs/AdminApi.md#patchOAuth2Client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -*AdminApi* | [**rejectConsentRequest**](docs/AdminApi.md#rejectConsentRequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -*AdminApi* | [**rejectLoginRequest**](docs/AdminApi.md#rejectLoginRequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -*AdminApi* | [**rejectLogoutRequest**](docs/AdminApi.md#rejectLogoutRequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -*AdminApi* | [**revokeAuthenticationSession**](docs/AdminApi.md#revokeAuthenticationSession) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -*AdminApi* | [**revokeConsentSessions**](docs/AdminApi.md#revokeConsentSessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -*AdminApi* | [**trustJwtGrantIssuer**](docs/AdminApi.md#trustJwtGrantIssuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**updateJsonWebKey**](docs/AdminApi.md#updateJsonWebKey) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -*AdminApi* | [**updateJsonWebKeySet**](docs/AdminApi.md#updateJsonWebKeySet) | **PUT** /keys/{set} | Update a JSON Web Key Set -*AdminApi* | [**updateOAuth2Client**](docs/AdminApi.md#updateOAuth2Client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client -*MetadataApi* | [**prometheus**](docs/MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: -*PublicApi* | [**disconnectUser**](docs/PublicApi.md#disconnectUser) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -*PublicApi* | [**discoverOpenIDConfiguration**](docs/PublicApi.md#discoverOpenIDConfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -*PublicApi* | [**dynamicClientRegistrationCreateOAuth2Client**](docs/PublicApi.md#dynamicClientRegistrationCreateOAuth2Client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamicClientRegistrationDeleteOAuth2Client**](docs/PublicApi.md#dynamicClientRegistrationDeleteOAuth2Client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamicClientRegistrationGetOAuth2Client**](docs/PublicApi.md#dynamicClientRegistrationGetOAuth2Client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamicClientRegistrationUpdateOAuth2Client**](docs/PublicApi.md#dynamicClientRegistrationUpdateOAuth2Client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**isInstanceReady**](docs/PublicApi.md#isInstanceReady) | **GET** /health/ready | Check Readiness Status -*PublicApi* | [**oauth2Token**](docs/PublicApi.md#oauth2Token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -*PublicApi* | [**oauthAuth**](docs/PublicApi.md#oauthAuth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -*PublicApi* | [**revokeOAuth2Token**](docs/PublicApi.md#revokeOAuth2Token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -*PublicApi* | [**userinfo**](docs/PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -*PublicApi* | [**wellKnown**](docs/PublicApi.md#wellKnown) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery +*JwkApi* | [**createJsonWebKeySet**](docs/JwkApi.md#createJsonWebKeySet) | **POST** /admin/keys/{set} | Create JSON Web Key +*JwkApi* | [**deleteJsonWebKey**](docs/JwkApi.md#deleteJsonWebKey) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key +*JwkApi* | [**deleteJsonWebKeySet**](docs/JwkApi.md#deleteJsonWebKeySet) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set +*JwkApi* | [**getJsonWebKey**](docs/JwkApi.md#getJsonWebKey) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key +*JwkApi* | [**getJsonWebKeySet**](docs/JwkApi.md#getJsonWebKeySet) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set +*JwkApi* | [**setJsonWebKey**](docs/JwkApi.md#setJsonWebKey) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key +*JwkApi* | [**setJsonWebKeySet**](docs/JwkApi.md#setJsonWebKeySet) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set +*MetadataApi* | [**getVersion**](docs/MetadataApi.md#getVersion) | **GET** /version | Return Running Software Version. +*MetadataApi* | [**isAlive**](docs/MetadataApi.md#isAlive) | **GET** /health/alive | Check HTTP Server Status +*MetadataApi* | [**isReady**](docs/MetadataApi.md#isReady) | **GET** /health/ready | Check HTTP Server and Database Status +*OAuth2Api* | [**acceptOAuth2ConsentRequest**](docs/OAuth2Api.md#acceptOAuth2ConsentRequest) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +*OAuth2Api* | [**acceptOAuth2LoginRequest**](docs/OAuth2Api.md#acceptOAuth2LoginRequest) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +*OAuth2Api* | [**acceptOAuth2LogoutRequest**](docs/OAuth2Api.md#acceptOAuth2LogoutRequest) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +*OAuth2Api* | [**createOAuth2Client**](docs/OAuth2Api.md#createOAuth2Client) | **POST** /admin/clients | Create OAuth 2.0 Client +*OAuth2Api* | [**deleteOAuth2Client**](docs/OAuth2Api.md#deleteOAuth2Client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client +*OAuth2Api* | [**deleteOAuth2Token**](docs/OAuth2Api.md#deleteOAuth2Token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +*OAuth2Api* | [**deleteTrustedOAuth2JwtGrantIssuer**](docs/OAuth2Api.md#deleteTrustedOAuth2JwtGrantIssuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**getOAuth2Client**](docs/OAuth2Api.md#getOAuth2Client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client +*OAuth2Api* | [**getOAuth2ConsentRequest**](docs/OAuth2Api.md#getOAuth2ConsentRequest) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +*OAuth2Api* | [**getOAuth2LoginRequest**](docs/OAuth2Api.md#getOAuth2LoginRequest) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +*OAuth2Api* | [**getOAuth2LogoutRequest**](docs/OAuth2Api.md#getOAuth2LogoutRequest) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +*OAuth2Api* | [**getTrustedOAuth2JwtGrantIssuer**](docs/OAuth2Api.md#getTrustedOAuth2JwtGrantIssuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**introspectOAuth2Token**](docs/OAuth2Api.md#introspectOAuth2Token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +*OAuth2Api* | [**listOAuth2Clients**](docs/OAuth2Api.md#listOAuth2Clients) | **GET** /admin/clients | List OAuth 2.0 Clients +*OAuth2Api* | [**listOAuth2ConsentSessions**](docs/OAuth2Api.md#listOAuth2ConsentSessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**listTrustedOAuth2JwtGrantIssuers**](docs/OAuth2Api.md#listTrustedOAuth2JwtGrantIssuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +*OAuth2Api* | [**oAuth2Authorize**](docs/OAuth2Api.md#oAuth2Authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint +*OAuth2Api* | [**oauth2TokenExchange**](docs/OAuth2Api.md#oauth2TokenExchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint +*OAuth2Api* | [**patchOAuth2Client**](docs/OAuth2Api.md#patchOAuth2Client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client +*OAuth2Api* | [**rejectOAuth2ConsentRequest**](docs/OAuth2Api.md#rejectOAuth2ConsentRequest) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +*OAuth2Api* | [**rejectOAuth2LoginRequest**](docs/OAuth2Api.md#rejectOAuth2LoginRequest) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +*OAuth2Api* | [**rejectOAuth2LogoutRequest**](docs/OAuth2Api.md#rejectOAuth2LogoutRequest) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +*OAuth2Api* | [**revokeOAuth2ConsentSessions**](docs/OAuth2Api.md#revokeOAuth2ConsentSessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**revokeOAuth2LoginSessions**](docs/OAuth2Api.md#revokeOAuth2LoginSessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +*OAuth2Api* | [**revokeOAuth2Token**](docs/OAuth2Api.md#revokeOAuth2Token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +*OAuth2Api* | [**setOAuth2Client**](docs/OAuth2Api.md#setOAuth2Client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client +*OAuth2Api* | [**setOAuth2ClientLifespans**](docs/OAuth2Api.md#setOAuth2ClientLifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +*OAuth2Api* | [**trustOAuth2JwtGrantIssuer**](docs/OAuth2Api.md#trustOAuth2JwtGrantIssuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer +*OidcApi* | [**createOidcDynamicClient**](docs/OidcApi.md#createOidcDynamicClient) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**deleteOidcDynamicClient**](docs/OidcApi.md#deleteOidcDynamicClient) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +*OidcApi* | [**discoverOidcConfiguration**](docs/OidcApi.md#discoverOidcConfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery +*OidcApi* | [**getOidcDynamicClient**](docs/OidcApi.md#getOidcDynamicClient) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**getOidcUserInfo**](docs/OidcApi.md#getOidcUserInfo) | **GET** /userinfo | OpenID Connect Userinfo +*OidcApi* | [**revokeOidcSession**](docs/OidcApi.md#revokeOidcSession) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +*OidcApi* | [**setOidcDynamicClient**](docs/OidcApi.md#setOidcDynamicClient) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration +*WellknownApi* | [**discoverJsonWebKeys**](docs/WellknownApi.md#discoverJsonWebKeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys ## Documentation for Models - - [AcceptConsentRequest](docs/AcceptConsentRequest.md) - - [AcceptLoginRequest](docs/AcceptLoginRequest.md) - - [CompletedRequest](docs/CompletedRequest.md) - - [ConsentRequest](docs/ConsentRequest.md) - - [ConsentRequestSession](docs/ConsentRequestSession.md) - - [ContainerWaitOKBodyError](docs/ContainerWaitOKBodyError.md) - - [FlushInactiveOAuth2TokensRequest](docs/FlushInactiveOAuth2TokensRequest.md) + - [AcceptOAuth2ConsentRequest](docs/AcceptOAuth2ConsentRequest.md) + - [AcceptOAuth2ConsentRequestSession](docs/AcceptOAuth2ConsentRequestSession.md) + - [AcceptOAuth2LoginRequest](docs/AcceptOAuth2LoginRequest.md) + - [CreateJsonWebKeySet](docs/CreateJsonWebKeySet.md) + - [ErrorOAuth2](docs/ErrorOAuth2.md) - [GenericError](docs/GenericError.md) + - [GetVersion200Response](docs/GetVersion200Response.md) - [HealthNotReadyStatus](docs/HealthNotReadyStatus.md) - [HealthStatus](docs/HealthStatus.md) - - [JSONWebKey](docs/JSONWebKey.md) - - [JSONWebKeySet](docs/JSONWebKeySet.md) - - [JsonError](docs/JsonError.md) - - [JsonWebKeySetGeneratorRequest](docs/JsonWebKeySetGeneratorRequest.md) - - [LoginRequest](docs/LoginRequest.md) - - [LogoutRequest](docs/LogoutRequest.md) + - [IntrospectedOAuth2Token](docs/IntrospectedOAuth2Token.md) + - [IsReady200Response](docs/IsReady200Response.md) + - [IsReady503Response](docs/IsReady503Response.md) + - [JsonPatch](docs/JsonPatch.md) + - [JsonWebKey](docs/JsonWebKey.md) + - [JsonWebKeySet](docs/JsonWebKeySet.md) - [OAuth2Client](docs/OAuth2Client.md) - - [OAuth2TokenIntrospection](docs/OAuth2TokenIntrospection.md) - - [Oauth2TokenResponse](docs/Oauth2TokenResponse.md) - - [OpenIDConnectContext](docs/OpenIDConnectContext.md) - - [PatchDocument](docs/PatchDocument.md) - - [PluginConfig](docs/PluginConfig.md) - - [PluginConfigArgs](docs/PluginConfigArgs.md) - - [PluginConfigInterface](docs/PluginConfigInterface.md) - - [PluginConfigLinux](docs/PluginConfigLinux.md) - - [PluginConfigNetwork](docs/PluginConfigNetwork.md) - - [PluginConfigRootfs](docs/PluginConfigRootfs.md) - - [PluginConfigUser](docs/PluginConfigUser.md) - - [PluginDevice](docs/PluginDevice.md) - - [PluginEnv](docs/PluginEnv.md) - - [PluginInterfaceType](docs/PluginInterfaceType.md) - - [PluginMount](docs/PluginMount.md) - - [PluginSettings](docs/PluginSettings.md) - - [PreviousConsentSession](docs/PreviousConsentSession.md) - - [RejectRequest](docs/RejectRequest.md) - - [RequestWasHandledResponse](docs/RequestWasHandledResponse.md) - - [TrustJwtGrantIssuerBody](docs/TrustJwtGrantIssuerBody.md) - - [TrustedJsonWebKey](docs/TrustedJsonWebKey.md) - - [TrustedJwtGrantIssuer](docs/TrustedJwtGrantIssuer.md) - - [UserinfoResponse](docs/UserinfoResponse.md) + - [OAuth2ClientTokenLifespans](docs/OAuth2ClientTokenLifespans.md) + - [OAuth2ConsentRequest](docs/OAuth2ConsentRequest.md) + - [OAuth2ConsentRequestOpenIDConnectContext](docs/OAuth2ConsentRequestOpenIDConnectContext.md) + - [OAuth2ConsentSession](docs/OAuth2ConsentSession.md) + - [OAuth2ConsentSessionExpiresAt](docs/OAuth2ConsentSessionExpiresAt.md) + - [OAuth2LoginRequest](docs/OAuth2LoginRequest.md) + - [OAuth2LogoutRequest](docs/OAuth2LogoutRequest.md) + - [OAuth2RedirectTo](docs/OAuth2RedirectTo.md) + - [OAuth2TokenExchange](docs/OAuth2TokenExchange.md) + - [OidcConfiguration](docs/OidcConfiguration.md) + - [OidcUserInfo](docs/OidcUserInfo.md) + - [Pagination](docs/Pagination.md) + - [PaginationHeaders](docs/PaginationHeaders.md) + - [RejectOAuth2Request](docs/RejectOAuth2Request.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) + - [TrustedOAuth2JwtGrantJsonWebKey](docs/TrustedOAuth2JwtGrantJsonWebKey.md) - [Version](docs/Version.md) - - [Volume](docs/Volume.md) - - [VolumeUsageData](docs/VolumeUsageData.md) - - [WellKnown](docs/WellKnown.md) ## Documentation for Authorization @@ -219,6 +213,10 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication +### bearer + +- **Type**: HTTP basic authentication + ### oauth2 - **Type**: OAuth @@ -236,5 +234,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea ## Author - +hi@ory.sh diff --git a/clients/hydra/java/api/openapi.yaml b/clients/hydra/java/api/openapi.yaml index a61c25000bd..52c63570c24 100644 --- a/clients/hydra/java/api/openapi.yaml +++ b/clients/hydra/java/api/openapi.yaml @@ -1,106 +1,120 @@ -openapi: 3.0.1 +openapi: 3.0.3 info: - description: Welcome to the ORY Hydra HTTP API documentation. You will find documentation - for all HTTP APIs here. - title: ORY Hydra - version: v1.11.0 + 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.0.1 servers: - url: / +tags: +- description: OAuth 2.0 + name: oauth2 +- description: OpenID Connect + name: oidc +- description: JSON Web Keys + name: jwk +- description: OAuth 2.0 Consent + name: consent paths: /.well-known/jwks.json: get: - description: |- - This endpoint returns JSON Web Keys to be used as public keys for 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: wellKnown + 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 - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: JSON Web Keys Discovery + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Discover Well-Known JSON Web Keys tags: - - public + - wellknown x-accepts: application/json /.well-known/openid-configuration: get: - description: |- - The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll - your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this - flow at https://openid.net/specs/openid-connect-discovery-1_0.html . - - 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: discoverOpenIDConfiguration + 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/wellKnown' - description: wellKnown - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oidcConfiguration' + description: oidcConfiguration + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 summary: OpenID Connect Discovery tags: - - public + - oidc x-accepts: application/json - /clients: + /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. The `limit` parameter can be used to retrieve more clients, - but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. - - 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. - - The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. - Multiple links can be included in this header, and will be separated by a comma. + 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: The maximum amount of clients to returned, upper bound is 500 - clients. + - description: "Items per Page\n\nThis is the number of items per page to return.\n\ + 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: limit + name: page_size + required: false schema: + default: 250 format: int64 + maximum: 500 + minimum: 1 type: integer - - description: The offset from where to start looking. + style: form + - 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)." + explode: true in: query - name: offset + name: page_token + required: false schema: - format: int64 - type: integer + 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: @@ -109,32 +123,30 @@ paths: items: $ref: '#/components/schemas/oAuth2Client' type: array - description: A list of clients. + description: Paginated OAuth2 Client List Response default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response summary: List OAuth 2.0 Clients tags: - - admin + - oAuth2 x-accepts: application/json post: - description: |- - Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret - will be generated. The 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 somwhere 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. + 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: @@ -142,65 +154,69 @@ paths: 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/jsonError' - description: jsonError - summary: Create an OAuth 2.0 Client + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Create OAuth 2.0 Client tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - oAuth2 + x-content-type: application/json x-accepts: application/json - /clients/{id}: + /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. + 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. + explode: false in: path name: id required: true schema: type: string + style: simple responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Deletes an OAuth 2.0 Client + $ref: '#/components/schemas/genericError' + description: genericError + summary: Delete OAuth 2.0 Client tags: - - admin + - oAuth2 x-accepts: application/json 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. + 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. + explode: false in: path name: id required: true schema: type: string + style: simple responses: "200": content: @@ -212,34 +228,38 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response summary: Get an OAuth 2.0 Client tags: - - admin + - oAuth2 x-accepts: application/json patch: - description: |- - Patch an existing OAuth 2.0 Client. 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. + 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. + explode: false in: path name: id required: true schema: type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/patchRequest' + $ref: '#/components/schemas/jsonPatchDocument' + description: OAuth 2.0 Client JSON Patch Body required: true + x-originalParamName: Body responses: "200": content: @@ -247,39 +267,49 @@ paths: 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/jsonError' - description: jsonError - summary: Patch an OAuth 2.0 Client + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Patch OAuth 2.0 Client tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - oAuth2 + x-content-type: application/json x-accepts: application/json put: - description: |- - Update an existing OAuth 2.0 Client. 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: updateOAuth2Client + 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: The id of the OAuth 2.0 Client. + - 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: @@ -287,167 +317,49 @@ paths: schema: $ref: '#/components/schemas/oAuth2Client' description: oAuth2Client - default: - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Update an OAuth 2.0 Client - tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json - x-accepts: application/json - /connect/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: dynamicClientRegistrationCreateOAuth2Client - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/oAuth2Client' - required: true - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/oAuth2Client' - description: oAuth2Client - default: - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client - Registration Management Protocol - tags: - - public - x-codegen-request-body-name: Body - x-contentType: application/json - x-accepts: application/json - /connect/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: dynamicClientRegistrationDeleteOAuth2Client - parameters: - - description: The id of the OAuth 2.0 Client. - in: path - name: id - required: true - schema: - type: string - responses: - "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - default: + "400": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client - Registration Management Protocol - tags: - - public - x-accepts: application/json - 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. 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: dynamicClientRegistrationGetOAuth2Client - parameters: - - description: The id of the OAuth 2.0 Client. - in: path - name: id - required: true - schema: - type: string - responses: - "200": + $ref: '#/components/schemas/errorOAuth2' + description: Bad Request Error Response + "404": content: application/json: schema: - $ref: '#/components/schemas/oAuth2Client' - description: oAuth2Client + $ref: '#/components/schemas/errorOAuth2' + description: Not Found Error Response default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration - Management Protocol + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Set OAuth 2.0 Client tags: - - public + - oAuth2 + x-content-type: application/json x-accepts: application/json + /admin/clients/{id}/lifespans: put: - description: |- - This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. - - 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. - - 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: dynamicClientRegistrationUpdateOAuth2Client + description: Set lifespans of different token types issued for this OAuth 2.0 + client. Does not modify other fields. + operationId: setOAuth2ClientLifespans parameters: - - description: The id of the OAuth 2.0 Client. + - 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' - required: true + $ref: '#/components/schemas/oAuth2ClientTokenLifespans' + x-originalParamName: Body responses: "200": content: @@ -459,2301 +371,2447 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client - Registration Management Protocol - tags: - - public - x-codegen-request-body-name: Body - x-contentType: application/json - x-accepts: application/json - /health/alive: - get: - description: |- - This endpoint returns a 200 status code when the HTTP server is up running. - 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: isInstanceAlive - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/healthStatus' - description: healthStatus - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Check Alive Status - tags: - - admin - x-accepts: application/json - /health/ready: - get: - description: |- - This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never - refer to the cluster state, only to a single instance. - operationId: isInstanceReady - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/healthStatus' - description: healthStatus - "503": - content: - application/json: - schema: - $ref: '#/components/schemas/healthNotReadyStatus' - description: healthNotReadyStatus - summary: Check Readiness Status + $ref: '#/components/schemas/genericError' + description: genericError + summary: Set OAuth2 Client Token Lifespans tags: - - public + - oAuth2 + x-content-type: application/json x-accepts: application/json - /keys/{set}: + /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. + 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 set + - description: The JSON Web Key Set + explode: false in: path name: set required: true schema: type: string + style: simple responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Delete a JSON Web Key Set + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Delete JSON Web Key Set tags: - - admin + - jwk x-accepts: application/json 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. + 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: The set + - 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 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 summary: Retrieve a JSON Web Key Set tags: - - admin + - jwk 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. - - 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. + 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 set + - 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/jsonWebKeySetGeneratorRequest' - required: false + $ref: '#/components/schemas/createJsonWebKeySet' + required: true + x-originalParamName: Body responses: "201": content: application/json: schema: - $ref: '#/components/schemas/JSONWebKeySet' - description: JSONWebKeySet - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Generate a New JSON Web Key + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Create JSON Web Key tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - jwk + x-content-type: 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. - - 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: updateJsonWebKeySet + 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 set + - 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' - required: false + $ref: '#/components/schemas/jsonWebKeySet' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/JSONWebKeySet' - description: JSONWebKeySet - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 summary: Update a JSON Web Key Set tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - jwk + x-content-type: application/json x-accepts: application/json - /keys/{set}/{kid}: + /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. + 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 kid of the desired key + - description: The JSON Web Key Set + explode: false in: path - name: kid + name: set required: true schema: type: string - - description: The set + style: simple + - description: The JSON Web Key ID (kid) + explode: false in: path - name: set + name: kid required: true schema: type: string + style: simple responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Delete a JSON Web Key + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Delete JSON Web Key tags: - - admin + - jwk x-accepts: application/json get: - description: This endpoint returns a singular JSON Web Key, identified by the - set and the specific key ID (kid). + 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: The kid of the desired key + - description: JSON Web Key Set ID + explode: false in: path - name: kid + name: set required: true schema: type: string - - description: The set + style: simple + - description: JSON Web Key ID + explode: false in: path - name: set + name: kid required: true schema: type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/JSONWebKeySet' - description: JSONWebKeySet - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/jsonWebKeySet' + description: jsonWebKeySet + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Fetch a JSON Web Key + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get JSON Web Key tags: - - admin + - jwk 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. - - 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: updateJsonWebKey + 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 kid of the desired key + - description: The JSON Web Key Set ID + explode: false in: path - name: kid + name: set required: true schema: type: string - - description: The set + style: simple + - description: JSON Web Key ID + explode: false in: path - name: set + name: kid required: true schema: type: string + style: simple requestBody: content: application/json: schema: - $ref: '#/components/schemas/JSONWebKey' - required: false + $ref: '#/components/schemas/jsonWebKey' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/JSONWebKey' - description: JSONWebKey - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "403": + $ref: '#/components/schemas/jsonWebKey' + description: jsonWebKey + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Update a JSON Web Key - tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json - x-accepts: application/json - /metrics/prometheus: - get: - description: |- - ``` - metadata: - annotations: - prometheus.io/port: "4434" - prometheus.io/path: "/metrics/prometheus" - ``` - operationId: prometheus - responses: - "200": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - summary: |- - Get snapshot metrics from the service. If you're using k8s, you can then add annotations to - your deployment like so: - tags: - - metadata - x-accepts: application/json - /oauth2/auth: - get: - description: |- - This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. - OAuth2 is a very popular protocol and a library for your programming language will exists. - - To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - operationId: oauthAuth - responses: - "302": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: The OAuth 2.0 Authorize Endpoint + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Set JSON Web Key tags: - - public + - jwk + x-content-type: application/json x-accepts: application/json - /oauth2/auth/requests/consent: + /admin/oauth2/auth/requests/consent: get: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to - grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - - 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 Hydra if the subject accepted - or rejected the request. - operationId: getConsentRequest + 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: - - in: query + - 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/consentRequest' - description: consentRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/oAuth2ConsentRequest' + description: oAuth2ConsentRequest "410": content: application/json: schema: - $ref: '#/components/schemas/requestWasHandledResponse' - description: requestWasHandledResponse - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Get Consent Request Information + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get OAuth 2.0 Consent Request tags: - - admin + - oAuth2 x-accepts: application/json - /oauth2/auth/requests/consent/accept: + /admin/oauth2/auth/requests/consent/accept: put: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to - grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - - 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 Hydra if the subject accepted - or rejected the request. - - This endpoint tells ORY Hydra 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. - operationId: acceptConsentRequest + 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.\n\ + The 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: - - in: query + - 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/acceptConsentRequest' - required: false + $ref: '#/components/schemas/acceptOAuth2ConsentRequest' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/completedRequest' - description: completedRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Accept a Consent Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Accept OAuth 2.0 Consent Request tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - oAuth2 + x-content-type: application/json x-accepts: application/json - /oauth2/auth/requests/consent/reject: + /admin/oauth2/auth/requests/consent/reject: put: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to - grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). - - 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 Hydra if the subject accepted - or rejected the request. - - This endpoint tells ORY Hydra 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. - operationId: rejectConsentRequest + 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.\n\ + The 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\n\ + head over to the OAuth 2.0 documentation." + operationId: rejectOAuth2ConsentRequest parameters: - - in: query + - 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/rejectRequest' - required: false + $ref: '#/components/schemas/rejectOAuth2Request' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/completedRequest' - description: completedRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Reject a Consent Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Reject OAuth 2.0 Consent Request tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - oAuth2 + x-content-type: application/json x-accepts: application/json - /oauth2/auth/requests/login: + /admin/oauth2/auth/requests/login: get: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login - provider is an 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: getLoginRequest + 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: - - in: query + - 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/loginRequest' - description: loginRequest - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/oAuth2LoginRequest' + description: oAuth2LoginRequest "410": content: application/json: schema: - $ref: '#/components/schemas/requestWasHandledResponse' - description: requestWasHandledResponse - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Get a Login Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get OAuth 2.0 Login Request tags: - - admin + - oAuth2 x-accepts: application/json - /oauth2/auth/requests/login/accept: + /admin/oauth2/auth/requests/login/accept: put: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login - provider is an 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. - - This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as - the subject's ID and if ORY Hydra 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: acceptLoginRequest + 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\n\ + the 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: - - in: query + - 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/acceptLoginRequest' - required: false + $ref: '#/components/schemas/acceptOAuth2LoginRequest' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/completedRequest' - description: completedRequest - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Accept a Login Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Accept OAuth 2.0 Login Request tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - oAuth2 + x-content-type: application/json x-accepts: application/json - /oauth2/auth/requests/login/reject: + /admin/oauth2/auth/requests/login/reject: put: - description: |- - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider - (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login - provider is an 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. - - This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication - was be denied. - - The response contains a redirect URL which the login provider should redirect the user-agent to. - operationId: rejectLoginRequest + 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: - - in: query + - 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/rejectRequest' - required: false + $ref: '#/components/schemas/rejectOAuth2Request' + x-originalParamName: Body responses: "200": content: application/json: schema: - $ref: '#/components/schemas/completedRequest' - description: completedRequest - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Reject a Login Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Reject OAuth 2.0 Login Request tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - oAuth2 + x-content-type: application/json x-accepts: application/json - /oauth2/auth/requests/logout: + /admin/oauth2/auth/requests/logout: get: - description: Use this endpoint to fetch a logout request. - operationId: getLogoutRequest + description: Use this endpoint to fetch an Ory OAuth 2.0 logout request. + operationId: getOAuth2LogoutRequest parameters: - - in: query + - explode: true + in: query name: logout_challenge required: true schema: type: string + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/logoutRequest' - description: logoutRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError + $ref: '#/components/schemas/oAuth2LogoutRequest' + description: oAuth2LogoutRequest "410": content: application/json: schema: - $ref: '#/components/schemas/requestWasHandledResponse' - description: requestWasHandledResponse - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Get a Logout Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Get OAuth 2.0 Session Logout Request tags: - - admin + - oAuth2 x-accepts: application/json - /oauth2/auth/requests/logout/accept: + /admin/oauth2/auth/requests/logout/accept: put: - description: |- - When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. - No body is required. - - The response contains a redirect URL which the consent provider should redirect the user-agent to. - operationId: acceptLogoutRequest + 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: - - in: query + - 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/completedRequest' - description: completedRequest - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2RedirectTo' + description: oAuth2RedirectTo + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Accept a Logout Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Accept OAuth 2.0 Session Logout Request tags: - - admin + - oAuth2 x-accepts: application/json - /oauth2/auth/requests/logout/reject: + /admin/oauth2/auth/requests/logout/reject: put: - description: |- - When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. - No body is required. - - The response is empty as the logout provider has to chose what action to perform next. - operationId: rejectLogoutRequest + 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 + - explode: true + in: query name: logout_challenge required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/rejectRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/rejectRequest' - required: false + style: form responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Reject a Logout Request + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Reject OAuth 2.0 Session Logout Request tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - oAuth2 x-accepts: application/json - /oauth2/auth/sessions/consent: + /admin/oauth2/auth/sessions/consent: delete: description: |- - This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all - associated OAuth 2.0 Access Tokens. - operationId: revokeConsentSessions + 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: The subject (Subject) who's consent sessions should be deleted. + - 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 - - description: If set, deletes only those consent sessions by the Subject that - have been granted to the specified OAuth 2.0 Client ID + style: form + - 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." + explode: true in: query name: client + required: false schema: type: string - - description: If set to `?all=true`, deletes all consent sessions by the Subject - that have been granted. + 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": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Revoke OAuth 2.0 Consent Sessions of a Subject tags: - - admin + - oAuth2 x-accepts: application/json 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. - - - The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel="{page}"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. - Multiple links can be included in this header, and will be separated by a comma. - operationId: listSubjectConsentSessions + 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: - - in: query + - description: "Items per Page\n\nThis is the number of items per page to return.\n\ + 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\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)." + 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 responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/PreviousConsentSession' - type: array - description: A list of used consent requests. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/oAuth2ConsentSessions' + description: oAuth2ConsentSessions + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Lists All Consent Sessions of a Subject + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: List OAuth 2.0 Consent Sessions of a Subject tags: - - admin + - oAuth2 x-accepts: application/json - /oauth2/auth/sessions/login: + /admin/oauth2/auth/sessions/login: delete: - description: |- - This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject - has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect - Front- or Back-channel logout. - operationId: revokeAuthenticationSession + description: "This endpoint invalidates a subject's authentication session.\ + \ After revoking the authentication session, the subject\nhas to re-authenticate\ + \ at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens\ + \ and\ndoes not work with OpenID Connect Front- or Back-channel logout." + operationId: revokeOAuth2LoginSessions parameters: - - in: query + - description: |- + OAuth 2.0 Subject + + The subject to revoke authentication sessions for. + explode: true + in: query name: subject required: true schema: type: string + style: form responses: "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: |- - Invalidates All Login Sessions of a Certain User - Invalidates a Subject's Authentication Session + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Revokes All OAuth 2.0 Login Sessions of a Subject tags: - - admin + - oAuth2 x-accepts: application/json - /oauth2/flush: + /admin/oauth2/introspect: post: - description: |- - This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be - not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted - automatically when performing the refresh flow. - operationId: flushInactiveOAuth2Tokens + 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/json: + application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/flushInactiveOAuth2TokensRequest' - required: false + $ref: '#/components/schemas/introspectOAuth2Token_request' responses: - "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": + "200": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/introspectedOAuth2Token' + description: introspectedOAuth2Token + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Flush Expired OAuth2 Access Tokens + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Introspect OAuth2 Access and Refresh Tokens tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - oAuth2 + x-content-type: application/x-www-form-urlencoded x-accepts: application/json - /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 `accessTokenExtra` during the consent flow. - - For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - operationId: introspectOAuth2Token - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - 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. - type: string - 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 - required: - - token + /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: - "200": + "204": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/oAuth2TokenIntrospection' - description: oAuth2TokenIntrospection - "401": + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + tags: + - oAuth2 + x-accepts: application/json + /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/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuers' + description: trustedOAuth2JwtGrantIssuers + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Introspect OAuth2 Tokens + $ref: '#/components/schemas/genericError' + description: genericError + summary: List Trusted OAuth2 JWT Bearer Grant Type Issuers tags: - - admin - x-contentType: application/x-www-form-urlencoded + - oAuth2 x-accepts: application/json - /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 + 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\n\ + and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523)." + operationId: trustOAuth2JwtGrantIssuer requestBody: content: - application/x-www-form-urlencoded: + application/json: schema: - properties: - token: - type: string - required: - - token - required: true + $ref: '#/components/schemas/trustOAuth2JwtGrantIssuer' + x-originalParamName: Body responses: - "200": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": + "201": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuer' + description: trustedOAuth2JwtGrantIssuer + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - security: - - basic: [] - - oauth2: [] - summary: Revoke OAuth2 Tokens + $ref: '#/components/schemas/genericError' + description: genericError + summary: Trust OAuth2 JWT Bearer Grant Type Issuer tags: - - public - x-contentType: application/x-www-form-urlencoded + - oAuth2 + x-content-type: application/json x-accepts: application/json - /oauth2/sessions/logout: - get: - description: |- - This endpoint initiates and completes user logout at Ory Hydra 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 - operationId: disconnectUser + /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\n\ + Once 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 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple responses: - "302": - content: {} - 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-Backchannel Enabled Logout + "204": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + description: genericError + summary: Delete Trusted OAuth2 JWT Bearer Grant Type Issuer tags: - - public + - oAuth2 x-accepts: application/json - /oauth2/token: - post: + get: description: |- - The client makes a request to the token endpoint by sending the - following parameters using the "application/x-www-form-urlencoded" HTTP - request entity-body. - - > Do not implement a client for this endpoint yourself. Use a library. There are many libraries - > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ - > - > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - operationId: oauth2Token - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - grant_type: - type: string - code: - type: string - refresh_token: - type: string - redirect_uri: - type: string - client_id: - type: string - required: - - grant_type + 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/oauth2TokenResponse' - description: oauth2TokenResponse - "400": + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuer' + description: trustedOAuth2JwtGrantIssuer + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "401": + $ref: '#/components/schemas/genericError' + description: genericError + summary: Get Trusted OAuth2 JWT Bearer Grant Type Issuer + tags: + - oAuth2 + x-accepts: application/json + /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/jsonError' - description: jsonError + $ref: '#/components/schemas/healthStatus' + description: Ory Hydra is ready to accept connections. "500": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - security: - - basic: [] - - oauth2: [] - summary: The OAuth 2.0 Token Endpoint + $ref: '#/components/schemas/genericError' + description: genericError + summary: Check HTTP Server Status tags: - - public - x-contentType: application/x-www-form-urlencoded + - metadata x-accepts: application/json - /oauth2/tokens: - delete: - description: This endpoint deletes OAuth2 access tokens issued for a client - from the database - operationId: deleteOAuth2Token - parameters: - - in: query - name: client_id - required: true - schema: - type: string + /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: - "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "401": + "200": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/isReady_200_response' + description: Ory Hydra is ready to accept requests. + "503": content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - summary: Delete OAuth2 Access Tokens from a Client + $ref: '#/components/schemas/isReady_503_response' + description: Ory Kratos is not yet ready to accept requests. + summary: Check HTTP Server and Database Status tags: - - admin + - metadata x-accepts: application/json - /trust/grants/jwt-bearer/issuers: + /oauth2/auth: get: - description: Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - operationId: listTrustedJwtGrantIssuers - parameters: - - description: If optional "issuer" is supplied, only jwt-bearer grants with - this issuer will be returned. - in: query - name: issuer - schema: - type: string - - description: The maximum amount of policies returned, upper bound is 500 policies - in: query - name: limit - schema: - format: int64 - type: integer - - description: The offset from where to start looking. - in: query - name: offset - schema: - format: int64 - type: integer + 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: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/trustedJwtGrantIssuers' - description: trustedJwtGrantIssuers - "500": + "302": + description: "Empty responses are sent when, for example, resources are\ + \ deleted. The HTTP status code for empty responses is\ntypically 201." + default: content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: List Trusted OAuth2 JWT Bearer Grant Type Issuers + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + summary: OAuth 2.0 Authorize Endpoint tags: - - admin + - oAuth2 x-accepts: application/json + /oauth2/register: 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: trustJwtGrantIssuer + 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/trustJwtGrantIssuerBody' - required: false + $ref: '#/components/schemas/oAuth2Client' + description: Dynamic Client Registration Request Body + required: true + x-originalParamName: Body responses: "201": content: application/json: schema: - $ref: '#/components/schemas/trustedJwtGrantIssuer' - description: trustedJwtGrantIssuer + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client "400": content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - "409": + $ref: '#/components/schemas/errorOAuth2' + description: Bad Request Error Response + default: content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - "500": + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + summary: Register OAuth2 Client using OpenID Dynamic Client Registration + tags: + - oidc + x-content-type: application/json + x-accepts: application/json + /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\n\ + is 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. + 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\ntypically 201." + default: content: application/json: schema: $ref: '#/components/schemas/genericError' description: genericError - summary: Trust an OAuth2 JWT Bearer Grant Type Issuer + security: + - bearer: [] + summary: Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration + Management Protocol tags: - - admin - x-codegen-request-body-name: Body - x-contentType: application/json + - oidc x-accepts: application/json - /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: deleteTrustedJwtGrantIssuer + 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 desired grant + - description: The id of the OAuth 2.0 Client. + explode: false in: path name: id required: true schema: type: string + style: simple responses: - "204": - content: {} - description: |- - Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is - typically 201. - "404": + "200": content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - "500": + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client + default: content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + security: + - bearer: [] + summary: Get OAuth2 Client using OpenID Dynamic Client Registration tags: - - admin + - oidc 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 - created the trust relationship. - operationId: getTrustedJwtGrantIssuer + 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: The id of the desired grant + - 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/trustedJwtGrantIssuer' - description: trustedJwtGrantIssuer + $ref: '#/components/schemas/oAuth2Client' + description: oAuth2Client "404": content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - "500": + $ref: '#/components/schemas/errorOAuth2' + description: Not Found Error Response + default: content: application/json: schema: - $ref: '#/components/schemas/genericError' - description: genericError - summary: Get a Trusted OAuth2 JWT Bearer Grant Type Issuer + $ref: '#/components/schemas/errorOAuth2' + description: Default Error Response + security: + - bearer: [] + summary: Set OAuth2 Client using OpenID Dynamic Client Registration tags: - - admin + - oidc + x-content-type: application/json x-accepts: application/json - /userinfo: + /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: + $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\ntypically 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 + x-content-type: application/x-www-form-urlencoded + x-accepts: application/json + /oauth2/sessions/logout: get: description: |- - This endpoint returns the payload of the ID Token, including the idTokenExtra values, of - the provided OAuth 2.0 Access Token. + 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 - For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). + 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\ntypically 201." + summary: OpenID Connect Front- and Back-channel Enabled Logout + tags: + - oidc + x-accepts: application/json + /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/ - 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: userinfo + 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/userinfoResponse' - description: userinfoResponse - "401": + $ref: '#/components/schemas/oAuth2TokenExchange' + description: oAuth2TokenExchange + default: content: application/json: schema: - $ref: '#/components/schemas/jsonError' - description: jsonError - "500": + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 + security: + - basic: [] + - oauth2: [] + summary: The OAuth 2.0 Token Endpoint + tags: + - oAuth2 + x-content-type: application/x-www-form-urlencoded + x-accepts: application/json + /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)\n\ + 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/jsonError' - description: jsonError + $ref: '#/components/schemas/errorOAuth2' + description: errorOAuth2 security: - oauth2: [] summary: OpenID Connect Userinfo tags: - - public + - oidc x-accepts: application/json /version: get: - description: |- - This endpoint returns the service version typically notated using semantic versioning. - - If the service supports TLS Edge Termination, this endpoint does not require the - `X-Forwarded-Proto` header to be set. + 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: - $ref: '#/components/schemas/version' - description: version - summary: Get Service Version + $ref: '#/components/schemas/getVersion_200_response' + description: Returns the Ory Hydra version. + summary: Return Running Software Version. tags: - - admin + - metadata x-accepts: application/json 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: - ContainerWaitOKBodyError: - description: ContainerWaitOKBodyError container waiting error, if any - properties: - Message: - description: Details of an error - type: string - type: object JSONRawMessage: - title: JSONRawMessage represents a json.RawMessage that works well with JSON, - SQL, and Swagger. - type: object - JSONWebKey: - description: |- - It is important that this model object is named JSONWebKey for - "swagger generate spec" to generate only on definition of a - 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 + 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 + 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 + acceptOAuth2ConsentRequest: 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 + 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 - dp: - example: G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0 + 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: + 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\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 + 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\nto express that,\ + \ for example, a user authenticated using two factor authentication." type: string - dq: - example: s9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk + 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." + 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\n\ + configuration).\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 - e: - example: AQAB + 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 - k: - example: GawgguFyGrWKav7AX4VKUg + 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: |- - 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 + JSON Web Key ID + + The Key ID of the key to be created. type: string use: description: |- - Use ("public key use") identifies the intended use of + 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. 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 + on data. Valid values are "enc" and "sig". type: string required: - alg - kid - - kty - use type: object - JSONWebKeySet: - description: |- - It is important that this model object is named JSONWebKeySet for - "swagger generate spec" to generate only on definition of a - JSONWebKeySet. Since one with the same name is previously defined as - client.Client.JSONWebKeys and this one is last, this one will be - effectively written in the swagger spec. + errorOAuth2: + description: Error 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: |- - The value of the "keys" parameter is an array of 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 - JoseJSONWebKeySet: - type: object - PluginConfig: + error_debug: error_debug + status_code: 401 + error_description: error_description + error: error + error_hint: The redirect URL is not allowed. properties: - Args: - $ref: '#/components/schemas/PluginConfigArgs' - Description: - description: description - type: string - DockerVersion: - description: Docker Version used to create the plugin + error: + description: Error type: string - Documentation: - description: documentation + error_debug: + description: |- + Error Debug Information + + Only available in dev mode. type: string - Entrypoint: - description: entrypoint - items: - type: string - type: array - Env: - description: env - items: - $ref: '#/components/schemas/PluginEnv' - type: array - Interface: - $ref: '#/components/schemas/PluginConfigInterface' - IpcHost: - description: ipc host - type: boolean - Linux: - $ref: '#/components/schemas/PluginConfigLinux' - Mounts: - description: mounts - items: - $ref: '#/components/schemas/PluginMount' - type: array - Network: - $ref: '#/components/schemas/PluginConfigNetwork' - PidHost: - description: pid host - type: boolean - PropagatedMount: - description: propagated mount + error_description: + description: Error Description type: string - User: - $ref: '#/components/schemas/PluginConfigUser' - WorkDir: - description: work dir + error_hint: + description: |- + Error Hint + + Helps the user identify the error cause. + example: The redirect URL is not allowed. type: string - rootfs: - $ref: '#/components/schemas/PluginConfigRootfs' - required: - - Args - - Description - - Documentation - - Entrypoint - - Env - - Interface - - IpcHost - - Linux - - Mounts - - Network - - PidHost - - PropagatedMount - - WorkDir - title: PluginConfig The config of a plugin. + status_code: + description: HTTP Status Code + example: 401 + format: int64 + type: integer type: object - PluginConfigArgs: - description: PluginConfigArgs plugin config args + genericError: properties: - Description: - description: description + 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 - Name: - description: name + message: + description: |- + Error message + + The error's message. + example: The resource could not be found type: string - Settable: - description: settable - items: - type: string - type: array - Value: - description: value - items: - type: string - type: array - required: - - Description - - Name - - Settable - - Value - type: object - PluginConfigInterface: - description: PluginConfigInterface The interface between Docker and the plugin - properties: - ProtocolScheme: - description: Protocol to use for clients connecting to the plugin. + 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 - Socket: - description: socket + status: + description: The status description + example: Not Found type: string - Types: - description: types - items: - $ref: '#/components/schemas/PluginInterfaceType' - type: array required: - - Socket - - Types + - message type: object - PluginConfigLinux: - description: PluginConfigLinux plugin config linux + healthNotReadyStatus: properties: - AllowAllDevices: - description: allow all devices - type: boolean - Capabilities: - description: capabilities - items: + errors: + additionalProperties: type: string - type: array - Devices: - description: devices - items: - $ref: '#/components/schemas/PluginDevice' - type: array - required: - - AllowAllDevices - - Capabilities - - Devices - type: object - PluginConfigNetwork: - description: PluginConfigNetwork plugin config network - properties: - Type: - description: type - type: string - required: - - Type + description: Errors contains a list of errors that caused the not ready + status. + type: object type: object - PluginConfigRootfs: - description: PluginConfigRootfs plugin config rootfs + healthStatus: + example: + status: status properties: - diff_ids: - description: diff ids - items: - type: string - type: array - type: - description: type + status: + description: Status always contains "ok". type: string type: object - PluginConfigUser: - description: PluginConfigUser plugin config user - properties: - GID: - description: g ID - format: uint32 + introspectedOAuth2Token: + description: "Introspection contains an access token's session data as specified\ + \ by\n[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\nis currently active. The specifics of a token's \"active\" state\n\ + will 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 + requested 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 - UID: - description: UID - format: uint32 + 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\n\ + originally issued." + format: int64 type: integer - type: object - PluginDevice: - description: PluginDevice plugin device - properties: - Description: - description: description + iss: + description: IssuerURL is a string representing the issuer of this token type: string - Name: - description: name + 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. + It is the `sub` value of the ID Token that was issued. type: string - Path: - description: path + scope: + description: |- + Scope is a JSON string containing a space-separated list of + scopes associated with this token. type: string - Settable: - description: settable - items: - type: string - type: array - required: - - Description - - Name - - Path - - Settable - type: object - PluginEnv: - description: PluginEnv plugin env - properties: - Description: - description: description + 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 - Name: - description: name + token_type: + description: "TokenType is the introspected token's type, typically `Bearer`." type: string - Settable: - description: settable - items: - type: string - type: array - Value: - description: value + 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: - - Description - - Name - - Settable - - Value + - active type: object - PluginInterfaceType: - description: PluginInterfaceType plugin interface type + jsonPatch: + description: A JSONPatch document as defined by RFC 6902 properties: - Capability: - description: capability + 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 - Prefix: - description: prefix + op: + description: "The operation to be performed. One of \"add\", \"remove\"\ + , \"replace\", \"move\", \"copy\", or \"test\"." + example: replace type: string - Version: - description: version + 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: - - Capability - - Prefix - - Version + - op + - path type: object - PluginMount: - description: PluginMount plugin mount + 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: - Description: - description: description + 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\n\ + established by [JWA] or be a value that contains a Collision-\nResistant\ + \ Name." + example: RS256 type: string - Destination: - description: destination + crv: + example: P-256 type: string - Name: - description: name + 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 - Options: - description: options - items: - type: string - type: array - Settable: - description: settable + 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\n\ + keys 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\n\ + equivalent alternatives by the application using them.) The \"kid\"\n\ + value 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-\n\ + 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\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.\n\ + The PKIX certificate containing the key value MUST be the first\ncertificate." items: type: string type: array - Source: - description: source - type: string - Type: - description: type + "y": + example: x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0 type: string required: - - Description - - Destination - - Name - - Options - - Settable - - Source - - Type + - alg + - kid + - kty + - use type: object - PluginSettings: + 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: - Args: - description: args - items: - type: string - type: array - Devices: - description: devices + 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/PluginDevice' + $ref: '#/components/schemas/jsonWebKey' type: array - Env: - description: env + 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." + 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: token_endpoint_auth_method + 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 + 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 + 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 + 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: + allowed_cors_origins: items: type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - Mounts: - description: mounts + audience: items: - $ref: '#/components/schemas/PluginMount' + type: string + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - required: - - Args - - Devices - - Env - - Mounts - title: PluginSettings Settings that can be modified by users. - type: object - PreviousConsentSession: - description: |- - The response used to return used consent requests - same as HandledLoginRequest, just with consent_request exposed as json - 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: '{}' - 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 - 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 - registration_access_token: registration_access_token - client_id: client_id - token_endpoint_auth_method: token_endpoint_auth_method - userinfo_signed_response_alg: userinfo_signed_response_alg - updated_at: 2000-01-23T04:56:07.000+00:00 - scope: scope - 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 - audience: - - audience - - audience - post_logout_redirect_uris: - - post_logout_redirect_uris - - post_logout_redirect_uris - grant_types: - - grant_types - - grant_types - subject_type: subject_type - redirect_uris: - - redirect_uris - - redirect_uris - sector_identifier_uri: sector_identifier_uri - frontchannel_logout_session_required: true - frontchannel_logout_uri: frontchannel_logout_uri - client_secret_expires_at: 0 - 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 - session: - access_token: '{}' - id_token: '{}' - 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/consentRequest' - grant_access_token_audience: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. - type: array - grant_scope: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. - type: array - handled_at: - format: date-time - title: NullTime implements sql.NullTime functionality. + 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 - 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. + 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 - remember_for: + backchannel_logout_uri: 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/consentRequestSession' - type: object - StringSlicePipeDelimiter: - items: - type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL string. - type: array - Volume: - description: Volume volume - properties: - CreatedAt: - description: Date/Time the volume was created. + 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 - Driver: - description: Name of the volume driver used by the volume. + 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 - Labels: - additionalProperties: - type: string - description: User-defined key/value metadata. - type: object - Mountpoint: - description: Mount path of the volume on the host. + client_id: + description: |- + OAuth 2.0 Client ID + + The ID is autogenerated and immutable. type: string - Name: - description: Name of the volume. + 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 - Options: - additionalProperties: - type: string - description: The driver specific options used when creating the volume. - type: object - Scope: - description: The level at which the volume exists. Either `global` for cluster-wide, - or `local` for machine level. + 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 - Status: + client_secret_expires_at: description: |- - Low-level details about the volume, provided by the volume driver. - Details are returned as a map with key/value pairs: - `{"key":"value","key2":"value2"}`. + OAuth 2.0 Client Secret Expires At - The `Status` field is optional, and is omitted if the volume driver - does not support this feature. - properties: {} - type: object - UsageData: - $ref: '#/components/schemas/VolumeUsageData' - required: - - Driver - - Labels - - Mountpoint - - Name - - Options - - Scope - type: object - VolumeUsageData: - description: |- - VolumeUsageData Usage details about the volume. This information is used by the - `GET /system/df` endpoint, and omitted in other endpoints. - properties: - RefCount: - description: |- - The number of containers referencing this volume. This field - is set to `-1` if the reference-count is not available. - format: int64 - type: integer - Size: - description: |- - Amount of disk space used by the volume (in bytes). This information - is only available for volumes created with the `"local"` volume - driver. For volumes created with other volume drivers, this field - is set to `-1` ("not available") + The field is currently not supported and its value is always 0. format: int64 type: integer - required: - - RefCount - - Size - type: object - acceptConsentRequest: - properties: - grant_access_token_audience: + 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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array - grant_scope: + 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\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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - 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. + 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 - 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: + 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\n\ + can 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\n\ + JWK 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: + 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: |- - 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/consentRequestSession' - title: The request payload used to accept a consent request. - type: object - acceptLoginRequest: - properties: - acr: + 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: |- - 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. + OAuth 2.0 Client Owner + + Owner is a string identifying the owner of the OAuth 2.0 Client. type: string - amr: + 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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - 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. - type: object - force_subject_identifier: + 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\n\n\ + RegistrationAccessToken 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: + 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\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: |- - 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. + OpenID Connect Sector Identifier URI - 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). + 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 + subject_type: + description: |- + OpenID Connect Subject Type - 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). + 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: + description: "OAuth 2.0 Token Endpoint Authentication Method\n\nRequested\ + \ Client Authentication method for the Token Endpoint. The options are:\n\ + \n`client_secret_post`: (default) Send `client_id` and `client_secret`\ + \ as `application/x-www-form-urlencoded` in the HTTP body.\n`client_secret_basic`:\ + \ Send `client_id` and `client_secret` as `application/x-www-form-urlencoded`\ + \ encoded in the HTTP Authorization header.\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 - If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail. + Requested Client Authentication signing algorithm for the Token Endpoint. type: string - remember: + tos_uri: 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: + 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: |- - 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. + OAuth 2.0 Client Last Update Date + + UpdatedAt returns the timestamp of the last update. + format: date-time type: string - required: - - subject - title: HandledLoginRequest is the request payload used to accept a login request. + 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 - completedRequest: - example: - redirect_to: redirect_to + oAuth2ClientTokenLifespans: + description: Lifespans of different token types issued for this OAuth 2.0 Client. properties: - redirect_to: - description: RedirectURL is the URL which you should redirect the user to - once the authentication process is completed. - type: string - required: - - redirect_to - title: The response payload sent when accepting or rejecting a login or consent - request. + 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 - consentRequest: + oAuth2ConsentRequest: example: requested_access_token_audience: - requested_access_token_audience @@ -2768,7 +2826,8 @@ components: ui_locales: - ui_locales - ui_locales - id_token_hint_claims: '{}' + id_token_hint_claims: + key: "" acr_values: - acr_values - acr_values @@ -2776,25 +2835,30 @@ components: skip: true request_url: request_url acr: acr - context: '{}' + context: "" challenge: challenge client: - metadata: '{}' + metadata: "" token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg client_uri: client_uri - jwks: '{}' + 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: token_endpoint_auth_method 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: scope + scope: scope1 scope-2 scope.3 scope:4 request_uris: - request_uris - request_uris @@ -2807,6 +2871,7 @@ components: 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 @@ -2814,13 +2879,17 @@ components: - 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 + 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 jwks_uri: jwks_uri request_object_signing_alg: request_object_signing_alg tos_uri: tos_uri @@ -2836,15 +2905,15 @@ components: - 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. + 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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array challenge: description: |- @@ -2854,9 +2923,8 @@ components: client: $ref: '#/components/schemas/oAuth2Client' context: - title: JSONRawMessage represents a json.RawMessage that works well with - JSON, SQL, and Swagger. - type: object + 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 @@ -2870,185 +2938,267 @@ components: 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/openIDConnectContext' + $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. + 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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array requested_scope: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - 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. + 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 - requested by the OAuth 2.0 client. + 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 - consentRequestSession: + oAuth2ConsentRequestOpenIDConnectContext: 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! - properties: {} - type: object - 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! - properties: {} - type: object - title: Used to pass session data to a consent request. - type: object - flushInactiveOAuth2TokensRequest: + login_hint: login_hint + ui_locales: + - ui_locales + - ui_locales + id_token_hint_claims: + key: "" + acr_values: + - acr_values + - acr_values + display: display properties: - notAfter: - description: |- - NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history - of recently issued tokens for auditing. - format: date-time + 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 - type: object - genericError: - properties: - code: - description: The status code - example: 404 - format: int64 - type: integer - debug: + id_token_hint_claims: + additionalProperties: {} 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 - properties: {} + 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 - 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: + login_hint: 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 + 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 - required: - - message - type: object - healthNotReadyStatus: - properties: - errors: - additionalProperties: + 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 - description: Errors contains a list of errors that caused the not ready - status. - type: object + type: array + title: Contains optional information about the OpenID Connect request. type: object - healthStatus: + oAuth2ConsentSession: + description: A completed OAuth 2.0 Consent Session. example: - status: status - properties: - status: - description: Status always contains "ok". - type: string - type: object - jsonError: - description: Error responses are sent when an error (e.g. unauthorized, bad - request, ...) occurred. + 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: token_endpoint_auth_method + 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 + 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 + 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 + 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: "" + 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: - error: - description: Name is the error name. - example: The requested resource could not be found - type: string - error_debug: - description: Debug contains debug information. This is usually not available - and has to be enabled. - example: The database adapter was unable to find the element - type: string - error_description: - description: Description contains further information on the nature of the - error. - example: Object with ID 12345 does not exist + consent_request: + $ref: '#/components/schemas/oAuth2ConsentRequest' + 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 - status_code: - description: Code represents the error status code (404, 403, 401, ...). - example: 404 + 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\n\ + authorization will be remembered indefinitely." format: int64 type: integer - title: Generic Error Response - type: object - jsonWebKeySetGeneratorRequest: - properties: - alg: - description: The algorithm to be used for creating the key. Supports "RS256", - "ES256", "ES512", "HS512", and "HS256" - type: string - kid: - description: The kid of the key to be created - type: string - use: - description: |- - 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 + session: + $ref: '#/components/schemas/acceptOAuth2ConsentRequestSession' + title: OAuth 2.0 Consent Session type: object - loginRequest: + 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 @@ -3059,29 +3209,35 @@ components: ui_locales: - ui_locales - ui_locales - id_token_hint_claims: '{}' + id_token_hint_claims: + key: "" acr_values: - acr_values - acr_values display: display challenge: challenge client: - metadata: '{}' + metadata: "" token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg client_uri: client_uri - jwks: '{}' + 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: token_endpoint_auth_method 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: scope + scope: scope1 scope-2 scope.3 scope:4 request_uris: - request_uris - request_uris @@ -3094,6 +3250,7 @@ components: 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 @@ -3101,13 +3258,17 @@ components: - 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 + 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 jwks_uri: jwks_uri request_object_signing_alg: request_object_signing_alg tos_uri: tos_uri @@ -3132,24 +3293,25 @@ components: client: $ref: '#/components/schemas/oAuth2Client' oidc_context: - $ref: '#/components/schemas/openIDConnectContext' + $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. + 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: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array requested_scope: items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. + title: "StringSliceJSONFormat represents []string{} which is encoded to/from\ + \ JSON for SQL storage." type: array session_id: description: |- @@ -3159,17 +3321,18 @@ components: 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. + 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 - 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. + 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 @@ -3181,27 +3344,32 @@ components: - subject title: Contains information on an ongoing login request. type: object - logoutRequest: + oAuth2LogoutRequest: example: subject: subject challenge: challenge client: - metadata: '{}' + metadata: "" token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg client_uri: client_uri - jwks: '{}' + 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: token_endpoint_auth_method 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: scope + scope: scope1 scope-2 scope.3 scope:4 request_uris: - request_uris - request_uris @@ -3214,6 +3382,7 @@ components: 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 @@ -3221,13 +3390,17 @@ components: - 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 + 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 jwks_uri: jwks_uri request_object_signing_alg: request_object_signing_alg tos_uri: tos_uri @@ -3252,8 +3425,8 @@ components: 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. + 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 @@ -3264,479 +3437,509 @@ components: type: string title: Contains information about an ongoing logout request. type: object - nullTime: - format: date-time - title: NullTime implements sql.NullTime functionality. - type: string - oAuth2Client: + oAuth2RedirectTo: + description: "Contains a redirect URL used to complete a login, consent, or\ + \ logout request." example: - metadata: '{}' - token_endpoint_auth_signing_alg: token_endpoint_auth_signing_alg - client_uri: client_uri - 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 - registration_access_token: registration_access_token - client_id: client_id - token_endpoint_auth_method: token_endpoint_auth_method - userinfo_signed_response_alg: userinfo_signed_response_alg - updated_at: 2000-01-23T04:56:07.000+00:00 - scope: scope - 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 - audience: - - audience - - audience - post_logout_redirect_uris: - - post_logout_redirect_uris - - post_logout_redirect_uris - grant_types: - - grant_types - - grant_types - subject_type: subject_type - redirect_uris: - - redirect_uris - - redirect_uris - sector_identifier_uri: sector_identifier_uri - frontchannel_logout_session_required: true - frontchannel_logout_uri: frontchannel_logout_uri - client_secret_expires_at: 0 - 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 + redirect_to: redirect_to properties: - allowed_cors_origins: + 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: 1 + id_token: 6 + 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\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. + format: int64 + type: integer + 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 + format: int64 + type: integer + 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 + frontchannel_logout_session_supported: true + jwks_uri: "https://{slug}.projects.oryapis.com/.well-known/jwks.json" + 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\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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - audience: + 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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - backchannel_logout_session_required: - description: |- - 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: RP URL that will cause the RP to log itself out when sent a - Logout Token by the OP. - type: string - client_id: - description: ID is the id for this client. - type: string - client_name: - description: |- - Name is the human-readable string name of the client to be presented to the - end-user during authorization. - type: string - client_secret: + end_session_endpoint: description: |- - Secret is the client's secret. The secret will be included in the create request as cleartext, and then - never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users - that they need to write the secret down as it will not be made available again. + 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 - client_secret_expires_at: + 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\n\ + included 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: |- - SecretExpiresAt is an integer holding the time at which the client - secret will expire or 0 if it will not expire. The time is - represented as the number of seconds from 1970-01-01T00:00:00Z as - measured in UTC until the date/time of expiration. + OAuth 2.0 Supported Grant Types - This feature is currently not supported and it's value will always - be set to 0. - format: int64 - type: integer - client_uri: - description: |- - ClientURI is an 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: + JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - created_at: - description: CreatedAt returns the timestamp of the client's creation. - format: date-time - type: string - frontchannel_logout_session_required: + id_token_signed_response_alg: description: |- - 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: |- - 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: + OpenID Connect Default ID Token Signing Algorithms + + Algorithm used to sign OpenID Connect ID Tokens. items: type: string - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - jwks: - type: object - jwks_uri: + id_token_signing_alg_values_supported: description: |- - 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. + 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\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 - logo_uri: - description: LogoURI is an URL string that references a logo for the client. + 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\n\ + 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 - metadata: - title: JSONRawMessage represents a json.RawMessage that works well with - JSON, SQL, and Swagger. - type: object - owner: - description: Owner is a string identifying the owner of the OAuth 2.0 Client. + registration_endpoint: + description: OpenID Connect Dynamic Client Registration Endpoint URL + example: https://playground.ory.sh/ory-hydra/admin/client type: string - policy_uri: + 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: |- - 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: + 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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - redirect_uris: + 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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - registration_access_token: - description: RegistrationAccessToken can be used to update, get, or delete - the OAuth2 Client. - type: string - registration_client_uri: - description: RegistrationClientURI is the URL used to update, get, or delete - the OAuth2 Client. - type: string - request_object_signing_alg: + revocation_endpoint: description: |- - 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. + OAuth 2.0 Token Revocation URL + + URL of the authorization server's OAuth 2.0 revocation endpoint. type: string - request_uris: + 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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - response_types: + 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 - title: StringSlicePipeDelimiter de/encodes the string slice to/from a SQL - string. type: array - scope: - description: |- - 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. - pattern: ([a-zA-Z0-9\.\*]+\s?)+ - type: string - sector_identifier_uri: - description: |- - 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 - subject_type: - description: |- - SubjectType requested for responses to this Client. 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: - description: |- - Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, - client_secret_basic, private_key_jwt, and none. - type: string - token_endpoint_auth_signing_alg: - description: Requested Client Authentication signing algorithm for the Token - Endpoint. + token_endpoint: + description: OAuth 2.0 Token Endpoint URL + example: https://playground.ory.sh/ory-hydra/public/oauth2/token type: string - tos_uri: + 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: |- - TermsOfServiceURI is a URL string that points 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: UpdatedAt returns the timestamp of the last update. - format: date-time + OpenID Connect Userinfo URL + + URL of the OP's UserInfo Endpoint. type: string userinfo_signed_response_alg: description: |- - 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: Client represents an OAuth 2.0 Client. - type: object - oAuth2TokenIntrospection: - description: https://tools.ietf.org/html/rfc7662 - example: - ext: '{}' - 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. + OpenID Connect User Userinfo Signing Algorithm + + Algorithm used to sign OpenID Connect Userinfo Responses. items: type: string type: array - client_id: - description: |- - ID is aclient identifier for the OAuth 2.0 client that - requested this token. + 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: + - 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 - 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: - description: Extra is arbitrary data set by the session. - properties: {} - 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 + 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 - 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. + 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 - scope: - description: |- - Scope is a JSON string containing a space-separated list of - scopes associated with this token. + 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 - sub: - description: |- - Subject of the token, as defined in JWT [RFC7519]. - Usually a machine-readable identifier of the resource owner who - authorized this token. + 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 - token_type: - description: TokenType is the introspected token's type, typically `Bearer`. + 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 - token_use: - description: TokenUse is the introspected token's use, for example `access_token` - or `refresh_token`. + 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 - username: - description: |- - Username is a human-readable identifier for the resource owner who - authorized this token. + 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 - required: - - active - title: 'Introspection contains an access token''s session data as specified - by IETF RFC 7662, see:' - type: object - oauth2TokenResponse: - description: The Access Token Response - 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: + 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 - expires_in: - format: int64 - type: integer - id_token: + 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 - refresh_token: + 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 - scope: + 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 - token_type: + profile: + description: URL of the End-User's profile page. The contents of this Web + page SHOULD be about the End-User. type: string - type: object - openIDConnectContext: - example: - login_hint: login_hint - ui_locales: - - ui_locales - - ui_locales - id_token_hint_claims: '{}' - 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. + sub: + description: Subject - Identifier for the End-User at the IssuerURL. type: string - id_token_hint_claims: - 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. - properties: {} - 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. + 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 - 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 - patchDocument: - description: A JSONPatch document as defined by RFC 6902 + pagination: properties: - from: - description: A JSON-pointer + 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 - op: - description: The operation to be performed - example: '"replace"' + 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 - path: - description: A JSON-pointer - example: '"/name"' + x-total-count: + description: "The total number of clients.\n\nin: header" type: string - value: - description: The value to be used within the operations - properties: {} - type: object - required: - - op - - path type: object - patchRequest: - description: A JSONPatch request - items: - $ref: '#/components/schemas/patchDocument' - type: array - rejectRequest: + rejectOAuth2Request: properties: error: - description: |- - The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). - - Defaults to `request_denied`. + 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: |- @@ -3758,22 +3961,93 @@ components: type: integer title: The request payload used to accept a login or consent request. type: object - requestWasHandledResponse: + tokenPagination: properties: - redirect_to: - description: Original request URL to which you should redirect the user - if request was already handled. + 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 - required: - - redirect_to - title: The response payload sent when there is an attempt to access already - handled request. type: object - trustJwtGrantIssuerBody: + 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.\n\ + next: The next page of results.\nprev: The previous page of results.\n\ + last: 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 + + 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". + description: "The \"expires_at\" indicates, when grant will expire, so we\ + \ will reject assertion from \"issuer\" targeting \"subject\"." format: date-time type: string issuer: @@ -3782,10 +4056,10 @@ components: example: https://jwt-idp.example.com type: string jwk: - $ref: '#/components/schemas/JSONWebKey' + $ref: '#/components/schemas/jsonWebKey' scope: - description: The "scope" contains list of scope values (as described in - Section 3.3 of OAuth 2.0 [RFC6749]) + description: "The \"scope\" contains list of scope values (as described\ + \ in Section 3.3 of OAuth 2.0 [RFC6749])" example: - openid - offline @@ -3802,25 +4076,9 @@ components: - issuer - jwk - scope - - subject type: object - trustedJsonWebKey: - 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 - trustedJwtGrantIssuer: + trustedOAuth2JwtGrantIssuer: + description: OAuth2 JWT Bearer Grant Type Issuer Trust Relationship example: public_key: set: https://jwt-idp.example.com @@ -3832,15 +4090,20 @@ components: - 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. + 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". + description: "The \"expires_at\" indicates, when grant will expire, so we\ + \ will reject assertion from \"issuer\" targeting \"subject\"." format: date-time type: string id: @@ -3852,10 +4115,10 @@ components: example: https://jwt-idp.example.com type: string public_key: - $ref: '#/components/schemas/trustedJsonWebKey' + $ref: '#/components/schemas/trustedOAuth2JwtGrantJsonWebKey' scope: - description: The "scope" contains list of scope values (as described in - Section 3.3 of OAuth 2.0 [RFC6749]) + description: "The \"scope\" contains list of scope values (as described\ + \ in Section 3.3 of OAuth 2.0 [RFC6749])" example: - openid - offline @@ -3868,376 +4131,142 @@ components: example: mike@example.com type: string type: object - trustedJwtGrantIssuers: + trustedOAuth2JwtGrantIssuers: + description: OAuth2 JWT Bearer Grant Type Issuer Trust Relationships items: - $ref: '#/components/schemas/trustedJwtGrantIssuer' + $ref: '#/components/schemas/trustedOAuth2JwtGrantIssuer' type: array - userinfoResponse: - description: The userinfo response + trustedOAuth2JwtGrantJsonWebKey: + description: OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key 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 + set: https://jwt-idp.example.com + kid: 123e4567-e89b-12d3-a456-426655440000 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. + kid: + description: The "key_id" is key unique identifier (same as kid header in + jws/jwt). + example: 123e4567-e89b-12d3-a456-426655440000 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. + 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 - 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: object + version: + properties: + version: + description: Version is the service's version. 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: object + introspectOAuth2Token_request: + 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 + isReady_200_response: + example: + status: status + properties: + status: + description: Always "ok". 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: object + isReady_503_response: + 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: + token: + required: + - token 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. + x-formData-name: token + required: + - token + type: object + oauth2TokenExchange_request: + properties: + client_id: type: string - profile: - description: URL of the End-User's profile page. The contents of this Web - page SHOULD be about the End-User. + x-formData-name: client_id + code: type: string - sub: - description: Subject - Identifier for the End-User at the IssuerURL. + x-formData-name: code + grant_type: + required: + - grant_type 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. + x-formData-name: grant_type + redirect_uri: 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. + x-formData-name: redirect_uri + refresh_token: type: string + x-formData-name: refresh_token + required: + - grant_type type: object - version: + getVersion_200_response: example: version: version properties: version: - description: Version is the service's version. + description: The version of Ory Hydra. type: string type: object - wellKnown: - description: |- - It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms - among others. + oAuth2ConsentSession_expires_at: 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/ - 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 - 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 - frontchannel_logout_session_supported: true - jwks_uri: https://playground.ory.sh/ory-hydra/public/.well-known/jwks.json - 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 + 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: - authorization_endpoint: - description: URL of the OP's OAuth 2.0 Authorization Endpoint. - example: https://playground.ory.sh/ory-hydra/public/oauth2/auth - type: string - backchannel_logout_session_supported: - description: |- - 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: Boolean value specifying whether the OP supports back-channel - logout, with true indicating support. - type: boolean - claims_parameter_supported: - description: Boolean value specifying whether the OP supports use of the - claims parameter, with true indicating support. - type: boolean - claims_supported: - description: |- - 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: |- - 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 - end_session_endpoint: - description: 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: |- - 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: Boolean value specifying whether the OP supports HTTP-based - logout, with true indicating support. - type: boolean - grant_types_supported: - description: JSON array containing a list of the OAuth 2.0 Grant Type values - that this OP supports. - items: - type: string - type: array - id_token_signing_alg_values_supported: - description: |- - 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: |- - 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: |- - 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://playground.ory.sh/ory-hydra/public/.well-known/jwks.json + access_token: + format: date-time type: string - registration_endpoint: - description: URL of the OP's Dynamic Client Registration Endpoint. - example: https://playground.ory.sh/ory-hydra/admin/client + authorize_code: + format: date-time type: string - request_object_signing_alg_values_supported: - description: |- - 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: Boolean value specifying whether the OP supports use of the - request parameter, with true indicating support. - type: boolean - request_uri_parameter_supported: - description: Boolean value specifying whether the OP supports use of the - request_uri parameter, with true indicating support. - type: boolean - require_request_uri_registration: - description: |- - 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: 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: |- - 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: URL of the authorization server's OAuth 2.0 revocation endpoint. + id_token: + format: date-time type: string - scopes_supported: - description: |- - SON 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: |- - 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: URL of the OP's OAuth 2.0 Token Endpoint - example: https://playground.ory.sh/ory-hydra/public/oauth2/token + par_context: + format: date-time type: string - token_endpoint_auth_methods_supported: - description: |- - 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: URL of the OP's UserInfo Endpoint. + refresh_token: + format: date-time type: string - userinfo_signing_alg_values_supported: - description: 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_signing_alg_values_supported - - issuer - - jwks_uri - - response_types_supported - - subject_types_supported - - token_endpoint - title: WellKnown represents important OpenID Connect discovery metadata type: object securitySchemes: basic: scheme: basic type: http + bearer: + scheme: bearer + type: http oauth2: flows: authorizationCode: @@ -4250,5 +4279,4 @@ components: type: oauth2 x-forwarded-proto: string x-request-id: string -x-original-swagger-version: "2.0" diff --git a/clients/hydra/java/build.gradle b/clients/hydra/java/build.gradle index 0b406538d68..03c58b4ec2e 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 = 'v1.11.0' +version = 'v2.0.1' buildscript { repositories { @@ -12,8 +12,8 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.3.0' } } @@ -106,18 +106,21 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.5.24' + implementation 'io.swagger:swagger-annotations:1.6.5' implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.9.1' - implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1' - implementation 'com.google.code.gson:gson:2.8.6' - implementation 'io.gsonfire:gson-fire:1.8.4' - implementation 'org.openapitools:jackson-databind-nullable:0.2.1' + implementation 'com.squareup.okhttp3:okhttp:4.9.3' + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3' + implementation 'com.google.code.gson:gson:2.9.0' + implementation 'io.gsonfire:gson-fire:1.8.5' + 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.3' implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'junit:junit:4.13.1' - testImplementation 'org.mockito:mockito-core:3.11.2' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testImplementation 'org.mockito:mockito-core:3.12.4' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2' } javadoc { @@ -150,3 +153,17 @@ spotless { importOrder() } } + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/clients/hydra/java/build.sbt b/clients/hydra/java/build.sbt index 16b55e8d273..537ea1209c6 100644 --- a/clients/hydra/java/build.sbt +++ b/clients/hydra/java/build.sbt @@ -2,25 +2,27 @@ lazy val root = (project in file(".")). settings( organization := "sh.ory.hydra", name := "hydra-client", - version := "v1.11.0", + version := "v2.0.1", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.24", - "com.squareup.okhttp3" % "okhttp" % "4.9.1", - "com.squareup.okhttp3" % "logging-interceptor" % "4.9.1", - "com.google.code.gson" % "gson" % "2.8.6", - "org.apache.commons" % "commons-lang3" % "3.10", - "org.openapitools" % "jackson-databind-nullable" % "0.2.2", + "io.swagger" % "swagger-annotations" % "1.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.9.3", + "com.squareup.okhttp3" % "logging-interceptor" % "4.9.3", + "com.google.code.gson" % "gson" % "2.9.0", + "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.3", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1", - "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.5" % "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", - "junit" % "junit" % "4.13.1" % "test", + "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/clients/hydra/java/docs/AcceptConsentRequest.md b/clients/hydra/java/docs/AcceptConsentRequest.md deleted file mode 100644 index 22c1818ce3c..00000000000 --- a/clients/hydra/java/docs/AcceptConsentRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# AcceptConsentRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**grantAccessTokenAudience** | **List<String>** | | [optional] -**grantScope** | **List<String>** | | [optional] -**handledAt** | **OffsetDateTime** | | [optional] -**remember** | **Boolean** | 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] -**rememberFor** | **Long** | 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** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] - - - diff --git a/clients/hydra/java/docs/AcceptLoginRequest.md b/clients/hydra/java/docs/AcceptLoginRequest.md deleted file mode 100644 index 9a671c4ea07..00000000000 --- a/clients/hydra/java/docs/AcceptLoginRequest.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# AcceptLoginRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**acr** | **String** | 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** | **List<String>** | | [optional] -**context** | **Object** | | [optional] -**forceSubjectIdentifier** | **String** | 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] -**remember** | **Boolean** | 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] -**rememberFor** | **Long** | 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] -**subject** | **String** | Subject is the user ID of the end-user that authenticated. | - - - diff --git a/clients/hydra/java/docs/AcceptOAuth2ConsentRequest.md b/clients/hydra/java/docs/AcceptOAuth2ConsentRequest.md new file mode 100644 index 00000000000..a73bc1094b4 --- /dev/null +++ b/clients/hydra/java/docs/AcceptOAuth2ConsentRequest.md @@ -0,0 +1,18 @@ + + +# AcceptOAuth2ConsentRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**grantAccessTokenAudience** | **List<String>** | | [optional] | +|**grantScope** | **List<String>** | | [optional] | +|**handledAt** | **OffsetDateTime** | | [optional] | +|**remember** | **Boolean** | 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] | +|**rememberFor** | **Long** | 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] | + + + diff --git a/clients/hydra/java/docs/AcceptOAuth2ConsentRequestSession.md b/clients/hydra/java/docs/AcceptOAuth2ConsentRequestSession.md new file mode 100644 index 00000000000..5fade5f7c9a --- /dev/null +++ b/clients/hydra/java/docs/AcceptOAuth2ConsentRequestSession.md @@ -0,0 +1,14 @@ + + +# AcceptOAuth2ConsentRequestSession + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accessToken** | **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] | +|**idToken** | **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] | + + + diff --git a/clients/hydra/java/docs/AcceptOAuth2LoginRequest.md b/clients/hydra/java/docs/AcceptOAuth2LoginRequest.md new file mode 100644 index 00000000000..8b77565a6a6 --- /dev/null +++ b/clients/hydra/java/docs/AcceptOAuth2LoginRequest.md @@ -0,0 +1,19 @@ + + +# AcceptOAuth2LoginRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acr** | **String** | 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** | **List<String>** | | [optional] | +|**context** | **Object** | | [optional] | +|**forceSubjectIdentifier** | **String** | 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] | +|**remember** | **Boolean** | 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] | +|**rememberFor** | **Long** | 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] | +|**subject** | **String** | Subject is the user ID of the end-user that authenticated. | | + + + diff --git a/clients/hydra/java/docs/AdminApi.md b/clients/hydra/java/docs/AdminApi.md deleted file mode 100644 index 6aa9a8fe5cd..00000000000 --- a/clients/hydra/java/docs/AdminApi.md +++ /dev/null @@ -1,2248 +0,0 @@ -# AdminApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**acceptConsentRequest**](AdminApi.md#acceptConsentRequest) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -[**acceptLoginRequest**](AdminApi.md#acceptLoginRequest) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -[**acceptLogoutRequest**](AdminApi.md#acceptLogoutRequest) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -[**createJsonWebKeySet**](AdminApi.md#createJsonWebKeySet) | **POST** /keys/{set} | Generate a New JSON Web Key -[**createOAuth2Client**](AdminApi.md#createOAuth2Client) | **POST** /clients | Create an OAuth 2.0 Client -[**deleteJsonWebKey**](AdminApi.md#deleteJsonWebKey) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -[**deleteJsonWebKeySet**](AdminApi.md#deleteJsonWebKeySet) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -[**deleteOAuth2Client**](AdminApi.md#deleteOAuth2Client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -[**deleteOAuth2Token**](AdminApi.md#deleteOAuth2Token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -[**deleteTrustedJwtGrantIssuer**](AdminApi.md#deleteTrustedJwtGrantIssuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**flushInactiveOAuth2Tokens**](AdminApi.md#flushInactiveOAuth2Tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -[**getConsentRequest**](AdminApi.md#getConsentRequest) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -[**getJsonWebKey**](AdminApi.md#getJsonWebKey) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -[**getJsonWebKeySet**](AdminApi.md#getJsonWebKeySet) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -[**getLoginRequest**](AdminApi.md#getLoginRequest) | **GET** /oauth2/auth/requests/login | Get a Login Request -[**getLogoutRequest**](AdminApi.md#getLogoutRequest) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -[**getOAuth2Client**](AdminApi.md#getOAuth2Client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -[**getTrustedJwtGrantIssuer**](AdminApi.md#getTrustedJwtGrantIssuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**getVersion**](AdminApi.md#getVersion) | **GET** /version | Get Service Version -[**introspectOAuth2Token**](AdminApi.md#introspectOAuth2Token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -[**isInstanceAlive**](AdminApi.md#isInstanceAlive) | **GET** /health/alive | Check Alive Status -[**listOAuth2Clients**](AdminApi.md#listOAuth2Clients) | **GET** /clients | List OAuth 2.0 Clients -[**listSubjectConsentSessions**](AdminApi.md#listSubjectConsentSessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -[**listTrustedJwtGrantIssuers**](AdminApi.md#listTrustedJwtGrantIssuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -[**patchOAuth2Client**](AdminApi.md#patchOAuth2Client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -[**rejectConsentRequest**](AdminApi.md#rejectConsentRequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -[**rejectLoginRequest**](AdminApi.md#rejectLoginRequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -[**rejectLogoutRequest**](AdminApi.md#rejectLogoutRequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -[**revokeAuthenticationSession**](AdminApi.md#revokeAuthenticationSession) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -[**revokeConsentSessions**](AdminApi.md#revokeConsentSessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -[**trustJwtGrantIssuer**](AdminApi.md#trustJwtGrantIssuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -[**updateJsonWebKey**](AdminApi.md#updateJsonWebKey) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -[**updateJsonWebKeySet**](AdminApi.md#updateJsonWebKeySet) | **PUT** /keys/{set} | Update a JSON Web Key Set -[**updateOAuth2Client**](AdminApi.md#updateOAuth2Client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client - - - -# **acceptConsentRequest** -> CompletedRequest acceptConsentRequest(consentChallenge, body) - -Accept a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String consentChallenge = "consentChallenge_example"; // String | - AcceptConsentRequest body = new AcceptConsentRequest(); // AcceptConsentRequest | - try { - CompletedRequest result = apiInstance.acceptConsentRequest(consentChallenge, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#acceptConsentRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **String**| | - **body** | [**AcceptConsentRequest**](AcceptConsentRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**404** | jsonError | - | -**500** | jsonError | - | - - -# **acceptLoginRequest** -> CompletedRequest acceptLoginRequest(loginChallenge, body) - -Accept a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String loginChallenge = "loginChallenge_example"; // String | - AcceptLoginRequest body = new AcceptLoginRequest(); // AcceptLoginRequest | - try { - CompletedRequest result = apiInstance.acceptLoginRequest(loginChallenge, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#acceptLoginRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **String**| | - **body** | [**AcceptLoginRequest**](AcceptLoginRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**400** | jsonError | - | -**401** | jsonError | - | -**404** | jsonError | - | -**500** | jsonError | - | - - -# **acceptLogoutRequest** -> CompletedRequest acceptLogoutRequest(logoutChallenge) - -Accept a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String logoutChallenge = "logoutChallenge_example"; // String | - try { - CompletedRequest result = apiInstance.acceptLogoutRequest(logoutChallenge); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#acceptLogoutRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **String**| | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**404** | jsonError | - | -**500** | jsonError | - | - - -# **createJsonWebKeySet** -> JSONWebKeySet createJsonWebKeySet(set, body) - -Generate a New 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String set = "set_example"; // String | The set - JsonWebKeySetGeneratorRequest body = new JsonWebKeySetGeneratorRequest(); // JsonWebKeySetGeneratorRequest | - try { - JSONWebKeySet result = apiInstance.createJsonWebKeySet(set, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#createJsonWebKeySet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **String**| The set | - **body** | [**JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md)| | [optional] - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | JSONWebKeySet | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - - -# **createOAuth2Client** -> OAuth2Client createOAuth2Client(body) - -Create an OAuth 2.0 Client - -Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - OAuth2Client body = new OAuth2Client(); // OAuth2Client | - try { - OAuth2Client result = apiInstance.createOAuth2Client(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#createOAuth2Client"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | oAuth2Client | - | -**0** | jsonError | - | - - -# **deleteJsonWebKey** -> deleteJsonWebKey(kid, set) - -Delete a 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String kid = "kid_example"; // String | The kid of the desired key - String set = "set_example"; // String | The set - try { - apiInstance.deleteJsonWebKey(kid, set); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#deleteJsonWebKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **String**| The kid of the desired key | - **set** | **String**| The set | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - - -# **deleteJsonWebKeySet** -> deleteJsonWebKeySet(set) - -Delete a 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String set = "set_example"; // String | The set - try { - apiInstance.deleteJsonWebKeySet(set); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#deleteJsonWebKeySet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **String**| The set | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - - -# **deleteOAuth2Client** -> deleteOAuth2Client(id) - -Deletes an 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String id = "id_example"; // String | The id of the OAuth 2.0 Client. - try { - apiInstance.deleteOAuth2Client(id); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#deleteOAuth2Client"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**0** | jsonError | - | - - -# **deleteOAuth2Token** -> deleteOAuth2Token(clientId) - -Delete OAuth2 Access Tokens from a Client - -This endpoint deletes OAuth2 access tokens issued for a client from the database - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String clientId = "clientId_example"; // String | - try { - apiInstance.deleteOAuth2Token(clientId); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#deleteOAuth2Token"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **clientId** | **String**| | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**500** | jsonError | - | - - -# **deleteTrustedJwtGrantIssuer** -> deleteTrustedJwtGrantIssuer(id) - -Delete a 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String id = "id_example"; // String | The id of the desired grant - try { - apiInstance.deleteTrustedJwtGrantIssuer(id); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#deleteTrustedJwtGrantIssuer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the desired grant | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**404** | genericError | - | -**500** | genericError | - | - - -# **flushInactiveOAuth2Tokens** -> flushInactiveOAuth2Tokens(body) - -Flush Expired OAuth2 Access Tokens - -This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - FlushInactiveOAuth2TokensRequest body = new FlushInactiveOAuth2TokensRequest(); // FlushInactiveOAuth2TokensRequest | - try { - apiInstance.flushInactiveOAuth2Tokens(body); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#flushInactiveOAuth2Tokens"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**500** | jsonError | - | - - -# **getConsentRequest** -> ConsentRequest getConsentRequest(consentChallenge) - -Get Consent Request Information - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String consentChallenge = "consentChallenge_example"; // String | - try { - ConsentRequest result = apiInstance.getConsentRequest(consentChallenge); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#getConsentRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **String**| | - -### Return type - -[**ConsentRequest**](ConsentRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | consentRequest | - | -**404** | jsonError | - | -**410** | requestWasHandledResponse | - | -**500** | jsonError | - | - - -# **getJsonWebKey** -> JSONWebKeySet getJsonWebKey(kid, set) - -Fetch a JSON Web Key - -This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String kid = "kid_example"; // String | The kid of the desired key - String set = "set_example"; // String | The set - try { - JSONWebKeySet result = apiInstance.getJsonWebKey(kid, set); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#getJsonWebKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **String**| The kid of the desired key | - **set** | **String**| The set | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKeySet | - | -**404** | jsonError | - | -**500** | jsonError | - | - - -# **getJsonWebKeySet** -> JSONWebKeySet getJsonWebKeySet(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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String set = "set_example"; // String | The set - try { - JSONWebKeySet result = apiInstance.getJsonWebKeySet(set); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#getJsonWebKeySet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **String**| The set | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKeySet | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - - -# **getLoginRequest** -> LoginRequest getLoginRequest(loginChallenge) - -Get a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String loginChallenge = "loginChallenge_example"; // String | - try { - LoginRequest result = apiInstance.getLoginRequest(loginChallenge); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#getLoginRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **String**| | - -### Return type - -[**LoginRequest**](LoginRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | loginRequest | - | -**400** | jsonError | - | -**404** | jsonError | - | -**410** | requestWasHandledResponse | - | -**500** | jsonError | - | - - -# **getLogoutRequest** -> LogoutRequest getLogoutRequest(logoutChallenge) - -Get a Logout Request - -Use this endpoint to fetch a logout request. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String logoutChallenge = "logoutChallenge_example"; // String | - try { - LogoutRequest result = apiInstance.getLogoutRequest(logoutChallenge); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#getLogoutRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **String**| | - -### Return type - -[**LogoutRequest**](LogoutRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | logoutRequest | - | -**404** | jsonError | - | -**410** | requestWasHandledResponse | - | -**500** | jsonError | - | - - -# **getOAuth2Client** -> OAuth2Client getOAuth2Client(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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String id = "id_example"; // String | The id of the OAuth 2.0 Client. - try { - OAuth2Client result = apiInstance.getOAuth2Client(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#getOAuth2Client"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - - -# **getTrustedJwtGrantIssuer** -> TrustedJwtGrantIssuer getTrustedJwtGrantIssuer(id) - -Get a 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String id = "id_example"; // String | The id of the desired grant - try { - TrustedJwtGrantIssuer result = apiInstance.getTrustedJwtGrantIssuer(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#getTrustedJwtGrantIssuer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the desired grant | - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | trustedJwtGrantIssuer | - | -**404** | genericError | - | -**500** | genericError | - | - - -# **getVersion** -> Version getVersion() - -Get Service Version - -This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - try { - Version result = apiInstance.getVersion(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#getVersion"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Version**](Version.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | version | - | - - -# **introspectOAuth2Token** -> OAuth2TokenIntrospection introspectOAuth2Token(token, scope) - -Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String 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. - String 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. - try { - OAuth2TokenIntrospection result = apiInstance.introspectOAuth2Token(token, scope); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#introspectOAuth2Token"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### 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] - -### Return type - -[**OAuth2TokenIntrospection**](OAuth2TokenIntrospection.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2TokenIntrospection | - | -**401** | jsonError | - | -**500** | jsonError | - | - - -# **isInstanceAlive** -> HealthStatus isInstanceAlive() - -Check Alive Status - -This endpoint returns a 200 status code when the HTTP server is up running. 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - try { - HealthStatus result = apiInstance.isInstanceAlive(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#isInstanceAlive"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | healthStatus | - | -**500** | jsonError | - | - - -# **listOAuth2Clients** -> List<OAuth2Client> listOAuth2Clients(limit, offset, clientName, 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - Long limit = 56L; // Long | The maximum amount of clients to returned, upper bound is 500 clients. - Long offset = 56L; // Long | The offset from where to start looking. - String clientName = "clientName_example"; // String | The name of the clients to filter by. - String owner = "owner_example"; // String | The owner of the clients to filter by. - try { - List result = apiInstance.listOAuth2Clients(limit, offset, clientName, owner); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#listOAuth2Clients"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **Long**| The maximum amount of clients to returned, upper bound is 500 clients. | [optional] - **offset** | **Long**| The offset from where to start looking. | [optional] - **clientName** | **String**| The name of the clients to filter by. | [optional] - **owner** | **String**| The owner of the clients to filter by. | [optional] - -### Return type - -[**List<OAuth2Client>**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A list of clients. | - | -**0** | jsonError | - | - - -# **listSubjectConsentSessions** -> List<PreviousConsentSession> listSubjectConsentSessions(subject) - -Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String subject = "subject_example"; // String | - try { - List result = apiInstance.listSubjectConsentSessions(subject); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#listSubjectConsentSessions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **String**| | - -### Return type - -[**List<PreviousConsentSession>**](PreviousConsentSession.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A list of used consent requests. | - | -**400** | jsonError | - | -**500** | jsonError | - | - - -# **listTrustedJwtGrantIssuers** -> List<TrustedJwtGrantIssuer> listTrustedJwtGrantIssuers(issuer, limit, offset) - -List Trusted OAuth2 JWT Bearer Grant Type Issuers - -Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String issuer = "issuer_example"; // String | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - Long limit = 56L; // Long | The maximum amount of policies returned, upper bound is 500 policies - Long offset = 56L; // Long | The offset from where to start looking. - try { - List result = apiInstance.listTrustedJwtGrantIssuers(issuer, limit, offset); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#listTrustedJwtGrantIssuers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **issuer** | **String**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] - **limit** | **Long**| The maximum amount of policies returned, upper bound is 500 policies | [optional] - **offset** | **Long**| The offset from where to start looking. | [optional] - -### Return type - -[**List<TrustedJwtGrantIssuer>**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | trustedJwtGrantIssuers | - | -**500** | genericError | - | - - -# **patchOAuth2Client** -> OAuth2Client patchOAuth2Client(id, body) - -Patch an OAuth 2.0 Client - -Patch an existing OAuth 2.0 Client. 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String id = "id_example"; // String | The id of the OAuth 2.0 Client. - List body = Arrays.asList(); // List | - try { - OAuth2Client result = apiInstance.patchOAuth2Client(id, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#patchOAuth2Client"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - **body** | [**List<PatchDocument>**](PatchDocument.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - - -# **rejectConsentRequest** -> CompletedRequest rejectConsentRequest(consentChallenge, body) - -Reject a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String consentChallenge = "consentChallenge_example"; // String | - RejectRequest body = new RejectRequest(); // RejectRequest | - try { - CompletedRequest result = apiInstance.rejectConsentRequest(consentChallenge, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#rejectConsentRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **String**| | - **body** | [**RejectRequest**](RejectRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**404** | jsonError | - | -**500** | jsonError | - | - - -# **rejectLoginRequest** -> CompletedRequest rejectLoginRequest(loginChallenge, body) - -Reject a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String loginChallenge = "loginChallenge_example"; // String | - RejectRequest body = new RejectRequest(); // RejectRequest | - try { - CompletedRequest result = apiInstance.rejectLoginRequest(loginChallenge, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#rejectLoginRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **String**| | - **body** | [**RejectRequest**](RejectRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**400** | jsonError | - | -**401** | jsonError | - | -**404** | jsonError | - | -**500** | jsonError | - | - - -# **rejectLogoutRequest** -> rejectLogoutRequest(logoutChallenge, body) - -Reject a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String logoutChallenge = "logoutChallenge_example"; // String | - RejectRequest body = new RejectRequest(); // RejectRequest | - try { - apiInstance.rejectLogoutRequest(logoutChallenge, body); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#rejectLogoutRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **String**| | - **body** | [**RejectRequest**](RejectRequest.md)| | [optional] - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**404** | jsonError | - | -**500** | jsonError | - | - - -# **revokeAuthenticationSession** -> revokeAuthenticationSession(subject) - -Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - -This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String subject = "subject_example"; // String | - try { - apiInstance.revokeAuthenticationSession(subject); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#revokeAuthenticationSession"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **String**| | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**400** | jsonError | - | -**500** | jsonError | - | - - -# **revokeConsentSessions** -> revokeConsentSessions(subject, client, all) - -Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - -This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String subject = "subject_example"; // String | The subject (Subject) who's consent sessions should be deleted. - String client = "client_example"; // String | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - Boolean all = true; // Boolean | If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. - try { - apiInstance.revokeConsentSessions(subject, client, all); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#revokeConsentSessions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **String**| The subject (Subject) who's consent sessions should be deleted. | - **client** | **String**| If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | [optional] - **all** | **Boolean**| If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. | [optional] - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**400** | jsonError | - | -**500** | jsonError | - | - - -# **trustJwtGrantIssuer** -> TrustedJwtGrantIssuer trustJwtGrantIssuer(body) - -Trust an 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). - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - TrustJwtGrantIssuerBody body = new TrustJwtGrantIssuerBody(); // TrustJwtGrantIssuerBody | - try { - TrustedJwtGrantIssuer result = apiInstance.trustJwtGrantIssuer(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#trustJwtGrantIssuer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**TrustJwtGrantIssuerBody**](TrustJwtGrantIssuerBody.md)| | [optional] - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | trustedJwtGrantIssuer | - | -**400** | genericError | - | -**409** | genericError | - | -**500** | genericError | - | - - -# **updateJsonWebKey** -> JSONWebKey updateJsonWebKey(kid, set, body) - -Update a 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String kid = "kid_example"; // String | The kid of the desired key - String set = "set_example"; // String | The set - JSONWebKey body = new JSONWebKey(); // JSONWebKey | - try { - JSONWebKey result = apiInstance.updateJsonWebKey(kid, set, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#updateJsonWebKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **String**| The kid of the desired key | - **set** | **String**| The set | - **body** | [**JSONWebKey**](JSONWebKey.md)| | [optional] - -### Return type - -[**JSONWebKey**](JSONWebKey.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKey | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - - -# **updateJsonWebKeySet** -> JSONWebKeySet updateJsonWebKeySet(set, body) - -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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String set = "set_example"; // String | The set - JSONWebKeySet body = new JSONWebKeySet(); // JSONWebKeySet | - try { - JSONWebKeySet result = apiInstance.updateJsonWebKeySet(set, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#updateJsonWebKeySet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **String**| The set | - **body** | [**JSONWebKeySet**](JSONWebKeySet.md)| | [optional] - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKeySet | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - - -# **updateOAuth2Client** -> OAuth2Client updateOAuth2Client(id, body) - -Update an OAuth 2.0 Client - -Update an existing OAuth 2.0 Client. 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.AdminApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - AdminApi apiInstance = new AdminApi(defaultClient); - String id = "id_example"; // String | The id of the OAuth 2.0 Client. - OAuth2Client body = new OAuth2Client(); // OAuth2Client | - try { - OAuth2Client result = apiInstance.updateOAuth2Client(id, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#updateOAuth2Client"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - diff --git a/clients/hydra/java/docs/CompletedRequest.md b/clients/hydra/java/docs/CompletedRequest.md deleted file mode 100644 index 8a5160e50f5..00000000000 --- a/clients/hydra/java/docs/CompletedRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# CompletedRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**redirectTo** | **String** | RedirectURL is the URL which you should redirect the user to once the authentication process is completed. | - - - diff --git a/clients/hydra/java/docs/ConsentRequest.md b/clients/hydra/java/docs/ConsentRequest.md deleted file mode 100644 index 918b8fd629a..00000000000 --- a/clients/hydra/java/docs/ConsentRequest.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# ConsentRequest - - -## Properties - -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** | [**OAuth2Client**](OAuth2Client.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] -**oidcContext** | [**OpenIDConnectContext**](OpenIDConnectContext.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. | [optional] -**requestedAccessTokenAudience** | **List<String>** | | [optional] -**requestedScope** | **List<String>** | | [optional] -**skip** | **Boolean** | 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** | **String** | 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] - - - diff --git a/clients/hydra/java/docs/ConsentRequestSession.md b/clients/hydra/java/docs/ConsentRequestSession.md deleted file mode 100644 index 880592966f3..00000000000 --- a/clients/hydra/java/docs/ConsentRequestSession.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ConsentRequestSession - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**accessToken** | **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] -**idToken** | **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] - - - diff --git a/clients/hydra/java/docs/ContainerWaitOKBodyError.md b/clients/hydra/java/docs/ContainerWaitOKBodyError.md deleted file mode 100644 index 2e6aa19cb9c..00000000000 --- a/clients/hydra/java/docs/ContainerWaitOKBodyError.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ContainerWaitOKBodyError - -ContainerWaitOKBodyError container waiting error, if any - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **String** | Details of an error | [optional] - - - diff --git a/clients/hydra/java/docs/CreateJsonWebKeySet.md b/clients/hydra/java/docs/CreateJsonWebKeySet.md new file mode 100644 index 00000000000..8195bc95c9d --- /dev/null +++ b/clients/hydra/java/docs/CreateJsonWebKeySet.md @@ -0,0 +1,16 @@ + + +# CreateJsonWebKeySet + +Create JSON Web Key Set Request Body + +## Properties + +| 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\". | | + + + diff --git a/clients/hydra/java/docs/ErrorOAuth2.md b/clients/hydra/java/docs/ErrorOAuth2.md new file mode 100644 index 00000000000..b0ca00725df --- /dev/null +++ b/clients/hydra/java/docs/ErrorOAuth2.md @@ -0,0 +1,18 @@ + + +# ErrorOAuth2 + +Error + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**error** | **String** | Error | [optional] | +|**errorDebug** | **String** | Error Debug Information Only available in dev mode. | [optional] | +|**errorDescription** | **String** | Error Description | [optional] | +|**errorHint** | **String** | Error Hint Helps the user identify the error cause. | [optional] | +|**statusCode** | **Long** | HTTP Status Code | [optional] | + + + diff --git a/clients/hydra/java/docs/FlushInactiveOAuth2TokensRequest.md b/clients/hydra/java/docs/FlushInactiveOAuth2TokensRequest.md deleted file mode 100644 index 5c2804c5c87..00000000000 --- a/clients/hydra/java/docs/FlushInactiveOAuth2TokensRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# FlushInactiveOAuth2TokensRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**notAfter** | **OffsetDateTime** | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. | [optional] - - - diff --git a/clients/hydra/java/docs/GenericError.md b/clients/hydra/java/docs/GenericError.md index 730b7fedf97..af720565b4c 100644 --- a/clients/hydra/java/docs/GenericError.md +++ b/clients/hydra/java/docs/GenericError.md @@ -5,16 +5,16 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **Long** | The status code | [optional] -**debug** | **String** | Debug information This field is often not exposed to protect against leaking sensitive information. | [optional] -**details** | **Object** | Further error details | [optional] -**id** | **String** | The error ID Useful when trying to identify various errors in application logic. | [optional] -**message** | **String** | Error message The error's message. | -**reason** | **String** | A human-readable reason for the error | [optional] -**request** | **String** | 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** | **String** | The status description | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Long** | The status code | [optional] | +|**debug** | **String** | Debug information This field is often not exposed to protect against leaking sensitive information. | [optional] | +|**details** | **Object** | Further error details | [optional] | +|**id** | **String** | The error ID Useful when trying to identify various errors in application logic. | [optional] | +|**message** | **String** | Error message The error's message. | | +|**reason** | **String** | A human-readable reason for the error | [optional] | +|**request** | **String** | 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** | **String** | The status description | [optional] | diff --git a/clients/hydra/java/docs/GetVersion200Response.md b/clients/hydra/java/docs/GetVersion200Response.md new file mode 100644 index 00000000000..7eebc98bfe6 --- /dev/null +++ b/clients/hydra/java/docs/GetVersion200Response.md @@ -0,0 +1,13 @@ + + +# GetVersion200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**version** | **String** | The version of Ory Hydra. | [optional] | + + + diff --git a/clients/hydra/java/docs/HealthNotReadyStatus.md b/clients/hydra/java/docs/HealthNotReadyStatus.md index 850f3f65b6a..ad712dc5487 100644 --- a/clients/hydra/java/docs/HealthNotReadyStatus.md +++ b/clients/hydra/java/docs/HealthNotReadyStatus.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**errors** | **Map<String, String>** | Errors contains a list of errors that caused the not ready status. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**errors** | **Map<String, String>** | Errors contains a list of errors that caused the not ready status. | [optional] | diff --git a/clients/hydra/java/docs/HealthStatus.md b/clients/hydra/java/docs/HealthStatus.md index 6bfabc6bfcc..cb9766196a4 100644 --- a/clients/hydra/java/docs/HealthStatus.md +++ b/clients/hydra/java/docs/HealthStatus.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **String** | Status always contains \"ok\". | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | Status always contains \"ok\". | [optional] | diff --git a/clients/hydra/java/docs/IntrospectedOAuth2Token.md b/clients/hydra/java/docs/IntrospectedOAuth2Token.md new file mode 100644 index 00000000000..ed29fb06309 --- /dev/null +++ b/clients/hydra/java/docs/IntrospectedOAuth2Token.md @@ -0,0 +1,27 @@ + + +# IntrospectedOAuth2Token + +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** | **Boolean** | 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** | **List<String>** | Audience contains a list of the token's intended audiences. | [optional] | +|**clientId** | **String** | ID is aclient identifier for the OAuth 2.0 client that requested this token. | [optional] | +|**exp** | **Long** | 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** | **Map<String, Object>** | Extra is arbitrary data set by the session. | [optional] | +|**iat** | **Long** | 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** | **String** | IssuerURL is a string representing the issuer of this token | [optional] | +|**nbf** | **Long** | 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] | +|**obfuscatedSubject** | **String** | 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] | +|**scope** | **String** | Scope is a JSON string containing a space-separated list of scopes associated with this token. | [optional] | +|**sub** | **String** | Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. | [optional] | +|**tokenType** | **String** | TokenType is the introspected token's type, typically `Bearer`. | [optional] | +|**tokenUse** | **String** | TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. | [optional] | +|**username** | **String** | Username is a human-readable identifier for the resource owner who authorized this token. | [optional] | + + + diff --git a/clients/hydra/java/docs/IsReady200Response.md b/clients/hydra/java/docs/IsReady200Response.md new file mode 100644 index 00000000000..309b1d3adc5 --- /dev/null +++ b/clients/hydra/java/docs/IsReady200Response.md @@ -0,0 +1,13 @@ + + +# IsReady200Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **String** | Always \"ok\". | [optional] | + + + diff --git a/clients/hydra/java/docs/IsReady503Response.md b/clients/hydra/java/docs/IsReady503Response.md new file mode 100644 index 00000000000..a1d62b85348 --- /dev/null +++ b/clients/hydra/java/docs/IsReady503Response.md @@ -0,0 +1,13 @@ + + +# IsReady503Response + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**errors** | **Map<String, String>** | Errors contains a list of errors that caused the not ready status. | [optional] | + + + diff --git a/clients/hydra/java/docs/JSONWebKey.md b/clients/hydra/java/docs/JSONWebKey.md deleted file mode 100644 index f2fef479dc1..00000000000 --- a/clients/hydra/java/docs/JSONWebKey.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# JSONWebKey - -It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alg** | **String** | 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** | **String** | | [optional] -**d** | **String** | | [optional] -**dp** | **String** | | [optional] -**dq** | **String** | | [optional] -**e** | **String** | | [optional] -**k** | **String** | | [optional] -**kid** | **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. | -**kty** | **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. | -**n** | **String** | | [optional] -**p** | **String** | | [optional] -**q** | **String** | | [optional] -**qi** | **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). | -**x** | **String** | | [optional] -**x5c** | **List<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. | [optional] -**y** | **String** | | [optional] - - - diff --git a/clients/hydra/java/docs/JSONWebKeySet.md b/clients/hydra/java/docs/JSONWebKeySet.md deleted file mode 100644 index f7a4aba6a63..00000000000 --- a/clients/hydra/java/docs/JSONWebKeySet.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# JSONWebKeySet - -It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**keys** | [**List<JSONWebKey>**](JSONWebKey.md) | The value of the \"keys\" parameter is an array of 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] - - - diff --git a/clients/hydra/java/docs/JsonError.md b/clients/hydra/java/docs/JsonError.md deleted file mode 100644 index 494288b74b2..00000000000 --- a/clients/hydra/java/docs/JsonError.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# JsonError - -Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **String** | Name is the error name. | [optional] -**errorDebug** | **String** | Debug contains debug information. This is usually not available and has to be enabled. | [optional] -**errorDescription** | **String** | Description contains further information on the nature of the error. | [optional] -**statusCode** | **Long** | Code represents the error status code (404, 403, 401, ...). | [optional] - - - diff --git a/clients/hydra/java/docs/JsonPatch.md b/clients/hydra/java/docs/JsonPatch.md new file mode 100644 index 00000000000..00e6ee692cc --- /dev/null +++ b/clients/hydra/java/docs/JsonPatch.md @@ -0,0 +1,17 @@ + + +# JsonPatch + +A JSONPatch document as defined by RFC 6902 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | 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** | **String** | The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". | | +|**path** | **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). | | +|**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] | + + + diff --git a/clients/hydra/java/docs/JsonWebKey.md b/clients/hydra/java/docs/JsonWebKey.md new file mode 100644 index 00000000000..3d0602780ea --- /dev/null +++ b/clients/hydra/java/docs/JsonWebKey.md @@ -0,0 +1,29 @@ + + +# JsonWebKey + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**alg** | **String** | 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** | **String** | | [optional] | +|**d** | **String** | | [optional] | +|**dp** | **String** | | [optional] | +|**dq** | **String** | | [optional] | +|**e** | **String** | | [optional] | +|**k** | **String** | | [optional] | +|**kid** | **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. | | +|**kty** | **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. | | +|**n** | **String** | | [optional] | +|**p** | **String** | | [optional] | +|**q** | **String** | | [optional] | +|**qi** | **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). | | +|**x** | **String** | | [optional] | +|**x5c** | **List<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. | [optional] | +|**y** | **String** | | [optional] | + + + diff --git a/clients/hydra/java/docs/JsonWebKeySet.md b/clients/hydra/java/docs/JsonWebKeySet.md new file mode 100644 index 00000000000..881a152ce3c --- /dev/null +++ b/clients/hydra/java/docs/JsonWebKeySet.md @@ -0,0 +1,14 @@ + + +# JsonWebKeySet + +JSON Web Key Set + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**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] | + + + diff --git a/clients/hydra/java/docs/JsonWebKeySetGeneratorRequest.md b/clients/hydra/java/docs/JsonWebKeySetGeneratorRequest.md deleted file mode 100644 index 0ff841d7290..00000000000 --- a/clients/hydra/java/docs/JsonWebKeySetGeneratorRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# JsonWebKeySetGeneratorRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alg** | **String** | The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" | -**kid** | **String** | The kid of the key to be created | -**use** | **String** | 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\". | - - - diff --git a/clients/hydra/java/docs/JwkApi.md b/clients/hydra/java/docs/JwkApi.md new file mode 100644 index 00000000000..ef6966ce50a --- /dev/null +++ b/clients/hydra/java/docs/JwkApi.md @@ -0,0 +1,466 @@ +# JwkApi + +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 | + + + +# **createJsonWebKeySet** +> JsonWebKeySet createJsonWebKeySet(set, createJsonWebKeySet) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.JwkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + JwkApi apiInstance = new JwkApi(defaultClient); + String set = "set_example"; // String | The JSON Web Key Set ID + CreateJsonWebKeySet createJsonWebKeySet = new CreateJsonWebKeySet(); // CreateJsonWebKeySet | + try { + JsonWebKeySet result = apiInstance.createJsonWebKeySet(set, createJsonWebKeySet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JwkApi#createJsonWebKeySet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **set** | **String**| The JSON Web Key Set ID | | +| **createJsonWebKeySet** | [**CreateJsonWebKeySet**](CreateJsonWebKeySet.md)| | | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + + +# **deleteJsonWebKey** +> deleteJsonWebKey(set, kid) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.JwkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + JwkApi apiInstance = new JwkApi(defaultClient); + String set = "set_example"; // String | The JSON Web Key Set + String kid = "kid_example"; // String | The JSON Web Key ID (kid) + try { + apiInstance.deleteJsonWebKey(set, kid); + } catch (ApiException e) { + System.err.println("Exception when calling JwkApi#deleteJsonWebKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **set** | **String**| The JSON Web Key Set | | +| **kid** | **String**| The JSON Web Key ID (kid) | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.JwkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + JwkApi apiInstance = new JwkApi(defaultClient); + String set = "set_example"; // String | The JSON Web Key Set + try { + apiInstance.deleteJsonWebKeySet(set); + } catch (ApiException e) { + System.err.println("Exception when calling JwkApi#deleteJsonWebKeySet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **set** | **String**| The JSON Web Key Set | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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). + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.JwkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + JwkApi apiInstance = new JwkApi(defaultClient); + String set = "set_example"; // String | JSON Web Key Set ID + String kid = "kid_example"; // String | JSON Web Key ID + try { + JsonWebKeySet result = apiInstance.getJsonWebKey(set, kid); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JwkApi#getJsonWebKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **set** | **String**| JSON Web Key Set ID | | +| **kid** | **String**| JSON Web Key ID | | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + + +# **getJsonWebKeySet** +> JsonWebKeySet getJsonWebKeySet(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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.JwkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + JwkApi apiInstance = new JwkApi(defaultClient); + String set = "set_example"; // String | JSON Web Key Set ID + try { + JsonWebKeySet result = apiInstance.getJsonWebKeySet(set); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JwkApi#getJsonWebKeySet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **set** | **String**| JSON Web Key Set ID | | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + + +# **setJsonWebKey** +> JsonWebKey setJsonWebKey(set, kid, 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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.JwkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + JwkApi apiInstance = new JwkApi(defaultClient); + String set = "set_example"; // String | The JSON Web Key Set ID + String kid = "kid_example"; // String | JSON Web Key ID + JsonWebKey jsonWebKey = new JsonWebKey(); // JsonWebKey | + try { + JsonWebKey result = apiInstance.setJsonWebKey(set, kid, jsonWebKey); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JwkApi#setJsonWebKey"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **set** | **String**| The JSON Web Key Set ID | | +| **kid** | **String**| JSON Web Key ID | | +| **jsonWebKey** | [**JsonWebKey**](JsonWebKey.md)| | [optional] | + +### Return type + +[**JsonWebKey**](JsonWebKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKey | - | +| **0** | errorOAuth2 | - | + + +# **setJsonWebKeySet** +> JsonWebKeySet setJsonWebKeySet(set, 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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.JwkApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + JwkApi apiInstance = new JwkApi(defaultClient); + String set = "set_example"; // String | The JSON Web Key Set ID + JsonWebKeySet jsonWebKeySet = new JsonWebKeySet(); // JsonWebKeySet | + try { + JsonWebKeySet result = apiInstance.setJsonWebKeySet(set, jsonWebKeySet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JwkApi#setJsonWebKeySet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **set** | **String**| The JSON Web Key Set ID | | +| **jsonWebKeySet** | [**JsonWebKeySet**](JsonWebKeySet.md)| | [optional] | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + diff --git a/clients/hydra/java/docs/LoginRequest.md b/clients/hydra/java/docs/LoginRequest.md deleted file mode 100644 index fb9fdecbc04..00000000000 --- a/clients/hydra/java/docs/LoginRequest.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# LoginRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**challenge** | **String** | ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. | -**client** | [**OAuth2Client**](OAuth2Client.md) | | -**oidcContext** | [**OpenIDConnectContext**](OpenIDConnectContext.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>** | | -**requestedScope** | **List<String>** | | -**sessionId** | **String** | 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** | **Boolean** | 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** | **String** | 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. | - - - diff --git a/clients/hydra/java/docs/LogoutRequest.md b/clients/hydra/java/docs/LogoutRequest.md deleted file mode 100644 index d38ec311967..00000000000 --- a/clients/hydra/java/docs/LogoutRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# LogoutRequest - - -## Properties - -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** | [**OAuth2Client**](OAuth2Client.md) | | [optional] -**requestUrl** | **String** | RequestURL is the original Logout URL requested. | [optional] -**rpInitiated** | **Boolean** | 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] -**subject** | **String** | Subject is the user for whom the logout was request. | [optional] - - - diff --git a/clients/hydra/java/docs/MetadataApi.md b/clients/hydra/java/docs/MetadataApi.md index 368a4dbaa50..810ae35e428 100644 --- a/clients/hydra/java/docs/MetadataApi.md +++ b/clients/hydra/java/docs/MetadataApi.md @@ -2,18 +2,20 @@ All URIs are relative to *http://localhost* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**prometheus**](MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +| 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 | - -# **prometheus** -> prometheus() + +# **getVersion** +> GetVersion200Response getVersion() -Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +Return Running Software Version. -``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` +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. ### Example ```java @@ -31,9 +33,10 @@ public class Example { MetadataApi apiInstance = new MetadataApi(defaultClient); try { - apiInstance.prometheus(); + GetVersion200Response result = apiInstance.getVersion(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MetadataApi#prometheus"); + System.err.println("Exception when calling MetadataApi#getVersion"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -48,7 +51,7 @@ This endpoint does not need any parameter. ### Return type -null (empty response body) +[**GetVersion200Response**](GetVersion200Response.md) ### Authorization @@ -57,10 +60,128 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +| **200** | Returns the Ory Hydra version. | - | + + +# **isAlive** +> HealthStatus 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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.MetadataApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + MetadataApi apiInstance = new MetadataApi(defaultClient); + try { + HealthStatus result = apiInstance.isAlive(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MetadataApi#isAlive"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HealthStatus**](HealthStatus.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ory Hydra is ready to accept connections. | - | +| **500** | genericError | - | + + +# **isReady** +> IsReady200Response 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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.MetadataApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + MetadataApi apiInstance = new MetadataApi(defaultClient); + try { + IsReady200Response result = apiInstance.isReady(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MetadataApi#isReady"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IsReady200Response**](IsReady200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Ory Hydra is ready to accept requests. | - | +| **503** | Ory Kratos is not yet ready to accept requests. | - | diff --git a/clients/hydra/java/docs/OAuth2Api.md b/clients/hydra/java/docs/OAuth2Api.md new file mode 100644 index 00000000000..34250885dcd --- /dev/null +++ b/clients/hydra/java/docs/OAuth2Api.md @@ -0,0 +1,1858 @@ +# 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 All OAuth 2.0 Login Sessions of a Subject | +| [**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** +> OAuth2RedirectTo acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String consentChallenge = "consentChallenge_example"; // String | OAuth 2.0 Consent Request Challenge + AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest = new AcceptOAuth2ConsentRequest(); // AcceptOAuth2ConsentRequest | + try { + OAuth2RedirectTo result = apiInstance.acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#acceptOAuth2ConsentRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **consentChallenge** | **String**| OAuth 2.0 Consent Request Challenge | | +| **acceptOAuth2ConsentRequest** | [**AcceptOAuth2ConsentRequest**](AcceptOAuth2ConsentRequest.md)| | [optional] | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + + +# **acceptOAuth2LoginRequest** +> OAuth2RedirectTo acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String loginChallenge = "loginChallenge_example"; // String | OAuth 2.0 Login Request Challenge + AcceptOAuth2LoginRequest acceptOAuth2LoginRequest = new AcceptOAuth2LoginRequest(); // AcceptOAuth2LoginRequest | + try { + OAuth2RedirectTo result = apiInstance.acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#acceptOAuth2LoginRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loginChallenge** | **String**| OAuth 2.0 Login Request Challenge | | +| **acceptOAuth2LoginRequest** | [**AcceptOAuth2LoginRequest**](AcceptOAuth2LoginRequest.md)| | [optional] | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + + +# **acceptOAuth2LogoutRequest** +> OAuth2RedirectTo acceptOAuth2LogoutRequest(logoutChallenge) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String logoutChallenge = "logoutChallenge_example"; // String | OAuth 2.0 Logout Request Challenge + try { + OAuth2RedirectTo result = apiInstance.acceptOAuth2LogoutRequest(logoutChallenge); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#acceptOAuth2LogoutRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **logoutChallenge** | **String**| OAuth 2.0 Logout Request Challenge | | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + + +# **createOAuth2Client** +> OAuth2Client createOAuth2Client(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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + OAuth2Client oauth2Client = new OAuth2Client(); // OAuth2Client | OAuth 2.0 Client Request Body + try { + OAuth2Client result = apiInstance.createOAuth2Client(oauth2Client); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#createOAuth2Client"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **oauth2Client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | oAuth2Client | - | +| **400** | Bad Request Error Response | - | +| **0** | Default Error Response | - | + + +# **deleteOAuth2Client** +> deleteOAuth2Client(id) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String id = "id_example"; // String | The id of the OAuth 2.0 Client. + try { + apiInstance.deleteOAuth2Client(id); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#deleteOAuth2Client"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The id of the OAuth 2.0 Client. | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String clientId = "clientId_example"; // String | OAuth 2.0 Client ID + try { + apiInstance.deleteOAuth2Token(clientId); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#deleteOAuth2Token"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **clientId** | **String**| OAuth 2.0 Client ID | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String id = "id_example"; // String | The id of the desired grant + try { + apiInstance.deleteTrustedOAuth2JwtGrantIssuer(id); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#deleteTrustedOAuth2JwtGrantIssuer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The id of the desired grant | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String id = "id_example"; // String | The id of the OAuth 2.0 Client. + try { + OAuth2Client result = apiInstance.getOAuth2Client(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#getOAuth2Client"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The id of the OAuth 2.0 Client. | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **0** | Default Error Response | - | + + +# **getOAuth2ConsentRequest** +> OAuth2ConsentRequest getOAuth2ConsentRequest(consentChallenge) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String consentChallenge = "consentChallenge_example"; // String | OAuth 2.0 Consent Request Challenge + try { + OAuth2ConsentRequest result = apiInstance.getOAuth2ConsentRequest(consentChallenge); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#getOAuth2ConsentRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **consentChallenge** | **String**| OAuth 2.0 Consent Request Challenge | | + +### Return type + +[**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2ConsentRequest | - | +| **410** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + + +# **getOAuth2LoginRequest** +> OAuth2LoginRequest getOAuth2LoginRequest(loginChallenge) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String loginChallenge = "loginChallenge_example"; // String | OAuth 2.0 Login Request Challenge + try { + OAuth2LoginRequest result = apiInstance.getOAuth2LoginRequest(loginChallenge); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#getOAuth2LoginRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loginChallenge** | **String**| OAuth 2.0 Login Request Challenge | | + +### Return type + +[**OAuth2LoginRequest**](OAuth2LoginRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2LoginRequest | - | +| **410** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + + +# **getOAuth2LogoutRequest** +> OAuth2LogoutRequest getOAuth2LogoutRequest(logoutChallenge) + +Get OAuth 2.0 Session Logout Request + +Use this endpoint to fetch an Ory OAuth 2.0 logout request. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String logoutChallenge = "logoutChallenge_example"; // String | + try { + OAuth2LogoutRequest result = apiInstance.getOAuth2LogoutRequest(logoutChallenge); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#getOAuth2LogoutRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **logoutChallenge** | **String**| | | + +### Return type + +[**OAuth2LogoutRequest**](OAuth2LogoutRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2LogoutRequest | - | +| **410** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + + +# **getTrustedOAuth2JwtGrantIssuer** +> TrustedOAuth2JwtGrantIssuer getTrustedOAuth2JwtGrantIssuer(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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String id = "id_example"; // String | The id of the desired grant + try { + TrustedOAuth2JwtGrantIssuer result = apiInstance.getTrustedOAuth2JwtGrantIssuer(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#getTrustedOAuth2JwtGrantIssuer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The id of the desired grant | | + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | trustedOAuth2JwtGrantIssuer | - | +| **0** | genericError | - | + + +# **introspectOAuth2Token** +> IntrospectedOAuth2Token introspectOAuth2Token(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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String 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. + String 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. + try { + IntrospectedOAuth2Token result = apiInstance.introspectOAuth2Token(token, scope); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#introspectOAuth2Token"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### 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] | + +### Return type + +[**IntrospectedOAuth2Token**](IntrospectedOAuth2Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | introspectedOAuth2Token | - | +| **0** | errorOAuth2 | - | + + +# **listOAuth2Clients** +> List<OAuth2Client> listOAuth2Clients(pageSize, pageToken, clientName, 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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + Long 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). + String 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). + String clientName = "clientName_example"; // String | The name of the clients to filter by. + String owner = "owner_example"; // String | The owner of the clients to filter by. + try { + List result = apiInstance.listOAuth2Clients(pageSize, pageToken, clientName, owner); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#listOAuth2Clients"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### 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] | + +### Return type + +[**List<OAuth2Client>**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Paginated OAuth2 Client List Response | - | +| **0** | Default Error Response | - | + + +# **listOAuth2ConsentSessions** +> List<OAuth2ConsentSession> listOAuth2ConsentSessions(subject, pageSize, pageToken) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String subject = "subject_example"; // String | The subject to list the consent sessions for. + Long 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). + String 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). + try { + List result = apiInstance.listOAuth2ConsentSessions(subject, pageSize, pageToken); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#listOAuth2ConsentSessions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### 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] | + +### Return type + +[**List<OAuth2ConsentSession>**](OAuth2ConsentSession.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2ConsentSessions | - | +| **0** | errorOAuth2 | - | + + +# **listTrustedOAuth2JwtGrantIssuers** +> List<TrustedOAuth2JwtGrantIssuer> listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer) + +List Trusted OAuth2 JWT Bearer Grant Type Issuers + +Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + Long maxItems = 56L; // Long | + Long defaultItems = 56L; // Long | + String issuer = "issuer_example"; // String | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + try { + List result = apiInstance.listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#listTrustedOAuth2JwtGrantIssuers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### 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] | + +### Return type + +[**List<TrustedOAuth2JwtGrantIssuer>**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | trustedOAuth2JwtGrantIssuers | - | +| **0** | genericError | - | + + +# **oAuth2Authorize** +> ErrorOAuth2 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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + try { + ErrorOAuth2 result = apiInstance.oAuth2Authorize(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#oAuth2Authorize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ErrorOAuth2**](ErrorOAuth2.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.auth.*; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: basic + HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic"); + basic.setUsername("YOUR USERNAME"); + basic.setPassword("YOUR PASSWORD"); + + // Configure OAuth2 access token for authorization: oauth2 + OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); + oauth2.setAccessToken("YOUR ACCESS TOKEN"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String grantType = "grantType_example"; // String | + String clientId = "clientId_example"; // String | + String code = "code_example"; // String | + String redirectUri = "redirectUri_example"; // String | + String refreshToken = "refreshToken_example"; // String | + try { + OAuth2TokenExchange result = apiInstance.oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#oauth2TokenExchange"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **grantType** | **String**| | | +| **clientId** | **String**| | [optional] | +| **code** | **String**| | [optional] | +| **redirectUri** | **String**| | [optional] | +| **refreshToken** | **String**| | [optional] | + +### Return type + +[**OAuth2TokenExchange**](OAuth2TokenExchange.md) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2TokenExchange | - | +| **0** | errorOAuth2 | - | + + +# **patchOAuth2Client** +> OAuth2Client patchOAuth2Client(id, jsonPatch) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String id = "id_example"; // String | The id of the OAuth 2.0 Client. + List jsonPatch = Arrays.asList(); // List | OAuth 2.0 Client JSON Patch Body + try { + OAuth2Client result = apiInstance.patchOAuth2Client(id, jsonPatch); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#patchOAuth2Client"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The id of the OAuth 2.0 Client. | | +| **jsonPatch** | [**List<JsonPatch>**](JsonPatch.md)| OAuth 2.0 Client JSON Patch Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **404** | Not Found Error Response | - | +| **0** | Default Error Response | - | + + +# **rejectOAuth2ConsentRequest** +> OAuth2RedirectTo rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String consentChallenge = "consentChallenge_example"; // String | OAuth 2.0 Consent Request Challenge + RejectOAuth2Request rejectOAuth2Request = new RejectOAuth2Request(); // RejectOAuth2Request | + try { + OAuth2RedirectTo result = apiInstance.rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#rejectOAuth2ConsentRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **consentChallenge** | **String**| OAuth 2.0 Consent Request Challenge | | +| **rejectOAuth2Request** | [**RejectOAuth2Request**](RejectOAuth2Request.md)| | [optional] | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + + +# **rejectOAuth2LoginRequest** +> OAuth2RedirectTo rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String loginChallenge = "loginChallenge_example"; // String | OAuth 2.0 Login Request Challenge + RejectOAuth2Request rejectOAuth2Request = new RejectOAuth2Request(); // RejectOAuth2Request | + try { + OAuth2RedirectTo result = apiInstance.rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#rejectOAuth2LoginRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loginChallenge** | **String**| OAuth 2.0 Login Request Challenge | | +| **rejectOAuth2Request** | [**RejectOAuth2Request**](RejectOAuth2Request.md)| | [optional] | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2RedirectTo | - | +| **0** | errorOAuth2 | - | + + +# **rejectOAuth2LogoutRequest** +> rejectOAuth2LogoutRequest(logoutChallenge) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String logoutChallenge = "logoutChallenge_example"; // String | + try { + apiInstance.rejectOAuth2LogoutRequest(logoutChallenge); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#rejectOAuth2LogoutRequest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **logoutChallenge** | **String**| | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String subject = "subject_example"; // String | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + String 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. + Boolean all = true; // Boolean | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + try { + apiInstance.revokeOAuth2ConsentSessions(subject, client, all); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#revokeOAuth2ConsentSessions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### 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** | **Boolean**| Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +Revokes All OAuth 2.0 Login Sessions of a Subject + +This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String subject = "subject_example"; // String | OAuth 2.0 Subject The subject to revoke authentication sessions for. + try { + apiInstance.revokeOAuth2LoginSessions(subject); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#revokeOAuth2LoginSessions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **subject** | **String**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.auth.*; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: basic + HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic"); + basic.setUsername("YOUR USERNAME"); + basic.setPassword("YOUR PASSWORD"); + + // Configure OAuth2 access token for authorization: oauth2 + OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); + oauth2.setAccessToken("YOUR ACCESS TOKEN"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String token = "token_example"; // String | + try { + apiInstance.revokeOAuth2Token(token); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#revokeOAuth2Token"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **token** | **String**| | | + +### Return type + +null (empty response body) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String id = "id_example"; // String | OAuth 2.0 Client ID + OAuth2Client oauth2Client = new OAuth2Client(); // OAuth2Client | OAuth 2.0 Client Request Body + try { + OAuth2Client result = apiInstance.setOAuth2Client(id, oauth2Client); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#setOAuth2Client"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| OAuth 2.0 Client ID | | +| **oauth2Client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **400** | Bad Request Error Response | - | +| **404** | Not Found Error Response | - | +| **0** | Default Error Response | - | + + +# **setOAuth2ClientLifespans** +> OAuth2Client setOAuth2ClientLifespans(id, oauth2ClientTokenLifespans) + +Set OAuth2 Client Token Lifespans + +Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + String id = "id_example"; // String | OAuth 2.0 Client ID + OAuth2ClientTokenLifespans oauth2ClientTokenLifespans = new OAuth2ClientTokenLifespans(); // OAuth2ClientTokenLifespans | + try { + OAuth2Client result = apiInstance.setOAuth2ClientLifespans(id, oauth2ClientTokenLifespans); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#setOAuth2ClientLifespans"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| OAuth 2.0 Client ID | | +| **oauth2ClientTokenLifespans** | [**OAuth2ClientTokenLifespans**](OAuth2ClientTokenLifespans.md)| | [optional] | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **0** | genericError | - | + + +# **trustOAuth2JwtGrantIssuer** +> TrustedOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer) + +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). + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OAuth2Api; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OAuth2Api apiInstance = new OAuth2Api(defaultClient); + TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer = new TrustOAuth2JwtGrantIssuer(); // TrustOAuth2JwtGrantIssuer | + try { + TrustedOAuth2JwtGrantIssuer result = apiInstance.trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OAuth2Api#trustOAuth2JwtGrantIssuer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **trustOAuth2JwtGrantIssuer** | [**TrustOAuth2JwtGrantIssuer**](TrustOAuth2JwtGrantIssuer.md)| | [optional] | + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | trustedOAuth2JwtGrantIssuer | - | +| **0** | genericError | - | + diff --git a/clients/hydra/java/docs/OAuth2Client.md b/clients/hydra/java/docs/OAuth2Client.md index 95fd91496cc..f6608cfd620 100644 --- a/clients/hydra/java/docs/OAuth2Client.md +++ b/clients/hydra/java/docs/OAuth2Client.md @@ -2,46 +2,57 @@ # 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. ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowedCorsOrigins** | **List<String>** | | [optional] -**audience** | **List<String>** | | [optional] -**backchannelLogoutSessionRequired** | **Boolean** | 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] -**backchannelLogoutUri** | **String** | RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. | [optional] -**clientId** | **String** | ID is the id for this client. | [optional] -**clientName** | **String** | Name is the human-readable string name of the client to be presented to the end-user during authorization. | [optional] -**clientSecret** | **String** | Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. | [optional] -**clientSecretExpiresAt** | **Long** | SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. | [optional] -**clientUri** | **String** | ClientURI is an 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** | **List<String>** | | [optional] -**createdAt** | **OffsetDateTime** | CreatedAt returns the timestamp of the client's creation. | [optional] -**frontchannelLogoutSessionRequired** | **Boolean** | 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] -**frontchannelLogoutUri** | **String** | 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] -**grantTypes** | **List<String>** | | [optional] -**jwks** | **Object** | | [optional] -**jwksUri** | **String** | 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] -**logoUri** | **String** | LogoURI is an URL string that references a logo for the client. | [optional] -**metadata** | **Object** | | [optional] -**owner** | **String** | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] -**policyUri** | **String** | 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] -**postLogoutRedirectUris** | **List<String>** | | [optional] -**redirectUris** | **List<String>** | | [optional] -**registrationAccessToken** | **String** | RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. | [optional] -**registrationClientUri** | **String** | RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] -**requestObjectSigningAlg** | **String** | 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] -**requestUris** | **List<String>** | | [optional] -**responseTypes** | **List<String>** | | [optional] -**scope** | **String** | 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] -**sectorIdentifierUri** | **String** | 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] -**subjectType** | **String** | SubjectType requested for responses to this Client. 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] -**tokenEndpointAuthMethod** | **String** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional] -**tokenEndpointAuthSigningAlg** | **String** | Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] -**tosUri** | **String** | TermsOfServiceURI is a URL string that points 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] -**updatedAt** | **OffsetDateTime** | UpdatedAt returns the timestamp of the last update. | [optional] -**userinfoSignedResponseAlg** | **String** | 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] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**allowedCorsOrigins** | **List<String>** | | [optional] | +|**audience** | **List<String>** | | [optional] | +|**authorizationCodeGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**authorizationCodeGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**authorizationCodeGrantRefreshTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**backchannelLogoutSessionRequired** | **Boolean** | 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] | +|**backchannelLogoutUri** | **String** | 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] | +|**clientCredentialsGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**clientId** | **String** | OAuth 2.0 Client ID The ID is autogenerated and immutable. | [optional] | +|**clientName** | **String** | OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. | [optional] | +|**clientSecret** | **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. | [optional] | +|**clientSecretExpiresAt** | **Long** | OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. | [optional] | +|**clientUri** | **String** | 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** | **List<String>** | | [optional] | +|**createdAt** | **OffsetDateTime** | OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. | [optional] | +|**frontchannelLogoutSessionRequired** | **Boolean** | 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] | +|**frontchannelLogoutUri** | **String** | 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] | +|**grantTypes** | **List<String>** | | [optional] | +|**implicitGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**implicitGrantIdTokenLifespan** | **String** | 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] | +|**jwksUri** | **String** | OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | [optional] | +|**jwtBearerGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**logoUri** | **String** | OAuth 2.0 Client Logo URI A URL string referencing the client's logo. | [optional] | +|**metadata** | **Object** | | [optional] | +|**owner** | **String** | OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] | +|**policyUri** | **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. | [optional] | +|**postLogoutRedirectUris** | **List<String>** | | [optional] | +|**redirectUris** | **List<String>** | | [optional] | +|**refreshTokenGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**refreshTokenGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**refreshTokenGrantRefreshTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**registrationAccessToken** | **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. | [optional] | +|**registrationClientUri** | **String** | OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] | +|**requestObjectSigningAlg** | **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. | [optional] | +|**requestUris** | **List<String>** | | [optional] | +|**responseTypes** | **List<String>** | | [optional] | +|**scope** | **String** | 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] | +|**sectorIdentifierUri** | **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. | [optional] | +|**subjectType** | **String** | 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] | +|**tokenEndpointAuthMethod** | **String** | OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] | +|**tokenEndpointAuthSigningAlg** | **String** | OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] | +|**tosUri** | **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. | [optional] | +|**updatedAt** | **OffsetDateTime** | OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. | [optional] | +|**userinfoSignedResponseAlg** | **String** | 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] | diff --git a/clients/hydra/java/docs/OAuth2ClientTokenLifespans.md b/clients/hydra/java/docs/OAuth2ClientTokenLifespans.md new file mode 100644 index 00000000000..7030005c077 --- /dev/null +++ b/clients/hydra/java/docs/OAuth2ClientTokenLifespans.md @@ -0,0 +1,23 @@ + + +# OAuth2ClientTokenLifespans + +Lifespans of different token types issued for this OAuth 2.0 Client. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorizationCodeGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**authorizationCodeGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**authorizationCodeGrantRefreshTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**clientCredentialsGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**implicitGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**implicitGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**jwtBearerGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**refreshTokenGrantAccessTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**refreshTokenGrantIdTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +|**refreshTokenGrantRefreshTokenLifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | + + + diff --git a/clients/hydra/java/docs/OAuth2ConsentRequest.md b/clients/hydra/java/docs/OAuth2ConsentRequest.md new file mode 100644 index 00000000000..0cb0adde37f --- /dev/null +++ b/clients/hydra/java/docs/OAuth2ConsentRequest.md @@ -0,0 +1,25 @@ + + +# OAuth2ConsentRequest + + +## Properties + +| 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** | [**OAuth2Client**](OAuth2Client.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] | +|**oidcContext** | [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.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. | [optional] | +|**requestedAccessTokenAudience** | **List<String>** | | [optional] | +|**requestedScope** | **List<String>** | | [optional] | +|**skip** | **Boolean** | 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** | **String** | 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] | + + + diff --git a/clients/hydra/java/docs/OAuth2ConsentRequestOpenIDConnectContext.md b/clients/hydra/java/docs/OAuth2ConsentRequestOpenIDConnectContext.md new file mode 100644 index 00000000000..a1f832a25fe --- /dev/null +++ b/clients/hydra/java/docs/OAuth2ConsentRequestOpenIDConnectContext.md @@ -0,0 +1,17 @@ + + +# OAuth2ConsentRequestOpenIDConnectContext + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**acrValues** | **List<String>** | 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** | **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] | +|**idTokenHintClaims** | **Map<String, 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] | +|**loginHint** | **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] | +|**uiLocales** | **List<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. | [optional] | + + + diff --git a/clients/hydra/java/docs/OAuth2ConsentSession.md b/clients/hydra/java/docs/OAuth2ConsentSession.md new file mode 100644 index 00000000000..56e5bf4261d --- /dev/null +++ b/clients/hydra/java/docs/OAuth2ConsentSession.md @@ -0,0 +1,21 @@ + + +# OAuth2ConsentSession + +A completed OAuth 2.0 Consent Session. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**consentRequest** | [**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) | | [optional] | +|**expiresAt** | [**OAuth2ConsentSessionExpiresAt**](OAuth2ConsentSessionExpiresAt.md) | | [optional] | +|**grantAccessTokenAudience** | **List<String>** | | [optional] | +|**grantScope** | **List<String>** | | [optional] | +|**handledAt** | **OffsetDateTime** | | [optional] | +|**remember** | **Boolean** | 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] | +|**rememberFor** | **Long** | 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] | + + + diff --git a/clients/hydra/java/docs/OAuth2ConsentSessionExpiresAt.md b/clients/hydra/java/docs/OAuth2ConsentSessionExpiresAt.md new file mode 100644 index 00000000000..15a84dfa58a --- /dev/null +++ b/clients/hydra/java/docs/OAuth2ConsentSessionExpiresAt.md @@ -0,0 +1,17 @@ + + +# OAuth2ConsentSessionExpiresAt + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accessToken** | **OffsetDateTime** | | [optional] | +|**authorizeCode** | **OffsetDateTime** | | [optional] | +|**idToken** | **OffsetDateTime** | | [optional] | +|**parContext** | **OffsetDateTime** | | [optional] | +|**refreshToken** | **OffsetDateTime** | | [optional] | + + + diff --git a/clients/hydra/java/docs/OAuth2LoginRequest.md b/clients/hydra/java/docs/OAuth2LoginRequest.md new file mode 100644 index 00000000000..54ccf2b689d --- /dev/null +++ b/clients/hydra/java/docs/OAuth2LoginRequest.md @@ -0,0 +1,21 @@ + + +# OAuth2LoginRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**challenge** | **String** | ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. | | +|**client** | [**OAuth2Client**](OAuth2Client.md) | | | +|**oidcContext** | [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.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>** | | | +|**requestedScope** | **List<String>** | | | +|**sessionId** | **String** | 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** | **Boolean** | 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** | **String** | 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. | | + + + diff --git a/clients/hydra/java/docs/OAuth2LogoutRequest.md b/clients/hydra/java/docs/OAuth2LogoutRequest.md new file mode 100644 index 00000000000..9a9439b241c --- /dev/null +++ b/clients/hydra/java/docs/OAuth2LogoutRequest.md @@ -0,0 +1,18 @@ + + +# OAuth2LogoutRequest + + +## Properties + +| 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** | [**OAuth2Client**](OAuth2Client.md) | | [optional] | +|**requestUrl** | **String** | RequestURL is the original Logout URL requested. | [optional] | +|**rpInitiated** | **Boolean** | 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] | +|**subject** | **String** | Subject is the user for whom the logout was request. | [optional] | + + + diff --git a/clients/hydra/java/docs/OAuth2RedirectTo.md b/clients/hydra/java/docs/OAuth2RedirectTo.md new file mode 100644 index 00000000000..62fa367b582 --- /dev/null +++ b/clients/hydra/java/docs/OAuth2RedirectTo.md @@ -0,0 +1,14 @@ + + +# OAuth2RedirectTo + +Contains a redirect URL used to complete a login, consent, or logout request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**redirectTo** | **String** | RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. | | + + + diff --git a/clients/hydra/java/docs/OAuth2TokenExchange.md b/clients/hydra/java/docs/OAuth2TokenExchange.md new file mode 100644 index 00000000000..8c0046ba87a --- /dev/null +++ b/clients/hydra/java/docs/OAuth2TokenExchange.md @@ -0,0 +1,19 @@ + + +# OAuth2TokenExchange + +OAuth2 Token Exchange Result + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accessToken** | **String** | The access token issued by the authorization server. | [optional] | +|**expiresIn** | **Long** | 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] | +|**idToken** | **Long** | To retrieve a refresh token request the id_token scope. | [optional] | +|**refreshToken** | **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. | [optional] | +|**scope** | **Long** | The scope of the access token | [optional] | +|**tokenType** | **String** | The type of the token issued | [optional] | + + + diff --git a/clients/hydra/java/docs/OAuth2TokenIntrospection.md b/clients/hydra/java/docs/OAuth2TokenIntrospection.md deleted file mode 100644 index 3a1ac5e43d7..00000000000 --- a/clients/hydra/java/docs/OAuth2TokenIntrospection.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# OAuth2TokenIntrospection - -https://tools.ietf.org/html/rfc7662 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**active** | **Boolean** | 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** | **List<String>** | Audience contains a list of the token's intended audiences. | [optional] -**clientId** | **String** | ID is aclient identifier for the OAuth 2.0 client that requested this token. | [optional] -**exp** | **Long** | 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** | **Object** | Extra is arbitrary data set by the session. | [optional] -**iat** | **Long** | 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** | **String** | IssuerURL is a string representing the issuer of this token | [optional] -**nbf** | **Long** | 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] -**obfuscatedSubject** | **String** | 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] -**scope** | **String** | Scope is a JSON string containing a space-separated list of scopes associated with this token. | [optional] -**sub** | **String** | Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. | [optional] -**tokenType** | **String** | TokenType is the introspected token's type, typically `Bearer`. | [optional] -**tokenUse** | **String** | TokenUse is the introspected token's use, for example `access_token` or `refresh_token`. | [optional] -**username** | **String** | Username is a human-readable identifier for the resource owner who authorized this token. | [optional] - - - diff --git a/clients/hydra/java/docs/Oauth2TokenResponse.md b/clients/hydra/java/docs/Oauth2TokenResponse.md deleted file mode 100644 index 08ae5ae2d7a..00000000000 --- a/clients/hydra/java/docs/Oauth2TokenResponse.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# Oauth2TokenResponse - -The Access Token Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**accessToken** | **String** | | [optional] -**expiresIn** | **Long** | | [optional] -**idToken** | **String** | | [optional] -**refreshToken** | **String** | | [optional] -**scope** | **String** | | [optional] -**tokenType** | **String** | | [optional] - - - diff --git a/clients/hydra/java/docs/OidcApi.md b/clients/hydra/java/docs/OidcApi.md new file mode 100644 index 00000000000..5a6f8550e57 --- /dev/null +++ b/clients/hydra/java/docs/OidcApi.md @@ -0,0 +1,465 @@ +# OidcApi + +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 | +| [**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** +> OAuth2Client createOidcDynamicClient(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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OidcApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OidcApi apiInstance = new OidcApi(defaultClient); + OAuth2Client oauth2Client = new OAuth2Client(); // OAuth2Client | Dynamic Client Registration Request Body + try { + OAuth2Client result = apiInstance.createOidcDynamicClient(oauth2Client); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OidcApi#createOidcDynamicClient"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **oauth2Client** | [**OAuth2Client**](OAuth2Client.md)| Dynamic Client Registration Request Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | oAuth2Client | - | +| **400** | Bad Request Error Response | - | +| **0** | Default Error Response | - | + + +# **deleteOidcDynamicClient** +> deleteOidcDynamicClient(id) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.auth.*; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OidcApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP bearer authorization: bearer + HttpBearerAuth bearer = (HttpBearerAuth) defaultClient.getAuthentication("bearer"); + bearer.setBearerToken("BEARER TOKEN"); + + OidcApi apiInstance = new OidcApi(defaultClient); + String id = "id_example"; // String | The id of the OAuth 2.0 Client. + try { + apiInstance.deleteOidcDynamicClient(id); + } catch (ApiException e) { + System.err.println("Exception when calling OidcApi#deleteOidcDynamicClient"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The id of the OAuth 2.0 Client. | | + +### Return type + +null (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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() + +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/ + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OidcApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OidcApi apiInstance = new OidcApi(defaultClient); + try { + OidcConfiguration result = apiInstance.discoverOidcConfiguration(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OidcApi#discoverOidcConfiguration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OidcConfiguration**](OidcConfiguration.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oidcConfiguration | - | +| **0** | errorOAuth2 | - | + + +# **getOidcDynamicClient** +> OAuth2Client getOidcDynamicClient(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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.auth.*; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OidcApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP bearer authorization: bearer + HttpBearerAuth bearer = (HttpBearerAuth) defaultClient.getAuthentication("bearer"); + bearer.setBearerToken("BEARER TOKEN"); + + OidcApi apiInstance = new OidcApi(defaultClient); + String id = "id_example"; // String | The id of the OAuth 2.0 Client. + try { + OAuth2Client result = apiInstance.getOidcDynamicClient(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OidcApi#getOidcDynamicClient"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The id of the OAuth 2.0 Client. | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **0** | Default Error Response | - | + + +# **getOidcUserInfo** +> OidcUserInfo 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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.auth.*; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OidcApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure OAuth2 access token for authorization: oauth2 + OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); + oauth2.setAccessToken("YOUR ACCESS TOKEN"); + + OidcApi apiInstance = new OidcApi(defaultClient); + try { + OidcUserInfo result = apiInstance.getOidcUserInfo(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OidcApi#getOidcUserInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OidcUserInfo**](OidcUserInfo.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oidcUserInfo | - | +| **0** | errorOAuth2 | - | + + +# **revokeOidcSession** +> 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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OidcApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + OidcApi apiInstance = new OidcApi(defaultClient); + try { + apiInstance.revokeOidcSession(); + } catch (ApiException e) { + System.err.println("Exception when calling OidcApi#revokeOidcSession"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **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) + +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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.auth.*; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.OidcApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP bearer authorization: bearer + HttpBearerAuth bearer = (HttpBearerAuth) defaultClient.getAuthentication("bearer"); + bearer.setBearerToken("BEARER TOKEN"); + + OidcApi apiInstance = new OidcApi(defaultClient); + String id = "id_example"; // String | OAuth 2.0 Client ID + OAuth2Client oauth2Client = new OAuth2Client(); // OAuth2Client | OAuth 2.0 Client Request Body + try { + OAuth2Client result = apiInstance.setOidcDynamicClient(id, oauth2Client); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OidcApi#setOidcDynamicClient"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| OAuth 2.0 Client ID | | +| **oauth2Client** | [**OAuth2Client**](OAuth2Client.md)| OAuth 2.0 Client Request Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | oAuth2Client | - | +| **404** | Not Found Error Response | - | +| **0** | Default Error Response | - | + diff --git a/clients/hydra/java/docs/OidcConfiguration.md b/clients/hydra/java/docs/OidcConfiguration.md new file mode 100644 index 00000000000..6f68b33acf8 --- /dev/null +++ b/clients/hydra/java/docs/OidcConfiguration.md @@ -0,0 +1,42 @@ + + +# OidcConfiguration + +Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**authorizationEndpoint** | **String** | OAuth 2.0 Authorization Endpoint URL | | +|**backchannelLogoutSessionSupported** | **Boolean** | 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] | +|**backchannelLogoutSupported** | **Boolean** | OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] | +|**claimsParameterSupported** | **Boolean** | OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] | +|**claimsSupported** | **List<String>** | 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] | +|**codeChallengeMethodsSupported** | **List<String>** | 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] | +|**endSessionEndpoint** | **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] | +|**frontchannelLogoutSessionSupported** | **Boolean** | 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] | +|**frontchannelLogoutSupported** | **Boolean** | OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] | +|**grantTypesSupported** | **List<String>** | OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] | +|**idTokenSignedResponseAlg** | **List<String>** | OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. | | +|**idTokenSigningAlgValuesSupported** | **List<String>** | 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** | **String** | 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. | | +|**jwksUri** | **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. | | +|**registrationEndpoint** | **String** | OpenID Connect Dynamic Client Registration Endpoint URL | [optional] | +|**requestObjectSigningAlgValuesSupported** | **List<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). | [optional] | +|**requestParameterSupported** | **Boolean** | OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] | +|**requestUriParameterSupported** | **Boolean** | OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] | +|**requireRequestUriRegistration** | **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. | [optional] | +|**responseModesSupported** | **List<String>** | OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] | +|**responseTypesSupported** | **List<String>** | 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. | | +|**revocationEndpoint** | **String** | OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] | +|**scopesSupported** | **List<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 | [optional] | +|**subjectTypesSupported** | **List<String>** | 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. | | +|**tokenEndpoint** | **String** | OAuth 2.0 Token Endpoint URL | | +|**tokenEndpointAuthMethodsSupported** | **List<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 | [optional] | +|**userinfoEndpoint** | **String** | OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. | [optional] | +|**userinfoSignedResponseAlg** | **List<String>** | OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. | | +|**userinfoSigningAlgValuesSupported** | **List<String>** | 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] | + + + diff --git a/clients/hydra/java/docs/OidcUserInfo.md b/clients/hydra/java/docs/OidcUserInfo.md new file mode 100644 index 00000000000..c2b8d70c8e7 --- /dev/null +++ b/clients/hydra/java/docs/OidcUserInfo.md @@ -0,0 +1,32 @@ + + +# OidcUserInfo + +OpenID Connect Userinfo + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**birthdate** | **String** | 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] | +|**email** | **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. | [optional] | +|**emailVerified** | **Boolean** | 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] | +|**familyName** | **String** | 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] | +|**gender** | **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. | [optional] | +|**givenName** | **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. | [optional] | +|**locale** | **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. | [optional] | +|**middleName** | **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. | [optional] | +|**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. | [optional] | +|**nickname** | **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. | [optional] | +|**phoneNumber** | **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. | [optional] | +|**phoneNumberVerified** | **Boolean** | 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] | +|**picture** | **String** | 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] | +|**preferredUsername** | **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. | [optional] | +|**profile** | **String** | URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. | [optional] | +|**sub** | **String** | Subject - Identifier for the End-User at the IssuerURL. | [optional] | +|**updatedAt** | **Long** | 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** | **String** | 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** | **String** | String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. | [optional] | + + + diff --git a/clients/hydra/java/docs/OpenIDConnectContext.md b/clients/hydra/java/docs/OpenIDConnectContext.md deleted file mode 100644 index a7d019083a6..00000000000 --- a/clients/hydra/java/docs/OpenIDConnectContext.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# OpenIDConnectContext - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**acrValues** | **List<String>** | 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** | **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] -**idTokenHintClaims** | **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] -**loginHint** | **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] -**uiLocales** | **List<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. | [optional] - - - diff --git a/clients/hydra/java/docs/Pagination.md b/clients/hydra/java/docs/Pagination.md new file mode 100644 index 00000000000..60aa01971d1 --- /dev/null +++ b/clients/hydra/java/docs/Pagination.md @@ -0,0 +1,14 @@ + + +# Pagination + + +## Properties + +| 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] | +|**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] | + + + diff --git a/clients/hydra/java/docs/PaginationHeaders.md b/clients/hydra/java/docs/PaginationHeaders.md new file mode 100644 index 00000000000..47a6248a577 --- /dev/null +++ b/clients/hydra/java/docs/PaginationHeaders.md @@ -0,0 +1,14 @@ + + +# PaginationHeaders + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**link** | **String** | 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] | +|**xTotalCount** | **String** | The total number of clients. in: header | [optional] | + + + diff --git a/clients/hydra/java/docs/PatchDocument.md b/clients/hydra/java/docs/PatchDocument.md deleted file mode 100644 index ccaaa5b0ccd..00000000000 --- a/clients/hydra/java/docs/PatchDocument.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# PatchDocument - -A JSONPatch document as defined by RFC 6902 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**from** | **String** | A JSON-pointer | [optional] -**op** | **String** | The operation to be performed | -**path** | **String** | A JSON-pointer | -**value** | **Object** | The value to be used within the operations | [optional] - - - diff --git a/clients/hydra/java/docs/PluginConfig.md b/clients/hydra/java/docs/PluginConfig.md deleted file mode 100644 index 0c83640f5df..00000000000 --- a/clients/hydra/java/docs/PluginConfig.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# PluginConfig - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | [**PluginConfigArgs**](PluginConfigArgs.md) | | -**description** | **String** | description | -**dockerVersion** | **String** | Docker Version used to create the plugin | [optional] -**documentation** | **String** | documentation | -**entrypoint** | **List<String>** | entrypoint | -**env** | [**List<PluginEnv>**](PluginEnv.md) | env | -**_interface** | [**PluginConfigInterface**](PluginConfigInterface.md) | | -**ipcHost** | **Boolean** | ipc host | -**linux** | [**PluginConfigLinux**](PluginConfigLinux.md) | | -**mounts** | [**List<PluginMount>**](PluginMount.md) | mounts | -**network** | [**PluginConfigNetwork**](PluginConfigNetwork.md) | | -**pidHost** | **Boolean** | pid host | -**propagatedMount** | **String** | propagated mount | -**user** | [**PluginConfigUser**](PluginConfigUser.md) | | [optional] -**workDir** | **String** | work dir | -**rootfs** | [**PluginConfigRootfs**](PluginConfigRootfs.md) | | [optional] - - - diff --git a/clients/hydra/java/docs/PluginConfigArgs.md b/clients/hydra/java/docs/PluginConfigArgs.md deleted file mode 100644 index db1902ff6bd..00000000000 --- a/clients/hydra/java/docs/PluginConfigArgs.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# PluginConfigArgs - -PluginConfigArgs plugin config args - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**name** | **String** | name | -**settable** | **List<String>** | settable | -**value** | **List<String>** | value | - - - diff --git a/clients/hydra/java/docs/PluginConfigInterface.md b/clients/hydra/java/docs/PluginConfigInterface.md deleted file mode 100644 index 0fd50b9cc94..00000000000 --- a/clients/hydra/java/docs/PluginConfigInterface.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# PluginConfigInterface - -PluginConfigInterface The interface between Docker and the plugin - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**protocolScheme** | **String** | Protocol to use for clients connecting to the plugin. | [optional] -**socket** | **String** | socket | -**types** | [**List<PluginInterfaceType>**](PluginInterfaceType.md) | types | - - - diff --git a/clients/hydra/java/docs/PluginConfigLinux.md b/clients/hydra/java/docs/PluginConfigLinux.md deleted file mode 100644 index f806f137864..00000000000 --- a/clients/hydra/java/docs/PluginConfigLinux.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# PluginConfigLinux - -PluginConfigLinux plugin config linux - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowAllDevices** | **Boolean** | allow all devices | -**capabilities** | **List<String>** | capabilities | -**devices** | [**List<PluginDevice>**](PluginDevice.md) | devices | - - - diff --git a/clients/hydra/java/docs/PluginConfigNetwork.md b/clients/hydra/java/docs/PluginConfigNetwork.md deleted file mode 100644 index 8c1c62b4f5a..00000000000 --- a/clients/hydra/java/docs/PluginConfigNetwork.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# PluginConfigNetwork - -PluginConfigNetwork plugin config network - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **String** | type | - - - diff --git a/clients/hydra/java/docs/PluginConfigRootfs.md b/clients/hydra/java/docs/PluginConfigRootfs.md deleted file mode 100644 index 6121e43905e..00000000000 --- a/clients/hydra/java/docs/PluginConfigRootfs.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PluginConfigRootfs - -PluginConfigRootfs plugin config rootfs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**diffIds** | **List<String>** | diff ids | [optional] -**type** | **String** | type | [optional] - - - diff --git a/clients/hydra/java/docs/PluginConfigUser.md b/clients/hydra/java/docs/PluginConfigUser.md deleted file mode 100644 index ff3c4b13848..00000000000 --- a/clients/hydra/java/docs/PluginConfigUser.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# PluginConfigUser - -PluginConfigUser plugin config user - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**GID** | **Integer** | g ID | [optional] -**UID** | **Integer** | UID | [optional] - - - diff --git a/clients/hydra/java/docs/PluginDevice.md b/clients/hydra/java/docs/PluginDevice.md deleted file mode 100644 index ba9c5ac3d8f..00000000000 --- a/clients/hydra/java/docs/PluginDevice.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# PluginDevice - -PluginDevice plugin device - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**name** | **String** | name | -**path** | **String** | path | -**settable** | **List<String>** | settable | - - - diff --git a/clients/hydra/java/docs/PluginEnv.md b/clients/hydra/java/docs/PluginEnv.md deleted file mode 100644 index 48d149e6575..00000000000 --- a/clients/hydra/java/docs/PluginEnv.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# PluginEnv - -PluginEnv plugin env - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**name** | **String** | name | -**settable** | **List<String>** | settable | -**value** | **String** | value | - - - diff --git a/clients/hydra/java/docs/PluginInterfaceType.md b/clients/hydra/java/docs/PluginInterfaceType.md deleted file mode 100644 index 7b0637bfdbe..00000000000 --- a/clients/hydra/java/docs/PluginInterfaceType.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# PluginInterfaceType - -PluginInterfaceType plugin interface type - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capability** | **String** | capability | -**prefix** | **String** | prefix | -**version** | **String** | version | - - - diff --git a/clients/hydra/java/docs/PluginMount.md b/clients/hydra/java/docs/PluginMount.md deleted file mode 100644 index 7284593169c..00000000000 --- a/clients/hydra/java/docs/PluginMount.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# PluginMount - -PluginMount plugin mount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**destination** | **String** | destination | -**name** | **String** | name | -**options** | **List<String>** | options | -**settable** | **List<String>** | settable | -**source** | **String** | source | -**type** | **String** | type | - - - diff --git a/clients/hydra/java/docs/PluginSettings.md b/clients/hydra/java/docs/PluginSettings.md deleted file mode 100644 index ea9ec3f1e45..00000000000 --- a/clients/hydra/java/docs/PluginSettings.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# PluginSettings - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | **List<String>** | args | -**devices** | [**List<PluginDevice>**](PluginDevice.md) | devices | -**env** | **List<String>** | env | -**mounts** | [**List<PluginMount>**](PluginMount.md) | mounts | - - - diff --git a/clients/hydra/java/docs/PreviousConsentSession.md b/clients/hydra/java/docs/PreviousConsentSession.md deleted file mode 100644 index b1f8a78e1e5..00000000000 --- a/clients/hydra/java/docs/PreviousConsentSession.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# PreviousConsentSession - -The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**consentRequest** | [**ConsentRequest**](ConsentRequest.md) | | [optional] -**grantAccessTokenAudience** | **List<String>** | | [optional] -**grantScope** | **List<String>** | | [optional] -**handledAt** | **OffsetDateTime** | | [optional] -**remember** | **Boolean** | 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] -**rememberFor** | **Long** | 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** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] - - - diff --git a/clients/hydra/java/docs/PublicApi.md b/clients/hydra/java/docs/PublicApi.md deleted file mode 100644 index fdf61593c3e..00000000000 --- a/clients/hydra/java/docs/PublicApi.md +++ /dev/null @@ -1,788 +0,0 @@ -# PublicApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disconnectUser**](PublicApi.md#disconnectUser) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -[**discoverOpenIDConfiguration**](PublicApi.md#discoverOpenIDConfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -[**dynamicClientRegistrationCreateOAuth2Client**](PublicApi.md#dynamicClientRegistrationCreateOAuth2Client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamicClientRegistrationDeleteOAuth2Client**](PublicApi.md#dynamicClientRegistrationDeleteOAuth2Client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamicClientRegistrationGetOAuth2Client**](PublicApi.md#dynamicClientRegistrationGetOAuth2Client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamicClientRegistrationUpdateOAuth2Client**](PublicApi.md#dynamicClientRegistrationUpdateOAuth2Client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**isInstanceReady**](PublicApi.md#isInstanceReady) | **GET** /health/ready | Check Readiness Status -[**oauth2Token**](PublicApi.md#oauth2Token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -[**oauthAuth**](PublicApi.md#oauthAuth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -[**revokeOAuth2Token**](PublicApi.md#revokeOAuth2Token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -[**userinfo**](PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -[**wellKnown**](PublicApi.md#wellKnown) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery - - - -# **disconnectUser** -> disconnectUser() - -OpenID Connect Front-Backchannel Enabled Logout - -This endpoint initiates and completes user logout at Ory Hydra 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 - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - PublicApi apiInstance = new PublicApi(defaultClient); - try { - apiInstance.disconnectUser(); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#disconnectUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | - - -# **discoverOpenIDConfiguration** -> WellKnown discoverOpenIDConfiguration() - -OpenID Connect Discovery - -The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - PublicApi apiInstance = new PublicApi(defaultClient); - try { - WellKnown result = apiInstance.discoverOpenIDConfiguration(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#discoverOpenIDConfiguration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**WellKnown**](WellKnown.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | wellKnown | - | -**401** | jsonError | - | -**500** | jsonError | - | - - -# **dynamicClientRegistrationCreateOAuth2Client** -> OAuth2Client dynamicClientRegistrationCreateOAuth2Client(body) - -Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - PublicApi apiInstance = new PublicApi(defaultClient); - OAuth2Client body = new OAuth2Client(); // OAuth2Client | - try { - OAuth2Client result = apiInstance.dynamicClientRegistrationCreateOAuth2Client(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#dynamicClientRegistrationCreateOAuth2Client"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | oAuth2Client | - | -**0** | jsonError | - | - - -# **dynamicClientRegistrationDeleteOAuth2Client** -> dynamicClientRegistrationDeleteOAuth2Client(id) - -Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - PublicApi apiInstance = new PublicApi(defaultClient); - String id = "id_example"; // String | The id of the OAuth 2.0 Client. - try { - apiInstance.dynamicClientRegistrationDeleteOAuth2Client(id); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#dynamicClientRegistrationDeleteOAuth2Client"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**0** | jsonError | - | - - -# **dynamicClientRegistrationGetOAuth2Client** -> OAuth2Client dynamicClientRegistrationGetOAuth2Client(id) - -Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - PublicApi apiInstance = new PublicApi(defaultClient); - String id = "id_example"; // String | The id of the OAuth 2.0 Client. - try { - OAuth2Client result = apiInstance.dynamicClientRegistrationGetOAuth2Client(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#dynamicClientRegistrationGetOAuth2Client"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - - -# **dynamicClientRegistrationUpdateOAuth2Client** -> OAuth2Client dynamicClientRegistrationUpdateOAuth2Client(id, body) - -Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - PublicApi apiInstance = new PublicApi(defaultClient); - String id = "id_example"; // String | The id of the OAuth 2.0 Client. - OAuth2Client body = new OAuth2Client(); // OAuth2Client | - try { - OAuth2Client result = apiInstance.dynamicClientRegistrationUpdateOAuth2Client(id, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#dynamicClientRegistrationUpdateOAuth2Client"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **String**| The id of the OAuth 2.0 Client. | - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - - -# **isInstanceReady** -> HealthStatus isInstanceReady() - -Check Readiness Status - -This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - PublicApi apiInstance = new PublicApi(defaultClient); - try { - HealthStatus result = apiInstance.isInstanceReady(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#isInstanceReady"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | healthStatus | - | -**503** | healthNotReadyStatus | - | - - -# **oauth2Token** -> Oauth2TokenResponse oauth2Token(grantType, code, refreshToken, redirectUri, clientId) - -The OAuth 2.0 Token Endpoint - -The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.auth.*; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure HTTP basic authorization: basic - HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic"); - basic.setUsername("YOUR USERNAME"); - basic.setPassword("YOUR PASSWORD"); - - // Configure OAuth2 access token for authorization: oauth2 - OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); - oauth2.setAccessToken("YOUR ACCESS TOKEN"); - - PublicApi apiInstance = new PublicApi(defaultClient); - String grantType = "grantType_example"; // String | - String code = "code_example"; // String | - String refreshToken = "refreshToken_example"; // String | - String redirectUri = "redirectUri_example"; // String | - String clientId = "clientId_example"; // String | - try { - Oauth2TokenResponse result = apiInstance.oauth2Token(grantType, code, refreshToken, redirectUri, clientId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#oauth2Token"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grantType** | **String**| | - **code** | **String**| | [optional] - **refreshToken** | **String**| | [optional] - **redirectUri** | **String**| | [optional] - **clientId** | **String**| | [optional] - -### Return type - -[**Oauth2TokenResponse**](Oauth2TokenResponse.md) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oauth2TokenResponse | - | -**400** | jsonError | - | -**401** | jsonError | - | -**500** | jsonError | - | - - -# **oauthAuth** -> oauthAuth() - -The OAuth 2.0 Authorize Endpoint - -This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - PublicApi apiInstance = new PublicApi(defaultClient); - try { - apiInstance.oauthAuth(); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#oauthAuth"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**500** | jsonError | - | - - -# **revokeOAuth2Token** -> revokeOAuth2Token(token) - -Revoke OAuth2 Tokens - -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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.auth.*; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure HTTP basic authorization: basic - HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic"); - basic.setUsername("YOUR USERNAME"); - basic.setPassword("YOUR PASSWORD"); - - // Configure OAuth2 access token for authorization: oauth2 - OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); - oauth2.setAccessToken("YOUR ACCESS TOKEN"); - - PublicApi apiInstance = new PublicApi(defaultClient); - String token = "token_example"; // String | - try { - apiInstance.revokeOAuth2Token(token); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#revokeOAuth2Token"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **String**| | - -### Return type - -null (empty response body) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**500** | jsonError | - | - - -# **userinfo** -> UserinfoResponse userinfo() - -OpenID Connect Userinfo - -This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.auth.*; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure OAuth2 access token for authorization: oauth2 - OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2"); - oauth2.setAccessToken("YOUR ACCESS TOKEN"); - - PublicApi apiInstance = new PublicApi(defaultClient); - try { - UserinfoResponse result = apiInstance.userinfo(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#userinfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**UserinfoResponse**](UserinfoResponse.md) - -### Authorization - -[oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | userinfoResponse | - | -**401** | jsonError | - | -**500** | jsonError | - | - - -# **wellKnown** -> JSONWebKeySet wellKnown() - -JSON Web Keys Discovery - -This endpoint returns JSON Web Keys to be used as public keys for 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. - -### Example -```java -// Import classes: -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.models.*; -import sh.ory.hydra.api.PublicApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - PublicApi apiInstance = new PublicApi(defaultClient); - try { - JSONWebKeySet result = apiInstance.wellKnown(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PublicApi#wellKnown"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKeySet | - | -**500** | jsonError | - | - diff --git a/clients/hydra/java/docs/RejectOAuth2Request.md b/clients/hydra/java/docs/RejectOAuth2Request.md new file mode 100644 index 00000000000..eb3b0daf8b4 --- /dev/null +++ b/clients/hydra/java/docs/RejectOAuth2Request.md @@ -0,0 +1,17 @@ + + +# RejectOAuth2Request + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**error** | **String** | The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. | [optional] | +|**errorDebug** | **String** | Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs. | [optional] | +|**errorDescription** | **String** | Description of the error in a human readable format. | [optional] | +|**errorHint** | **String** | Hint to help resolve the error. | [optional] | +|**statusCode** | **Long** | Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 | [optional] | + + + diff --git a/clients/hydra/java/docs/RejectRequest.md b/clients/hydra/java/docs/RejectRequest.md deleted file mode 100644 index 0d141618386..00000000000 --- a/clients/hydra/java/docs/RejectRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# RejectRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **String** | The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. | [optional] -**errorDebug** | **String** | Debug contains information to help resolve the problem as a developer. Usually not exposed to the public but only in the server logs. | [optional] -**errorDescription** | **String** | Description of the error in a human readable format. | [optional] -**errorHint** | **String** | Hint to help resolve the error. | [optional] -**statusCode** | **Long** | Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 | [optional] - - - diff --git a/clients/hydra/java/docs/RequestWasHandledResponse.md b/clients/hydra/java/docs/RequestWasHandledResponse.md deleted file mode 100644 index d2214965cf4..00000000000 --- a/clients/hydra/java/docs/RequestWasHandledResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# RequestWasHandledResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**redirectTo** | **String** | Original request URL to which you should redirect the user if request was already handled. | - - - diff --git a/clients/hydra/java/docs/TokenPagination.md b/clients/hydra/java/docs/TokenPagination.md new file mode 100644 index 00000000000..a8cb730bb12 --- /dev/null +++ b/clients/hydra/java/docs/TokenPagination.md @@ -0,0 +1,14 @@ + + +# TokenPagination + + +## Properties + +| 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] | +|**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] | + + + diff --git a/clients/hydra/java/docs/TokenPaginationHeaders.md b/clients/hydra/java/docs/TokenPaginationHeaders.md new file mode 100644 index 00000000000..0aaaad92898 --- /dev/null +++ b/clients/hydra/java/docs/TokenPaginationHeaders.md @@ -0,0 +1,14 @@ + + +# TokenPaginationHeaders + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**link** | **String** | 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] | +|**xTotalCount** | **String** | The total number of clients. in: header | [optional] | + + + diff --git a/clients/hydra/java/docs/TokenPaginationRequestParameters.md b/clients/hydra/java/docs/TokenPaginationRequestParameters.md new file mode 100644 index 00000000000..471fb6c4f33 --- /dev/null +++ b/clients/hydra/java/docs/TokenPaginationRequestParameters.md @@ -0,0 +1,15 @@ + + +# 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). + +## Properties + +| 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] | +|**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] | + + + diff --git a/clients/hydra/java/docs/TokenPaginationResponseHeaders.md b/clients/hydra/java/docs/TokenPaginationResponseHeaders.md new file mode 100644 index 00000000000..553c6f166a4 --- /dev/null +++ b/clients/hydra/java/docs/TokenPaginationResponseHeaders.md @@ -0,0 +1,15 @@ + + +# 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). + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**link** | **String** | 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=20>; rel=\"last\" | [optional] | +|**xTotalCount** | **Long** | The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. | [optional] | + + + diff --git a/clients/hydra/java/docs/TrustJwtGrantIssuerBody.md b/clients/hydra/java/docs/TrustJwtGrantIssuerBody.md deleted file mode 100644 index 603e6ff2d4b..00000000000 --- a/clients/hydra/java/docs/TrustJwtGrantIssuerBody.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# TrustJwtGrantIssuerBody - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expiresAt** | **OffsetDateTime** | 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** | [**JSONWebKey**](JSONWebKey.md) | | -**scope** | **List<String>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | -**subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | - - - diff --git a/clients/hydra/java/docs/TrustOAuth2JwtGrantIssuer.md b/clients/hydra/java/docs/TrustOAuth2JwtGrantIssuer.md new file mode 100644 index 00000000000..77359f18136 --- /dev/null +++ b/clients/hydra/java/docs/TrustOAuth2JwtGrantIssuer.md @@ -0,0 +1,19 @@ + + +# TrustOAuth2JwtGrantIssuer + +Trust OAuth2 JWT Bearer Grant Type Issuer Request Body + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**allowAnySubject** | **Boolean** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] | +|**expiresAt** | **OffsetDateTime** | 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** | [**JsonWebKey**](JsonWebKey.md) | | | +|**scope** | **List<String>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | | +|**subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] | + + + diff --git a/clients/hydra/java/docs/TrustedJsonWebKey.md b/clients/hydra/java/docs/TrustedJsonWebKey.md deleted file mode 100644 index 4b14bd4561f..00000000000 --- a/clients/hydra/java/docs/TrustedJsonWebKey.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TrustedJsonWebKey - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**kid** | **String** | The \"key_id\" is key unique identifier (same as kid header in jws/jwt). | [optional] -**set** | **String** | The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. | [optional] - - - diff --git a/clients/hydra/java/docs/TrustedJwtGrantIssuer.md b/clients/hydra/java/docs/TrustedJwtGrantIssuer.md deleted file mode 100644 index 0015f1b9476..00000000000 --- a/clients/hydra/java/docs/TrustedJwtGrantIssuer.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# TrustedJwtGrantIssuer - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**createdAt** | **OffsetDateTime** | The \"created_at\" indicates, when grant was created. | [optional] -**expiresAt** | **OffsetDateTime** | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | [optional] -**id** | **String** | | [optional] -**issuer** | **String** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] -**publicKey** | [**TrustedJsonWebKey**](TrustedJsonWebKey.md) | | [optional] -**scope** | **List<String>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] -**subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] - - - diff --git a/clients/hydra/java/docs/TrustedOAuth2JwtGrantIssuer.md b/clients/hydra/java/docs/TrustedOAuth2JwtGrantIssuer.md new file mode 100644 index 00000000000..b3dfd443ffa --- /dev/null +++ b/clients/hydra/java/docs/TrustedOAuth2JwtGrantIssuer.md @@ -0,0 +1,21 @@ + + +# TrustedOAuth2JwtGrantIssuer + +OAuth2 JWT Bearer Grant Type Issuer Trust Relationship + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**allowAnySubject** | **Boolean** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] | +|**createdAt** | **OffsetDateTime** | The \"created_at\" indicates, when grant was created. | [optional] | +|**expiresAt** | **OffsetDateTime** | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | [optional] | +|**id** | **String** | | [optional] | +|**issuer** | **String** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] | +|**publicKey** | [**TrustedOAuth2JwtGrantJsonWebKey**](TrustedOAuth2JwtGrantJsonWebKey.md) | | [optional] | +|**scope** | **List<String>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] | +|**subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] | + + + diff --git a/clients/hydra/java/docs/TrustedOAuth2JwtGrantJsonWebKey.md b/clients/hydra/java/docs/TrustedOAuth2JwtGrantJsonWebKey.md new file mode 100644 index 00000000000..dd5417ac73d --- /dev/null +++ b/clients/hydra/java/docs/TrustedOAuth2JwtGrantJsonWebKey.md @@ -0,0 +1,15 @@ + + +# TrustedOAuth2JwtGrantJsonWebKey + +OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**kid** | **String** | The \"key_id\" is key unique identifier (same as kid header in jws/jwt). | [optional] | +|**set** | **String** | The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. | [optional] | + + + diff --git a/clients/hydra/java/docs/UserinfoResponse.md b/clients/hydra/java/docs/UserinfoResponse.md deleted file mode 100644 index 1fd88f5bf09..00000000000 --- a/clients/hydra/java/docs/UserinfoResponse.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# UserinfoResponse - -The userinfo response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**birthdate** | **String** | 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] -**email** | **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. | [optional] -**emailVerified** | **Boolean** | 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] -**familyName** | **String** | 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] -**gender** | **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. | [optional] -**givenName** | **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. | [optional] -**locale** | **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. | [optional] -**middleName** | **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. | [optional] -**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. | [optional] -**nickname** | **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. | [optional] -**phoneNumber** | **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. | [optional] -**phoneNumberVerified** | **Boolean** | 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] -**picture** | **String** | 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] -**preferredUsername** | **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. | [optional] -**profile** | **String** | URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User. | [optional] -**sub** | **String** | Subject - Identifier for the End-User at the IssuerURL. | [optional] -**updatedAt** | **Long** | 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** | **String** | 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** | **String** | String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles. | [optional] - - - diff --git a/clients/hydra/java/docs/Version.md b/clients/hydra/java/docs/Version.md index d3b7e05e019..fbb5d6a51b3 100644 --- a/clients/hydra/java/docs/Version.md +++ b/clients/hydra/java/docs/Version.md @@ -5,9 +5,9 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **String** | Version is the service's version. | [optional] +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**version** | **String** | Version is the service's version. | [optional] | diff --git a/clients/hydra/java/docs/Volume.md b/clients/hydra/java/docs/Volume.md deleted file mode 100644 index a21f3dc3359..00000000000 --- a/clients/hydra/java/docs/Volume.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# Volume - -Volume volume - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**createdAt** | **String** | Date/Time the volume was created. | [optional] -**driver** | **String** | Name of the volume driver used by the volume. | -**labels** | **Map<String, String>** | User-defined key/value metadata. | -**mountpoint** | **String** | Mount path of the volume on the host. | -**name** | **String** | Name of the volume. | -**options** | **Map<String, String>** | The driver specific options used when creating the volume. | -**scope** | **String** | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | -**status** | **Object** | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. | [optional] -**usageData** | [**VolumeUsageData**](VolumeUsageData.md) | | [optional] - - - diff --git a/clients/hydra/java/docs/VolumeUsageData.md b/clients/hydra/java/docs/VolumeUsageData.md deleted file mode 100644 index 97529506d35..00000000000 --- a/clients/hydra/java/docs/VolumeUsageData.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# VolumeUsageData - -VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refCount** | **Long** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | -**size** | **Long** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | - - - diff --git a/clients/hydra/java/docs/WellKnown.md b/clients/hydra/java/docs/WellKnown.md deleted file mode 100644 index d055daf755a..00000000000 --- a/clients/hydra/java/docs/WellKnown.md +++ /dev/null @@ -1,40 +0,0 @@ - - -# WellKnown - -It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorizationEndpoint** | **String** | URL of the OP's OAuth 2.0 Authorization Endpoint. | -**backchannelLogoutSessionSupported** | **Boolean** | 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] -**backchannelLogoutSupported** | **Boolean** | Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] -**claimsParameterSupported** | **Boolean** | Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] -**claimsSupported** | **List<String>** | 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] -**codeChallengeMethodsSupported** | **List<String>** | JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] -**endSessionEndpoint** | **String** | 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] -**frontchannelLogoutSessionSupported** | **Boolean** | 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] -**frontchannelLogoutSupported** | **Boolean** | Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] -**grantTypesSupported** | **List<String>** | JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] -**idTokenSigningAlgValuesSupported** | **List<String>** | 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** | **String** | 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. | -**jwksUri** | **String** | 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. | -**registrationEndpoint** | **String** | URL of the OP's Dynamic Client Registration Endpoint. | [optional] -**requestObjectSigningAlgValuesSupported** | **List<String>** | 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] -**requestParameterSupported** | **Boolean** | Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] -**requestUriParameterSupported** | **Boolean** | Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] -**requireRequestUriRegistration** | **Boolean** | Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. | [optional] -**responseModesSupported** | **List<String>** | JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] -**responseTypesSupported** | **List<String>** | 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. | -**revocationEndpoint** | **String** | URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] -**scopesSupported** | **List<String>** | SON 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] -**subjectTypesSupported** | **List<String>** | JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | -**tokenEndpoint** | **String** | URL of the OP's OAuth 2.0 Token Endpoint | -**tokenEndpointAuthMethodsSupported** | **List<String>** | 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] -**userinfoEndpoint** | **String** | URL of the OP's UserInfo Endpoint. | [optional] -**userinfoSigningAlgValuesSupported** | **List<String>** | 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] - - - diff --git a/clients/hydra/java/docs/WellknownApi.md b/clients/hydra/java/docs/WellknownApi.md new file mode 100644 index 00000000000..00975c0ac83 --- /dev/null +++ b/clients/hydra/java/docs/WellknownApi.md @@ -0,0 +1,68 @@ +# WellknownApi + +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 | + + + +# **discoverJsonWebKeys** +> JsonWebKeySet 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. + +### Example +```java +// Import classes: +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.models.*; +import sh.ory.hydra.api.WellknownApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + WellknownApi apiInstance = new WellknownApi(defaultClient); + try { + JsonWebKeySet result = apiInstance.discoverJsonWebKeys(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling WellknownApi#discoverJsonWebKeys"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | jsonWebKeySet | - | +| **0** | errorOAuth2 | - | + diff --git a/clients/hydra/java/pom.xml b/clients/hydra/java/pom.xml index d2d318cf654..a3117b7ac14 100644 --- a/clients/hydra/java/pom.xml +++ b/clients/hydra/java/pom.xml @@ -147,7 +147,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.3.2 attach-javadocs @@ -385,17 +385,33 @@ jackson-databind-nullable ${jackson-databind-nullable-version} + + javax.ws.rs + jsr311-api + ${jsr311-api-version} + + + javax.ws.rs + javax.ws.rs-api + ${javax.ws.rs-api-version} + - junit - junit + org.junit.jupiter + junit-jupiter-engine ${junit-version} test + + org.junit.platform + junit-platform-runner + ${junit-platform-runner.version} + test + org.mockito mockito-core - 3.12.4 + ${mockito-core-version} test @@ -404,15 +420,19 @@ ${java.version} ${java.version} 1.8.5 - 1.6.3 - 4.9.2 - 2.8.8 + 1.6.5 + 4.9.3 + 2.9.0 3.12.0 - 0.2.2 + 0.2.3 1.3.5 - 4.13.2 + 5.8.2 + 1.6.2 + 3.12.4 + 2.1.1 + 1.1.1 UTF-8 - 2.17.3 + 2.21.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 8376f55bda2..0868825f4c2 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 0fa48e20950..c429649247e 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -96,6 +96,7 @@ public ApiClient() { // Setup authentications (key: authentication name, value: authentication). authentications.put("basic", new HttpBasicAuth()); + authentications.put("bearer", new HttpBearerAuth("bearer")); authentications.put("oauth2", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -113,6 +114,7 @@ public ApiClient(OkHttpClient client) { // Setup authentications (key: authentication name, value: authentication). authentications.put("basic", new HttpBasicAuth()); + authentications.put("bearer", new HttpBearerAuth("bearer")); authentications.put("oauth2", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -172,7 +174,7 @@ public ApiClient(String basePath, String clientId, String clientSecret, MapsingletonList(retryingOAuth)); // Setup authentications (key: authentication name, value: authentication). authentications.put("basic", new HttpBasicAuth()); + authentications.put("bearer", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -205,7 +208,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/v1.11.0/java"); + setUserAgent("OpenAPI-Generator/v2.0.1/java"); authentications = new HashMap(); } @@ -351,7 +354,7 @@ public DateFormat getDateFormat() { *

Setter for the field dateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object + * @return a {@link sh.ory.hydra.ApiClient} object */ public ApiClient setDateFormat(DateFormat dateFormat) { this.json.setDateFormat(dateFormat); @@ -362,7 +365,7 @@ public ApiClient setDateFormat(DateFormat dateFormat) { *

Set SqlDateFormat.

* * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object + * @return a {@link sh.ory.hydra.ApiClient} object */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { this.json.setSqlDateFormat(dateFormat); @@ -372,8 +375,8 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) { /** *

Set OffsetDateTimeFormat.

* - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link sh.ory.hydra.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { this.json.setOffsetDateTimeFormat(dateFormat); @@ -383,8 +386,8 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { /** *

Set LocalDateFormat.

* - * @param dateFormat a {@link org.threeten.bp.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link sh.ory.hydra.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { this.json.setLocalDateFormat(dateFormat); @@ -395,7 +398,7 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { *

Set LenientOnJson.

* * @param lenientOnJson a boolean - * @return a {@link org.openapitools.client.ApiClient} object + * @return a {@link sh.ory.hydra.ApiClient} object */ public ApiClient setLenientOnJson(boolean lenientOnJson) { this.json.setLenientOnJson(lenientOnJson); @@ -421,6 +424,19 @@ public Authentication getAuthentication(String authName) { return authentications.get(authName); } + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } /** * Helper method to set username for the first HTTP basic authentication. @@ -897,7 +913,7 @@ public String escapeString(String str) { * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object - * @throws org.openapitools.client.ApiException If fail to deserialize response body, i.e. cannot read response body + * @throws sh.ory.hydra.ApiException If fail to deserialize response body, i.e. cannot read response body * or the Content-Type of the response is not supported. */ @SuppressWarnings("unchecked") @@ -958,7 +974,7 @@ public T deserialize(Response response, Type returnType) throws ApiException * @param obj The Java object * @param contentType The request Content-Type * @return The serialized request body - * @throws org.openapitools.client.ApiException If fail to serialize the given object + * @throws sh.ory.hydra.ApiException If fail to serialize the given object */ public RequestBody serialize(Object obj, String contentType) throws ApiException { if (obj instanceof byte[]) { @@ -986,7 +1002,7 @@ public RequestBody serialize(Object obj, String contentType) throws ApiException * Download file from the given response. * * @param response An instance of the Response object - * @throws org.openapitools.client.ApiException If fail to read file content from response and write to disk + * @throws sh.ory.hydra.ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { @@ -1050,7 +1066,7 @@ public File prepareDownloadFile(Response response) throws IOException { * @param Type * @param call An instance of the Call object * @return ApiResponse<T> - * @throws org.openapitools.client.ApiException If fail to execute the call + * @throws sh.ory.hydra.ApiException If fail to execute the call */ public ApiResponse execute(Call call) throws ApiException { return execute(call, null); @@ -1065,7 +1081,7 @@ public ApiResponse execute(Call call) throws ApiException { * @return ApiResponse object containing response status, headers and * data, which is a Java object deserialized from response body and would be null * when returnType is null. - * @throws org.openapitools.client.ApiException If fail to execute the call + * @throws sh.ory.hydra.ApiException If fail to execute the call */ public ApiResponse execute(Call call, Type returnType) throws ApiException { try { @@ -1129,7 +1145,7 @@ public void onResponse(Call call, Response response) throws IOException { * @param response Response * @param returnType Return type * @return Type - * @throws org.openapitools.client.ApiException If the response has an unsuccessful status code or + * @throws sh.ory.hydra.ApiException If the response has an unsuccessful status code or * fail to deserialize the response body */ public T handleResponse(Response response, Type returnType) throws ApiException { @@ -1164,6 +1180,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept /** * Build HTTP call with the given options. * + * @param baseUrl The base URL * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters @@ -1175,7 +1192,7 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call - * @throws org.openapitools.client.ApiException If fail to serialize the request body object + * @throws sh.ory.hydra.ApiException If fail to serialize the request body object */ public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); @@ -1186,6 +1203,7 @@ public Call buildCall(String baseUrl, String path, String method, List que /** * Build an HTTP request with the given options. * + * @param baseUrl The base URL * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters @@ -1197,7 +1215,7 @@ public Call buildCall(String baseUrl, String path, String method, List que * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request - * @throws org.openapitools.client.ApiException If fail to serialize the request body object + * @throws sh.ory.hydra.ApiException If fail to serialize the request body object */ public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams @@ -1222,7 +1240,7 @@ public Request buildRequest(String baseUrl, String path, String method, List cookieParams, Request.Builde * @param payload HTTP request body * @param method HTTP method * @param uri URI + * @throws sh.ory.hydra.ApiException If fails to update the parameters */ public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException { @@ -1386,9 +1406,14 @@ public RequestBody buildRequestBodyMultipart(Map formParams) { for (Entry param : formParams.entrySet()) { if (param.getValue() instanceof File) { File file = (File) param.getValue(); - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); + addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + } else if (param.getValue() instanceof List) { + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } + } } else { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); mpBuilder.addPart(partHeaders, RequestBody.create(parameterToString(param.getValue()), null)); @@ -1412,6 +1437,19 @@ public String guessContentTypeFromFile(File file) { } } + /** + * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param file The file to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); + } + /** * Get network interceptor to add it to the httpClient to track download progress for * async requests. @@ -1514,7 +1552,7 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti * * @param request The HTTP request object * @return The string representation of the HTTP request body - * @throws org.openapitools.client.ApiException If fail to serialize the request body object into a string + * @throws sh.ory.hydra.ApiException If fail to serialize the request body object into a string */ private String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { 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 ea3a66ce3e0..95b022a843e 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,11 +16,13 @@ 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 = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; @@ -151,4 +153,14 @@ public Map> getResponseHeaders() { public String getResponseBody() { return responseBody; } + + /** + * Get the exception message including HTTP response data. + * + * @return The exception message + */ + public String getMessage() { + return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); + } } 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 0c1ee6e3971..82fef2d2550 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 b096c3791fd..966ba54de80 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,7 +13,7 @@ package sh.ory.hydra; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") public class Configuration { 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 ed16c8e59e0..4a9a6c58f82 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 d6a9c7d6d0c..4953a8ee64d 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,7 +24,6 @@ import io.gsonfire.GsonFireBuilder; import io.gsonfire.TypeSelector; -import sh.ory.hydra.model.*; import okio.ByteString; import java.io.IOException; @@ -41,14 +40,20 @@ import java.util.Map; import java.util.HashMap; +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ public class JSON { - private Gson gson; - private boolean isLenientOnJson = false; - private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); @SuppressWarnings("unchecked") public static GsonBuilder createGson() { @@ -81,14 +86,52 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri return clazz; } - public JSON() { - gson = createGson() - .registerTypeAdapter(Date.class, dateTypeAdapter) - .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) - .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) - .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) - .registerTypeAdapter(byte[].class, byteArrayAdapter) - .create(); + { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.AcceptOAuth2ConsentRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.AcceptOAuth2ConsentRequestSession.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.AcceptOAuth2LoginRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.CreateJsonWebKeySet.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.ErrorOAuth2.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.GenericError.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.GetVersion200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.HealthNotReadyStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.HealthStatus.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.IntrospectedOAuth2Token.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.IsReady200Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.IsReady503Response.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.JsonPatch.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.JsonWebKey.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.JsonWebKeySet.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2Client.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2ClientTokenLifespans.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2ConsentRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2ConsentRequestOpenIDConnectContext.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2ConsentSession.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2ConsentSessionExpiresAt.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2LoginRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2LogoutRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2RedirectTo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OAuth2TokenExchange.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OidcConfiguration.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.OidcUserInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.Pagination.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.PaginationHeaders.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.RejectOAuth2Request.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.TokenPagination.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.TokenPaginationHeaders.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.TokenPaginationRequestParameters.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.TokenPaginationResponseHeaders.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.TrustOAuth2JwtGrantIssuer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.TrustedOAuth2JwtGrantIssuer.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.TrustedOAuth2JwtGrantJsonWebKey.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new sh.ory.hydra.model.Version.CustomTypeAdapterFactory()); + gson = gsonBuilder.create(); } /** @@ -96,7 +139,7 @@ public JSON() { * * @return Gson */ - public Gson getGson() { + public static Gson getGson() { return gson; } @@ -104,23 +147,13 @@ public Gson getGson() { * Set Gson. * * @param gson Gson - * @return JSON */ - public JSON setGson(Gson gson) { - this.gson = gson; - return this; + public static void setGson(Gson gson) { + JSON.gson = gson; } - /** - * Configure the parser to be liberal in what it accepts. - * - * @param lenientOnJson Set it to true to ignore some syntax errors - * @return JSON - * @see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html - */ - public JSON setLenientOnJson(boolean lenientOnJson) { + public static void setLenientOnJson(boolean lenientOnJson) { isLenientOnJson = lenientOnJson; - return this; } /** @@ -129,7 +162,7 @@ public JSON setLenientOnJson(boolean lenientOnJson) { * @param obj Object * @return String representation of the JSON */ - public String serialize(Object obj) { + public static String serialize(Object obj) { return gson.toJson(obj); } @@ -142,11 +175,11 @@ public String serialize(Object obj) { * @return The deserialized Java object */ @SuppressWarnings("unchecked") - public T deserialize(String body, Type returnType) { + public static T deserialize(String body, Type returnType) { try { if (isLenientOnJson) { JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.5/com/google/gson/stream/JsonReader.html + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) jsonReader.setLenient(true); return gson.fromJson(jsonReader, returnType); } else { @@ -166,7 +199,7 @@ public T deserialize(String body, Type returnType) { /** * Gson TypeAdapter for Byte Array type */ - public class ByteArrayAdapter extends TypeAdapter { + public static class ByteArrayAdapter extends TypeAdapter { @Override public void write(JsonWriter out, byte[] value) throws IOException { @@ -238,7 +271,7 @@ public OffsetDateTime read(JsonReader in) throws IOException { /** * Gson TypeAdapter for JSR310 LocalDate type */ - public class LocalDateTypeAdapter extends TypeAdapter { + public static class LocalDateTypeAdapter extends TypeAdapter { private DateTimeFormatter formatter; @@ -276,14 +309,12 @@ public LocalDate read(JsonReader in) throws IOException { } } - public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { offsetDateTimeTypeAdapter.setFormat(dateFormat); - return this; } - public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { localDateTypeAdapter.setFormat(dateFormat); - return this; } /** @@ -397,14 +428,11 @@ public Date read(JsonReader in) throws IOException { } } - public JSON setDateFormat(DateFormat dateFormat) { + public static void setDateFormat(DateFormat dateFormat) { dateTypeAdapter.setFormat(dateFormat); - return this; } - public JSON setSqlDateFormat(DateFormat dateFormat) { + public static void setSqlDateFormat(DateFormat dateFormat) { sqlDateTypeAdapter.setFormat(dateFormat); - return this; } - } 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 e82af9c56b5..3d06b95ac2c 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,7 +13,7 @@ package sh.ory.hydra; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") 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 daf90961b81..74ad24fd403 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 1d0808610b3..3e471ad7b7f 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 a8b41e13fc6..e55e1dd873d 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 @@ -39,7 +39,7 @@ public String URL(Map variables) { if (variables != null && variables.containsKey(name)) { value = variables.get(name); if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); } } url = url.replaceAll("\\{" + name + "\\}", value); 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 cc059802a80..63af737b5c5 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") 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/AdminApi.java b/clients/hydra/java/src/main/java/sh/ory/hydra/api/AdminApi.java deleted file mode 100644 index d98099673a1..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/api/AdminApi.java +++ /dev/null @@ -1,4853 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.api; - -import sh.ory.hydra.ApiCallback; -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.ApiResponse; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.Pair; -import sh.ory.hydra.ProgressRequestBody; -import sh.ory.hydra.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import sh.ory.hydra.model.AcceptConsentRequest; -import sh.ory.hydra.model.AcceptLoginRequest; -import sh.ory.hydra.model.CompletedRequest; -import sh.ory.hydra.model.ConsentRequest; -import sh.ory.hydra.model.FlushInactiveOAuth2TokensRequest; -import sh.ory.hydra.model.GenericError; -import sh.ory.hydra.model.HealthStatus; -import sh.ory.hydra.model.JSONWebKey; -import sh.ory.hydra.model.JSONWebKeySet; -import sh.ory.hydra.model.JsonError; -import sh.ory.hydra.model.JsonWebKeySetGeneratorRequest; -import sh.ory.hydra.model.LoginRequest; -import sh.ory.hydra.model.LogoutRequest; -import sh.ory.hydra.model.OAuth2Client; -import sh.ory.hydra.model.OAuth2TokenIntrospection; -import sh.ory.hydra.model.PatchDocument; -import sh.ory.hydra.model.PreviousConsentSession; -import sh.ory.hydra.model.RejectRequest; -import sh.ory.hydra.model.RequestWasHandledResponse; -import sh.ory.hydra.model.TrustJwtGrantIssuerBody; -import sh.ory.hydra.model.TrustedJwtGrantIssuer; -import sh.ory.hydra.model.Version; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class AdminApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AdminApi() { - this(Configuration.getDefaultApiClient()); - } - - public AdminApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for acceptConsentRequest - * @param consentChallenge (required) - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call acceptConsentRequestCall(String consentChallenge, AcceptConsentRequest body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/oauth2/auth/requests/consent/accept"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (consentChallenge != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("consent_challenge", consentChallenge)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call acceptConsentRequestValidateBeforeCall(String consentChallenge, AcceptConsentRequest body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'consentChallenge' is set - if (consentChallenge == null) { - throw new ApiException("Missing the required parameter 'consentChallenge' when calling acceptConsentRequest(Async)"); - } - - - okhttp3.Call localVarCall = acceptConsentRequestCall(consentChallenge, body, _callback); - return localVarCall; - - } - - /** - * Accept a Consent Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @param consentChallenge (required) - * @param body (optional) - * @return CompletedRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public CompletedRequest acceptConsentRequest(String consentChallenge, AcceptConsentRequest body) throws ApiException { - ApiResponse localVarResp = acceptConsentRequestWithHttpInfo(consentChallenge, body); - return localVarResp.getData(); - } - - /** - * Accept a Consent Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @param consentChallenge (required) - * @param body (optional) - * @return ApiResponse<CompletedRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public ApiResponse acceptConsentRequestWithHttpInfo(String consentChallenge, AcceptConsentRequest body) throws ApiException { - okhttp3.Call localVarCall = acceptConsentRequestValidateBeforeCall(consentChallenge, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Accept a Consent Request (asynchronously) - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @param consentChallenge (required) - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call acceptConsentRequestAsync(String consentChallenge, AcceptConsentRequest body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = acceptConsentRequestValidateBeforeCall(consentChallenge, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for acceptLoginRequest - * @param loginChallenge (required) - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 completedRequest -
400 jsonError -
401 jsonError -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call acceptLoginRequestCall(String loginChallenge, AcceptLoginRequest body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/oauth2/auth/requests/login/accept"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (loginChallenge != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("login_challenge", loginChallenge)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call acceptLoginRequestValidateBeforeCall(String loginChallenge, AcceptLoginRequest body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'loginChallenge' is set - if (loginChallenge == null) { - throw new ApiException("Missing the required parameter 'loginChallenge' when calling acceptLoginRequest(Async)"); - } - - - okhttp3.Call localVarCall = acceptLoginRequestCall(loginChallenge, body, _callback); - return localVarCall; - - } - - /** - * Accept a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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 loginChallenge (required) - * @param body (optional) - * @return CompletedRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 completedRequest -
400 jsonError -
401 jsonError -
404 jsonError -
500 jsonError -
- */ - public CompletedRequest acceptLoginRequest(String loginChallenge, AcceptLoginRequest body) throws ApiException { - ApiResponse localVarResp = acceptLoginRequestWithHttpInfo(loginChallenge, body); - return localVarResp.getData(); - } - - /** - * Accept a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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 loginChallenge (required) - * @param body (optional) - * @return ApiResponse<CompletedRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 completedRequest -
400 jsonError -
401 jsonError -
404 jsonError -
500 jsonError -
- */ - public ApiResponse acceptLoginRequestWithHttpInfo(String loginChallenge, AcceptLoginRequest body) throws ApiException { - okhttp3.Call localVarCall = acceptLoginRequestValidateBeforeCall(loginChallenge, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Accept a Login Request (asynchronously) - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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 loginChallenge (required) - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 completedRequest -
400 jsonError -
401 jsonError -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call acceptLoginRequestAsync(String loginChallenge, AcceptLoginRequest body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = acceptLoginRequestValidateBeforeCall(loginChallenge, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for acceptLogoutRequest - * @param logoutChallenge (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call acceptLogoutRequestCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/auth/requests/logout/accept"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (logoutChallenge != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("logout_challenge", logoutChallenge)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call acceptLogoutRequestValidateBeforeCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'logoutChallenge' is set - if (logoutChallenge == null) { - throw new ApiException("Missing the required parameter 'logoutChallenge' when calling acceptLogoutRequest(Async)"); - } - - - okhttp3.Call localVarCall = acceptLogoutRequestCall(logoutChallenge, _callback); - return localVarCall; - - } - - /** - * Accept a Logout Request - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @param logoutChallenge (required) - * @return CompletedRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public CompletedRequest acceptLogoutRequest(String logoutChallenge) throws ApiException { - ApiResponse localVarResp = acceptLogoutRequestWithHttpInfo(logoutChallenge); - return localVarResp.getData(); - } - - /** - * Accept a Logout Request - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @param logoutChallenge (required) - * @return ApiResponse<CompletedRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public ApiResponse acceptLogoutRequestWithHttpInfo(String logoutChallenge) throws ApiException { - okhttp3.Call localVarCall = acceptLogoutRequestValidateBeforeCall(logoutChallenge, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Accept a Logout Request (asynchronously) - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @param logoutChallenge (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call acceptLogoutRequestAsync(String logoutChallenge, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = acceptLogoutRequestValidateBeforeCall(logoutChallenge, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createJsonWebKeySet - * @param set The set (required) - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call createJsonWebKeySetCall(String set, JsonWebKeySetGeneratorRequest body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/keys/{set}" - .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createJsonWebKeySetValidateBeforeCall(String set, JsonWebKeySetGeneratorRequest body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'set' is set - if (set == null) { - throw new ApiException("Missing the required parameter 'set' when calling createJsonWebKeySet(Async)"); - } - - - okhttp3.Call localVarCall = createJsonWebKeySetCall(set, body, _callback); - return localVarCall; - - } - - /** - * Generate a New 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 set (required) - * @param body (optional) - * @return JSONWebKeySet - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public JSONWebKeySet createJsonWebKeySet(String set, JsonWebKeySetGeneratorRequest body) throws ApiException { - ApiResponse localVarResp = createJsonWebKeySetWithHttpInfo(set, body); - return localVarResp.getData(); - } - - /** - * Generate a New 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 set (required) - * @param body (optional) - * @return ApiResponse<JSONWebKeySet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public ApiResponse createJsonWebKeySetWithHttpInfo(String set, JsonWebKeySetGeneratorRequest body) throws ApiException { - okhttp3.Call localVarCall = createJsonWebKeySetValidateBeforeCall(set, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Generate a New JSON Web Key (asynchronously) - * 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 set (required) - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call createJsonWebKeySetAsync(String set, JsonWebKeySetGeneratorRequest body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createJsonWebKeySetValidateBeforeCall(set, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createOAuth2Client - * @param body (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
201 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call createOAuth2ClientCall(OAuth2Client body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/clients"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createOAuth2ClientValidateBeforeCall(OAuth2Client body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling createOAuth2Client(Async)"); - } - - - okhttp3.Call localVarCall = createOAuth2ClientCall(body, _callback); - return localVarCall; - - } - - /** - * Create an OAuth 2.0 Client - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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 body (required) - * @return OAuth2Client - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
201 oAuth2Client -
0 jsonError -
- */ - public OAuth2Client createOAuth2Client(OAuth2Client body) throws ApiException { - ApiResponse localVarResp = createOAuth2ClientWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Create an OAuth 2.0 Client - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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 body (required) - * @return ApiResponse<OAuth2Client> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
201 oAuth2Client -
0 jsonError -
- */ - public ApiResponse createOAuth2ClientWithHttpInfo(OAuth2Client body) throws ApiException { - okhttp3.Call localVarCall = createOAuth2ClientValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create an OAuth 2.0 Client (asynchronously) - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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 body (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
201 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call createOAuth2ClientAsync(OAuth2Client body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createOAuth2ClientValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteJsonWebKey - * @param kid The kid of the desired key (required) - * @param set The set (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call deleteJsonWebKeyCall(String kid, String set, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/keys/{set}/{kid}" - .replaceAll("\\{" + "kid" + "\\}", localVarApiClient.escapeString(kid.toString())) - .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteJsonWebKeyValidateBeforeCall(String kid, String set, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'kid' is set - if (kid == null) { - throw new ApiException("Missing the required parameter 'kid' when calling deleteJsonWebKey(Async)"); - } - - // verify the required parameter 'set' is set - if (set == null) { - throw new ApiException("Missing the required parameter 'set' when calling deleteJsonWebKey(Async)"); - } - - - okhttp3.Call localVarCall = deleteJsonWebKeyCall(kid, set, _callback); - return localVarCall; - - } - - /** - * Delete a 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 kid The kid of the desired key (required) - * @param set The set (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public void deleteJsonWebKey(String kid, String set) throws ApiException { - deleteJsonWebKeyWithHttpInfo(kid, set); - } - - /** - * Delete a 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 kid The kid of the desired key (required) - * @param set The set (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public ApiResponse deleteJsonWebKeyWithHttpInfo(String kid, String set) throws ApiException { - okhttp3.Call localVarCall = deleteJsonWebKeyValidateBeforeCall(kid, set, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete a JSON Web Key (asynchronously) - * 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 kid The kid of the desired key (required) - * @param set The set (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call deleteJsonWebKeyAsync(String kid, String set, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteJsonWebKeyValidateBeforeCall(kid, set, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteJsonWebKeySet - * @param set The set (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call deleteJsonWebKeySetCall(String set, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/keys/{set}" - .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteJsonWebKeySetValidateBeforeCall(String set, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'set' is set - if (set == null) { - throw new ApiException("Missing the required parameter 'set' when calling deleteJsonWebKeySet(Async)"); - } - - - okhttp3.Call localVarCall = deleteJsonWebKeySetCall(set, _callback); - return localVarCall; - - } - - /** - * Delete a 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 set (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public void deleteJsonWebKeySet(String set) throws ApiException { - deleteJsonWebKeySetWithHttpInfo(set); - } - - /** - * Delete a 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 set (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public ApiResponse deleteJsonWebKeySetWithHttpInfo(String set) throws ApiException { - okhttp3.Call localVarCall = deleteJsonWebKeySetValidateBeforeCall(set, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete a JSON Web Key Set (asynchronously) - * 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 set (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call deleteJsonWebKeySetAsync(String set, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteJsonWebKeySetValidateBeforeCall(set, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteOAuth2Client - * @param id The id of the OAuth 2.0 Client. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 jsonError -
- */ - public okhttp3.Call deleteOAuth2ClientCall(String id, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/clients/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteOAuth2ClientValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteOAuth2Client(Async)"); - } - - - okhttp3.Call localVarCall = deleteOAuth2ClientCall(id, _callback); - return localVarCall; - - } - - /** - * Deletes an 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) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 jsonError -
- */ - public void deleteOAuth2Client(String id) throws ApiException { - deleteOAuth2ClientWithHttpInfo(id); - } - - /** - * Deletes an 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) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 jsonError -
- */ - public ApiResponse deleteOAuth2ClientWithHttpInfo(String id) throws ApiException { - okhttp3.Call localVarCall = deleteOAuth2ClientValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Deletes an OAuth 2.0 Client (asynchronously) - * 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 jsonError -
- */ - public okhttp3.Call deleteOAuth2ClientAsync(String id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteOAuth2ClientValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteOAuth2Token - * @param clientId (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call deleteOAuth2TokenCall(String clientId, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/tokens"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (clientId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("client_id", clientId)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteOAuth2TokenValidateBeforeCall(String clientId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'clientId' is set - if (clientId == null) { - throw new ApiException("Missing the required parameter 'clientId' when calling deleteOAuth2Token(Async)"); - } - - - okhttp3.Call localVarCall = deleteOAuth2TokenCall(clientId, _callback); - return localVarCall; - - } - - /** - * Delete OAuth2 Access Tokens from a Client - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @param clientId (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public void deleteOAuth2Token(String clientId) throws ApiException { - deleteOAuth2TokenWithHttpInfo(clientId); - } - - /** - * Delete OAuth2 Access Tokens from a Client - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @param clientId (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public ApiResponse deleteOAuth2TokenWithHttpInfo(String clientId) throws ApiException { - okhttp3.Call localVarCall = deleteOAuth2TokenValidateBeforeCall(clientId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete OAuth2 Access Tokens from a Client (asynchronously) - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @param clientId (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call deleteOAuth2TokenAsync(String clientId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteOAuth2TokenValidateBeforeCall(clientId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteTrustedJwtGrantIssuer - * @param id The id of the desired grant (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
404 genericError -
500 genericError -
- */ - public okhttp3.Call deleteTrustedJwtGrantIssuerCall(String id, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/trust/grants/jwt-bearer/issuers/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteTrustedJwtGrantIssuerValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling deleteTrustedJwtGrantIssuer(Async)"); - } - - - okhttp3.Call localVarCall = deleteTrustedJwtGrantIssuerCall(id, _callback); - return localVarCall; - - } - - /** - * Delete a 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) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
404 genericError -
500 genericError -
- */ - public void deleteTrustedJwtGrantIssuer(String id) throws ApiException { - deleteTrustedJwtGrantIssuerWithHttpInfo(id); - } - - /** - * Delete a 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) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
404 genericError -
500 genericError -
- */ - public ApiResponse deleteTrustedJwtGrantIssuerWithHttpInfo(String id) throws ApiException { - okhttp3.Call localVarCall = deleteTrustedJwtGrantIssuerValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer (asynchronously) - * 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
404 genericError -
500 genericError -
- */ - public okhttp3.Call deleteTrustedJwtGrantIssuerAsync(String id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteTrustedJwtGrantIssuerValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for flushInactiveOAuth2Tokens - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call flushInactiveOAuth2TokensCall(FlushInactiveOAuth2TokensRequest body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/oauth2/flush"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call flushInactiveOAuth2TokensValidateBeforeCall(FlushInactiveOAuth2TokensRequest body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = flushInactiveOAuth2TokensCall(body, _callback); - return localVarCall; - - } - - /** - * Flush Expired OAuth2 Access Tokens - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public void flushInactiveOAuth2Tokens(FlushInactiveOAuth2TokensRequest body) throws ApiException { - flushInactiveOAuth2TokensWithHttpInfo(body); - } - - /** - * Flush Expired OAuth2 Access Tokens - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public ApiResponse flushInactiveOAuth2TokensWithHttpInfo(FlushInactiveOAuth2TokensRequest body) throws ApiException { - okhttp3.Call localVarCall = flushInactiveOAuth2TokensValidateBeforeCall(body, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Flush Expired OAuth2 Access Tokens (asynchronously) - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call flushInactiveOAuth2TokensAsync(FlushInactiveOAuth2TokensRequest body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = flushInactiveOAuth2TokensValidateBeforeCall(body, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getConsentRequest - * @param consentChallenge (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 consentRequest -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public okhttp3.Call getConsentRequestCall(String consentChallenge, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/auth/requests/consent"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (consentChallenge != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("consent_challenge", consentChallenge)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getConsentRequestValidateBeforeCall(String consentChallenge, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'consentChallenge' is set - if (consentChallenge == null) { - throw new ApiException("Missing the required parameter 'consentChallenge' when calling getConsentRequest(Async)"); - } - - - okhttp3.Call localVarCall = getConsentRequestCall(consentChallenge, _callback); - return localVarCall; - - } - - /** - * Get Consent Request Information - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - * @param consentChallenge (required) - * @return ConsentRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 consentRequest -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public ConsentRequest getConsentRequest(String consentChallenge) throws ApiException { - ApiResponse localVarResp = getConsentRequestWithHttpInfo(consentChallenge); - return localVarResp.getData(); - } - - /** - * Get Consent Request Information - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - * @param consentChallenge (required) - * @return ApiResponse<ConsentRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 consentRequest -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public ApiResponse getConsentRequestWithHttpInfo(String consentChallenge) throws ApiException { - okhttp3.Call localVarCall = getConsentRequestValidateBeforeCall(consentChallenge, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Consent Request Information (asynchronously) - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - * @param consentChallenge (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 consentRequest -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public okhttp3.Call getConsentRequestAsync(String consentChallenge, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getConsentRequestValidateBeforeCall(consentChallenge, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getJsonWebKey - * @param kid The kid of the desired key (required) - * @param set The set (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call getJsonWebKeyCall(String kid, String set, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/keys/{set}/{kid}" - .replaceAll("\\{" + "kid" + "\\}", localVarApiClient.escapeString(kid.toString())) - .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getJsonWebKeyValidateBeforeCall(String kid, String set, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'kid' is set - if (kid == null) { - throw new ApiException("Missing the required parameter 'kid' when calling getJsonWebKey(Async)"); - } - - // verify the required parameter 'set' is set - if (set == null) { - throw new ApiException("Missing the required parameter 'set' when calling getJsonWebKey(Async)"); - } - - - okhttp3.Call localVarCall = getJsonWebKeyCall(kid, set, _callback); - return localVarCall; - - } - - /** - * Fetch a JSON Web Key - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @param kid The kid of the desired key (required) - * @param set The set (required) - * @return JSONWebKeySet - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
404 jsonError -
500 jsonError -
- */ - public JSONWebKeySet getJsonWebKey(String kid, String set) throws ApiException { - ApiResponse localVarResp = getJsonWebKeyWithHttpInfo(kid, set); - return localVarResp.getData(); - } - - /** - * Fetch a JSON Web Key - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @param kid The kid of the desired key (required) - * @param set The set (required) - * @return ApiResponse<JSONWebKeySet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
404 jsonError -
500 jsonError -
- */ - public ApiResponse getJsonWebKeyWithHttpInfo(String kid, String set) throws ApiException { - okhttp3.Call localVarCall = getJsonWebKeyValidateBeforeCall(kid, set, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Fetch a JSON Web Key (asynchronously) - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @param kid The kid of the desired key (required) - * @param set The set (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call getJsonWebKeyAsync(String kid, String set, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getJsonWebKeyValidateBeforeCall(kid, set, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getJsonWebKeySet - * @param set The set (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call getJsonWebKeySetCall(String set, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/keys/{set}" - .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getJsonWebKeySetValidateBeforeCall(String set, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'set' is set - if (set == null) { - throw new ApiException("Missing the required parameter 'set' when calling getJsonWebKeySet(Async)"); - } - - - okhttp3.Call localVarCall = getJsonWebKeySetCall(set, _callback); - return localVarCall; - - } - - /** - * 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 The set (required) - * @return JSONWebKeySet - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public JSONWebKeySet getJsonWebKeySet(String set) throws ApiException { - ApiResponse localVarResp = getJsonWebKeySetWithHttpInfo(set); - return localVarResp.getData(); - } - - /** - * 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 The set (required) - * @return ApiResponse<JSONWebKeySet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public ApiResponse getJsonWebKeySetWithHttpInfo(String set) throws ApiException { - okhttp3.Call localVarCall = getJsonWebKeySetValidateBeforeCall(set, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a JSON Web Key Set (asynchronously) - * 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 The set (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call getJsonWebKeySetAsync(String set, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getJsonWebKeySetValidateBeforeCall(set, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getLoginRequest - * @param loginChallenge (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 loginRequest -
400 jsonError -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public okhttp3.Call getLoginRequestCall(String loginChallenge, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/auth/requests/login"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (loginChallenge != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("login_challenge", loginChallenge)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getLoginRequestValidateBeforeCall(String loginChallenge, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'loginChallenge' is set - if (loginChallenge == null) { - throw new ApiException("Missing the required parameter 'loginChallenge' when calling getLoginRequest(Async)"); - } - - - okhttp3.Call localVarCall = getLoginRequestCall(loginChallenge, _callback); - return localVarCall; - - } - - /** - * Get a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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 loginChallenge (required) - * @return LoginRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 loginRequest -
400 jsonError -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public LoginRequest getLoginRequest(String loginChallenge) throws ApiException { - ApiResponse localVarResp = getLoginRequestWithHttpInfo(loginChallenge); - return localVarResp.getData(); - } - - /** - * Get a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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 loginChallenge (required) - * @return ApiResponse<LoginRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 loginRequest -
400 jsonError -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public ApiResponse getLoginRequestWithHttpInfo(String loginChallenge) throws ApiException { - okhttp3.Call localVarCall = getLoginRequestValidateBeforeCall(loginChallenge, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a Login Request (asynchronously) - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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 loginChallenge (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 loginRequest -
400 jsonError -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public okhttp3.Call getLoginRequestAsync(String loginChallenge, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getLoginRequestValidateBeforeCall(loginChallenge, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getLogoutRequest - * @param logoutChallenge (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 logoutRequest -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public okhttp3.Call getLogoutRequestCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/auth/requests/logout"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (logoutChallenge != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("logout_challenge", logoutChallenge)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getLogoutRequestValidateBeforeCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'logoutChallenge' is set - if (logoutChallenge == null) { - throw new ApiException("Missing the required parameter 'logoutChallenge' when calling getLogoutRequest(Async)"); - } - - - okhttp3.Call localVarCall = getLogoutRequestCall(logoutChallenge, _callback); - return localVarCall; - - } - - /** - * Get a Logout Request - * Use this endpoint to fetch a logout request. - * @param logoutChallenge (required) - * @return LogoutRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 logoutRequest -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public LogoutRequest getLogoutRequest(String logoutChallenge) throws ApiException { - ApiResponse localVarResp = getLogoutRequestWithHttpInfo(logoutChallenge); - return localVarResp.getData(); - } - - /** - * Get a Logout Request - * Use this endpoint to fetch a logout request. - * @param logoutChallenge (required) - * @return ApiResponse<LogoutRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 logoutRequest -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public ApiResponse getLogoutRequestWithHttpInfo(String logoutChallenge) throws ApiException { - okhttp3.Call localVarCall = getLogoutRequestValidateBeforeCall(logoutChallenge, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a Logout Request (asynchronously) - * Use this endpoint to fetch a logout request. - * @param logoutChallenge (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 logoutRequest -
404 jsonError -
410 requestWasHandledResponse -
500 jsonError -
- */ - public okhttp3.Call getLogoutRequestAsync(String logoutChallenge, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getLogoutRequestValidateBeforeCall(logoutChallenge, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getOAuth2Client - * @param id The id of the OAuth 2.0 Client. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call getOAuth2ClientCall(String id, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/clients/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getOAuth2ClientValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getOAuth2Client(Async)"); - } - - - okhttp3.Call localVarCall = getOAuth2ClientCall(id, _callback); - return localVarCall; - - } - - /** - * 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) - * @return OAuth2Client - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public OAuth2Client getOAuth2Client(String id) throws ApiException { - ApiResponse localVarResp = getOAuth2ClientWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * 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) - * @return ApiResponse<OAuth2Client> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public ApiResponse getOAuth2ClientWithHttpInfo(String id) throws ApiException { - okhttp3.Call localVarCall = getOAuth2ClientValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get an OAuth 2.0 Client (asynchronously) - * 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call getOAuth2ClientAsync(String id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getOAuth2ClientValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getTrustedJwtGrantIssuer - * @param id The id of the desired grant (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 trustedJwtGrantIssuer -
404 genericError -
500 genericError -
- */ - public okhttp3.Call getTrustedJwtGrantIssuerCall(String id, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/trust/grants/jwt-bearer/issuers/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getTrustedJwtGrantIssuerValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling getTrustedJwtGrantIssuer(Async)"); - } - - - okhttp3.Call localVarCall = getTrustedJwtGrantIssuerCall(id, _callback); - return localVarCall; - - } - - /** - * Get a 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) - * @return TrustedJwtGrantIssuer - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 trustedJwtGrantIssuer -
404 genericError -
500 genericError -
- */ - public TrustedJwtGrantIssuer getTrustedJwtGrantIssuer(String id) throws ApiException { - ApiResponse localVarResp = getTrustedJwtGrantIssuerWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Get a 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) - * @return ApiResponse<TrustedJwtGrantIssuer> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 trustedJwtGrantIssuer -
404 genericError -
500 genericError -
- */ - public ApiResponse getTrustedJwtGrantIssuerWithHttpInfo(String id) throws ApiException { - okhttp3.Call localVarCall = getTrustedJwtGrantIssuerValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get a Trusted OAuth2 JWT Bearer Grant Type Issuer (asynchronously) - * 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 trustedJwtGrantIssuer -
404 genericError -
500 genericError -
- */ - public okhttp3.Call getTrustedJwtGrantIssuerAsync(String id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getTrustedJwtGrantIssuerValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getVersion - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 version -
- */ - public okhttp3.Call getVersionCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/version"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getVersionValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getVersionCall(_callback); - return localVarCall; - - } - - /** - * Get Service Version - * This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - * @return Version - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 version -
- */ - public Version getVersion() throws ApiException { - ApiResponse localVarResp = getVersionWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get Service Version - * This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - * @return ApiResponse<Version> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 version -
- */ - public ApiResponse getVersionWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getVersionValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get Service Version (asynchronously) - * This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 version -
- */ - public okhttp3.Call getVersionAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getVersionValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for introspectOAuth2Token - * @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) - * @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. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 oAuth2TokenIntrospection -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call introspectOAuth2TokenCall(String token, String scope, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/introspect"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (token != null) { - localVarFormParams.put("token", token); - } - - if (scope != null) { - localVarFormParams.put("scope", scope); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call introspectOAuth2TokenValidateBeforeCall(String token, String scope, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'token' is set - if (token == null) { - throw new ApiException("Missing the required parameter 'token' when calling introspectOAuth2Token(Async)"); - } - - - okhttp3.Call localVarCall = introspectOAuth2TokenCall(token, scope, _callback); - return localVarCall; - - } - - /** - * Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @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) - * @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. (optional) - * @return OAuth2TokenIntrospection - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 oAuth2TokenIntrospection -
401 jsonError -
500 jsonError -
- */ - public OAuth2TokenIntrospection introspectOAuth2Token(String token, String scope) throws ApiException { - ApiResponse localVarResp = introspectOAuth2TokenWithHttpInfo(token, scope); - return localVarResp.getData(); - } - - /** - * Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @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) - * @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. (optional) - * @return ApiResponse<OAuth2TokenIntrospection> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 oAuth2TokenIntrospection -
401 jsonError -
500 jsonError -
- */ - public ApiResponse introspectOAuth2TokenWithHttpInfo(String token, String scope) throws ApiException { - okhttp3.Call localVarCall = introspectOAuth2TokenValidateBeforeCall(token, scope, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Introspect OAuth2 Tokens (asynchronously) - * 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @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) - * @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. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 oAuth2TokenIntrospection -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call introspectOAuth2TokenAsync(String token, String scope, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = introspectOAuth2TokenValidateBeforeCall(token, scope, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for isInstanceAlive - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 healthStatus -
500 jsonError -
- */ - public okhttp3.Call isInstanceAliveCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/health/alive"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call isInstanceAliveValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = isInstanceAliveCall(_callback); - return localVarCall; - - } - - /** - * Check Alive Status - * This endpoint returns a 200 status code when the HTTP server is up running. 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. - * @return HealthStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 healthStatus -
500 jsonError -
- */ - public HealthStatus isInstanceAlive() throws ApiException { - ApiResponse localVarResp = isInstanceAliveWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Check Alive Status - * This endpoint returns a 200 status code when the HTTP server is up running. 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. - * @return ApiResponse<HealthStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 healthStatus -
500 jsonError -
- */ - public ApiResponse isInstanceAliveWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = isInstanceAliveValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Check Alive Status (asynchronously) - * This endpoint returns a 200 status code when the HTTP server is up running. 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 _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 healthStatus -
500 jsonError -
- */ - public okhttp3.Call isInstanceAliveAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = isInstanceAliveValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listOAuth2Clients - * @param limit The maximum amount of clients to returned, upper bound is 500 clients. (optional) - * @param offset The offset from where to start looking. (optional) - * @param clientName The name of the clients to filter by. (optional) - * @param owner The owner of the clients to filter by. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 A list of clients. -
0 jsonError -
- */ - public okhttp3.Call listOAuth2ClientsCall(Long limit, Long offset, String clientName, String owner, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/clients"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (clientName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("client_name", clientName)); - } - - if (owner != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("owner", owner)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listOAuth2ClientsValidateBeforeCall(Long limit, Long offset, String clientName, String owner, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listOAuth2ClientsCall(limit, offset, clientName, owner, _callback); - return localVarCall; - - } - - /** - * 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - * @param limit The maximum amount of clients to returned, upper bound is 500 clients. (optional) - * @param offset The offset from where to start looking. (optional) - * @param clientName The name of the clients to filter by. (optional) - * @param owner The owner of the clients to filter by. (optional) - * @return List<OAuth2Client> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 A list of clients. -
0 jsonError -
- */ - public List listOAuth2Clients(Long limit, Long offset, String clientName, String owner) throws ApiException { - ApiResponse> localVarResp = listOAuth2ClientsWithHttpInfo(limit, offset, clientName, owner); - return localVarResp.getData(); - } - - /** - * 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - * @param limit The maximum amount of clients to returned, upper bound is 500 clients. (optional) - * @param offset The offset from where to start looking. (optional) - * @param clientName The name of the clients to filter by. (optional) - * @param owner The owner of the clients to filter by. (optional) - * @return ApiResponse<List<OAuth2Client>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 A list of clients. -
0 jsonError -
- */ - public ApiResponse> listOAuth2ClientsWithHttpInfo(Long limit, Long offset, String clientName, String owner) throws ApiException { - okhttp3.Call localVarCall = listOAuth2ClientsValidateBeforeCall(limit, offset, clientName, owner, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List OAuth 2.0 Clients (asynchronously) - * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - * @param limit The maximum amount of clients to returned, upper bound is 500 clients. (optional) - * @param offset The offset from where to start looking. (optional) - * @param clientName The name of the clients to filter by. (optional) - * @param owner The owner of the clients to filter by. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 A list of clients. -
0 jsonError -
- */ - public okhttp3.Call listOAuth2ClientsAsync(Long limit, Long offset, String clientName, String owner, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = listOAuth2ClientsValidateBeforeCall(limit, offset, clientName, owner, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listSubjectConsentSessions - * @param subject (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 A list of used consent requests. -
400 jsonError -
500 jsonError -
- */ - public okhttp3.Call listSubjectConsentSessionsCall(String subject, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/auth/sessions/consent"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (subject != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("subject", subject)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listSubjectConsentSessionsValidateBeforeCall(String subject, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'subject' is set - if (subject == null) { - throw new ApiException("Missing the required parameter 'subject' when calling listSubjectConsentSessions(Async)"); - } - - - okhttp3.Call localVarCall = listSubjectConsentSessionsCall(subject, _callback); - return localVarCall; - - } - - /** - * Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - * @param subject (required) - * @return List<PreviousConsentSession> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 A list of used consent requests. -
400 jsonError -
500 jsonError -
- */ - public List listSubjectConsentSessions(String subject) throws ApiException { - ApiResponse> localVarResp = listSubjectConsentSessionsWithHttpInfo(subject); - return localVarResp.getData(); - } - - /** - * Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - * @param subject (required) - * @return ApiResponse<List<PreviousConsentSession>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 A list of used consent requests. -
400 jsonError -
500 jsonError -
- */ - public ApiResponse> listSubjectConsentSessionsWithHttpInfo(String subject) throws ApiException { - okhttp3.Call localVarCall = listSubjectConsentSessionsValidateBeforeCall(subject, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Lists All Consent Sessions of a Subject (asynchronously) - * 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - * @param subject (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 A list of used consent requests. -
400 jsonError -
500 jsonError -
- */ - public okhttp3.Call listSubjectConsentSessionsAsync(String subject, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = listSubjectConsentSessionsValidateBeforeCall(subject, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for listTrustedJwtGrantIssuers - * @param issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - * @param limit The maximum amount of policies returned, upper bound is 500 policies (optional) - * @param offset The offset from where to start looking. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 trustedJwtGrantIssuers -
500 genericError -
- */ - public okhttp3.Call listTrustedJwtGrantIssuersCall(String issuer, Long limit, Long offset, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/trust/grants/jwt-bearer/issuers"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (issuer != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("issuer", issuer)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call listTrustedJwtGrantIssuersValidateBeforeCall(String issuer, Long limit, Long offset, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = listTrustedJwtGrantIssuersCall(issuer, limit, offset, _callback); - return localVarCall; - - } - - /** - * List Trusted OAuth2 JWT Bearer Grant Type Issuers - * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - * @param issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - * @param limit The maximum amount of policies returned, upper bound is 500 policies (optional) - * @param offset The offset from where to start looking. (optional) - * @return List<TrustedJwtGrantIssuer> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 trustedJwtGrantIssuers -
500 genericError -
- */ - public List listTrustedJwtGrantIssuers(String issuer, Long limit, Long offset) throws ApiException { - ApiResponse> localVarResp = listTrustedJwtGrantIssuersWithHttpInfo(issuer, limit, offset); - return localVarResp.getData(); - } - - /** - * List Trusted OAuth2 JWT Bearer Grant Type Issuers - * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - * @param issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - * @param limit The maximum amount of policies returned, upper bound is 500 policies (optional) - * @param offset The offset from where to start looking. (optional) - * @return ApiResponse<List<TrustedJwtGrantIssuer>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 trustedJwtGrantIssuers -
500 genericError -
- */ - public ApiResponse> listTrustedJwtGrantIssuersWithHttpInfo(String issuer, Long limit, Long offset) throws ApiException { - okhttp3.Call localVarCall = listTrustedJwtGrantIssuersValidateBeforeCall(issuer, limit, offset, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * List Trusted OAuth2 JWT Bearer Grant Type Issuers (asynchronously) - * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - * @param issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - * @param limit The maximum amount of policies returned, upper bound is 500 policies (optional) - * @param offset The offset from where to start looking. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 trustedJwtGrantIssuers -
500 genericError -
- */ - public okhttp3.Call listTrustedJwtGrantIssuersAsync(String issuer, Long limit, Long offset, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = listTrustedJwtGrantIssuersValidateBeforeCall(issuer, limit, offset, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for patchOAuth2Client - * @param id The id of the OAuth 2.0 Client. (required) - * @param body (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call patchOAuth2ClientCall(String id, List body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/clients/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call patchOAuth2ClientValidateBeforeCall(String id, List body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling patchOAuth2Client(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling patchOAuth2Client(Async)"); - } - - - okhttp3.Call localVarCall = patchOAuth2ClientCall(id, body, _callback); - return localVarCall; - - } - - /** - * Patch an OAuth 2.0 Client - * Patch an existing OAuth 2.0 Client. 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) - * @param body (required) - * @return OAuth2Client - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public OAuth2Client patchOAuth2Client(String id, List body) throws ApiException { - ApiResponse localVarResp = patchOAuth2ClientWithHttpInfo(id, body); - return localVarResp.getData(); - } - - /** - * Patch an OAuth 2.0 Client - * Patch an existing OAuth 2.0 Client. 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) - * @param body (required) - * @return ApiResponse<OAuth2Client> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public ApiResponse patchOAuth2ClientWithHttpInfo(String id, List body) throws ApiException { - okhttp3.Call localVarCall = patchOAuth2ClientValidateBeforeCall(id, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Patch an OAuth 2.0 Client (asynchronously) - * Patch an existing OAuth 2.0 Client. 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) - * @param body (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call patchOAuth2ClientAsync(String id, List body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = patchOAuth2ClientValidateBeforeCall(id, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for rejectConsentRequest - * @param consentChallenge (required) - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call rejectConsentRequestCall(String consentChallenge, RejectRequest body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/oauth2/auth/requests/consent/reject"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (consentChallenge != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("consent_challenge", consentChallenge)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call rejectConsentRequestValidateBeforeCall(String consentChallenge, RejectRequest body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'consentChallenge' is set - if (consentChallenge == null) { - throw new ApiException("Missing the required parameter 'consentChallenge' when calling rejectConsentRequest(Async)"); - } - - - okhttp3.Call localVarCall = rejectConsentRequestCall(consentChallenge, body, _callback); - return localVarCall; - - } - - /** - * Reject a Consent Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @param consentChallenge (required) - * @param body (optional) - * @return CompletedRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public CompletedRequest rejectConsentRequest(String consentChallenge, RejectRequest body) throws ApiException { - ApiResponse localVarResp = rejectConsentRequestWithHttpInfo(consentChallenge, body); - return localVarResp.getData(); - } - - /** - * Reject a Consent Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @param consentChallenge (required) - * @param body (optional) - * @return ApiResponse<CompletedRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public ApiResponse rejectConsentRequestWithHttpInfo(String consentChallenge, RejectRequest body) throws ApiException { - okhttp3.Call localVarCall = rejectConsentRequestValidateBeforeCall(consentChallenge, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Reject a Consent Request (asynchronously) - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @param consentChallenge (required) - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 completedRequest -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call rejectConsentRequestAsync(String consentChallenge, RejectRequest body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = rejectConsentRequestValidateBeforeCall(consentChallenge, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for rejectLoginRequest - * @param loginChallenge (required) - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 completedRequest -
400 jsonError -
401 jsonError -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call rejectLoginRequestCall(String loginChallenge, RejectRequest body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/oauth2/auth/requests/login/reject"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (loginChallenge != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("login_challenge", loginChallenge)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call rejectLoginRequestValidateBeforeCall(String loginChallenge, RejectRequest body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'loginChallenge' is set - if (loginChallenge == null) { - throw new ApiException("Missing the required parameter 'loginChallenge' when calling rejectLoginRequest(Async)"); - } - - - okhttp3.Call localVarCall = rejectLoginRequestCall(loginChallenge, body, _callback); - return localVarCall; - - } - - /** - * Reject a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - * @param loginChallenge (required) - * @param body (optional) - * @return CompletedRequest - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 completedRequest -
400 jsonError -
401 jsonError -
404 jsonError -
500 jsonError -
- */ - public CompletedRequest rejectLoginRequest(String loginChallenge, RejectRequest body) throws ApiException { - ApiResponse localVarResp = rejectLoginRequestWithHttpInfo(loginChallenge, body); - return localVarResp.getData(); - } - - /** - * Reject a Login Request - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - * @param loginChallenge (required) - * @param body (optional) - * @return ApiResponse<CompletedRequest> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 completedRequest -
400 jsonError -
401 jsonError -
404 jsonError -
500 jsonError -
- */ - public ApiResponse rejectLoginRequestWithHttpInfo(String loginChallenge, RejectRequest body) throws ApiException { - okhttp3.Call localVarCall = rejectLoginRequestValidateBeforeCall(loginChallenge, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Reject a Login Request (asynchronously) - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - * @param loginChallenge (required) - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - - -
Status Code Description Response Headers
200 completedRequest -
400 jsonError -
401 jsonError -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call rejectLoginRequestAsync(String loginChallenge, RejectRequest body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = rejectLoginRequestValidateBeforeCall(loginChallenge, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for rejectLogoutRequest - * @param logoutChallenge (required) - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call rejectLogoutRequestCall(String logoutChallenge, RejectRequest body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/oauth2/auth/requests/logout/reject"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (logoutChallenge != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("logout_challenge", logoutChallenge)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json", "application/x-www-form-urlencoded" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call rejectLogoutRequestValidateBeforeCall(String logoutChallenge, RejectRequest body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'logoutChallenge' is set - if (logoutChallenge == null) { - throw new ApiException("Missing the required parameter 'logoutChallenge' when calling rejectLogoutRequest(Async)"); - } - - - okhttp3.Call localVarCall = rejectLogoutRequestCall(logoutChallenge, body, _callback); - return localVarCall; - - } - - /** - * Reject a Logout Request - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - * @param logoutChallenge (required) - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
404 jsonError -
500 jsonError -
- */ - public void rejectLogoutRequest(String logoutChallenge, RejectRequest body) throws ApiException { - rejectLogoutRequestWithHttpInfo(logoutChallenge, body); - } - - /** - * Reject a Logout Request - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - * @param logoutChallenge (required) - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
404 jsonError -
500 jsonError -
- */ - public ApiResponse rejectLogoutRequestWithHttpInfo(String logoutChallenge, RejectRequest body) throws ApiException { - okhttp3.Call localVarCall = rejectLogoutRequestValidateBeforeCall(logoutChallenge, body, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Reject a Logout Request (asynchronously) - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - * @param logoutChallenge (required) - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
404 jsonError -
500 jsonError -
- */ - public okhttp3.Call rejectLogoutRequestAsync(String logoutChallenge, RejectRequest body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = rejectLogoutRequestValidateBeforeCall(logoutChallenge, body, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for revokeAuthenticationSession - * @param subject (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
400 jsonError -
500 jsonError -
- */ - public okhttp3.Call revokeAuthenticationSessionCall(String subject, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/auth/sessions/login"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (subject != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("subject", subject)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call revokeAuthenticationSessionValidateBeforeCall(String subject, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'subject' is set - if (subject == null) { - throw new ApiException("Missing the required parameter 'subject' when calling revokeAuthenticationSession(Async)"); - } - - - okhttp3.Call localVarCall = revokeAuthenticationSessionCall(subject, _callback); - return localVarCall; - - } - - /** - * Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - * @param subject (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
400 jsonError -
500 jsonError -
- */ - public void revokeAuthenticationSession(String subject) throws ApiException { - revokeAuthenticationSessionWithHttpInfo(subject); - } - - /** - * Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - * @param subject (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
400 jsonError -
500 jsonError -
- */ - public ApiResponse revokeAuthenticationSessionWithHttpInfo(String subject) throws ApiException { - okhttp3.Call localVarCall = revokeAuthenticationSessionValidateBeforeCall(subject, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session (asynchronously) - * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - * @param subject (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
400 jsonError -
500 jsonError -
- */ - public okhttp3.Call revokeAuthenticationSessionAsync(String subject, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = revokeAuthenticationSessionValidateBeforeCall(subject, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for revokeConsentSessions - * @param subject The subject (Subject) who's consent sessions should be deleted. (required) - * @param client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - * @param all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
400 jsonError -
500 jsonError -
- */ - public okhttp3.Call revokeConsentSessionsCall(String subject, String client, Boolean all, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/auth/sessions/consent"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (subject != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("subject", subject)); - } - - if (client != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("client", client)); - } - - if (all != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("all", all)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call revokeConsentSessionsValidateBeforeCall(String subject, String client, Boolean all, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'subject' is set - if (subject == null) { - throw new ApiException("Missing the required parameter 'subject' when calling revokeConsentSessions(Async)"); - } - - - okhttp3.Call localVarCall = revokeConsentSessionsCall(subject, client, all, _callback); - return localVarCall; - - } - - /** - * Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - * @param subject The subject (Subject) who's consent sessions should be deleted. (required) - * @param client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - * @param all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
400 jsonError -
500 jsonError -
- */ - public void revokeConsentSessions(String subject, String client, Boolean all) throws ApiException { - revokeConsentSessionsWithHttpInfo(subject, client, all); - } - - /** - * Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - * @param subject The subject (Subject) who's consent sessions should be deleted. (required) - * @param client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - * @param all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
400 jsonError -
500 jsonError -
- */ - public ApiResponse revokeConsentSessionsWithHttpInfo(String subject, String client, Boolean all) throws ApiException { - okhttp3.Call localVarCall = revokeConsentSessionsValidateBeforeCall(subject, client, all, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client (asynchronously) - * This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - * @param subject The subject (Subject) who's consent sessions should be deleted. (required) - * @param client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - * @param all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
400 jsonError -
500 jsonError -
- */ - public okhttp3.Call revokeConsentSessionsAsync(String subject, String client, Boolean all, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = revokeConsentSessionsValidateBeforeCall(subject, client, all, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for trustJwtGrantIssuer - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 trustedJwtGrantIssuer -
400 genericError -
409 genericError -
500 genericError -
- */ - public okhttp3.Call trustJwtGrantIssuerCall(TrustJwtGrantIssuerBody body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/trust/grants/jwt-bearer/issuers"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call trustJwtGrantIssuerValidateBeforeCall(TrustJwtGrantIssuerBody body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = trustJwtGrantIssuerCall(body, _callback); - return localVarCall; - - } - - /** - * Trust an 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 body (optional) - * @return TrustedJwtGrantIssuer - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 trustedJwtGrantIssuer -
400 genericError -
409 genericError -
500 genericError -
- */ - public TrustedJwtGrantIssuer trustJwtGrantIssuer(TrustJwtGrantIssuerBody body) throws ApiException { - ApiResponse localVarResp = trustJwtGrantIssuerWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Trust an 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 body (optional) - * @return ApiResponse<TrustedJwtGrantIssuer> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 trustedJwtGrantIssuer -
400 genericError -
409 genericError -
500 genericError -
- */ - public ApiResponse trustJwtGrantIssuerWithHttpInfo(TrustJwtGrantIssuerBody body) throws ApiException { - okhttp3.Call localVarCall = trustJwtGrantIssuerValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Trust an OAuth2 JWT Bearer Grant Type Issuer (asynchronously) - * 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 body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
201 trustedJwtGrantIssuer -
400 genericError -
409 genericError -
500 genericError -
- */ - public okhttp3.Call trustJwtGrantIssuerAsync(TrustJwtGrantIssuerBody body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = trustJwtGrantIssuerValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateJsonWebKey - * @param kid The kid of the desired key (required) - * @param set The set (required) - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKey -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call updateJsonWebKeyCall(String kid, String set, JSONWebKey body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/keys/{set}/{kid}" - .replaceAll("\\{" + "kid" + "\\}", localVarApiClient.escapeString(kid.toString())) - .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateJsonWebKeyValidateBeforeCall(String kid, String set, JSONWebKey body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'kid' is set - if (kid == null) { - throw new ApiException("Missing the required parameter 'kid' when calling updateJsonWebKey(Async)"); - } - - // verify the required parameter 'set' is set - if (set == null) { - throw new ApiException("Missing the required parameter 'set' when calling updateJsonWebKey(Async)"); - } - - - okhttp3.Call localVarCall = updateJsonWebKeyCall(kid, set, body, _callback); - return localVarCall; - - } - - /** - * Update a 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 kid The kid of the desired key (required) - * @param set The set (required) - * @param body (optional) - * @return JSONWebKey - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKey -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public JSONWebKey updateJsonWebKey(String kid, String set, JSONWebKey body) throws ApiException { - ApiResponse localVarResp = updateJsonWebKeyWithHttpInfo(kid, set, body); - return localVarResp.getData(); - } - - /** - * Update a 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 kid The kid of the desired key (required) - * @param set The set (required) - * @param body (optional) - * @return ApiResponse<JSONWebKey> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKey -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public ApiResponse updateJsonWebKeyWithHttpInfo(String kid, String set, JSONWebKey body) throws ApiException { - okhttp3.Call localVarCall = updateJsonWebKeyValidateBeforeCall(kid, set, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update a JSON Web Key (asynchronously) - * 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 kid The kid of the desired key (required) - * @param set The set (required) - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKey -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call updateJsonWebKeyAsync(String kid, String set, JSONWebKey body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateJsonWebKeyValidateBeforeCall(kid, set, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateJsonWebKeySet - * @param set The set (required) - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call updateJsonWebKeySetCall(String set, JSONWebKeySet body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/keys/{set}" - .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateJsonWebKeySetValidateBeforeCall(String set, JSONWebKeySet body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'set' is set - if (set == null) { - throw new ApiException("Missing the required parameter 'set' when calling updateJsonWebKeySet(Async)"); - } - - - okhttp3.Call localVarCall = updateJsonWebKeySetCall(set, body, _callback); - return localVarCall; - - } - - /** - * 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 set (required) - * @param body (optional) - * @return JSONWebKeySet - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public JSONWebKeySet updateJsonWebKeySet(String set, JSONWebKeySet body) throws ApiException { - ApiResponse localVarResp = updateJsonWebKeySetWithHttpInfo(set, body); - return localVarResp.getData(); - } - - /** - * 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 set (required) - * @param body (optional) - * @return ApiResponse<JSONWebKeySet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public ApiResponse updateJsonWebKeySetWithHttpInfo(String set, JSONWebKeySet body) throws ApiException { - okhttp3.Call localVarCall = updateJsonWebKeySetValidateBeforeCall(set, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update a JSON Web Key Set (asynchronously) - * 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 set (required) - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
401 jsonError -
403 jsonError -
500 jsonError -
- */ - public okhttp3.Call updateJsonWebKeySetAsync(String set, JSONWebKeySet body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateJsonWebKeySetValidateBeforeCall(set, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateOAuth2Client - * @param id The id of the OAuth 2.0 Client. (required) - * @param body (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call updateOAuth2ClientCall(String id, OAuth2Client body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/clients/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateOAuth2ClientValidateBeforeCall(String id, OAuth2Client body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling updateOAuth2Client(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling updateOAuth2Client(Async)"); - } - - - okhttp3.Call localVarCall = updateOAuth2ClientCall(id, body, _callback); - return localVarCall; - - } - - /** - * Update an OAuth 2.0 Client - * Update an existing OAuth 2.0 Client. 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) - * @param body (required) - * @return OAuth2Client - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public OAuth2Client updateOAuth2Client(String id, OAuth2Client body) throws ApiException { - ApiResponse localVarResp = updateOAuth2ClientWithHttpInfo(id, body); - return localVarResp.getData(); - } - - /** - * Update an OAuth 2.0 Client - * Update an existing OAuth 2.0 Client. 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) - * @param body (required) - * @return ApiResponse<OAuth2Client> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public ApiResponse updateOAuth2ClientWithHttpInfo(String id, OAuth2Client body) throws ApiException { - okhttp3.Call localVarCall = updateOAuth2ClientValidateBeforeCall(id, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update an OAuth 2.0 Client (asynchronously) - * Update an existing OAuth 2.0 Client. 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) - * @param body (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call updateOAuth2ClientAsync(String id, OAuth2Client body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateOAuth2ClientValidateBeforeCall(id, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} 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 new file mode 100644 index 00000000000..9b2a4f43660 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/api/JwkApi.java @@ -0,0 +1,1035 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.api; + +import sh.ory.hydra.ApiCallback; +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.ApiResponse; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.Pair; +import sh.ory.hydra.ProgressRequestBody; +import sh.ory.hydra.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sh.ory.hydra.model.CreateJsonWebKeySet; +import sh.ory.hydra.model.ErrorOAuth2; +import sh.ory.hydra.model.JsonWebKey; +import sh.ory.hydra.model.JsonWebKeySet; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class JwkApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public JwkApi() { + this(Configuration.getDefaultApiClient()); + } + + public JwkApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createJsonWebKeySet + * @param set The JSON Web Key Set ID (required) + * @param createJsonWebKeySet (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
201 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call createJsonWebKeySetCall(String set, CreateJsonWebKeySet createJsonWebKeySet, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = createJsonWebKeySet; + + // create path and map variables + String localVarPath = "/admin/keys/{set}" + .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createJsonWebKeySetValidateBeforeCall(String set, CreateJsonWebKeySet createJsonWebKeySet, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'set' is set + if (set == null) { + throw new ApiException("Missing the required parameter 'set' when calling createJsonWebKeySet(Async)"); + } + + // verify the required parameter 'createJsonWebKeySet' is set + if (createJsonWebKeySet == null) { + throw new ApiException("Missing the required parameter 'createJsonWebKeySet' when calling createJsonWebKeySet(Async)"); + } + + + okhttp3.Call localVarCall = createJsonWebKeySetCall(set, createJsonWebKeySet, _callback); + return localVarCall; + + } + + /** + * 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) + * @param createJsonWebKeySet (required) + * @return JsonWebKeySet + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public JsonWebKeySet createJsonWebKeySet(String set, CreateJsonWebKeySet createJsonWebKeySet) throws ApiException { + ApiResponse localVarResp = createJsonWebKeySetWithHttpInfo(set, createJsonWebKeySet); + return localVarResp.getData(); + } + + /** + * 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) + * @param createJsonWebKeySet (required) + * @return ApiResponse<JsonWebKeySet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public ApiResponse createJsonWebKeySetWithHttpInfo(String set, CreateJsonWebKeySet createJsonWebKeySet) throws ApiException { + okhttp3.Call localVarCall = createJsonWebKeySetValidateBeforeCall(set, createJsonWebKeySet, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create JSON Web Key (asynchronously) + * 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) + * @param createJsonWebKeySet (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
201 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call createJsonWebKeySetAsync(String set, CreateJsonWebKeySet createJsonWebKeySet, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createJsonWebKeySetValidateBeforeCall(set, createJsonWebKeySet, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteJsonWebKey + * @param set The JSON Web Key Set (required) + * @param kid The JSON Web Key ID (kid) (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call deleteJsonWebKeyCall(String set, String kid, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/keys/{set}/{kid}" + .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())) + .replaceAll("\\{" + "kid" + "\\}", localVarApiClient.escapeString(kid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteJsonWebKeyValidateBeforeCall(String set, String kid, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'set' is set + if (set == null) { + throw new ApiException("Missing the required parameter 'set' when calling deleteJsonWebKey(Async)"); + } + + // verify the required parameter 'kid' is set + if (kid == null) { + throw new ApiException("Missing the required parameter 'kid' when calling deleteJsonWebKey(Async)"); + } + + + okhttp3.Call localVarCall = deleteJsonWebKeyCall(set, kid, _callback); + return localVarCall; + + } + + /** + * 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) + * @param kid The JSON Web Key ID (kid) (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public void deleteJsonWebKey(String set, String kid) throws ApiException { + deleteJsonWebKeyWithHttpInfo(set, kid); + } + + /** + * 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) + * @param kid The JSON Web Key ID (kid) (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public ApiResponse deleteJsonWebKeyWithHttpInfo(String set, String kid) throws ApiException { + okhttp3.Call localVarCall = deleteJsonWebKeyValidateBeforeCall(set, kid, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete JSON Web Key (asynchronously) + * 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) + * @param kid The JSON Web Key ID (kid) (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call deleteJsonWebKeyAsync(String set, String kid, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteJsonWebKeyValidateBeforeCall(set, kid, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteJsonWebKeySet + * @param set The JSON Web Key Set (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call deleteJsonWebKeySetCall(String set, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/keys/{set}" + .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteJsonWebKeySetValidateBeforeCall(String set, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'set' is set + if (set == null) { + throw new ApiException("Missing the required parameter 'set' when calling deleteJsonWebKeySet(Async)"); + } + + + okhttp3.Call localVarCall = deleteJsonWebKeySetCall(set, _callback); + return localVarCall; + + } + + /** + * 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) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public void deleteJsonWebKeySet(String set) throws ApiException { + deleteJsonWebKeySetWithHttpInfo(set); + } + + /** + * 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) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public ApiResponse deleteJsonWebKeySetWithHttpInfo(String set) throws ApiException { + okhttp3.Call localVarCall = deleteJsonWebKeySetValidateBeforeCall(set, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete JSON Web Key Set (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call deleteJsonWebKeySetAsync(String set, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteJsonWebKeySetValidateBeforeCall(set, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getJsonWebKey + * @param set JSON Web Key Set ID (required) + * @param kid JSON Web Key ID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call getJsonWebKeyCall(String set, String kid, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/keys/{set}/{kid}" + .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())) + .replaceAll("\\{" + "kid" + "\\}", localVarApiClient.escapeString(kid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getJsonWebKeyValidateBeforeCall(String set, String kid, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'set' is set + if (set == null) { + throw new ApiException("Missing the required parameter 'set' when calling getJsonWebKey(Async)"); + } + + // verify the required parameter 'kid' is set + if (kid == null) { + throw new ApiException("Missing the required parameter 'kid' when calling getJsonWebKey(Async)"); + } + + + okhttp3.Call localVarCall = getJsonWebKeyCall(set, kid, _callback); + return localVarCall; + + } + + /** + * 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) + * @param kid JSON Web Key ID (required) + * @return JsonWebKeySet + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public JsonWebKeySet getJsonWebKey(String set, String kid) throws ApiException { + ApiResponse localVarResp = getJsonWebKeyWithHttpInfo(set, kid); + return localVarResp.getData(); + } + + /** + * 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) + * @param kid JSON Web Key ID (required) + * @return ApiResponse<JsonWebKeySet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public ApiResponse getJsonWebKeyWithHttpInfo(String set, String kid) throws ApiException { + okhttp3.Call localVarCall = getJsonWebKeyValidateBeforeCall(set, kid, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get JSON Web Key (asynchronously) + * 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) + * @param kid JSON Web Key ID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call getJsonWebKeyAsync(String set, String kid, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getJsonWebKeyValidateBeforeCall(set, kid, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getJsonWebKeySet + * @param set JSON Web Key Set ID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call getJsonWebKeySetCall(String set, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/keys/{set}" + .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getJsonWebKeySetValidateBeforeCall(String set, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'set' is set + if (set == null) { + throw new ApiException("Missing the required parameter 'set' when calling getJsonWebKeySet(Async)"); + } + + + okhttp3.Call localVarCall = getJsonWebKeySetCall(set, _callback); + return localVarCall; + + } + + /** + * 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) + * @return JsonWebKeySet + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public JsonWebKeySet getJsonWebKeySet(String set) throws ApiException { + ApiResponse localVarResp = getJsonWebKeySetWithHttpInfo(set); + return localVarResp.getData(); + } + + /** + * 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) + * @return ApiResponse<JsonWebKeySet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public ApiResponse getJsonWebKeySetWithHttpInfo(String set) throws ApiException { + okhttp3.Call localVarCall = getJsonWebKeySetValidateBeforeCall(set, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a JSON Web Key Set (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call getJsonWebKeySetAsync(String set, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getJsonWebKeySetValidateBeforeCall(set, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for setJsonWebKey + * @param set The JSON Web Key Set ID (required) + * @param kid JSON Web Key ID (required) + * @param jsonWebKey (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKey -
0 errorOAuth2 -
+ */ + public okhttp3.Call setJsonWebKeyCall(String set, String kid, JsonWebKey jsonWebKey, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = jsonWebKey; + + // create path and map variables + String localVarPath = "/admin/keys/{set}/{kid}" + .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())) + .replaceAll("\\{" + "kid" + "\\}", localVarApiClient.escapeString(kid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call setJsonWebKeyValidateBeforeCall(String set, String kid, JsonWebKey jsonWebKey, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'set' is set + if (set == null) { + throw new ApiException("Missing the required parameter 'set' when calling setJsonWebKey(Async)"); + } + + // verify the required parameter 'kid' is set + if (kid == null) { + throw new ApiException("Missing the required parameter 'kid' when calling setJsonWebKey(Async)"); + } + + + okhttp3.Call localVarCall = setJsonWebKeyCall(set, kid, jsonWebKey, _callback); + return localVarCall; + + } + + /** + * 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) + * @param kid JSON Web Key ID (required) + * @param jsonWebKey (optional) + * @return JsonWebKey + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKey -
0 errorOAuth2 -
+ */ + public JsonWebKey setJsonWebKey(String set, String kid, JsonWebKey jsonWebKey) throws ApiException { + ApiResponse localVarResp = setJsonWebKeyWithHttpInfo(set, kid, jsonWebKey); + return localVarResp.getData(); + } + + /** + * 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) + * @param kid JSON Web Key ID (required) + * @param jsonWebKey (optional) + * @return ApiResponse<JsonWebKey> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKey -
0 errorOAuth2 -
+ */ + public ApiResponse setJsonWebKeyWithHttpInfo(String set, String kid, JsonWebKey jsonWebKey) throws ApiException { + okhttp3.Call localVarCall = setJsonWebKeyValidateBeforeCall(set, kid, jsonWebKey, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Set JSON Web Key (asynchronously) + * 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) + * @param kid JSON Web Key ID (required) + * @param jsonWebKey (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKey -
0 errorOAuth2 -
+ */ + public okhttp3.Call setJsonWebKeyAsync(String set, String kid, JsonWebKey jsonWebKey, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = setJsonWebKeyValidateBeforeCall(set, kid, jsonWebKey, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for setJsonWebKeySet + * @param set The JSON Web Key Set ID (required) + * @param jsonWebKeySet (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call setJsonWebKeySetCall(String set, JsonWebKeySet jsonWebKeySet, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = jsonWebKeySet; + + // create path and map variables + String localVarPath = "/admin/keys/{set}" + .replaceAll("\\{" + "set" + "\\}", localVarApiClient.escapeString(set.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call setJsonWebKeySetValidateBeforeCall(String set, JsonWebKeySet jsonWebKeySet, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'set' is set + if (set == null) { + throw new ApiException("Missing the required parameter 'set' when calling setJsonWebKeySet(Async)"); + } + + + okhttp3.Call localVarCall = setJsonWebKeySetCall(set, jsonWebKeySet, _callback); + return localVarCall; + + } + + /** + * 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) + * @param jsonWebKeySet (optional) + * @return JsonWebKeySet + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public JsonWebKeySet setJsonWebKeySet(String set, JsonWebKeySet jsonWebKeySet) throws ApiException { + ApiResponse localVarResp = setJsonWebKeySetWithHttpInfo(set, jsonWebKeySet); + return localVarResp.getData(); + } + + /** + * 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) + * @param jsonWebKeySet (optional) + * @return ApiResponse<JsonWebKeySet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public ApiResponse setJsonWebKeySetWithHttpInfo(String set, JsonWebKeySet jsonWebKeySet) throws ApiException { + okhttp3.Call localVarCall = setJsonWebKeySetValidateBeforeCall(set, jsonWebKeySet, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update a JSON Web Key Set (asynchronously) + * 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) + * @param jsonWebKeySet (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call setJsonWebKeySetAsync(String set, JsonWebKeySet jsonWebKeySet, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = setJsonWebKeySetValidateBeforeCall(set, jsonWebKeySet, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} 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 a155afbae1d..272ce009038 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -27,12 +27,18 @@ import java.io.IOException; +import sh.ory.hydra.model.GenericError; +import sh.ory.hydra.model.GetVersion200Response; +import sh.ory.hydra.model.HealthStatus; +import sh.ory.hydra.model.IsReady200Response; +import sh.ory.hydra.model.IsReady503Response; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.ws.rs.core.GenericType; public class MetadataApi { private ApiClient localVarApiClient; @@ -72,19 +78,136 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for prometheus + * Build call for getVersion * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
200 Returns the Ory Hydra version. -
*/ - public okhttp3.Call prometheusCall(final ApiCallback _callback) throws ApiException { + public okhttp3.Call getVersionCall(final ApiCallback _callback) throws ApiException { String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/version"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getVersionValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = getVersionCall(_callback); + return localVarCall; + + } + + /** + * 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. + * @return GetVersion200Response + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Returns the Ory Hydra version. -
+ */ + public GetVersion200Response getVersion() throws ApiException { + ApiResponse localVarResp = getVersionWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * 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. + * @return ApiResponse<GetVersion200Response> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Returns the Ory Hydra version. -
+ */ + public ApiResponse getVersionWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getVersionValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Return Running Software Version. (asynchronously) + * 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 _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Returns the Ory Hydra version. -
+ */ + public okhttp3.Call getVersionAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getVersionValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for isAlive + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Ory Hydra is ready to accept connections. -
500 genericError -
+ */ + public okhttp3.Call isAliveCall(final ApiCallback _callback) throws ApiException { + String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -100,7 +223,7 @@ public okhttp3.Call prometheusCall(final ApiCallback _callback) throws ApiExcept Object localVarPostBody = null; // create path and map variables - String localVarPath = "/metrics/prometheus"; + String localVarPath = "/health/alive"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -109,7 +232,128 @@ public okhttp3.Call prometheusCall(final ApiCallback _callback) throws ApiExcept Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call isAliveValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = isAliveCall(_callback); + return localVarCall; + + } + + /** + * 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. + * @return HealthStatus + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Ory Hydra is ready to accept connections. -
500 genericError -
+ */ + public HealthStatus isAlive() throws ApiException { + ApiResponse localVarResp = isAliveWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * 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. + * @return ApiResponse<HealthStatus> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Ory Hydra is ready to accept connections. -
500 genericError -
+ */ + public ApiResponse isAliveWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = isAliveValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Check HTTP Server Status (asynchronously) + * 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 _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Ory Hydra is ready to accept connections. -
500 genericError -
+ */ + public okhttp3.Call isAliveAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = isAliveValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for isReady + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Ory Hydra is ready to accept requests. -
503 Ory Kratos is not yet ready to accept requests. -
+ */ + public okhttp3.Call isReadyCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/health/ready"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -129,60 +373,67 @@ public okhttp3.Call prometheusCall(final ApiCallback _callback) throws ApiExcept } @SuppressWarnings("rawtypes") - private okhttp3.Call prometheusValidateBeforeCall(final ApiCallback _callback) throws ApiException { + private okhttp3.Call isReadyValidateBeforeCall(final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = prometheusCall(_callback); + okhttp3.Call localVarCall = isReadyCall(_callback); return localVarCall; } /** - * Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + * 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. + * @return IsReady200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
200 Ory Hydra is ready to accept requests. -
503 Ory Kratos is not yet ready to accept requests. -
*/ - public void prometheus() throws ApiException { - prometheusWithHttpInfo(); + public IsReady200Response isReady() throws ApiException { + ApiResponse localVarResp = isReadyWithHttpInfo(); + return localVarResp.getData(); } /** - * Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` - * @return ApiResponse<Void> + * 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. + * @return ApiResponse<IsReady200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
200 Ory Hydra is ready to accept requests. -
503 Ory Kratos is not yet ready to accept requests. -
*/ - public ApiResponse prometheusWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = prometheusValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); + public ApiResponse isReadyWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = isReadyValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: (asynchronously) - * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + * Check HTTP Server and Database Status (asynchronously) + * 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 _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
200 Ory Hydra is ready to accept requests. -
503 Ory Kratos is not yet ready to accept requests. -
*/ - public okhttp3.Call prometheusAsync(final ApiCallback _callback) throws ApiException { + public okhttp3.Call isReadyAsync(final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = prometheusValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); + okhttp3.Call localVarCall = isReadyValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } } 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 new file mode 100644 index 00000000000..983a1c9f4fc --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/api/OAuth2Api.java @@ -0,0 +1,3937 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.api; + +import sh.ory.hydra.ApiCallback; +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.ApiResponse; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.Pair; +import sh.ory.hydra.ProgressRequestBody; +import sh.ory.hydra.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sh.ory.hydra.model.AcceptOAuth2ConsentRequest; +import sh.ory.hydra.model.AcceptOAuth2LoginRequest; +import sh.ory.hydra.model.ErrorOAuth2; +import sh.ory.hydra.model.GenericError; +import sh.ory.hydra.model.IntrospectedOAuth2Token; +import sh.ory.hydra.model.JsonPatch; +import sh.ory.hydra.model.OAuth2Client; +import sh.ory.hydra.model.OAuth2ClientTokenLifespans; +import sh.ory.hydra.model.OAuth2ConsentRequest; +import sh.ory.hydra.model.OAuth2ConsentSession; +import sh.ory.hydra.model.OAuth2LoginRequest; +import sh.ory.hydra.model.OAuth2LogoutRequest; +import sh.ory.hydra.model.OAuth2RedirectTo; +import sh.ory.hydra.model.OAuth2TokenExchange; +import sh.ory.hydra.model.RejectOAuth2Request; +import sh.ory.hydra.model.TrustOAuth2JwtGrantIssuer; +import sh.ory.hydra.model.TrustedOAuth2JwtGrantIssuer; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class OAuth2Api { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OAuth2Api() { + this(Configuration.getDefaultApiClient()); + } + + public OAuth2Api(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for acceptOAuth2ConsentRequest + * @param consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param acceptOAuth2ConsentRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call acceptOAuth2ConsentRequestCall(String consentChallenge, AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = acceptOAuth2ConsentRequest; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/requests/consent/accept"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (consentChallenge != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("consent_challenge", consentChallenge)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call acceptOAuth2ConsentRequestValidateBeforeCall(String consentChallenge, AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) { + throw new ApiException("Missing the required parameter 'consentChallenge' when calling acceptOAuth2ConsentRequest(Async)"); + } + + + okhttp3.Call localVarCall = acceptOAuth2ConsentRequestCall(consentChallenge, acceptOAuth2ConsentRequest, _callback); + return localVarCall; + + } + + /** + * 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 consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param acceptOAuth2ConsentRequest (optional) + * @return OAuth2RedirectTo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public OAuth2RedirectTo acceptOAuth2ConsentRequest(String consentChallenge, AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest) throws ApiException { + ApiResponse localVarResp = acceptOAuth2ConsentRequestWithHttpInfo(consentChallenge, acceptOAuth2ConsentRequest); + return localVarResp.getData(); + } + + /** + * 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 consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param acceptOAuth2ConsentRequest (optional) + * @return ApiResponse<OAuth2RedirectTo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public ApiResponse acceptOAuth2ConsentRequestWithHttpInfo(String consentChallenge, AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest) throws ApiException { + okhttp3.Call localVarCall = acceptOAuth2ConsentRequestValidateBeforeCall(consentChallenge, acceptOAuth2ConsentRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Accept OAuth 2.0 Consent Request (asynchronously) + * 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 consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param acceptOAuth2ConsentRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call acceptOAuth2ConsentRequestAsync(String consentChallenge, AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = acceptOAuth2ConsentRequestValidateBeforeCall(consentChallenge, acceptOAuth2ConsentRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for acceptOAuth2LoginRequest + * @param loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param acceptOAuth2LoginRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call acceptOAuth2LoginRequestCall(String loginChallenge, AcceptOAuth2LoginRequest acceptOAuth2LoginRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = acceptOAuth2LoginRequest; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/requests/login/accept"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (loginChallenge != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("login_challenge", loginChallenge)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call acceptOAuth2LoginRequestValidateBeforeCall(String loginChallenge, AcceptOAuth2LoginRequest acceptOAuth2LoginRequest, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) { + throw new ApiException("Missing the required parameter 'loginChallenge' when calling acceptOAuth2LoginRequest(Async)"); + } + + + okhttp3.Call localVarCall = acceptOAuth2LoginRequestCall(loginChallenge, acceptOAuth2LoginRequest, _callback); + return localVarCall; + + } + + /** + * 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 loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param acceptOAuth2LoginRequest (optional) + * @return OAuth2RedirectTo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public OAuth2RedirectTo acceptOAuth2LoginRequest(String loginChallenge, AcceptOAuth2LoginRequest acceptOAuth2LoginRequest) throws ApiException { + ApiResponse localVarResp = acceptOAuth2LoginRequestWithHttpInfo(loginChallenge, acceptOAuth2LoginRequest); + return localVarResp.getData(); + } + + /** + * 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 loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param acceptOAuth2LoginRequest (optional) + * @return ApiResponse<OAuth2RedirectTo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public ApiResponse acceptOAuth2LoginRequestWithHttpInfo(String loginChallenge, AcceptOAuth2LoginRequest acceptOAuth2LoginRequest) throws ApiException { + okhttp3.Call localVarCall = acceptOAuth2LoginRequestValidateBeforeCall(loginChallenge, acceptOAuth2LoginRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Accept OAuth 2.0 Login Request (asynchronously) + * 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 loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param acceptOAuth2LoginRequest (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call acceptOAuth2LoginRequestAsync(String loginChallenge, AcceptOAuth2LoginRequest acceptOAuth2LoginRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = acceptOAuth2LoginRequestValidateBeforeCall(loginChallenge, acceptOAuth2LoginRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for acceptOAuth2LogoutRequest + * @param logoutChallenge OAuth 2.0 Logout Request Challenge (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call acceptOAuth2LogoutRequestCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/requests/logout/accept"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (logoutChallenge != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("logout_challenge", logoutChallenge)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call acceptOAuth2LogoutRequestValidateBeforeCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) { + throw new ApiException("Missing the required parameter 'logoutChallenge' when calling acceptOAuth2LogoutRequest(Async)"); + } + + + okhttp3.Call localVarCall = acceptOAuth2LogoutRequestCall(logoutChallenge, _callback); + return localVarCall; + + } + + /** + * 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 logoutChallenge OAuth 2.0 Logout Request Challenge (required) + * @return OAuth2RedirectTo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public OAuth2RedirectTo acceptOAuth2LogoutRequest(String logoutChallenge) throws ApiException { + ApiResponse localVarResp = acceptOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + return localVarResp.getData(); + } + + /** + * 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 logoutChallenge OAuth 2.0 Logout Request Challenge (required) + * @return ApiResponse<OAuth2RedirectTo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public ApiResponse acceptOAuth2LogoutRequestWithHttpInfo(String logoutChallenge) throws ApiException { + okhttp3.Call localVarCall = acceptOAuth2LogoutRequestValidateBeforeCall(logoutChallenge, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Accept OAuth 2.0 Session Logout Request (asynchronously) + * 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 logoutChallenge OAuth 2.0 Logout Request Challenge (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call acceptOAuth2LogoutRequestAsync(String logoutChallenge, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = acceptOAuth2LogoutRequestValidateBeforeCall(logoutChallenge, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createOAuth2Client + * @param oauth2Client OAuth 2.0 Client Request Body (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 oAuth2Client -
400 Bad Request Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call createOAuth2ClientCall(OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = oauth2Client; + + // create path and map variables + String localVarPath = "/admin/clients"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createOAuth2ClientValidateBeforeCall(OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'oauth2Client' is set + if (oauth2Client == null) { + throw new ApiException("Missing the required parameter 'oauth2Client' when calling createOAuth2Client(Async)"); + } + + + okhttp3.Call localVarCall = createOAuth2ClientCall(oauth2Client, _callback); + return localVarCall; + + } + + /** + * 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 oauth2Client OAuth 2.0 Client Request Body (required) + * @return OAuth2Client + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 oAuth2Client -
400 Bad Request Error Response -
0 Default Error Response -
+ */ + public OAuth2Client createOAuth2Client(OAuth2Client oauth2Client) throws ApiException { + ApiResponse localVarResp = createOAuth2ClientWithHttpInfo(oauth2Client); + return localVarResp.getData(); + } + + /** + * 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 oauth2Client OAuth 2.0 Client Request Body (required) + * @return ApiResponse<OAuth2Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 oAuth2Client -
400 Bad Request Error Response -
0 Default Error Response -
+ */ + public ApiResponse createOAuth2ClientWithHttpInfo(OAuth2Client oauth2Client) throws ApiException { + okhttp3.Call localVarCall = createOAuth2ClientValidateBeforeCall(oauth2Client, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create OAuth 2.0 Client (asynchronously) + * 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 oauth2Client OAuth 2.0 Client Request Body (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 oAuth2Client -
400 Bad Request Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call createOAuth2ClientAsync(OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createOAuth2ClientValidateBeforeCall(oauth2Client, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteOAuth2Client + * @param id The id of the OAuth 2.0 Client. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public okhttp3.Call deleteOAuth2ClientCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/clients/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOAuth2ClientValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteOAuth2Client(Async)"); + } + + + okhttp3.Call localVarCall = deleteOAuth2ClientCall(id, _callback); + return localVarCall; + + } + + /** + * 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) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public void deleteOAuth2Client(String id) throws ApiException { + deleteOAuth2ClientWithHttpInfo(id); + } + + /** + * 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) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public ApiResponse deleteOAuth2ClientWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = deleteOAuth2ClientValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete OAuth 2.0 Client (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public okhttp3.Call deleteOAuth2ClientAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteOAuth2ClientValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteOAuth2Token + * @param clientId OAuth 2.0 Client ID (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call deleteOAuth2TokenCall(String clientId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/tokens"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (clientId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("client_id", clientId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOAuth2TokenValidateBeforeCall(String clientId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'clientId' is set + if (clientId == null) { + throw new ApiException("Missing the required parameter 'clientId' when calling deleteOAuth2Token(Async)"); + } + + + okhttp3.Call localVarCall = deleteOAuth2TokenCall(clientId, _callback); + return localVarCall; + + } + + /** + * 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 clientId OAuth 2.0 Client ID (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public void deleteOAuth2Token(String clientId) throws ApiException { + deleteOAuth2TokenWithHttpInfo(clientId); + } + + /** + * 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 clientId OAuth 2.0 Client ID (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public ApiResponse deleteOAuth2TokenWithHttpInfo(String clientId) throws ApiException { + okhttp3.Call localVarCall = deleteOAuth2TokenValidateBeforeCall(clientId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client (asynchronously) + * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + * @param clientId OAuth 2.0 Client ID (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call deleteOAuth2TokenAsync(String clientId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteOAuth2TokenValidateBeforeCall(clientId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for deleteTrustedOAuth2JwtGrantIssuer + * @param id The id of the desired grant (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public okhttp3.Call deleteTrustedOAuth2JwtGrantIssuerCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/trust/grants/jwt-bearer/issuers/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteTrustedOAuth2JwtGrantIssuerValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteTrustedOAuth2JwtGrantIssuer(Async)"); + } + + + okhttp3.Call localVarCall = deleteTrustedOAuth2JwtGrantIssuerCall(id, _callback); + return localVarCall; + + } + + /** + * 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) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public void deleteTrustedOAuth2JwtGrantIssuer(String id) throws ApiException { + deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); + } + + /** + * 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) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public ApiResponse deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = deleteTrustedOAuth2JwtGrantIssuerValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public okhttp3.Call deleteTrustedOAuth2JwtGrantIssuerAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteTrustedOAuth2JwtGrantIssuerValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getOAuth2Client + * @param id The id of the OAuth 2.0 Client. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 Default Error Response -
+ */ + public okhttp3.Call getOAuth2ClientCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/clients/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOAuth2ClientValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getOAuth2Client(Async)"); + } + + + okhttp3.Call localVarCall = getOAuth2ClientCall(id, _callback); + return localVarCall; + + } + + /** + * 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) + * @return OAuth2Client + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 Default Error Response -
+ */ + public OAuth2Client getOAuth2Client(String id) throws ApiException { + ApiResponse localVarResp = getOAuth2ClientWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * 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) + * @return ApiResponse<OAuth2Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 Default Error Response -
+ */ + public ApiResponse getOAuth2ClientWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getOAuth2ClientValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get an OAuth 2.0 Client (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 Default Error Response -
+ */ + public okhttp3.Call getOAuth2ClientAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOAuth2ClientValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOAuth2ConsentRequest + * @param consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2ConsentRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call getOAuth2ConsentRequestCall(String consentChallenge, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/requests/consent"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (consentChallenge != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("consent_challenge", consentChallenge)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOAuth2ConsentRequestValidateBeforeCall(String consentChallenge, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) { + throw new ApiException("Missing the required parameter 'consentChallenge' when calling getOAuth2ConsentRequest(Async)"); + } + + + okhttp3.Call localVarCall = getOAuth2ConsentRequestCall(consentChallenge, _callback); + return localVarCall; + + } + + /** + * 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 consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @return OAuth2ConsentRequest + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2ConsentRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public OAuth2ConsentRequest getOAuth2ConsentRequest(String consentChallenge) throws ApiException { + ApiResponse localVarResp = getOAuth2ConsentRequestWithHttpInfo(consentChallenge); + return localVarResp.getData(); + } + + /** + * 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 consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @return ApiResponse<OAuth2ConsentRequest> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2ConsentRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public ApiResponse getOAuth2ConsentRequestWithHttpInfo(String consentChallenge) throws ApiException { + okhttp3.Call localVarCall = getOAuth2ConsentRequestValidateBeforeCall(consentChallenge, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get OAuth 2.0 Consent Request (asynchronously) + * 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 consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2ConsentRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call getOAuth2ConsentRequestAsync(String consentChallenge, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOAuth2ConsentRequestValidateBeforeCall(consentChallenge, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOAuth2LoginRequest + * @param loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2LoginRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call getOAuth2LoginRequestCall(String loginChallenge, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/requests/login"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (loginChallenge != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("login_challenge", loginChallenge)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOAuth2LoginRequestValidateBeforeCall(String loginChallenge, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) { + throw new ApiException("Missing the required parameter 'loginChallenge' when calling getOAuth2LoginRequest(Async)"); + } + + + okhttp3.Call localVarCall = getOAuth2LoginRequestCall(loginChallenge, _callback); + return localVarCall; + + } + + /** + * 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 loginChallenge OAuth 2.0 Login Request Challenge (required) + * @return OAuth2LoginRequest + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2LoginRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public OAuth2LoginRequest getOAuth2LoginRequest(String loginChallenge) throws ApiException { + ApiResponse localVarResp = getOAuth2LoginRequestWithHttpInfo(loginChallenge); + return localVarResp.getData(); + } + + /** + * 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 loginChallenge OAuth 2.0 Login Request Challenge (required) + * @return ApiResponse<OAuth2LoginRequest> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2LoginRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public ApiResponse getOAuth2LoginRequestWithHttpInfo(String loginChallenge) throws ApiException { + okhttp3.Call localVarCall = getOAuth2LoginRequestValidateBeforeCall(loginChallenge, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get OAuth 2.0 Login Request (asynchronously) + * 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 loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2LoginRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call getOAuth2LoginRequestAsync(String loginChallenge, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOAuth2LoginRequestValidateBeforeCall(loginChallenge, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOAuth2LogoutRequest + * @param logoutChallenge (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2LogoutRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call getOAuth2LogoutRequestCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/requests/logout"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (logoutChallenge != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("logout_challenge", logoutChallenge)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOAuth2LogoutRequestValidateBeforeCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) { + throw new ApiException("Missing the required parameter 'logoutChallenge' when calling getOAuth2LogoutRequest(Async)"); + } + + + okhttp3.Call localVarCall = getOAuth2LogoutRequestCall(logoutChallenge, _callback); + return localVarCall; + + } + + /** + * Get OAuth 2.0 Session Logout Request + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * @param logoutChallenge (required) + * @return OAuth2LogoutRequest + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2LogoutRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public OAuth2LogoutRequest getOAuth2LogoutRequest(String logoutChallenge) throws ApiException { + ApiResponse localVarResp = getOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + return localVarResp.getData(); + } + + /** + * Get OAuth 2.0 Session Logout Request + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * @param logoutChallenge (required) + * @return ApiResponse<OAuth2LogoutRequest> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2LogoutRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public ApiResponse getOAuth2LogoutRequestWithHttpInfo(String logoutChallenge) throws ApiException { + okhttp3.Call localVarCall = getOAuth2LogoutRequestValidateBeforeCall(logoutChallenge, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get OAuth 2.0 Session Logout Request (asynchronously) + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * @param logoutChallenge (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2LogoutRequest -
410 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call getOAuth2LogoutRequestAsync(String logoutChallenge, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOAuth2LogoutRequestValidateBeforeCall(logoutChallenge, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getTrustedOAuth2JwtGrantIssuer + * @param id The id of the desired grant (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 trustedOAuth2JwtGrantIssuer -
0 genericError -
+ */ + public okhttp3.Call getTrustedOAuth2JwtGrantIssuerCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/trust/grants/jwt-bearer/issuers/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getTrustedOAuth2JwtGrantIssuerValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getTrustedOAuth2JwtGrantIssuer(Async)"); + } + + + okhttp3.Call localVarCall = getTrustedOAuth2JwtGrantIssuerCall(id, _callback); + return localVarCall; + + } + + /** + * 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) + * @return TrustedOAuth2JwtGrantIssuer + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 trustedOAuth2JwtGrantIssuer -
0 genericError -
+ */ + public TrustedOAuth2JwtGrantIssuer getTrustedOAuth2JwtGrantIssuer(String id) throws ApiException { + ApiResponse localVarResp = getTrustedOAuth2JwtGrantIssuerWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * 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) + * @return ApiResponse<TrustedOAuth2JwtGrantIssuer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 trustedOAuth2JwtGrantIssuer -
0 genericError -
+ */ + public ApiResponse getTrustedOAuth2JwtGrantIssuerWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getTrustedOAuth2JwtGrantIssuerValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Trusted OAuth2 JWT Bearer Grant Type Issuer (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 trustedOAuth2JwtGrantIssuer -
0 genericError -
+ */ + public okhttp3.Call getTrustedOAuth2JwtGrantIssuerAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getTrustedOAuth2JwtGrantIssuerValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for introspectOAuth2Token + * @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) + * @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. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 introspectedOAuth2Token -
0 errorOAuth2 -
+ */ + public okhttp3.Call introspectOAuth2TokenCall(String token, String scope, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/introspect"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (scope != null) { + localVarFormParams.put("scope", scope); + } + + if (token != null) { + localVarFormParams.put("token", token); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call introspectOAuth2TokenValidateBeforeCall(String token, String scope, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'token' is set + if (token == null) { + throw new ApiException("Missing the required parameter 'token' when calling introspectOAuth2Token(Async)"); + } + + + okhttp3.Call localVarCall = introspectOAuth2TokenCall(token, scope, _callback); + return localVarCall; + + } + + /** + * 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) + * @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. (optional) + * @return IntrospectedOAuth2Token + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 introspectedOAuth2Token -
0 errorOAuth2 -
+ */ + public IntrospectedOAuth2Token introspectOAuth2Token(String token, String scope) throws ApiException { + ApiResponse localVarResp = introspectOAuth2TokenWithHttpInfo(token, scope); + return localVarResp.getData(); + } + + /** + * 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) + * @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. (optional) + * @return ApiResponse<IntrospectedOAuth2Token> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 introspectedOAuth2Token -
0 errorOAuth2 -
+ */ + public ApiResponse introspectOAuth2TokenWithHttpInfo(String token, String scope) throws ApiException { + okhttp3.Call localVarCall = introspectOAuth2TokenValidateBeforeCall(token, scope, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Introspect OAuth2 Access and Refresh Tokens (asynchronously) + * 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) + * @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. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 introspectedOAuth2Token -
0 errorOAuth2 -
+ */ + public okhttp3.Call introspectOAuth2TokenAsync(String token, String scope, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = introspectOAuth2TokenValidateBeforeCall(token, scope, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listOAuth2Clients + * @param 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 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 clientName The name of the clients to filter by. (optional) + * @param owner The owner of the clients to filter by. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Paginated OAuth2 Client List Response -
0 Default Error Response -
+ */ + public okhttp3.Call listOAuth2ClientsCall(Long pageSize, String pageToken, String clientName, String owner, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/clients"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageToken != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_token", pageToken)); + } + + if (clientName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("client_name", clientName)); + } + + if (owner != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("owner", owner)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listOAuth2ClientsValidateBeforeCall(Long pageSize, String pageToken, String clientName, String owner, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = listOAuth2ClientsCall(pageSize, pageToken, clientName, owner, _callback); + return localVarCall; + + } + + /** + * 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 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 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 clientName The name of the clients to filter by. (optional) + * @param owner The owner of the clients to filter by. (optional) + * @return List<OAuth2Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Paginated OAuth2 Client List Response -
0 Default Error Response -
+ */ + public List listOAuth2Clients(Long pageSize, String pageToken, String clientName, String owner) throws ApiException { + ApiResponse> localVarResp = listOAuth2ClientsWithHttpInfo(pageSize, pageToken, clientName, owner); + return localVarResp.getData(); + } + + /** + * 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 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 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 clientName The name of the clients to filter by. (optional) + * @param owner The owner of the clients to filter by. (optional) + * @return ApiResponse<List<OAuth2Client>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Paginated OAuth2 Client List Response -
0 Default Error Response -
+ */ + public ApiResponse> listOAuth2ClientsWithHttpInfo(Long pageSize, String pageToken, String clientName, String owner) throws ApiException { + okhttp3.Call localVarCall = listOAuth2ClientsValidateBeforeCall(pageSize, pageToken, clientName, owner, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List OAuth 2.0 Clients (asynchronously) + * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + * @param 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 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 clientName The name of the clients to filter by. (optional) + * @param owner The owner of the clients to filter by. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Paginated OAuth2 Client List Response -
0 Default Error Response -
+ */ + public okhttp3.Call listOAuth2ClientsAsync(Long pageSize, String pageToken, String clientName, String owner, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = listOAuth2ClientsValidateBeforeCall(pageSize, pageToken, clientName, owner, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listOAuth2ConsentSessions + * @param subject The subject to list the consent sessions for. (required) + * @param 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 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 _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2ConsentSessions -
0 errorOAuth2 -
+ */ + public okhttp3.Call listOAuth2ConsentSessionsCall(String subject, Long pageSize, String pageToken, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/sessions/consent"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + + if (pageToken != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_token", pageToken)); + } + + if (subject != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("subject", subject)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listOAuth2ConsentSessionsValidateBeforeCall(String subject, Long pageSize, String pageToken, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'subject' is set + if (subject == null) { + throw new ApiException("Missing the required parameter 'subject' when calling listOAuth2ConsentSessions(Async)"); + } + + + okhttp3.Call localVarCall = listOAuth2ConsentSessionsCall(subject, pageSize, pageToken, _callback); + return localVarCall; + + } + + /** + * 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) + * @param 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 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) + * @return List<OAuth2ConsentSession> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2ConsentSessions -
0 errorOAuth2 -
+ */ + public List listOAuth2ConsentSessions(String subject, Long pageSize, String pageToken) throws ApiException { + ApiResponse> localVarResp = listOAuth2ConsentSessionsWithHttpInfo(subject, pageSize, pageToken); + return localVarResp.getData(); + } + + /** + * 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) + * @param 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 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) + * @return ApiResponse<List<OAuth2ConsentSession>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2ConsentSessions -
0 errorOAuth2 -
+ */ + public ApiResponse> listOAuth2ConsentSessionsWithHttpInfo(String subject, Long pageSize, String pageToken) throws ApiException { + okhttp3.Call localVarCall = listOAuth2ConsentSessionsValidateBeforeCall(subject, pageSize, pageToken, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List OAuth 2.0 Consent Sessions of a Subject (asynchronously) + * 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) + * @param 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 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 _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2ConsentSessions -
0 errorOAuth2 -
+ */ + public okhttp3.Call listOAuth2ConsentSessionsAsync(String subject, Long pageSize, String pageToken, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = listOAuth2ConsentSessionsValidateBeforeCall(subject, pageSize, pageToken, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listTrustedOAuth2JwtGrantIssuers + * @param maxItems (optional) + * @param defaultItems (optional) + * @param issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 trustedOAuth2JwtGrantIssuers -
0 genericError -
+ */ + public okhttp3.Call listTrustedOAuth2JwtGrantIssuersCall(Long maxItems, Long defaultItems, String issuer, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/trust/grants/jwt-bearer/issuers"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (maxItems != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("MaxItems", maxItems)); + } + + if (defaultItems != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("DefaultItems", defaultItems)); + } + + if (issuer != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("issuer", issuer)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listTrustedOAuth2JwtGrantIssuersValidateBeforeCall(Long maxItems, Long defaultItems, String issuer, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = listTrustedOAuth2JwtGrantIssuersCall(maxItems, defaultItems, issuer, _callback); + return localVarCall; + + } + + /** + * List Trusted OAuth2 JWT Bearer Grant Type Issuers + * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + * @param maxItems (optional) + * @param defaultItems (optional) + * @param issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + * @return List<TrustedOAuth2JwtGrantIssuer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 trustedOAuth2JwtGrantIssuers -
0 genericError -
+ */ + public List listTrustedOAuth2JwtGrantIssuers(Long maxItems, Long defaultItems, String issuer) throws ApiException { + ApiResponse> localVarResp = listTrustedOAuth2JwtGrantIssuersWithHttpInfo(maxItems, defaultItems, issuer); + return localVarResp.getData(); + } + + /** + * List Trusted OAuth2 JWT Bearer Grant Type Issuers + * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + * @param maxItems (optional) + * @param defaultItems (optional) + * @param issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + * @return ApiResponse<List<TrustedOAuth2JwtGrantIssuer>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 trustedOAuth2JwtGrantIssuers -
0 genericError -
+ */ + public ApiResponse> listTrustedOAuth2JwtGrantIssuersWithHttpInfo(Long maxItems, Long defaultItems, String issuer) throws ApiException { + okhttp3.Call localVarCall = listTrustedOAuth2JwtGrantIssuersValidateBeforeCall(maxItems, defaultItems, issuer, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Trusted OAuth2 JWT Bearer Grant Type Issuers (asynchronously) + * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + * @param maxItems (optional) + * @param defaultItems (optional) + * @param issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 trustedOAuth2JwtGrantIssuers -
0 genericError -
+ */ + public okhttp3.Call listTrustedOAuth2JwtGrantIssuersAsync(Long maxItems, Long defaultItems, String issuer, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = listTrustedOAuth2JwtGrantIssuersValidateBeforeCall(maxItems, defaultItems, issuer, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for oAuth2Authorize + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call oAuth2AuthorizeCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/oauth2/auth"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call oAuth2AuthorizeValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = oAuth2AuthorizeCall(_callback); + return localVarCall; + + } + + /** + * 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. + * @return ErrorOAuth2 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public ErrorOAuth2 oAuth2Authorize() throws ApiException { + ApiResponse localVarResp = oAuth2AuthorizeWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * 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. + * @return ApiResponse<ErrorOAuth2> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public ApiResponse oAuth2AuthorizeWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = oAuth2AuthorizeValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * OAuth 2.0 Authorize Endpoint (asynchronously) + * 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 _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call oAuth2AuthorizeAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = oAuth2AuthorizeValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for oauth2TokenExchange + * @param grantType (required) + * @param clientId (optional) + * @param code (optional) + * @param redirectUri (optional) + * @param refreshToken (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2TokenExchange -
0 errorOAuth2 -
+ */ + public okhttp3.Call oauth2TokenExchangeCall(String grantType, String clientId, String code, String redirectUri, String refreshToken, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/oauth2/token"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (clientId != null) { + localVarFormParams.put("client_id", clientId); + } + + if (code != null) { + localVarFormParams.put("code", code); + } + + if (grantType != null) { + localVarFormParams.put("grant_type", grantType); + } + + if (redirectUri != null) { + localVarFormParams.put("redirect_uri", redirectUri); + } + + if (refreshToken != null) { + localVarFormParams.put("refresh_token", refreshToken); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "basic", "oauth2" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call oauth2TokenExchangeValidateBeforeCall(String grantType, String clientId, String code, String redirectUri, String refreshToken, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'grantType' is set + if (grantType == null) { + throw new ApiException("Missing the required parameter 'grantType' when calling oauth2TokenExchange(Async)"); + } + + + okhttp3.Call localVarCall = oauth2TokenExchangeCall(grantType, clientId, code, redirectUri, refreshToken, _callback); + return localVarCall; + + } + + /** + * 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 grantType (required) + * @param clientId (optional) + * @param code (optional) + * @param redirectUri (optional) + * @param refreshToken (optional) + * @return OAuth2TokenExchange + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2TokenExchange -
0 errorOAuth2 -
+ */ + public OAuth2TokenExchange oauth2TokenExchange(String grantType, String clientId, String code, String redirectUri, String refreshToken) throws ApiException { + ApiResponse localVarResp = oauth2TokenExchangeWithHttpInfo(grantType, clientId, code, redirectUri, refreshToken); + return localVarResp.getData(); + } + + /** + * 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 grantType (required) + * @param clientId (optional) + * @param code (optional) + * @param redirectUri (optional) + * @param refreshToken (optional) + * @return ApiResponse<OAuth2TokenExchange> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2TokenExchange -
0 errorOAuth2 -
+ */ + public ApiResponse oauth2TokenExchangeWithHttpInfo(String grantType, String clientId, String code, String redirectUri, String refreshToken) throws ApiException { + okhttp3.Call localVarCall = oauth2TokenExchangeValidateBeforeCall(grantType, clientId, code, redirectUri, refreshToken, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * The OAuth 2.0 Token Endpoint (asynchronously) + * 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 grantType (required) + * @param clientId (optional) + * @param code (optional) + * @param redirectUri (optional) + * @param refreshToken (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2TokenExchange -
0 errorOAuth2 -
+ */ + public okhttp3.Call oauth2TokenExchangeAsync(String grantType, String clientId, String code, String redirectUri, String refreshToken, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = oauth2TokenExchangeValidateBeforeCall(grantType, clientId, code, redirectUri, refreshToken, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for patchOAuth2Client + * @param id The id of the OAuth 2.0 Client. (required) + * @param jsonPatch OAuth 2.0 Client JSON Patch Body (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call patchOAuth2ClientCall(String id, List jsonPatch, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = jsonPatch; + + // create path and map variables + String localVarPath = "/admin/clients/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchOAuth2ClientValidateBeforeCall(String id, List jsonPatch, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling patchOAuth2Client(Async)"); + } + + // verify the required parameter 'jsonPatch' is set + if (jsonPatch == null) { + throw new ApiException("Missing the required parameter 'jsonPatch' when calling patchOAuth2Client(Async)"); + } + + + okhttp3.Call localVarCall = patchOAuth2ClientCall(id, jsonPatch, _callback); + return localVarCall; + + } + + /** + * 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) + * @param jsonPatch OAuth 2.0 Client JSON Patch Body (required) + * @return OAuth2Client + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public OAuth2Client patchOAuth2Client(String id, List jsonPatch) throws ApiException { + ApiResponse localVarResp = patchOAuth2ClientWithHttpInfo(id, jsonPatch); + return localVarResp.getData(); + } + + /** + * 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) + * @param jsonPatch OAuth 2.0 Client JSON Patch Body (required) + * @return ApiResponse<OAuth2Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public ApiResponse patchOAuth2ClientWithHttpInfo(String id, List jsonPatch) throws ApiException { + okhttp3.Call localVarCall = patchOAuth2ClientValidateBeforeCall(id, jsonPatch, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Patch OAuth 2.0 Client (asynchronously) + * 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) + * @param jsonPatch OAuth 2.0 Client JSON Patch Body (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call patchOAuth2ClientAsync(String id, List jsonPatch, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchOAuth2ClientValidateBeforeCall(id, jsonPatch, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for rejectOAuth2ConsentRequest + * @param consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param rejectOAuth2Request (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call rejectOAuth2ConsentRequestCall(String consentChallenge, RejectOAuth2Request rejectOAuth2Request, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = rejectOAuth2Request; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/requests/consent/reject"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (consentChallenge != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("consent_challenge", consentChallenge)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call rejectOAuth2ConsentRequestValidateBeforeCall(String consentChallenge, RejectOAuth2Request rejectOAuth2Request, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'consentChallenge' is set + if (consentChallenge == null) { + throw new ApiException("Missing the required parameter 'consentChallenge' when calling rejectOAuth2ConsentRequest(Async)"); + } + + + okhttp3.Call localVarCall = rejectOAuth2ConsentRequestCall(consentChallenge, rejectOAuth2Request, _callback); + return localVarCall; + + } + + /** + * 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 consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param rejectOAuth2Request (optional) + * @return OAuth2RedirectTo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public OAuth2RedirectTo rejectOAuth2ConsentRequest(String consentChallenge, RejectOAuth2Request rejectOAuth2Request) throws ApiException { + ApiResponse localVarResp = rejectOAuth2ConsentRequestWithHttpInfo(consentChallenge, rejectOAuth2Request); + return localVarResp.getData(); + } + + /** + * 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 consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param rejectOAuth2Request (optional) + * @return ApiResponse<OAuth2RedirectTo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public ApiResponse rejectOAuth2ConsentRequestWithHttpInfo(String consentChallenge, RejectOAuth2Request rejectOAuth2Request) throws ApiException { + okhttp3.Call localVarCall = rejectOAuth2ConsentRequestValidateBeforeCall(consentChallenge, rejectOAuth2Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Reject OAuth 2.0 Consent Request (asynchronously) + * 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 consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param rejectOAuth2Request (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call rejectOAuth2ConsentRequestAsync(String consentChallenge, RejectOAuth2Request rejectOAuth2Request, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = rejectOAuth2ConsentRequestValidateBeforeCall(consentChallenge, rejectOAuth2Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for rejectOAuth2LoginRequest + * @param loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param rejectOAuth2Request (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call rejectOAuth2LoginRequestCall(String loginChallenge, RejectOAuth2Request rejectOAuth2Request, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = rejectOAuth2Request; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/requests/login/reject"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (loginChallenge != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("login_challenge", loginChallenge)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call rejectOAuth2LoginRequestValidateBeforeCall(String loginChallenge, RejectOAuth2Request rejectOAuth2Request, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'loginChallenge' is set + if (loginChallenge == null) { + throw new ApiException("Missing the required parameter 'loginChallenge' when calling rejectOAuth2LoginRequest(Async)"); + } + + + okhttp3.Call localVarCall = rejectOAuth2LoginRequestCall(loginChallenge, rejectOAuth2Request, _callback); + return localVarCall; + + } + + /** + * 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 loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param rejectOAuth2Request (optional) + * @return OAuth2RedirectTo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public OAuth2RedirectTo rejectOAuth2LoginRequest(String loginChallenge, RejectOAuth2Request rejectOAuth2Request) throws ApiException { + ApiResponse localVarResp = rejectOAuth2LoginRequestWithHttpInfo(loginChallenge, rejectOAuth2Request); + return localVarResp.getData(); + } + + /** + * 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 loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param rejectOAuth2Request (optional) + * @return ApiResponse<OAuth2RedirectTo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public ApiResponse rejectOAuth2LoginRequestWithHttpInfo(String loginChallenge, RejectOAuth2Request rejectOAuth2Request) throws ApiException { + okhttp3.Call localVarCall = rejectOAuth2LoginRequestValidateBeforeCall(loginChallenge, rejectOAuth2Request, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Reject OAuth 2.0 Login Request (asynchronously) + * 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 loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param rejectOAuth2Request (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2RedirectTo -
0 errorOAuth2 -
+ */ + public okhttp3.Call rejectOAuth2LoginRequestAsync(String loginChallenge, RejectOAuth2Request rejectOAuth2Request, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = rejectOAuth2LoginRequestValidateBeforeCall(loginChallenge, rejectOAuth2Request, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for rejectOAuth2LogoutRequest + * @param logoutChallenge (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call rejectOAuth2LogoutRequestCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/requests/logout/reject"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (logoutChallenge != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("logout_challenge", logoutChallenge)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call rejectOAuth2LogoutRequestValidateBeforeCall(String logoutChallenge, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'logoutChallenge' is set + if (logoutChallenge == null) { + throw new ApiException("Missing the required parameter 'logoutChallenge' when calling rejectOAuth2LogoutRequest(Async)"); + } + + + okhttp3.Call localVarCall = rejectOAuth2LogoutRequestCall(logoutChallenge, _callback); + return localVarCall; + + } + + /** + * 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 logoutChallenge (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public void rejectOAuth2LogoutRequest(String logoutChallenge) throws ApiException { + rejectOAuth2LogoutRequestWithHttpInfo(logoutChallenge); + } + + /** + * 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 logoutChallenge (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public ApiResponse rejectOAuth2LogoutRequestWithHttpInfo(String logoutChallenge) throws ApiException { + okhttp3.Call localVarCall = rejectOAuth2LogoutRequestValidateBeforeCall(logoutChallenge, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Reject OAuth 2.0 Session Logout Request (asynchronously) + * 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 logoutChallenge (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call rejectOAuth2LogoutRequestAsync(String logoutChallenge, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = rejectOAuth2LogoutRequestValidateBeforeCall(logoutChallenge, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for revokeOAuth2ConsentSessions + * @param subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. (required) + * @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. (optional) + * @param all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call revokeOAuth2ConsentSessionsCall(String subject, String client, Boolean all, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/sessions/consent"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (subject != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("subject", subject)); + } + + if (client != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("client", client)); + } + + if (all != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("all", all)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeOAuth2ConsentSessionsValidateBeforeCall(String subject, String client, Boolean all, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'subject' is set + if (subject == null) { + throw new ApiException("Missing the required parameter 'subject' when calling revokeOAuth2ConsentSessions(Async)"); + } + + + okhttp3.Call localVarCall = revokeOAuth2ConsentSessionsCall(subject, client, all, _callback); + return localVarCall; + + } + + /** + * 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) + * @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. (optional) + * @param all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public void revokeOAuth2ConsentSessions(String subject, String client, Boolean all) throws ApiException { + revokeOAuth2ConsentSessionsWithHttpInfo(subject, client, all); + } + + /** + * 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) + * @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. (optional) + * @param all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public ApiResponse revokeOAuth2ConsentSessionsWithHttpInfo(String subject, String client, Boolean all) throws ApiException { + okhttp3.Call localVarCall = revokeOAuth2ConsentSessionsValidateBeforeCall(subject, client, all, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Revoke OAuth 2.0 Consent Sessions of a Subject (asynchronously) + * 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) + * @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. (optional) + * @param all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call revokeOAuth2ConsentSessionsAsync(String subject, String client, Boolean all, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = revokeOAuth2ConsentSessionsValidateBeforeCall(subject, client, all, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for revokeOAuth2LoginSessions + * @param subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call revokeOAuth2LoginSessionsCall(String subject, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/oauth2/auth/sessions/login"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (subject != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("subject", subject)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeOAuth2LoginSessionsValidateBeforeCall(String subject, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'subject' is set + if (subject == null) { + throw new ApiException("Missing the required parameter 'subject' when calling revokeOAuth2LoginSessions(Async)"); + } + + + okhttp3.Call localVarCall = revokeOAuth2LoginSessionsCall(subject, _callback); + return localVarCall; + + } + + /** + * Revokes All OAuth 2.0 Login Sessions of a Subject + * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + * @param subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public void revokeOAuth2LoginSessions(String subject) throws ApiException { + revokeOAuth2LoginSessionsWithHttpInfo(subject); + } + + /** + * Revokes All OAuth 2.0 Login Sessions of a Subject + * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + * @param subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public ApiResponse revokeOAuth2LoginSessionsWithHttpInfo(String subject) throws ApiException { + okhttp3.Call localVarCall = revokeOAuth2LoginSessionsValidateBeforeCall(subject, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Revokes All OAuth 2.0 Login Sessions of a Subject (asynchronously) + * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + * @param subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call revokeOAuth2LoginSessionsAsync(String subject, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = revokeOAuth2LoginSessionsValidateBeforeCall(subject, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for revokeOAuth2Token + * @param token (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call revokeOAuth2TokenCall(String token, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/oauth2/revoke"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (token != null) { + localVarFormParams.put("token", token); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "basic", "oauth2" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeOAuth2TokenValidateBeforeCall(String token, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'token' is set + if (token == null) { + throw new ApiException("Missing the required parameter 'token' when calling revokeOAuth2Token(Async)"); + } + + + okhttp3.Call localVarCall = revokeOAuth2TokenCall(token, _callback); + return localVarCall; + + } + + /** + * 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) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public void revokeOAuth2Token(String token) throws ApiException { + revokeOAuth2TokenWithHttpInfo(token); + } + + /** + * 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) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public ApiResponse revokeOAuth2TokenWithHttpInfo(String token) throws ApiException { + okhttp3.Call localVarCall = revokeOAuth2TokenValidateBeforeCall(token, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Revoke OAuth 2.0 Access or Refresh Token (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 errorOAuth2 -
+ */ + public okhttp3.Call revokeOAuth2TokenAsync(String token, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = revokeOAuth2TokenValidateBeforeCall(token, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for setOAuth2Client + * @param id OAuth 2.0 Client ID (required) + * @param oauth2Client OAuth 2.0 Client Request Body (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
400 Bad Request Error Response -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call setOAuth2ClientCall(String id, OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = oauth2Client; + + // create path and map variables + String localVarPath = "/admin/clients/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call setOAuth2ClientValidateBeforeCall(String id, OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling setOAuth2Client(Async)"); + } + + // verify the required parameter 'oauth2Client' is set + if (oauth2Client == null) { + throw new ApiException("Missing the required parameter 'oauth2Client' when calling setOAuth2Client(Async)"); + } + + + okhttp3.Call localVarCall = setOAuth2ClientCall(id, oauth2Client, _callback); + return localVarCall; + + } + + /** + * 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) + * @param oauth2Client OAuth 2.0 Client Request Body (required) + * @return OAuth2Client + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
400 Bad Request Error Response -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public OAuth2Client setOAuth2Client(String id, OAuth2Client oauth2Client) throws ApiException { + ApiResponse localVarResp = setOAuth2ClientWithHttpInfo(id, oauth2Client); + return localVarResp.getData(); + } + + /** + * 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) + * @param oauth2Client OAuth 2.0 Client Request Body (required) + * @return ApiResponse<OAuth2Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
400 Bad Request Error Response -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public ApiResponse setOAuth2ClientWithHttpInfo(String id, OAuth2Client oauth2Client) throws ApiException { + okhttp3.Call localVarCall = setOAuth2ClientValidateBeforeCall(id, oauth2Client, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Set OAuth 2.0 Client (asynchronously) + * 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) + * @param oauth2Client OAuth 2.0 Client Request Body (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
400 Bad Request Error Response -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call setOAuth2ClientAsync(String id, OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = setOAuth2ClientValidateBeforeCall(id, oauth2Client, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for setOAuth2ClientLifespans + * @param id OAuth 2.0 Client ID (required) + * @param oauth2ClientTokenLifespans (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 genericError -
+ */ + public okhttp3.Call setOAuth2ClientLifespansCall(String id, OAuth2ClientTokenLifespans oauth2ClientTokenLifespans, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = oauth2ClientTokenLifespans; + + // create path and map variables + String localVarPath = "/admin/clients/{id}/lifespans" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call setOAuth2ClientLifespansValidateBeforeCall(String id, OAuth2ClientTokenLifespans oauth2ClientTokenLifespans, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling setOAuth2ClientLifespans(Async)"); + } + + + okhttp3.Call localVarCall = setOAuth2ClientLifespansCall(id, oauth2ClientTokenLifespans, _callback); + return localVarCall; + + } + + /** + * 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) + * @param oauth2ClientTokenLifespans (optional) + * @return OAuth2Client + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 genericError -
+ */ + public OAuth2Client setOAuth2ClientLifespans(String id, OAuth2ClientTokenLifespans oauth2ClientTokenLifespans) throws ApiException { + ApiResponse localVarResp = setOAuth2ClientLifespansWithHttpInfo(id, oauth2ClientTokenLifespans); + return localVarResp.getData(); + } + + /** + * 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) + * @param oauth2ClientTokenLifespans (optional) + * @return ApiResponse<OAuth2Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 genericError -
+ */ + public ApiResponse setOAuth2ClientLifespansWithHttpInfo(String id, OAuth2ClientTokenLifespans oauth2ClientTokenLifespans) throws ApiException { + okhttp3.Call localVarCall = setOAuth2ClientLifespansValidateBeforeCall(id, oauth2ClientTokenLifespans, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Set OAuth2 Client Token Lifespans (asynchronously) + * 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) + * @param oauth2ClientTokenLifespans (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 genericError -
+ */ + public okhttp3.Call setOAuth2ClientLifespansAsync(String id, OAuth2ClientTokenLifespans oauth2ClientTokenLifespans, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = setOAuth2ClientLifespansValidateBeforeCall(id, oauth2ClientTokenLifespans, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for trustOAuth2JwtGrantIssuer + * @param trustOAuth2JwtGrantIssuer (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
201 trustedOAuth2JwtGrantIssuer -
0 genericError -
+ */ + public okhttp3.Call trustOAuth2JwtGrantIssuerCall(TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = trustOAuth2JwtGrantIssuer; + + // create path and map variables + String localVarPath = "/admin/trust/grants/jwt-bearer/issuers"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call trustOAuth2JwtGrantIssuerValidateBeforeCall(TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = trustOAuth2JwtGrantIssuerCall(trustOAuth2JwtGrantIssuer, _callback); + return localVarCall; + + } + + /** + * 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 trustOAuth2JwtGrantIssuer (optional) + * @return TrustedOAuth2JwtGrantIssuer + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 trustedOAuth2JwtGrantIssuer -
0 genericError -
+ */ + public TrustedOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer(TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer) throws ApiException { + ApiResponse localVarResp = trustOAuth2JwtGrantIssuerWithHttpInfo(trustOAuth2JwtGrantIssuer); + return localVarResp.getData(); + } + + /** + * 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 trustOAuth2JwtGrantIssuer (optional) + * @return ApiResponse<TrustedOAuth2JwtGrantIssuer> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 trustedOAuth2JwtGrantIssuer -
0 genericError -
+ */ + public ApiResponse trustOAuth2JwtGrantIssuerWithHttpInfo(TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer) throws ApiException { + okhttp3.Call localVarCall = trustOAuth2JwtGrantIssuerValidateBeforeCall(trustOAuth2JwtGrantIssuer, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Trust OAuth2 JWT Bearer Grant Type Issuer (asynchronously) + * 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 trustOAuth2JwtGrantIssuer (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
201 trustedOAuth2JwtGrantIssuer -
0 genericError -
+ */ + public okhttp3.Call trustOAuth2JwtGrantIssuerAsync(TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = trustOAuth2JwtGrantIssuerValidateBeforeCall(trustOAuth2JwtGrantIssuer, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} 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 new file mode 100644 index 00000000000..31051d9304f --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/api/OidcApi.java @@ -0,0 +1,971 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.api; + +import sh.ory.hydra.ApiCallback; +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.ApiResponse; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.Pair; +import sh.ory.hydra.ProgressRequestBody; +import sh.ory.hydra.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sh.ory.hydra.model.ErrorOAuth2; +import sh.ory.hydra.model.GenericError; +import sh.ory.hydra.model.OAuth2Client; +import sh.ory.hydra.model.OidcConfiguration; +import sh.ory.hydra.model.OidcUserInfo; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class OidcApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OidcApi() { + this(Configuration.getDefaultApiClient()); + } + + public OidcApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for createOidcDynamicClient + * @param oauth2Client Dynamic Client Registration Request Body (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 oAuth2Client -
400 Bad Request Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call createOidcDynamicClientCall(OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = oauth2Client; + + // create path and map variables + String localVarPath = "/oauth2/register"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call createOidcDynamicClientValidateBeforeCall(OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'oauth2Client' is set + if (oauth2Client == null) { + throw new ApiException("Missing the required parameter 'oauth2Client' when calling createOidcDynamicClient(Async)"); + } + + + okhttp3.Call localVarCall = createOidcDynamicClientCall(oauth2Client, _callback); + return localVarCall; + + } + + /** + * 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 oauth2Client Dynamic Client Registration Request Body (required) + * @return OAuth2Client + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 oAuth2Client -
400 Bad Request Error Response -
0 Default Error Response -
+ */ + public OAuth2Client createOidcDynamicClient(OAuth2Client oauth2Client) throws ApiException { + ApiResponse localVarResp = createOidcDynamicClientWithHttpInfo(oauth2Client); + return localVarResp.getData(); + } + + /** + * 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 oauth2Client Dynamic Client Registration Request Body (required) + * @return ApiResponse<OAuth2Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
201 oAuth2Client -
400 Bad Request Error Response -
0 Default Error Response -
+ */ + public ApiResponse createOidcDynamicClientWithHttpInfo(OAuth2Client oauth2Client) throws ApiException { + okhttp3.Call localVarCall = createOidcDynamicClientValidateBeforeCall(oauth2Client, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Register OAuth2 Client using OpenID Dynamic Client Registration (asynchronously) + * 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 oauth2Client Dynamic Client Registration Request Body (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
201 oAuth2Client -
400 Bad Request Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call createOidcDynamicClientAsync(OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createOidcDynamicClientValidateBeforeCall(oauth2Client, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteOidcDynamicClient + * @param id The id of the OAuth 2.0 Client. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public okhttp3.Call deleteOidcDynamicClientCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/oauth2/register/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteOidcDynamicClientValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteOidcDynamicClient(Async)"); + } + + + okhttp3.Call localVarCall = deleteOidcDynamicClientCall(id, _callback); + return localVarCall; + + } + + /** + * 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) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public void deleteOidcDynamicClient(String id) throws ApiException { + deleteOidcDynamicClientWithHttpInfo(id); + } + + /** + * 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) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public ApiResponse deleteOidcDynamicClientWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = deleteOidcDynamicClientValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 genericError -
+ */ + public okhttp3.Call deleteOidcDynamicClientAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteOidcDynamicClientValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for discoverOidcConfiguration + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oidcConfiguration -
0 errorOAuth2 -
+ */ + public okhttp3.Call discoverOidcConfigurationCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/.well-known/openid-configuration"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call discoverOidcConfigurationValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = discoverOidcConfigurationCall(_callback); + return localVarCall; + + } + + /** + * 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/ + * @return OidcConfiguration + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oidcConfiguration -
0 errorOAuth2 -
+ */ + public OidcConfiguration discoverOidcConfiguration() throws ApiException { + ApiResponse localVarResp = discoverOidcConfigurationWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * 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/ + * @return ApiResponse<OidcConfiguration> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oidcConfiguration -
0 errorOAuth2 -
+ */ + public ApiResponse discoverOidcConfigurationWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = discoverOidcConfigurationValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * OpenID Connect Discovery (asynchronously) + * 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 _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oidcConfiguration -
0 errorOAuth2 -
+ */ + public okhttp3.Call discoverOidcConfigurationAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = discoverOidcConfigurationValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOidcDynamicClient + * @param id The id of the OAuth 2.0 Client. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 Default Error Response -
+ */ + public okhttp3.Call getOidcDynamicClientCall(String id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/oauth2/register/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOidcDynamicClientValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling getOidcDynamicClient(Async)"); + } + + + okhttp3.Call localVarCall = getOidcDynamicClientCall(id, _callback); + return localVarCall; + + } + + /** + * 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) + * @return OAuth2Client + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 Default Error Response -
+ */ + public OAuth2Client getOidcDynamicClient(String id) throws ApiException { + ApiResponse localVarResp = getOidcDynamicClientWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * 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) + * @return ApiResponse<OAuth2Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 Default Error Response -
+ */ + public ApiResponse getOidcDynamicClientWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = getOidcDynamicClientValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get OAuth2 Client using OpenID Dynamic Client Registration (asynchronously) + * 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) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oAuth2Client -
0 Default Error Response -
+ */ + public okhttp3.Call getOidcDynamicClientAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOidcDynamicClientValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getOidcUserInfo + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oidcUserInfo -
0 errorOAuth2 -
+ */ + public okhttp3.Call getOidcUserInfoCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/userinfo"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "oauth2" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getOidcUserInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = getOidcUserInfoCall(_callback); + return localVarCall; + + } + + /** + * 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. + * @return OidcUserInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oidcUserInfo -
0 errorOAuth2 -
+ */ + public OidcUserInfo getOidcUserInfo() throws ApiException { + ApiResponse localVarResp = getOidcUserInfoWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * 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. + * @return ApiResponse<OidcUserInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 oidcUserInfo -
0 errorOAuth2 -
+ */ + public ApiResponse getOidcUserInfoWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getOidcUserInfoValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * OpenID Connect Userinfo (asynchronously) + * 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 _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 oidcUserInfo -
0 errorOAuth2 -
+ */ + public okhttp3.Call getOidcUserInfoAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getOidcUserInfoValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for revokeOidcSession + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
+ */ + public okhttp3.Call revokeOidcSessionCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/oauth2/sessions/logout"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call revokeOidcSessionValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = revokeOidcSessionCall(_callback); + return localVarCall; + + } + + /** + * 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. + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
+ */ + public void revokeOidcSession() throws ApiException { + 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. + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
+ */ + public ApiResponse revokeOidcSessionWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = revokeOidcSessionValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * OpenID Connect Front- and Back-channel Enabled Logout (asynchronously) + * 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 _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
+ */ + public okhttp3.Call revokeOidcSessionAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = revokeOidcSessionValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for setOidcDynamicClient + * @param id OAuth 2.0 Client ID (required) + * @param oauth2Client OAuth 2.0 Client Request Body (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call setOidcDynamicClientCall(String id, OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = oauth2Client; + + // create path and map variables + String localVarPath = "/oauth2/register/{id}" + .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "bearer" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call setOidcDynamicClientValidateBeforeCall(String id, OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling setOidcDynamicClient(Async)"); + } + + // verify the required parameter 'oauth2Client' is set + if (oauth2Client == null) { + throw new ApiException("Missing the required parameter 'oauth2Client' when calling setOidcDynamicClient(Async)"); + } + + + okhttp3.Call localVarCall = setOidcDynamicClientCall(id, oauth2Client, _callback); + return localVarCall; + + } + + /** + * 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. + * @param id OAuth 2.0 Client ID (required) + * @param oauth2Client OAuth 2.0 Client Request Body (required) + * @return OAuth2Client + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public OAuth2Client setOidcDynamicClient(String id, OAuth2Client oauth2Client) throws ApiException { + ApiResponse localVarResp = setOidcDynamicClientWithHttpInfo(id, oauth2Client); + return localVarResp.getData(); + } + + /** + * 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. + * @param id OAuth 2.0 Client ID (required) + * @param oauth2Client OAuth 2.0 Client Request Body (required) + * @return ApiResponse<OAuth2Client> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public ApiResponse setOidcDynamicClientWithHttpInfo(String id, OAuth2Client oauth2Client) throws ApiException { + okhttp3.Call localVarCall = setOidcDynamicClientValidateBeforeCall(id, oauth2Client, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Set OAuth2 Client using OpenID Dynamic Client Registration (asynchronously) + * 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) + * @param oauth2Client OAuth 2.0 Client Request Body (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
200 oAuth2Client -
404 Not Found Error Response -
0 Default Error Response -
+ */ + public okhttp3.Call setOidcDynamicClientAsync(String id, OAuth2Client oauth2Client, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = setOidcDynamicClientValidateBeforeCall(id, oauth2Client, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/api/PublicApi.java b/clients/hydra/java/src/main/java/sh/ory/hydra/api/PublicApi.java deleted file mode 100644 index cc449233e23..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/api/PublicApi.java +++ /dev/null @@ -1,1656 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.api; - -import sh.ory.hydra.ApiCallback; -import sh.ory.hydra.ApiClient; -import sh.ory.hydra.ApiException; -import sh.ory.hydra.ApiResponse; -import sh.ory.hydra.Configuration; -import sh.ory.hydra.Pair; -import sh.ory.hydra.ProgressRequestBody; -import sh.ory.hydra.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import sh.ory.hydra.model.HealthNotReadyStatus; -import sh.ory.hydra.model.HealthStatus; -import sh.ory.hydra.model.JSONWebKeySet; -import sh.ory.hydra.model.JsonError; -import sh.ory.hydra.model.OAuth2Client; -import sh.ory.hydra.model.Oauth2TokenResponse; -import sh.ory.hydra.model.UserinfoResponse; -import sh.ory.hydra.model.WellKnown; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class PublicApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PublicApi() { - this(Configuration.getDefaultApiClient()); - } - - public PublicApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for disconnectUser - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
- */ - public okhttp3.Call disconnectUserCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/sessions/logout"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call disconnectUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = disconnectUserCall(_callback); - return localVarCall; - - } - - /** - * OpenID Connect Front-Backchannel Enabled Logout - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
- */ - public void disconnectUser() throws ApiException { - disconnectUserWithHttpInfo(); - } - - /** - * OpenID Connect Front-Backchannel Enabled Logout - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
- */ - public ApiResponse disconnectUserWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = disconnectUserValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * OpenID Connect Front-Backchannel Enabled Logout (asynchronously) - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
- */ - public okhttp3.Call disconnectUserAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = disconnectUserValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for discoverOpenIDConfiguration - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 wellKnown -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call discoverOpenIDConfigurationCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/.well-known/openid-configuration"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call discoverOpenIDConfigurationValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = discoverOpenIDConfigurationCall(_callback); - return localVarCall; - - } - - /** - * OpenID Connect Discovery - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - * @return WellKnown - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 wellKnown -
401 jsonError -
500 jsonError -
- */ - public WellKnown discoverOpenIDConfiguration() throws ApiException { - ApiResponse localVarResp = discoverOpenIDConfigurationWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * OpenID Connect Discovery - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - * @return ApiResponse<WellKnown> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 wellKnown -
401 jsonError -
500 jsonError -
- */ - public ApiResponse discoverOpenIDConfigurationWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = discoverOpenIDConfigurationValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * OpenID Connect Discovery (asynchronously) - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 wellKnown -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call discoverOpenIDConfigurationAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = discoverOpenIDConfigurationValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for dynamicClientRegistrationCreateOAuth2Client - * @param body (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
201 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call dynamicClientRegistrationCreateOAuth2ClientCall(OAuth2Client body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/connect/register"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call dynamicClientRegistrationCreateOAuth2ClientValidateBeforeCall(OAuth2Client body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling dynamicClientRegistrationCreateOAuth2Client(Async)"); - } - - - okhttp3.Call localVarCall = dynamicClientRegistrationCreateOAuth2ClientCall(body, _callback); - return localVarCall; - - } - - /** - * Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * 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 body (required) - * @return OAuth2Client - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
201 oAuth2Client -
0 jsonError -
- */ - public OAuth2Client dynamicClientRegistrationCreateOAuth2Client(OAuth2Client body) throws ApiException { - ApiResponse localVarResp = dynamicClientRegistrationCreateOAuth2ClientWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * 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 body (required) - * @return ApiResponse<OAuth2Client> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
201 oAuth2Client -
0 jsonError -
- */ - public ApiResponse dynamicClientRegistrationCreateOAuth2ClientWithHttpInfo(OAuth2Client body) throws ApiException { - okhttp3.Call localVarCall = dynamicClientRegistrationCreateOAuth2ClientValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol (asynchronously) - * 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 body (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
201 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call dynamicClientRegistrationCreateOAuth2ClientAsync(OAuth2Client body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = dynamicClientRegistrationCreateOAuth2ClientValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for dynamicClientRegistrationDeleteOAuth2Client - * @param id The id of the OAuth 2.0 Client. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 jsonError -
- */ - public okhttp3.Call dynamicClientRegistrationDeleteOAuth2ClientCall(String id, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connect/register/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call dynamicClientRegistrationDeleteOAuth2ClientValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling dynamicClientRegistrationDeleteOAuth2Client(Async)"); - } - - - okhttp3.Call localVarCall = dynamicClientRegistrationDeleteOAuth2ClientCall(id, _callback); - return localVarCall; - - } - - /** - * Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 jsonError -
- */ - public void dynamicClientRegistrationDeleteOAuth2Client(String id) throws ApiException { - dynamicClientRegistrationDeleteOAuth2ClientWithHttpInfo(id); - } - - /** - * Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 jsonError -
- */ - public ApiResponse dynamicClientRegistrationDeleteOAuth2ClientWithHttpInfo(String id) throws ApiException { - okhttp3.Call localVarCall = dynamicClientRegistrationDeleteOAuth2ClientValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol (asynchronously) - * 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
204 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
0 jsonError -
- */ - public okhttp3.Call dynamicClientRegistrationDeleteOAuth2ClientAsync(String id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = dynamicClientRegistrationDeleteOAuth2ClientValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for dynamicClientRegistrationGetOAuth2Client - * @param id The id of the OAuth 2.0 Client. (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call dynamicClientRegistrationGetOAuth2ClientCall(String id, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/connect/register/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call dynamicClientRegistrationGetOAuth2ClientValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling dynamicClientRegistrationGetOAuth2Client(Async)"); - } - - - okhttp3.Call localVarCall = dynamicClientRegistrationGetOAuth2ClientCall(id, _callback); - return localVarCall; - - } - - /** - * Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * 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. 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) - * @return OAuth2Client - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public OAuth2Client dynamicClientRegistrationGetOAuth2Client(String id) throws ApiException { - ApiResponse localVarResp = dynamicClientRegistrationGetOAuth2ClientWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * 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. 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) - * @return ApiResponse<OAuth2Client> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public ApiResponse dynamicClientRegistrationGetOAuth2ClientWithHttpInfo(String id) throws ApiException { - okhttp3.Call localVarCall = dynamicClientRegistrationGetOAuth2ClientValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol (asynchronously) - * 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. 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call dynamicClientRegistrationGetOAuth2ClientAsync(String id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = dynamicClientRegistrationGetOAuth2ClientValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for dynamicClientRegistrationUpdateOAuth2Client - * @param id The id of the OAuth 2.0 Client. (required) - * @param body (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call dynamicClientRegistrationUpdateOAuth2ClientCall(String id, OAuth2Client body, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/connect/register/{id}" - .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call dynamicClientRegistrationUpdateOAuth2ClientValidateBeforeCall(String id, OAuth2Client body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling dynamicClientRegistrationUpdateOAuth2Client(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling dynamicClientRegistrationUpdateOAuth2Client(Async)"); - } - - - okhttp3.Call localVarCall = dynamicClientRegistrationUpdateOAuth2ClientCall(id, body, _callback); - return localVarCall; - - } - - /** - * Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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) - * @param body (required) - * @return OAuth2Client - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public OAuth2Client dynamicClientRegistrationUpdateOAuth2Client(String id, OAuth2Client body) throws ApiException { - ApiResponse localVarResp = dynamicClientRegistrationUpdateOAuth2ClientWithHttpInfo(id, body); - return localVarResp.getData(); - } - - /** - * Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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) - * @param body (required) - * @return ApiResponse<OAuth2Client> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public ApiResponse dynamicClientRegistrationUpdateOAuth2ClientWithHttpInfo(String id, OAuth2Client body) throws ApiException { - okhttp3.Call localVarCall = dynamicClientRegistrationUpdateOAuth2ClientValidateBeforeCall(id, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol (asynchronously) - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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) - * @param body (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 oAuth2Client -
0 jsonError -
- */ - public okhttp3.Call dynamicClientRegistrationUpdateOAuth2ClientAsync(String id, OAuth2Client body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = dynamicClientRegistrationUpdateOAuth2ClientValidateBeforeCall(id, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for isInstanceReady - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 healthStatus -
503 healthNotReadyStatus -
- */ - public okhttp3.Call isInstanceReadyCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/health/ready"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call isInstanceReadyValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = isInstanceReadyCall(_callback); - return localVarCall; - - } - - /** - * Check Readiness Status - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - * @return HealthStatus - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 healthStatus -
503 healthNotReadyStatus -
- */ - public HealthStatus isInstanceReady() throws ApiException { - ApiResponse localVarResp = isInstanceReadyWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Check Readiness Status - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - * @return ApiResponse<HealthStatus> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 healthStatus -
503 healthNotReadyStatus -
- */ - public ApiResponse isInstanceReadyWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = isInstanceReadyValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Check Readiness Status (asynchronously) - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 healthStatus -
503 healthNotReadyStatus -
- */ - public okhttp3.Call isInstanceReadyAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = isInstanceReadyValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for oauth2Token - * @param grantType (required) - * @param code (optional) - * @param refreshToken (optional) - * @param redirectUri (optional) - * @param clientId (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 oauth2TokenResponse -
400 jsonError -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call oauth2TokenCall(String grantType, String code, String refreshToken, String redirectUri, String clientId, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/token"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (grantType != null) { - localVarFormParams.put("grant_type", grantType); - } - - if (code != null) { - localVarFormParams.put("code", code); - } - - if (refreshToken != null) { - localVarFormParams.put("refresh_token", refreshToken); - } - - if (redirectUri != null) { - localVarFormParams.put("redirect_uri", redirectUri); - } - - if (clientId != null) { - localVarFormParams.put("client_id", clientId); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "basic", "oauth2" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call oauth2TokenValidateBeforeCall(String grantType, String code, String refreshToken, String redirectUri, String clientId, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'grantType' is set - if (grantType == null) { - throw new ApiException("Missing the required parameter 'grantType' when calling oauth2Token(Async)"); - } - - - okhttp3.Call localVarCall = oauth2TokenCall(grantType, code, refreshToken, redirectUri, clientId, _callback); - return localVarCall; - - } - - /** - * The OAuth 2.0 Token Endpoint - * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @param grantType (required) - * @param code (optional) - * @param refreshToken (optional) - * @param redirectUri (optional) - * @param clientId (optional) - * @return Oauth2TokenResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 oauth2TokenResponse -
400 jsonError -
401 jsonError -
500 jsonError -
- */ - public Oauth2TokenResponse oauth2Token(String grantType, String code, String refreshToken, String redirectUri, String clientId) throws ApiException { - ApiResponse localVarResp = oauth2TokenWithHttpInfo(grantType, code, refreshToken, redirectUri, clientId); - return localVarResp.getData(); - } - - /** - * The OAuth 2.0 Token Endpoint - * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @param grantType (required) - * @param code (optional) - * @param refreshToken (optional) - * @param redirectUri (optional) - * @param clientId (optional) - * @return ApiResponse<Oauth2TokenResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 oauth2TokenResponse -
400 jsonError -
401 jsonError -
500 jsonError -
- */ - public ApiResponse oauth2TokenWithHttpInfo(String grantType, String code, String refreshToken, String redirectUri, String clientId) throws ApiException { - okhttp3.Call localVarCall = oauth2TokenValidateBeforeCall(grantType, code, refreshToken, redirectUri, clientId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * The OAuth 2.0 Token Endpoint (asynchronously) - * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @param grantType (required) - * @param code (optional) - * @param refreshToken (optional) - * @param redirectUri (optional) - * @param clientId (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 oauth2TokenResponse -
400 jsonError -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call oauth2TokenAsync(String grantType, String code, String refreshToken, String redirectUri, String clientId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = oauth2TokenValidateBeforeCall(grantType, code, refreshToken, redirectUri, clientId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for oauthAuth - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call oauthAuthCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/auth"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call oauthAuthValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = oauthAuthCall(_callback); - return localVarCall; - - } - - /** - * The OAuth 2.0 Authorize Endpoint - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public void oauthAuth() throws ApiException { - oauthAuthWithHttpInfo(); - } - - /** - * The OAuth 2.0 Authorize Endpoint - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public ApiResponse oauthAuthWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = oauthAuthValidateBeforeCall(null); - return localVarApiClient.execute(localVarCall); - } - - /** - * The OAuth 2.0 Authorize Endpoint (asynchronously) - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
302 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call oauthAuthAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = oauthAuthValidateBeforeCall(_callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for revokeOAuth2Token - * @param token (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call revokeOAuth2TokenCall(String token, final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/oauth2/revoke"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (token != null) { - localVarFormParams.put("token", token); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "basic", "oauth2" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call revokeOAuth2TokenValidateBeforeCall(String token, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'token' is set - if (token == null) { - throw new ApiException("Missing the required parameter 'token' when calling revokeOAuth2Token(Async)"); - } - - - okhttp3.Call localVarCall = revokeOAuth2TokenCall(token, _callback); - return localVarCall; - - } - - /** - * Revoke OAuth2 Tokens - * 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) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public void revokeOAuth2Token(String token) throws ApiException { - revokeOAuth2TokenWithHttpInfo(token); - } - - /** - * Revoke OAuth2 Tokens - * 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) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public ApiResponse revokeOAuth2TokenWithHttpInfo(String token) throws ApiException { - okhttp3.Call localVarCall = revokeOAuth2TokenValidateBeforeCall(token, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Revoke OAuth2 Tokens (asynchronously) - * 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) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call revokeOAuth2TokenAsync(String token, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = revokeOAuth2TokenValidateBeforeCall(token, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for userinfo - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 userinfoResponse -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call userinfoCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/userinfo"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "oauth2" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call userinfoValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = userinfoCall(_callback); - return localVarCall; - - } - - /** - * OpenID Connect Userinfo - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - * @return UserinfoResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 userinfoResponse -
401 jsonError -
500 jsonError -
- */ - public UserinfoResponse userinfo() throws ApiException { - ApiResponse localVarResp = userinfoWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * OpenID Connect Userinfo - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - * @return ApiResponse<UserinfoResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 userinfoResponse -
401 jsonError -
500 jsonError -
- */ - public ApiResponse userinfoWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = userinfoValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * OpenID Connect Userinfo (asynchronously) - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 userinfoResponse -
401 jsonError -
500 jsonError -
- */ - public okhttp3.Call userinfoAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = userinfoValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for wellKnown - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
500 jsonError -
- */ - public okhttp3.Call wellKnownCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/.well-known/jwks.json"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call wellKnownValidateBeforeCall(final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = wellKnownCall(_callback); - return localVarCall; - - } - - /** - * JSON Web Keys Discovery - * This endpoint returns JSON Web Keys to be used as public keys for 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. - * @return JSONWebKeySet - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
500 jsonError -
- */ - public JSONWebKeySet wellKnown() throws ApiException { - ApiResponse localVarResp = wellKnownWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * JSON Web Keys Discovery - * This endpoint returns JSON Web Keys to be used as public keys for 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. - * @return ApiResponse<JSONWebKeySet> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
500 jsonError -
- */ - public ApiResponse wellKnownWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = wellKnownValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * JSON Web Keys Discovery (asynchronously) - * This endpoint returns JSON Web Keys to be used as public keys for 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 _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 JSONWebKeySet -
500 jsonError -
- */ - public okhttp3.Call wellKnownAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = wellKnownValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} 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 new file mode 100644 index 00000000000..35ea17eaa20 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/api/WellknownApi.java @@ -0,0 +1,198 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.api; + +import sh.ory.hydra.ApiCallback; +import sh.ory.hydra.ApiClient; +import sh.ory.hydra.ApiException; +import sh.ory.hydra.ApiResponse; +import sh.ory.hydra.Configuration; +import sh.ory.hydra.Pair; +import sh.ory.hydra.ProgressRequestBody; +import sh.ory.hydra.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import sh.ory.hydra.model.ErrorOAuth2; +import sh.ory.hydra.model.JsonWebKeySet; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class WellknownApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public WellknownApi() { + this(Configuration.getDefaultApiClient()); + } + + public WellknownApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for discoverJsonWebKeys + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call discoverJsonWebKeysCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/.well-known/jwks.json"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call discoverJsonWebKeysValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = discoverJsonWebKeysCall(_callback); + return localVarCall; + + } + + /** + * 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. + * @return JsonWebKeySet + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public JsonWebKeySet discoverJsonWebKeys() throws ApiException { + ApiResponse localVarResp = discoverJsonWebKeysWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * 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. + * @return ApiResponse<JsonWebKeySet> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public ApiResponse discoverJsonWebKeysWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = discoverJsonWebKeysValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Discover Well-Known JSON Web Keys (asynchronously) + * 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 _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 jsonWebKeySet -
0 errorOAuth2 -
+ */ + public okhttp3.Call discoverJsonWebKeysAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = discoverJsonWebKeysValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} 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 d7af05fe020..d703ff99ffa 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") 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 936c5719e1c..88384d9e951 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 1f132a65e67..e0cf71a32b0 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech 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 3dff8eb8031..0f370ad40d8 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; 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 df548eb9002..bda0a018885 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * 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 = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") 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 199c731a549..15141180fc2 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,10 +13,13 @@ package sh.ory.hydra.auth; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +/** + * OAuth flows that are supported by this client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") public enum OAuthFlow { - accessCode, //called authorizationCode in OpenAPI 3.0 - implicit, - password, - application //called clientCredentials in OpenAPI 3.0 + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/RetryingOAuth.java b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/RetryingOAuth.java index 320dd9a692f..14e11f10dd8 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/auth/RetryingOAuth.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/auth/RetryingOAuth.java @@ -28,22 +28,31 @@ public class RetryingOAuth extends OAuth implements Interceptor { private TokenRequestBuilder tokenRequestBuilder; + /** + * @param client An OkHttp client + * @param tokenRequestBuilder A token request builder + */ public RetryingOAuth(OkHttpClient client, TokenRequestBuilder tokenRequestBuilder) { this.oAuthClient = new OAuthClient(new OAuthOkHttpClient(client)); this.tokenRequestBuilder = tokenRequestBuilder; } + /** + * @param tokenRequestBuilder A token request builder + */ public RetryingOAuth(TokenRequestBuilder tokenRequestBuilder) { this(new OkHttpClient(), tokenRequestBuilder); } /** - @param tokenUrl The token URL to be used for this OAuth2 flow. - Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". - The value must be an absolute URL. - @param clientId The OAuth2 client ID for the "clientCredentials" flow. - @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. - */ + * @param tokenUrl The token URL to be used for this OAuth2 flow. + * Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". + * The value must be an absolute URL. + * @param clientId The OAuth2 client ID for the "clientCredentials" flow. + * @param flow OAuth flow. + * @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. + * @param parameters A map of string. + */ public RetryingOAuth( String tokenUrl, String clientId, @@ -62,18 +71,23 @@ public RetryingOAuth( } } + /** + * Set the OAuth flow + * + * @param flow The OAuth flow. + */ public void setFlow(OAuthFlow flow) { switch(flow) { - case accessCode: + case ACCESS_CODE: tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); break; - case implicit: + case IMPLICIT: tokenRequestBuilder.setGrantType(GrantType.IMPLICIT); break; - case password: + case PASSWORD: tokenRequestBuilder.setGrantType(GrantType.PASSWORD); break; - case application: + case APPLICATION: tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); break; default: @@ -147,8 +161,12 @@ private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAut } } - /* + /** * Returns true if the access token has been updated + * + * @param requestAccessToken the request access token + * @return True if the update is successful + * @throws java.io.IOException If fail to update the access token */ public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { @@ -165,10 +183,20 @@ public synchronized boolean updateAccessToken(String requestAccessToken) throws return getAccessToken() == null || !getAccessToken().equals(requestAccessToken); } + /** + * Gets the token request builder + * + * @return A token request builder + */ public TokenRequestBuilder getTokenRequestBuilder() { return tokenRequestBuilder; } + /** + * Sets the token request builder + * + * @param tokenRequestBuilder Token request builder + */ public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { this.tokenRequestBuilder = tokenRequestBuilder; } 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 new file mode 100644 index 00000000000..c8e379dceb9 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AbstractOpenApiSchema.java @@ -0,0 +1,149 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +import sh.ory.hydra.ApiException; +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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + //@JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptConsentRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptConsentRequest.java deleted file mode 100644 index a806c36709e..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptConsentRequest.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; -import sh.ory.hydra.model.ConsentRequestSession; - -/** - * AcceptConsentRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class AcceptConsentRequest { - 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; - - public static final String SERIALIZED_NAME_GRANT_SCOPE = "grant_scope"; - @SerializedName(SERIALIZED_NAME_GRANT_SCOPE) - private List grantScope = null; - - public static final String SERIALIZED_NAME_HANDLED_AT = "handled_at"; - @SerializedName(SERIALIZED_NAME_HANDLED_AT) - private OffsetDateTime handledAt; - - public static final String SERIALIZED_NAME_REMEMBER = "remember"; - @SerializedName(SERIALIZED_NAME_REMEMBER) - private Boolean remember; - - public static final String SERIALIZED_NAME_REMEMBER_FOR = "remember_for"; - @SerializedName(SERIALIZED_NAME_REMEMBER_FOR) - private Long rememberFor; - - public static final String SERIALIZED_NAME_SESSION = "session"; - @SerializedName(SERIALIZED_NAME_SESSION) - private ConsentRequestSession session; - - public AcceptConsentRequest() { - } - - public AcceptConsentRequest grantAccessTokenAudience(List grantAccessTokenAudience) { - - this.grantAccessTokenAudience = grantAccessTokenAudience; - return this; - } - - public AcceptConsentRequest addGrantAccessTokenAudienceItem(String grantAccessTokenAudienceItem) { - if (this.grantAccessTokenAudience == null) { - this.grantAccessTokenAudience = new ArrayList<>(); - } - this.grantAccessTokenAudience.add(grantAccessTokenAudienceItem); - 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 AcceptConsentRequest grantScope(List grantScope) { - - this.grantScope = grantScope; - return this; - } - - public AcceptConsentRequest addGrantScopeItem(String grantScopeItem) { - if (this.grantScope == null) { - this.grantScope = new ArrayList<>(); - } - this.grantScope.add(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 AcceptConsentRequest 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 AcceptConsentRequest 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 AcceptConsentRequest 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 AcceptConsentRequest session(ConsentRequestSession session) { - - this.session = session; - return this; - } - - /** - * Get session - * @return session - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public ConsentRequestSession getSession() { - return session; - } - - - public void setSession(ConsentRequestSession session) { - this.session = session; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AcceptConsentRequest acceptConsentRequest = (AcceptConsentRequest) o; - return Objects.equals(this.grantAccessTokenAudience, acceptConsentRequest.grantAccessTokenAudience) && - Objects.equals(this.grantScope, acceptConsentRequest.grantScope) && - Objects.equals(this.handledAt, acceptConsentRequest.handledAt) && - Objects.equals(this.remember, acceptConsentRequest.remember) && - Objects.equals(this.rememberFor, acceptConsentRequest.rememberFor) && - Objects.equals(this.session, acceptConsentRequest.session); - } - - @Override - public int hashCode() { - return Objects.hash(grantAccessTokenAudience, grantScope, handledAt, remember, rememberFor, session); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AcceptConsentRequest {\n"); - sb.append(" grantAccessTokenAudience: ").append(toIndentedString(grantAccessTokenAudience)).append("\n"); - sb.append(" grantScope: ").append(toIndentedString(grantScope)).append("\n"); - sb.append(" handledAt: ").append(toIndentedString(handledAt)).append("\n"); - sb.append(" remember: ").append(toIndentedString(remember)).append("\n"); - sb.append(" rememberFor: ").append(toIndentedString(rememberFor)).append("\n"); - sb.append(" session: ").append(toIndentedString(session)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 new file mode 100644 index 00000000000..b58188ea041 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequest.java @@ -0,0 +1,388 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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.List; +import sh.ory.hydra.model.AcceptOAuth2ConsentRequestSession; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * AcceptOAuth2ConsentRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +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; + + public static final String SERIALIZED_NAME_GRANT_SCOPE = "grant_scope"; + @SerializedName(SERIALIZED_NAME_GRANT_SCOPE) + private List grantScope = null; + + public static final String SERIALIZED_NAME_HANDLED_AT = "handled_at"; + @SerializedName(SERIALIZED_NAME_HANDLED_AT) + private OffsetDateTime handledAt; + + public static final String SERIALIZED_NAME_REMEMBER = "remember"; + @SerializedName(SERIALIZED_NAME_REMEMBER) + private Boolean remember; + + public static final String SERIALIZED_NAME_REMEMBER_FOR = "remember_for"; + @SerializedName(SERIALIZED_NAME_REMEMBER_FOR) + private Long rememberFor; + + public static final String SERIALIZED_NAME_SESSION = "session"; + @SerializedName(SERIALIZED_NAME_SESSION) + private AcceptOAuth2ConsentRequestSession session; + + public AcceptOAuth2ConsentRequest() { + } + + public AcceptOAuth2ConsentRequest grantAccessTokenAudience(List grantAccessTokenAudience) { + + this.grantAccessTokenAudience = grantAccessTokenAudience; + return this; + } + + public AcceptOAuth2ConsentRequest addGrantAccessTokenAudienceItem(String grantAccessTokenAudienceItem) { + if (this.grantAccessTokenAudience == null) { + this.grantAccessTokenAudience = new ArrayList<>(); + } + this.grantAccessTokenAudience.add(grantAccessTokenAudienceItem); + 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; + } + + public AcceptOAuth2ConsentRequest addGrantScopeItem(String grantScopeItem) { + if (this.grantScope == null) { + this.grantScope = new ArrayList<>(); + } + this.grantScope.add(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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest = (AcceptOAuth2ConsentRequest) o; + return Objects.equals(this.grantAccessTokenAudience, acceptOAuth2ConsentRequest.grantAccessTokenAudience) && + Objects.equals(this.grantScope, acceptOAuth2ConsentRequest.grantScope) && + Objects.equals(this.handledAt, acceptOAuth2ConsentRequest.handledAt) && + Objects.equals(this.remember, acceptOAuth2ConsentRequest.remember) && + Objects.equals(this.rememberFor, acceptOAuth2ConsentRequest.rememberFor) && + Objects.equals(this.session, acceptOAuth2ConsentRequest.session); + } + + @Override + public int hashCode() { + return Objects.hash(grantAccessTokenAudience, grantScope, handledAt, remember, rememberFor, session); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AcceptOAuth2ConsentRequest {\n"); + sb.append(" grantAccessTokenAudience: ").append(toIndentedString(grantAccessTokenAudience)).append("\n"); + sb.append(" grantScope: ").append(toIndentedString(grantScope)).append("\n"); + sb.append(" handledAt: ").append(toIndentedString(handledAt)).append("\n"); + sb.append(" remember: ").append(toIndentedString(remember)).append("\n"); + sb.append(" rememberFor: ").append(toIndentedString(rememberFor)).append("\n"); + sb.append(" session: ").append(toIndentedString(session)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("grant_access_token_audience"); + openapiFields.add("grant_scope"); + openapiFields.add("handled_at"); + openapiFields.add("remember"); + openapiFields.add("remember_for"); + openapiFields.add("session"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in AcceptOAuth2ConsentRequest is not found in the empty JSON string", AcceptOAuth2ConsentRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!AcceptOAuth2ConsentRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AcceptOAuth2ConsentRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + // ensure the json data is an array + if (jsonObj.get("grant_access_token_audience") != null && !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 json data is an array + if (jsonObj.get("grant_scope") != null && !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.getAsJsonObject("session") != null) { + AcceptOAuth2ConsentRequestSession.validateJsonObject(jsonObj.getAsJsonObject("session")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AcceptOAuth2ConsentRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AcceptOAuth2ConsentRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AcceptOAuth2ConsentRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AcceptOAuth2ConsentRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AcceptOAuth2ConsentRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..22d1256e626 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSession.java @@ -0,0 +1,248 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * AcceptOAuth2ConsentRequestSession + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class AcceptOAuth2ConsentRequestSession { + public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; + @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) + private Object accessToken = null; + + public static final String SERIALIZED_NAME_ID_TOKEN = "id_token"; + @SerializedName(SERIALIZED_NAME_ID_TOKEN) + private Object idToken = null; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AcceptOAuth2ConsentRequestSession acceptOAuth2ConsentRequestSession = (AcceptOAuth2ConsentRequestSession) o; + return Objects.equals(this.accessToken, acceptOAuth2ConsentRequestSession.accessToken) && + Objects.equals(this.idToken, acceptOAuth2ConsentRequestSession.idToken); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(accessToken, idToken); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AcceptOAuth2ConsentRequestSession {\n"); + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" idToken: ").append(toIndentedString(idToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("access_token"); + openapiFields.add("id_token"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in AcceptOAuth2ConsentRequestSession is not found in the empty JSON string", AcceptOAuth2ConsentRequestSession.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!AcceptOAuth2ConsentRequestSession.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AcceptOAuth2ConsentRequestSession` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AcceptOAuth2ConsentRequestSession.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AcceptOAuth2ConsentRequestSession' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AcceptOAuth2ConsentRequestSession.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AcceptOAuth2ConsentRequestSession value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AcceptOAuth2ConsentRequestSession read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptLoginRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2LoginRequest.java similarity index 54% rename from clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptLoginRequest.java rename to clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2LoginRequest.java index 5bedf3272fd..5663cc17282 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptLoginRequest.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/AcceptOAuth2LoginRequest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -25,12 +25,33 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; /** - * AcceptLoginRequest + * AcceptOAuth2LoginRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class AcceptLoginRequest { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class AcceptOAuth2LoginRequest { public static final String SERIALIZED_NAME_ACR = "acr"; @SerializedName(SERIALIZED_NAME_ACR) private String acr; @@ -41,7 +62,7 @@ public class AcceptLoginRequest { public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) - private Object context; + private Object context = null; public static final String SERIALIZED_NAME_FORCE_SUBJECT_IDENTIFIER = "force_subject_identifier"; @SerializedName(SERIALIZED_NAME_FORCE_SUBJECT_IDENTIFIER) @@ -59,10 +80,10 @@ public class AcceptLoginRequest { @SerializedName(SERIALIZED_NAME_SUBJECT) private String subject; - public AcceptLoginRequest() { + public AcceptOAuth2LoginRequest() { } - public AcceptLoginRequest acr(String acr) { + public AcceptOAuth2LoginRequest acr(String acr) { this.acr = acr; return this; @@ -85,13 +106,13 @@ public void setAcr(String acr) { } - public AcceptLoginRequest amr(List amr) { + public AcceptOAuth2LoginRequest amr(List amr) { this.amr = amr; return this; } - public AcceptLoginRequest addAmrItem(String amrItem) { + public AcceptOAuth2LoginRequest addAmrItem(String amrItem) { if (this.amr == null) { this.amr = new ArrayList<>(); } @@ -116,7 +137,7 @@ public void setAmr(List amr) { } - public AcceptLoginRequest context(Object context) { + public AcceptOAuth2LoginRequest context(Object context) { this.context = context; return this; @@ -139,7 +160,7 @@ public void setContext(Object context) { } - public AcceptLoginRequest forceSubjectIdentifier(String forceSubjectIdentifier) { + public AcceptOAuth2LoginRequest forceSubjectIdentifier(String forceSubjectIdentifier) { this.forceSubjectIdentifier = forceSubjectIdentifier; return this; @@ -162,7 +183,7 @@ public void setForceSubjectIdentifier(String forceSubjectIdentifier) { } - public AcceptLoginRequest remember(Boolean remember) { + public AcceptOAuth2LoginRequest remember(Boolean remember) { this.remember = remember; return this; @@ -185,7 +206,7 @@ public void setRemember(Boolean remember) { } - public AcceptLoginRequest rememberFor(Long rememberFor) { + public AcceptOAuth2LoginRequest rememberFor(Long rememberFor) { this.rememberFor = rememberFor; return this; @@ -208,7 +229,7 @@ public void setRememberFor(Long rememberFor) { } - public AcceptLoginRequest subject(String subject) { + public AcceptOAuth2LoginRequest subject(String subject) { this.subject = subject; return this; @@ -231,6 +252,7 @@ public void setSubject(String subject) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -239,14 +261,18 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AcceptLoginRequest acceptLoginRequest = (AcceptLoginRequest) o; - return Objects.equals(this.acr, acceptLoginRequest.acr) && - Objects.equals(this.amr, acceptLoginRequest.amr) && - Objects.equals(this.context, acceptLoginRequest.context) && - Objects.equals(this.forceSubjectIdentifier, acceptLoginRequest.forceSubjectIdentifier) && - Objects.equals(this.remember, acceptLoginRequest.remember) && - Objects.equals(this.rememberFor, acceptLoginRequest.rememberFor) && - Objects.equals(this.subject, acceptLoginRequest.subject); + AcceptOAuth2LoginRequest acceptOAuth2LoginRequest = (AcceptOAuth2LoginRequest) o; + return Objects.equals(this.acr, acceptOAuth2LoginRequest.acr) && + Objects.equals(this.amr, acceptOAuth2LoginRequest.amr) && + Objects.equals(this.context, acceptOAuth2LoginRequest.context) && + Objects.equals(this.forceSubjectIdentifier, acceptOAuth2LoginRequest.forceSubjectIdentifier) && + Objects.equals(this.remember, acceptOAuth2LoginRequest.remember) && + Objects.equals(this.rememberFor, acceptOAuth2LoginRequest.rememberFor) && + Objects.equals(this.subject, acceptOAuth2LoginRequest.subject); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override @@ -254,10 +280,17 @@ public int hashCode() { return Objects.hash(acr, amr, context, forceSubjectIdentifier, remember, rememberFor, subject); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AcceptLoginRequest {\n"); + sb.append("class AcceptOAuth2LoginRequest {\n"); sb.append(" acr: ").append(toIndentedString(acr)).append("\n"); sb.append(" amr: ").append(toIndentedString(amr)).append("\n"); sb.append(" context: ").append(toIndentedString(context)).append("\n"); @@ -280,5 +313,117 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("acr"); + openapiFields.add("amr"); + openapiFields.add("context"); + openapiFields.add("force_subject_identifier"); + openapiFields.add("remember"); + openapiFields.add("remember_for"); + openapiFields.add("subject"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in AcceptOAuth2LoginRequest is not found in the empty JSON string", AcceptOAuth2LoginRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!AcceptOAuth2LoginRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AcceptOAuth2LoginRequest` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("acr") != null && !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 json data is an array + if (jsonObj.get("amr") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `force_subject_identifier` to be a primitive type in the JSON string but got `%s`", jsonObj.get("force_subject_identifier").toString())); + } + if (jsonObj.get("subject") != null && !jsonObj.get("subject").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AcceptOAuth2LoginRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AcceptOAuth2LoginRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AcceptOAuth2LoginRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AcceptOAuth2LoginRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public AcceptOAuth2LoginRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/CompletedRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/CompletedRequest.java deleted file mode 100644 index 719ebd07f49..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/CompletedRequest.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * CompletedRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class CompletedRequest { - public static final String SERIALIZED_NAME_REDIRECT_TO = "redirect_to"; - @SerializedName(SERIALIZED_NAME_REDIRECT_TO) - private String redirectTo; - - public CompletedRequest() { - } - - public CompletedRequest redirectTo(String redirectTo) { - - this.redirectTo = redirectTo; - return this; - } - - /** - * RedirectURL is the URL which you should redirect the user 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 to once the authentication process is completed.") - - public String getRedirectTo() { - return redirectTo; - } - - - public void setRedirectTo(String redirectTo) { - this.redirectTo = redirectTo; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CompletedRequest completedRequest = (CompletedRequest) o; - return Objects.equals(this.redirectTo, completedRequest.redirectTo); - } - - @Override - public int hashCode() { - return Objects.hash(redirectTo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CompletedRequest {\n"); - sb.append(" redirectTo: ").append(toIndentedString(redirectTo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/ConsentRequestSession.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/ConsentRequestSession.java deleted file mode 100644 index b93668b7051..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/ConsentRequestSession.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * ConsentRequestSession - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class ConsentRequestSession { - public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; - @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) - private Object accessToken; - - public static final String SERIALIZED_NAME_ID_TOKEN = "id_token"; - @SerializedName(SERIALIZED_NAME_ID_TOKEN) - private Object idToken; - - public ConsentRequestSession() { - } - - public ConsentRequestSession 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 ConsentRequestSession 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; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ConsentRequestSession consentRequestSession = (ConsentRequestSession) o; - return Objects.equals(this.accessToken, consentRequestSession.accessToken) && - Objects.equals(this.idToken, consentRequestSession.idToken); - } - - @Override - public int hashCode() { - return Objects.hash(accessToken, idToken); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ConsentRequestSession {\n"); - sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); - sb.append(" idToken: ").append(toIndentedString(idToken)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/ContainerWaitOKBodyError.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/ContainerWaitOKBodyError.java deleted file mode 100644 index 848e2dba4fc..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/ContainerWaitOKBodyError.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * ContainerWaitOKBodyError container waiting error, if any - */ -@ApiModel(description = "ContainerWaitOKBodyError container waiting error, if any") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class ContainerWaitOKBodyError { - public static final String SERIALIZED_NAME_MESSAGE = "Message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public ContainerWaitOKBodyError() { - } - - public ContainerWaitOKBodyError message(String message) { - - this.message = message; - return this; - } - - /** - * Details of an error - * @return message - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Details of an error") - - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ContainerWaitOKBodyError containerWaitOKBodyError = (ContainerWaitOKBodyError) o; - return Objects.equals(this.message, containerWaitOKBodyError.message); - } - - @Override - public int hashCode() { - return Objects.hash(message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ContainerWaitOKBodyError {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 new file mode 100644 index 00000000000..c356a2cf40e --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/CreateJsonWebKeySet.java @@ -0,0 +1,286 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * 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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class CreateJsonWebKeySet { + public static final String SERIALIZED_NAME_ALG = "alg"; + @SerializedName(SERIALIZED_NAME_ALG) + private String alg; + + public static final String SERIALIZED_NAME_KID = "kid"; + @SerializedName(SERIALIZED_NAME_KID) + private String kid; + + public static final String SERIALIZED_NAME_USE = "use"; + @SerializedName(SERIALIZED_NAME_USE) + private String use; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateJsonWebKeySet createJsonWebKeySet = (CreateJsonWebKeySet) o; + return Objects.equals(this.alg, createJsonWebKeySet.alg) && + Objects.equals(this.kid, createJsonWebKeySet.kid) && + Objects.equals(this.use, createJsonWebKeySet.use); + } + + @Override + public int hashCode() { + return Objects.hash(alg, kid, use); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateJsonWebKeySet {\n"); + sb.append(" alg: ").append(toIndentedString(alg)).append("\n"); + sb.append(" kid: ").append(toIndentedString(kid)).append("\n"); + sb.append(" use: ").append(toIndentedString(use)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("alg"); + openapiFields.add("kid"); + openapiFields.add("use"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("alg"); + openapiRequiredFields.add("kid"); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in CreateJsonWebKeySet is not found in the empty JSON string", CreateJsonWebKeySet.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!CreateJsonWebKeySet.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateJsonWebKeySet` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("alg") != null && !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())); + } + if (jsonObj.get("kid") != null && !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())); + } + if (jsonObj.get("use") != null && !jsonObj.get("use").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `use` to be a primitive type in the JSON string but got `%s`", jsonObj.get("use").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateJsonWebKeySet.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateJsonWebKeySet' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateJsonWebKeySet.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateJsonWebKeySet value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public CreateJsonWebKeySet read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..105cf16147b --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/ErrorOAuth2.java @@ -0,0 +1,339 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * Error + */ +@ApiModel(description = "Error") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class ErrorOAuth2 { + public static final String SERIALIZED_NAME_ERROR = "error"; + @SerializedName(SERIALIZED_NAME_ERROR) + private String error; + + public static final String SERIALIZED_NAME_ERROR_DEBUG = "error_debug"; + @SerializedName(SERIALIZED_NAME_ERROR_DEBUG) + private String errorDebug; + + public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; + @SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION) + private String errorDescription; + + public static final String SERIALIZED_NAME_ERROR_HINT = "error_hint"; + @SerializedName(SERIALIZED_NAME_ERROR_HINT) + private String errorHint; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + private Long statusCode; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorOAuth2 errorOAuth2 = (ErrorOAuth2) o; + return Objects.equals(this.error, errorOAuth2.error) && + Objects.equals(this.errorDebug, errorOAuth2.errorDebug) && + Objects.equals(this.errorDescription, errorOAuth2.errorDescription) && + Objects.equals(this.errorHint, errorOAuth2.errorHint) && + Objects.equals(this.statusCode, errorOAuth2.statusCode); + } + + @Override + public int hashCode() { + return Objects.hash(error, errorDebug, errorDescription, errorHint, statusCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorOAuth2 {\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" errorDebug: ").append(toIndentedString(errorDebug)).append("\n"); + sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append(" errorHint: ").append(toIndentedString(errorHint)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("error"); + openapiFields.add("error_debug"); + openapiFields.add("error_description"); + openapiFields.add("error_hint"); + openapiFields.add("status_code"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorOAuth2 is not found in the empty JSON string", ErrorOAuth2.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ErrorOAuth2.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorOAuth2` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("error") != null && !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())); + } + if (jsonObj.get("error_debug") != null && !jsonObj.get("error_debug").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error_debug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_debug").toString())); + } + if (jsonObj.get("error_description") != null && !jsonObj.get("error_description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error_description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_description").toString())); + } + if (jsonObj.get("error_hint") != null && !jsonObj.get("error_hint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error_hint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_hint").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ErrorOAuth2.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ErrorOAuth2' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ErrorOAuth2.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ErrorOAuth2 value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ErrorOAuth2 read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java deleted file mode 100644 index fbe3a76cbc4..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * FlushInactiveOAuth2TokensRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class FlushInactiveOAuth2TokensRequest { - public static final String SERIALIZED_NAME_NOT_AFTER = "notAfter"; - @SerializedName(SERIALIZED_NAME_NOT_AFTER) - private OffsetDateTime notAfter; - - public FlushInactiveOAuth2TokensRequest() { - } - - public FlushInactiveOAuth2TokensRequest notAfter(OffsetDateTime notAfter) { - - this.notAfter = notAfter; - return this; - } - - /** - * NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. - * @return notAfter - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing.") - - public OffsetDateTime getNotAfter() { - return notAfter; - } - - - public void setNotAfter(OffsetDateTime notAfter) { - this.notAfter = notAfter; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FlushInactiveOAuth2TokensRequest flushInactiveOAuth2TokensRequest = (FlushInactiveOAuth2TokensRequest) o; - return Objects.equals(this.notAfter, flushInactiveOAuth2TokensRequest.notAfter); - } - - @Override - public int hashCode() { - return Objects.hash(notAfter); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FlushInactiveOAuth2TokensRequest {\n"); - sb.append(" notAfter: ").append(toIndentedString(notAfter)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 339ad19674e..b2b0920d977 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,11 +23,32 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; /** * GenericError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") public class GenericError { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @@ -39,7 +60,7 @@ public class GenericError { public static final String SERIALIZED_NAME_DETAILS = "details"; @SerializedName(SERIALIZED_NAME_DETAILS) - private Object details; + private Object details = null; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -248,6 +269,7 @@ public void setStatus(String status) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -267,11 +289,22 @@ public boolean equals(Object o) { Objects.equals(this.status, genericError.status); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { return Objects.hash(code, debug, details, id, message, reason, request, status); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -299,5 +332,123 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("debug"); + openapiFields.add("details"); + openapiFields.add("id"); + openapiFields.add("message"); + openapiFields.add("reason"); + openapiFields.add("request"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in GenericError is not found in the empty JSON string", GenericError.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!GenericError.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GenericError` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("debug") != null && !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())); + } + if (jsonObj.get("id") != null && !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())); + } + if (jsonObj.get("message") != null && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if (jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + } + if (jsonObj.get("request") != null && !jsonObj.get("request").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `request` to be a primitive type in the JSON string but got `%s`", jsonObj.get("request").toString())); + } + if (jsonObj.get("status") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GenericError.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GenericError' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GenericError.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GenericError value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GenericError read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..b20f46a5fc8 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/GetVersion200Response.java @@ -0,0 +1,209 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * GetVersion200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class GetVersion200Response { + public static final String SERIALIZED_NAME_VERSION = "version"; + @SerializedName(SERIALIZED_NAME_VERSION) + private String version; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetVersion200Response getVersion200Response = (GetVersion200Response) o; + return Objects.equals(this.version, getVersion200Response.version); + } + + @Override + public int hashCode() { + return Objects.hash(version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetVersion200Response {\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("version"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in GetVersion200Response is not found in the empty JSON string", GetVersion200Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!GetVersion200Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `GetVersion200Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("version") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetVersion200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetVersion200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetVersion200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetVersion200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetVersion200Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 4f8d15515fe..d92f4af4a8d 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -27,10 +27,30 @@ import java.util.List; import java.util.Map; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + /** * HealthNotReadyStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") public class HealthNotReadyStatus { public static final String SERIALIZED_NAME_ERRORS = "errors"; @SerializedName(SERIALIZED_NAME_ERRORS) @@ -70,6 +90,7 @@ public void setErrors(Map errors) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -107,5 +128,90 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in HealthNotReadyStatus is not found in the empty JSON string", HealthNotReadyStatus.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!HealthNotReadyStatus.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HealthNotReadyStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HealthNotReadyStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HealthNotReadyStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(HealthNotReadyStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, HealthNotReadyStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public HealthNotReadyStatus read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 33b2599bfbb..b80aabbe61d 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,10 +24,30 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + /** * HealthStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") public class HealthStatus { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -59,6 +79,7 @@ public void setStatus(String status) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -96,5 +117,93 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in HealthStatus is not found in the empty JSON string", HealthStatus.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!HealthStatus.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `HealthStatus` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("status") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!HealthStatus.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'HealthStatus' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(HealthStatus.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, HealthStatus value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public HealthStatus read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2TokenIntrospection.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IntrospectedOAuth2Token.java similarity index 53% rename from clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2TokenIntrospection.java rename to clients/hydra/java/src/main/java/sh/ory/hydra/model/IntrospectedOAuth2Token.java index 61188b6522a..65ab4674e1a 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2TokenIntrospection.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IntrospectedOAuth2Token.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,14 +24,36 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; /** - * https://tools.ietf.org/html/rfc7662 + * Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) */ -@ApiModel(description = "https://tools.ietf.org/html/rfc7662") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class OAuth2TokenIntrospection { +@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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class IntrospectedOAuth2Token { public static final String SERIALIZED_NAME_ACTIVE = "active"; @SerializedName(SERIALIZED_NAME_ACTIVE) private Boolean active; @@ -50,7 +72,7 @@ public class OAuth2TokenIntrospection { public static final String SERIALIZED_NAME_EXT = "ext"; @SerializedName(SERIALIZED_NAME_EXT) - private Object ext; + private Map ext = null; public static final String SERIALIZED_NAME_IAT = "iat"; @SerializedName(SERIALIZED_NAME_IAT) @@ -88,10 +110,10 @@ public class OAuth2TokenIntrospection { @SerializedName(SERIALIZED_NAME_USERNAME) private String username; - public OAuth2TokenIntrospection() { + public IntrospectedOAuth2Token() { } - public OAuth2TokenIntrospection active(Boolean active) { + public IntrospectedOAuth2Token active(Boolean active) { this.active = active; return this; @@ -114,13 +136,13 @@ public void setActive(Boolean active) { } - public OAuth2TokenIntrospection aud(List aud) { + public IntrospectedOAuth2Token aud(List aud) { this.aud = aud; return this; } - public OAuth2TokenIntrospection addAudItem(String audItem) { + public IntrospectedOAuth2Token addAudItem(String audItem) { if (this.aud == null) { this.aud = new ArrayList<>(); } @@ -145,7 +167,7 @@ public void setAud(List aud) { } - public OAuth2TokenIntrospection clientId(String clientId) { + public IntrospectedOAuth2Token clientId(String clientId) { this.clientId = clientId; return this; @@ -168,7 +190,7 @@ public void setClientId(String clientId) { } - public OAuth2TokenIntrospection exp(Long exp) { + public IntrospectedOAuth2Token exp(Long exp) { this.exp = exp; return this; @@ -191,12 +213,20 @@ public void setExp(Long exp) { } - public OAuth2TokenIntrospection ext(Object ext) { + public IntrospectedOAuth2Token ext(Map ext) { this.ext = ext; return this; } + public IntrospectedOAuth2Token putExtItem(String key, Object extItem) { + if (this.ext == null) { + this.ext = new HashMap<>(); + } + this.ext.put(key, extItem); + return this; + } + /** * Extra is arbitrary data set by the session. * @return ext @@ -204,17 +234,17 @@ public OAuth2TokenIntrospection ext(Object ext) { @javax.annotation.Nullable @ApiModelProperty(value = "Extra is arbitrary data set by the session.") - public Object getExt() { + public Map getExt() { return ext; } - public void setExt(Object ext) { + public void setExt(Map ext) { this.ext = ext; } - public OAuth2TokenIntrospection iat(Long iat) { + public IntrospectedOAuth2Token iat(Long iat) { this.iat = iat; return this; @@ -237,7 +267,7 @@ public void setIat(Long iat) { } - public OAuth2TokenIntrospection iss(String iss) { + public IntrospectedOAuth2Token iss(String iss) { this.iss = iss; return this; @@ -260,7 +290,7 @@ public void setIss(String iss) { } - public OAuth2TokenIntrospection nbf(Long nbf) { + public IntrospectedOAuth2Token nbf(Long nbf) { this.nbf = nbf; return this; @@ -283,7 +313,7 @@ public void setNbf(Long nbf) { } - public OAuth2TokenIntrospection obfuscatedSubject(String obfuscatedSubject) { + public IntrospectedOAuth2Token obfuscatedSubject(String obfuscatedSubject) { this.obfuscatedSubject = obfuscatedSubject; return this; @@ -306,7 +336,7 @@ public void setObfuscatedSubject(String obfuscatedSubject) { } - public OAuth2TokenIntrospection scope(String scope) { + public IntrospectedOAuth2Token scope(String scope) { this.scope = scope; return this; @@ -329,7 +359,7 @@ public void setScope(String scope) { } - public OAuth2TokenIntrospection sub(String sub) { + public IntrospectedOAuth2Token sub(String sub) { this.sub = sub; return this; @@ -352,7 +382,7 @@ public void setSub(String sub) { } - public OAuth2TokenIntrospection tokenType(String tokenType) { + public IntrospectedOAuth2Token tokenType(String tokenType) { this.tokenType = tokenType; return this; @@ -375,7 +405,7 @@ public void setTokenType(String tokenType) { } - public OAuth2TokenIntrospection tokenUse(String tokenUse) { + public IntrospectedOAuth2Token tokenUse(String tokenUse) { this.tokenUse = tokenUse; return this; @@ -398,7 +428,7 @@ public void setTokenUse(String tokenUse) { } - public OAuth2TokenIntrospection username(String username) { + public IntrospectedOAuth2Token username(String username) { this.username = username; return this; @@ -421,6 +451,7 @@ public void setUsername(String username) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -429,21 +460,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OAuth2TokenIntrospection oAuth2TokenIntrospection = (OAuth2TokenIntrospection) o; - return Objects.equals(this.active, oAuth2TokenIntrospection.active) && - Objects.equals(this.aud, oAuth2TokenIntrospection.aud) && - Objects.equals(this.clientId, oAuth2TokenIntrospection.clientId) && - Objects.equals(this.exp, oAuth2TokenIntrospection.exp) && - Objects.equals(this.ext, oAuth2TokenIntrospection.ext) && - Objects.equals(this.iat, oAuth2TokenIntrospection.iat) && - Objects.equals(this.iss, oAuth2TokenIntrospection.iss) && - Objects.equals(this.nbf, oAuth2TokenIntrospection.nbf) && - Objects.equals(this.obfuscatedSubject, oAuth2TokenIntrospection.obfuscatedSubject) && - Objects.equals(this.scope, oAuth2TokenIntrospection.scope) && - Objects.equals(this.sub, oAuth2TokenIntrospection.sub) && - Objects.equals(this.tokenType, oAuth2TokenIntrospection.tokenType) && - Objects.equals(this.tokenUse, oAuth2TokenIntrospection.tokenUse) && - Objects.equals(this.username, oAuth2TokenIntrospection.username); + IntrospectedOAuth2Token introspectedOAuth2Token = (IntrospectedOAuth2Token) o; + return Objects.equals(this.active, introspectedOAuth2Token.active) && + Objects.equals(this.aud, introspectedOAuth2Token.aud) && + Objects.equals(this.clientId, introspectedOAuth2Token.clientId) && + Objects.equals(this.exp, introspectedOAuth2Token.exp) && + Objects.equals(this.ext, introspectedOAuth2Token.ext) && + Objects.equals(this.iat, introspectedOAuth2Token.iat) && + Objects.equals(this.iss, introspectedOAuth2Token.iss) && + Objects.equals(this.nbf, introspectedOAuth2Token.nbf) && + Objects.equals(this.obfuscatedSubject, introspectedOAuth2Token.obfuscatedSubject) && + Objects.equals(this.scope, introspectedOAuth2Token.scope) && + Objects.equals(this.sub, introspectedOAuth2Token.sub) && + Objects.equals(this.tokenType, introspectedOAuth2Token.tokenType) && + Objects.equals(this.tokenUse, introspectedOAuth2Token.tokenUse) && + Objects.equals(this.username, introspectedOAuth2Token.username); } @Override @@ -454,7 +485,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OAuth2TokenIntrospection {\n"); + sb.append("class IntrospectedOAuth2Token {\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); sb.append(" aud: ").append(toIndentedString(aud)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); @@ -484,5 +515,139 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("active"); + openapiFields.add("aud"); + openapiFields.add("client_id"); + openapiFields.add("exp"); + openapiFields.add("ext"); + openapiFields.add("iat"); + openapiFields.add("iss"); + openapiFields.add("nbf"); + openapiFields.add("obfuscated_subject"); + openapiFields.add("scope"); + openapiFields.add("sub"); + openapiFields.add("token_type"); + openapiFields.add("token_use"); + openapiFields.add("username"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in IntrospectedOAuth2Token is not found in the empty JSON string", IntrospectedOAuth2Token.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!IntrospectedOAuth2Token.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IntrospectedOAuth2Token` properties. JSON: %s", entry.getKey(), jsonObj.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())); + } + } + // ensure the json data is an array + if (jsonObj.get("aud") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_id").toString())); + } + if (jsonObj.get("iss") != null && !jsonObj.get("iss").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `iss` to be a primitive type in the JSON string but got `%s`", jsonObj.get("iss").toString())); + } + if (jsonObj.get("obfuscated_subject") != null && !jsonObj.get("obfuscated_subject").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `obfuscated_subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("obfuscated_subject").toString())); + } + if (jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + } + if (jsonObj.get("sub") != null && !jsonObj.get("sub").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sub` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub").toString())); + } + if (jsonObj.get("token_type") != null && !jsonObj.get("token_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token_type").toString())); + } + if (jsonObj.get("token_use") != null && !jsonObj.get("token_use").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token_use` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token_use").toString())); + } + if (jsonObj.get("username") != null && !jsonObj.get("username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IntrospectedOAuth2Token.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IntrospectedOAuth2Token' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IntrospectedOAuth2Token.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IntrospectedOAuth2Token value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IntrospectedOAuth2Token read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..350ea81d6dc --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady200Response.java @@ -0,0 +1,209 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * IsReady200Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class IsReady200Response { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IsReady200Response isReady200Response = (IsReady200Response) o; + return Objects.equals(this.status, isReady200Response.status); + } + + @Override + public int hashCode() { + return Objects.hash(status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IsReady200Response {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in IsReady200Response is not found in the empty JSON string", IsReady200Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!IsReady200Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IsReady200Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("status") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IsReady200Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IsReady200Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IsReady200Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IsReady200Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IsReady200Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..2bcd27f9f4e --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/IsReady503Response.java @@ -0,0 +1,217 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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.HashMap; +import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * IsReady503Response + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class IsReady503Response { + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + private Map errors = null; + + public IsReady503Response() { + } + + public IsReady503Response errors(Map errors) { + + this.errors = errors; + return this; + } + + public IsReady503Response putErrorsItem(String key, String errorsItem) { + if (this.errors == null) { + this.errors = new HashMap<>(); + } + this.errors.put(key, 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IsReady503Response isReady503Response = (IsReady503Response) o; + return Objects.equals(this.errors, isReady503Response.errors); + } + + @Override + public int hashCode() { + return Objects.hash(errors); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IsReady503Response {\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("errors"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in IsReady503Response is not found in the empty JSON string", IsReady503Response.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!IsReady503Response.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `IsReady503Response` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!IsReady503Response.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'IsReady503Response' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(IsReady503Response.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, IsReady503Response value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public IsReady503Response read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 deleted file mode 100644 index 679572c629d..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JSONWebKeySet.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; -import sh.ory.hydra.model.JSONWebKey; - -/** - * It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. - */ -@ApiModel(description = "It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class JSONWebKeySet { - public static final String SERIALIZED_NAME_KEYS = "keys"; - @SerializedName(SERIALIZED_NAME_KEYS) - private List keys = null; - - public JSONWebKeySet() { - } - - public JSONWebKeySet keys(List keys) { - - this.keys = keys; - return this; - } - - public JSONWebKeySet addKeysItem(JSONWebKey keysItem) { - if (this.keys == null) { - this.keys = new ArrayList<>(); - } - this.keys.add(keysItem); - return this; - } - - /** - * The value of the \"keys\" parameter is an array of 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 = "The value of the \"keys\" parameter is an array of 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; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - JSONWebKeySet jsONWebKeySet = (JSONWebKeySet) o; - return Objects.equals(this.keys, jsONWebKeySet.keys); - } - - @Override - public int hashCode() { - return Objects.hash(keys); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class JSONWebKeySet {\n"); - sb.append(" keys: ").append(toIndentedString(keys)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonError.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonError.java deleted file mode 100644 index 510e347249c..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonError.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. - */ -@ApiModel(description = "Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class JsonError { - public static final String SERIALIZED_NAME_ERROR = "error"; - @SerializedName(SERIALIZED_NAME_ERROR) - private String error; - - public static final String SERIALIZED_NAME_ERROR_DEBUG = "error_debug"; - @SerializedName(SERIALIZED_NAME_ERROR_DEBUG) - private String errorDebug; - - public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; - @SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION) - private String errorDescription; - - public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; - @SerializedName(SERIALIZED_NAME_STATUS_CODE) - private Long statusCode; - - public JsonError() { - } - - public JsonError error(String error) { - - this.error = error; - return this; - } - - /** - * Name is the error name. - * @return error - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "The requested resource could not be found", value = "Name is the error name.") - - public String getError() { - return error; - } - - - public void setError(String error) { - this.error = error; - } - - - public JsonError errorDebug(String errorDebug) { - - this.errorDebug = errorDebug; - return this; - } - - /** - * Debug contains debug information. This is usually not available and has to be enabled. - * @return errorDebug - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "The database adapter was unable to find the element", value = "Debug contains debug information. This is usually not available and has to be enabled.") - - public String getErrorDebug() { - return errorDebug; - } - - - public void setErrorDebug(String errorDebug) { - this.errorDebug = errorDebug; - } - - - public JsonError errorDescription(String errorDescription) { - - this.errorDescription = errorDescription; - return this; - } - - /** - * Description contains further information on the nature of the error. - * @return errorDescription - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "Object with ID 12345 does not exist", value = "Description contains further information on the nature of the error.") - - public String getErrorDescription() { - return errorDescription; - } - - - public void setErrorDescription(String errorDescription) { - this.errorDescription = errorDescription; - } - - - public JsonError statusCode(Long statusCode) { - - this.statusCode = statusCode; - return this; - } - - /** - * Code represents the error status code (404, 403, 401, ...). - * @return statusCode - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "404", value = "Code represents the error status code (404, 403, 401, ...).") - - public Long getStatusCode() { - return statusCode; - } - - - public void setStatusCode(Long statusCode) { - this.statusCode = statusCode; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - JsonError jsonError = (JsonError) o; - return Objects.equals(this.error, jsonError.error) && - Objects.equals(this.errorDebug, jsonError.errorDebug) && - Objects.equals(this.errorDescription, jsonError.errorDescription) && - Objects.equals(this.statusCode, jsonError.statusCode); - } - - @Override - public int hashCode() { - return Objects.hash(error, errorDebug, errorDescription, statusCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class JsonError {\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" errorDebug: ").append(toIndentedString(errorDebug)).append("\n"); - sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); - sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 new file mode 100644 index 00000000000..a82f92a4145 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonPatch.java @@ -0,0 +1,327 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * 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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class JsonPatch { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + private String from; + + public static final String SERIALIZED_NAME_OP = "op"; + @SerializedName(SERIALIZED_NAME_OP) + private String op; + + public static final String SERIALIZED_NAME_PATH = "path"; + @SerializedName(SERIALIZED_NAME_PATH) + private String path; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private Object value = null; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JsonPatch jsonPatch = (JsonPatch) o; + return Objects.equals(this.from, jsonPatch.from) && + Objects.equals(this.op, jsonPatch.op) && + Objects.equals(this.path, jsonPatch.path) && + Objects.equals(this.value, jsonPatch.value); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(from, op, path, value); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JsonPatch {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("from"); + openapiFields.add("op"); + openapiFields.add("path"); + openapiFields.add("value"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("op"); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in JsonPatch is not found in the empty JSON string", JsonPatch.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!JsonPatch.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JsonPatch` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("from") != null && !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())); + } + if (jsonObj.get("op") != null && !jsonObj.get("op").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `op` to be a primitive type in the JSON string but got `%s`", jsonObj.get("op").toString())); + } + if (jsonObj.get("path") != null && !jsonObj.get("path").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `path` to be a primitive type in the JSON string but got `%s`", jsonObj.get("path").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JsonPatch.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JsonPatch' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JsonPatch.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JsonPatch value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JsonPatch read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 similarity index 58% rename from clients/hydra/java/src/main/java/sh/ory/hydra/model/JSONWebKey.java rename to clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKey.java index 6b9685079db..036f6a08c63 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,12 +26,31 @@ import java.util.ArrayList; import java.util.List; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + /** - * It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. + * JsonWebKey */ -@ApiModel(description = "It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class JSONWebKey { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class JsonWebKey { public static final String SERIALIZED_NAME_ALG = "alg"; @SerializedName(SERIALIZED_NAME_ALG) private String alg; @@ -100,10 +119,10 @@ public class JSONWebKey { @SerializedName(SERIALIZED_NAME_Y) private String y; - public JSONWebKey() { + public JsonWebKey() { } - public JSONWebKey alg(String alg) { + public JsonWebKey alg(String alg) { this.alg = alg; return this; @@ -126,7 +145,7 @@ public void setAlg(String alg) { } - public JSONWebKey crv(String crv) { + public JsonWebKey crv(String crv) { this.crv = crv; return this; @@ -149,7 +168,7 @@ public void setCrv(String crv) { } - public JSONWebKey d(String d) { + public JsonWebKey d(String d) { this.d = d; return this; @@ -172,7 +191,7 @@ public void setD(String d) { } - public JSONWebKey dp(String dp) { + public JsonWebKey dp(String dp) { this.dp = dp; return this; @@ -195,7 +214,7 @@ public void setDp(String dp) { } - public JSONWebKey dq(String dq) { + public JsonWebKey dq(String dq) { this.dq = dq; return this; @@ -218,7 +237,7 @@ public void setDq(String dq) { } - public JSONWebKey e(String e) { + public JsonWebKey e(String e) { this.e = e; return this; @@ -241,7 +260,7 @@ public void setE(String e) { } - public JSONWebKey k(String k) { + public JsonWebKey k(String k) { this.k = k; return this; @@ -264,7 +283,7 @@ public void setK(String k) { } - public JSONWebKey kid(String kid) { + public JsonWebKey kid(String kid) { this.kid = kid; return this; @@ -287,7 +306,7 @@ public void setKid(String kid) { } - public JSONWebKey kty(String kty) { + public JsonWebKey kty(String kty) { this.kty = kty; return this; @@ -310,7 +329,7 @@ public void setKty(String kty) { } - public JSONWebKey n(String n) { + public JsonWebKey n(String n) { this.n = n; return this; @@ -333,7 +352,7 @@ public void setN(String n) { } - public JSONWebKey p(String p) { + public JsonWebKey p(String p) { this.p = p; return this; @@ -356,7 +375,7 @@ public void setP(String p) { } - public JSONWebKey q(String q) { + public JsonWebKey q(String q) { this.q = q; return this; @@ -379,7 +398,7 @@ public void setQ(String q) { } - public JSONWebKey qi(String qi) { + public JsonWebKey qi(String qi) { this.qi = qi; return this; @@ -402,7 +421,7 @@ public void setQi(String qi) { } - public JSONWebKey use(String use) { + public JsonWebKey use(String use) { this.use = use; return this; @@ -425,7 +444,7 @@ public void setUse(String use) { } - public JSONWebKey x(String x) { + public JsonWebKey x(String x) { this.x = x; return this; @@ -448,13 +467,13 @@ public void setX(String x) { } - public JSONWebKey x5c(List x5c) { + public JsonWebKey x5c(List x5c) { this.x5c = x5c; return this; } - public JSONWebKey addX5cItem(String x5cItem) { + public JsonWebKey addX5cItem(String x5cItem) { if (this.x5c == null) { this.x5c = new ArrayList<>(); } @@ -479,7 +498,7 @@ public void setX5c(List x5c) { } - public JSONWebKey y(String y) { + public JsonWebKey y(String y) { this.y = y; return this; @@ -502,6 +521,7 @@ public void setY(String y) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -510,24 +530,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - JSONWebKey jsONWebKey = (JSONWebKey) o; - return Objects.equals(this.alg, jsONWebKey.alg) && - Objects.equals(this.crv, jsONWebKey.crv) && - Objects.equals(this.d, jsONWebKey.d) && - Objects.equals(this.dp, jsONWebKey.dp) && - Objects.equals(this.dq, jsONWebKey.dq) && - Objects.equals(this.e, jsONWebKey.e) && - Objects.equals(this.k, jsONWebKey.k) && - Objects.equals(this.kid, jsONWebKey.kid) && - Objects.equals(this.kty, jsONWebKey.kty) && - Objects.equals(this.n, jsONWebKey.n) && - Objects.equals(this.p, jsONWebKey.p) && - Objects.equals(this.q, jsONWebKey.q) && - Objects.equals(this.qi, jsONWebKey.qi) && - Objects.equals(this.use, jsONWebKey.use) && - Objects.equals(this.x, jsONWebKey.x) && - Objects.equals(this.x5c, jsONWebKey.x5c) && - Objects.equals(this.y, jsONWebKey.y); + JsonWebKey jsonWebKey = (JsonWebKey) o; + return Objects.equals(this.alg, jsonWebKey.alg) && + Objects.equals(this.crv, jsonWebKey.crv) && + Objects.equals(this.d, jsonWebKey.d) && + Objects.equals(this.dp, jsonWebKey.dp) && + Objects.equals(this.dq, jsonWebKey.dq) && + Objects.equals(this.e, jsonWebKey.e) && + Objects.equals(this.k, jsonWebKey.k) && + Objects.equals(this.kid, jsonWebKey.kid) && + Objects.equals(this.kty, jsonWebKey.kty) && + Objects.equals(this.n, jsonWebKey.n) && + Objects.equals(this.p, jsonWebKey.p) && + Objects.equals(this.q, jsonWebKey.q) && + Objects.equals(this.qi, jsonWebKey.qi) && + Objects.equals(this.use, jsonWebKey.use) && + Objects.equals(this.x, jsonWebKey.x) && + Objects.equals(this.x5c, jsonWebKey.x5c) && + Objects.equals(this.y, jsonWebKey.y); } @Override @@ -538,7 +558,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class JSONWebKey {\n"); + sb.append("class JsonWebKey {\n"); sb.append(" alg: ").append(toIndentedString(alg)).append("\n"); sb.append(" crv: ").append(toIndentedString(crv)).append("\n"); sb.append(" d: ").append(toIndentedString(d)).append("\n"); @@ -571,5 +591,169 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("alg"); + openapiFields.add("crv"); + openapiFields.add("d"); + openapiFields.add("dp"); + openapiFields.add("dq"); + openapiFields.add("e"); + openapiFields.add("k"); + openapiFields.add("kid"); + openapiFields.add("kty"); + openapiFields.add("n"); + openapiFields.add("p"); + openapiFields.add("q"); + openapiFields.add("qi"); + openapiFields.add("use"); + openapiFields.add("x"); + openapiFields.add("x5c"); + openapiFields.add("y"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("alg"); + openapiRequiredFields.add("kid"); + openapiRequiredFields.add("kty"); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in JsonWebKey is not found in the empty JSON string", JsonWebKey.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!JsonWebKey.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JsonWebKey` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("alg") != null && !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())); + } + if (jsonObj.get("crv") != null && !jsonObj.get("crv").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `crv` to be a primitive type in the JSON string but got `%s`", jsonObj.get("crv").toString())); + } + if (jsonObj.get("d") != null && !jsonObj.get("d").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `d` to be a primitive type in the JSON string but got `%s`", jsonObj.get("d").toString())); + } + if (jsonObj.get("dp") != null && !jsonObj.get("dp").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dp").toString())); + } + if (jsonObj.get("dq") != null && !jsonObj.get("dq").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `dq` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dq").toString())); + } + if (jsonObj.get("e") != null && !jsonObj.get("e").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `e` to be a primitive type in the JSON string but got `%s`", jsonObj.get("e").toString())); + } + if (jsonObj.get("k") != null && !jsonObj.get("k").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `k` to be a primitive type in the JSON string but got `%s`", jsonObj.get("k").toString())); + } + if (jsonObj.get("kid") != null && !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())); + } + if (jsonObj.get("kty") != null && !jsonObj.get("kty").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `kty` to be a primitive type in the JSON string but got `%s`", jsonObj.get("kty").toString())); + } + if (jsonObj.get("n") != null && !jsonObj.get("n").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `n` to be a primitive type in the JSON string but got `%s`", jsonObj.get("n").toString())); + } + if (jsonObj.get("p") != null && !jsonObj.get("p").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `p` to be a primitive type in the JSON string but got `%s`", jsonObj.get("p").toString())); + } + if (jsonObj.get("q") != null && !jsonObj.get("q").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `q` to be a primitive type in the JSON string but got `%s`", jsonObj.get("q").toString())); + } + if (jsonObj.get("qi") != null && !jsonObj.get("qi").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `qi` to be a primitive type in the JSON string but got `%s`", jsonObj.get("qi").toString())); + } + if (jsonObj.get("use") != null && !jsonObj.get("use").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `use` to be a primitive type in the JSON string but got `%s`", jsonObj.get("use").toString())); + } + if (jsonObj.get("x") != null && !jsonObj.get("x").isJsonPrimitive()) { + 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 json data is an array + if (jsonObj.get("x5c") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `y` to be a primitive type in the JSON string but got `%s`", jsonObj.get("y").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JsonWebKey.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JsonWebKey' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JsonWebKey.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JsonWebKey value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JsonWebKey read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..50b3f3d82a4 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySet.java @@ -0,0 +1,230 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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.List; +import sh.ory.hydra.model.JsonWebKey; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * JSON Web Key Set + */ +@ApiModel(description = "JSON Web Key Set") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class JsonWebKeySet { + public static final String SERIALIZED_NAME_KEYS = "keys"; + @SerializedName(SERIALIZED_NAME_KEYS) + private List keys = null; + + public JsonWebKeySet() { + } + + public JsonWebKeySet keys(List keys) { + + this.keys = keys; + return this; + } + + public JsonWebKeySet addKeysItem(JsonWebKey keysItem) { + if (this.keys == null) { + this.keys = new ArrayList<>(); + } + this.keys.add(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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JsonWebKeySet jsonWebKeySet = (JsonWebKeySet) o; + return Objects.equals(this.keys, jsonWebKeySet.keys); + } + + @Override + public int hashCode() { + return Objects.hash(keys); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JsonWebKeySet {\n"); + sb.append(" keys: ").append(toIndentedString(keys)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("keys"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in JsonWebKeySet is not found in the empty JSON string", JsonWebKeySet.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!JsonWebKeySet.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JsonWebKeySet` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + JsonArray jsonArraykeys = jsonObj.getAsJsonArray("keys"); + if (jsonArraykeys != null) { + // ensure the json data is an array + if (!jsonObj.get("keys").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `keys` to be an array in the JSON string but got `%s`", jsonObj.get("keys").toString())); + } + + // validate the optional field `keys` (array) + for (int i = 0; i < jsonArraykeys.size(); i++) { + JsonWebKey.validateJsonObject(jsonArraykeys.get(i).getAsJsonObject()); + }; + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JsonWebKeySet.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JsonWebKeySet' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JsonWebKeySet.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JsonWebKeySet value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JsonWebKeySet read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySetGeneratorRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySetGeneratorRequest.java deleted file mode 100644 index 30c9bec3bbc..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/JsonWebKeySetGeneratorRequest.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * JsonWebKeySetGeneratorRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class JsonWebKeySetGeneratorRequest { - public static final String SERIALIZED_NAME_ALG = "alg"; - @SerializedName(SERIALIZED_NAME_ALG) - private String alg; - - public static final String SERIALIZED_NAME_KID = "kid"; - @SerializedName(SERIALIZED_NAME_KID) - private String kid; - - public static final String SERIALIZED_NAME_USE = "use"; - @SerializedName(SERIALIZED_NAME_USE) - private String use; - - public JsonWebKeySetGeneratorRequest() { - } - - public JsonWebKeySetGeneratorRequest alg(String alg) { - - this.alg = alg; - return this; - } - - /** - * 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 = "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 JsonWebKeySetGeneratorRequest kid(String kid) { - - this.kid = kid; - return this; - } - - /** - * The kid of the key to be created - * @return kid - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The kid of the key to be created") - - public String getKid() { - return kid; - } - - - public void setKid(String kid) { - this.kid = kid; - } - - - public JsonWebKeySetGeneratorRequest use(String use) { - - this.use = use; - return this; - } - - /** - * 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 = "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; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - JsonWebKeySetGeneratorRequest jsonWebKeySetGeneratorRequest = (JsonWebKeySetGeneratorRequest) o; - return Objects.equals(this.alg, jsonWebKeySetGeneratorRequest.alg) && - Objects.equals(this.kid, jsonWebKeySetGeneratorRequest.kid) && - Objects.equals(this.use, jsonWebKeySetGeneratorRequest.use); - } - - @Override - public int hashCode() { - return Objects.hash(alg, kid, use); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class JsonWebKeySetGeneratorRequest {\n"); - sb.append(" alg: ").append(toIndentedString(alg)).append("\n"); - sb.append(" kid: ").append(toIndentedString(kid)).append("\n"); - sb.append(" use: ").append(toIndentedString(use)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/LogoutRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/LogoutRequest.java deleted file mode 100644 index 193c98a95fa..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/LogoutRequest.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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 sh.ory.hydra.model.OAuth2Client; - -/** - * LogoutRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class LogoutRequest { - public static final String SERIALIZED_NAME_CHALLENGE = "challenge"; - @SerializedName(SERIALIZED_NAME_CHALLENGE) - private String challenge; - - public static final String SERIALIZED_NAME_CLIENT = "client"; - @SerializedName(SERIALIZED_NAME_CLIENT) - private OAuth2Client client; - - public static final String SERIALIZED_NAME_REQUEST_URL = "request_url"; - @SerializedName(SERIALIZED_NAME_REQUEST_URL) - private String requestUrl; - - public static final String SERIALIZED_NAME_RP_INITIATED = "rp_initiated"; - @SerializedName(SERIALIZED_NAME_RP_INITIATED) - private Boolean rpInitiated; - - public static final String SERIALIZED_NAME_SID = "sid"; - @SerializedName(SERIALIZED_NAME_SID) - private String sid; - - public static final String SERIALIZED_NAME_SUBJECT = "subject"; - @SerializedName(SERIALIZED_NAME_SUBJECT) - private String subject; - - public LogoutRequest() { - } - - public LogoutRequest 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 LogoutRequest 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 LogoutRequest 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 LogoutRequest 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 LogoutRequest 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 LogoutRequest 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; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LogoutRequest logoutRequest = (LogoutRequest) o; - return Objects.equals(this.challenge, logoutRequest.challenge) && - Objects.equals(this.client, logoutRequest.client) && - Objects.equals(this.requestUrl, logoutRequest.requestUrl) && - Objects.equals(this.rpInitiated, logoutRequest.rpInitiated) && - Objects.equals(this.sid, logoutRequest.sid) && - Objects.equals(this.subject, logoutRequest.subject); - } - - @Override - public int hashCode() { - return Objects.hash(challenge, client, requestUrl, rpInitiated, sid, subject); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LogoutRequest {\n"); - sb.append(" challenge: ").append(toIndentedString(challenge)).append("\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); - sb.append(" requestUrl: ").append(toIndentedString(requestUrl)).append("\n"); - sb.append(" rpInitiated: ").append(toIndentedString(rpInitiated)).append("\n"); - sb.append(" sid: ").append(toIndentedString(sid)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 33fb939b96c..55ff0306487 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,11 +26,33 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; /** - * 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. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") public class OAuth2Client { public static final String SERIALIZED_NAME_ALLOWED_CORS_ORIGINS = "allowed_cors_origins"; @SerializedName(SERIALIZED_NAME_ALLOWED_CORS_ORIGINS) @@ -40,6 +62,18 @@ public class OAuth2Client { @SerializedName(SERIALIZED_NAME_AUDIENCE) private List audience = null; + 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) + private String authorizationCodeGrantAccessTokenLifespan; + + public static final String SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_ID_TOKEN_LIFESPAN = "authorization_code_grant_id_token_lifespan"; + @SerializedName(SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_ID_TOKEN_LIFESPAN) + private String authorizationCodeGrantIdTokenLifespan; + + public static final String SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_REFRESH_TOKEN_LIFESPAN = "authorization_code_grant_refresh_token_lifespan"; + @SerializedName(SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_REFRESH_TOKEN_LIFESPAN) + private String authorizationCodeGrantRefreshTokenLifespan; + public static final String SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SESSION_REQUIRED = "backchannel_logout_session_required"; @SerializedName(SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SESSION_REQUIRED) private Boolean backchannelLogoutSessionRequired; @@ -48,6 +82,10 @@ public class OAuth2Client { @SerializedName(SERIALIZED_NAME_BACKCHANNEL_LOGOUT_URI) private String backchannelLogoutUri; + public static final String SERIALIZED_NAME_CLIENT_CREDENTIALS_GRANT_ACCESS_TOKEN_LIFESPAN = "client_credentials_grant_access_token_lifespan"; + @SerializedName(SERIALIZED_NAME_CLIENT_CREDENTIALS_GRANT_ACCESS_TOKEN_LIFESPAN) + private String clientCredentialsGrantAccessTokenLifespan; + public static final String SERIALIZED_NAME_CLIENT_ID = "client_id"; @SerializedName(SERIALIZED_NAME_CLIENT_ID) private String clientId; @@ -88,21 +126,33 @@ public class OAuth2Client { @SerializedName(SERIALIZED_NAME_GRANT_TYPES) private List grantTypes = null; + public static final String SERIALIZED_NAME_IMPLICIT_GRANT_ACCESS_TOKEN_LIFESPAN = "implicit_grant_access_token_lifespan"; + @SerializedName(SERIALIZED_NAME_IMPLICIT_GRANT_ACCESS_TOKEN_LIFESPAN) + private String implicitGrantAccessTokenLifespan; + + public static final String SERIALIZED_NAME_IMPLICIT_GRANT_ID_TOKEN_LIFESPAN = "implicit_grant_id_token_lifespan"; + @SerializedName(SERIALIZED_NAME_IMPLICIT_GRANT_ID_TOKEN_LIFESPAN) + private String implicitGrantIdTokenLifespan; + public static final String SERIALIZED_NAME_JWKS = "jwks"; @SerializedName(SERIALIZED_NAME_JWKS) - private Object jwks; + private Object jwks = null; public static final String SERIALIZED_NAME_JWKS_URI = "jwks_uri"; @SerializedName(SERIALIZED_NAME_JWKS_URI) private String jwksUri; + public static final String SERIALIZED_NAME_JWT_BEARER_GRANT_ACCESS_TOKEN_LIFESPAN = "jwt_bearer_grant_access_token_lifespan"; + @SerializedName(SERIALIZED_NAME_JWT_BEARER_GRANT_ACCESS_TOKEN_LIFESPAN) + private String jwtBearerGrantAccessTokenLifespan; + public static final String SERIALIZED_NAME_LOGO_URI = "logo_uri"; @SerializedName(SERIALIZED_NAME_LOGO_URI) private String logoUri; public static final String SERIALIZED_NAME_METADATA = "metadata"; @SerializedName(SERIALIZED_NAME_METADATA) - private Object metadata; + private Object metadata = null; public static final String SERIALIZED_NAME_OWNER = "owner"; @SerializedName(SERIALIZED_NAME_OWNER) @@ -120,6 +170,18 @@ public class OAuth2Client { @SerializedName(SERIALIZED_NAME_REDIRECT_URIS) private List redirectUris = null; + 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) + private String refreshTokenGrantAccessTokenLifespan; + + public static final String SERIALIZED_NAME_REFRESH_TOKEN_GRANT_ID_TOKEN_LIFESPAN = "refresh_token_grant_id_token_lifespan"; + @SerializedName(SERIALIZED_NAME_REFRESH_TOKEN_GRANT_ID_TOKEN_LIFESPAN) + private String refreshTokenGrantIdTokenLifespan; + + public static final String SERIALIZED_NAME_REFRESH_TOKEN_GRANT_REFRESH_TOKEN_LIFESPAN = "refresh_token_grant_refresh_token_lifespan"; + @SerializedName(SERIALIZED_NAME_REFRESH_TOKEN_GRANT_REFRESH_TOKEN_LIFESPAN) + private String refreshTokenGrantRefreshTokenLifespan; + public static final String SERIALIZED_NAME_REGISTRATION_ACCESS_TOKEN = "registration_access_token"; @SerializedName(SERIALIZED_NAME_REGISTRATION_ACCESS_TOKEN) private String registrationAccessToken; @@ -237,6 +299,75 @@ public void setAudience(List 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; @@ -244,11 +375,11 @@ public OAuth2Client backchannelLogoutSessionRequired(Boolean backchannelLogoutSe } /** - * 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. + * 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 = "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.") + @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; @@ -267,11 +398,11 @@ public OAuth2Client backchannelLogoutUri(String backchannelLogoutUri) { } /** - * RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + * 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 = "RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.") + @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; @@ -283,6 +414,29 @@ public void setBackchannelLogoutUri(String 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; @@ -290,11 +444,11 @@ public OAuth2Client clientId(String clientId) { } /** - * ID is the id for this client. + * OAuth 2.0 Client ID The ID is autogenerated and immutable. * @return clientId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "ID is the id for this client.") + @ApiModelProperty(value = "OAuth 2.0 Client ID The ID is autogenerated and immutable.") public String getClientId() { return clientId; @@ -313,11 +467,11 @@ public OAuth2Client clientName(String clientName) { } /** - * Name is the human-readable string name of the client to be presented to the end-user during authorization. + * 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 = "Name is the human-readable string name of the client to be presented to the end-user during authorization.") + @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; @@ -336,11 +490,11 @@ public OAuth2Client clientSecret(String clientSecret) { } /** - * Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. + * 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 = "Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again.") + @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; @@ -359,11 +513,11 @@ public OAuth2Client clientSecretExpiresAt(Long clientSecretExpiresAt) { } /** - * SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. + * 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 = "SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0.") + @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; @@ -382,11 +536,11 @@ public OAuth2Client clientUri(String clientUri) { } /** - * ClientURI is an 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. + * 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 = "ClientURI is an 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.") + @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; @@ -436,11 +590,11 @@ public OAuth2Client createdAt(OffsetDateTime createdAt) { } /** - * CreatedAt returns the timestamp of the client's creation. + * OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "CreatedAt returns the timestamp of the client's creation.") + @ApiModelProperty(value = "OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.") public OffsetDateTime getCreatedAt() { return createdAt; @@ -459,11 +613,11 @@ public OAuth2Client frontchannelLogoutSessionRequired(Boolean frontchannelLogout } /** - * 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. + * 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 = "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.") + @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; @@ -482,11 +636,11 @@ public OAuth2Client frontchannelLogoutUri(String frontchannelLogoutUri) { } /** - * 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. + * 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 = "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.") + @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; @@ -529,6 +683,52 @@ public void setGrantTypes(List 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; @@ -536,11 +736,11 @@ public OAuth2Client jwks(Object jwks) { } /** - * Get jwks + * 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 = "") + @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; @@ -559,11 +759,11 @@ public OAuth2Client jwksUri(String jwksUri) { } /** - * 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. + * 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 = "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.") + @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; @@ -575,6 +775,29 @@ public void setJwksUri(String 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; @@ -582,11 +805,11 @@ public OAuth2Client logoUri(String logoUri) { } /** - * LogoURI is an URL string that references a logo for the client. + * OAuth 2.0 Client Logo URI A URL string referencing the client's logo. * @return logoUri **/ @javax.annotation.Nullable - @ApiModelProperty(value = "LogoURI is an URL string that references a logo for the client.") + @ApiModelProperty(value = "OAuth 2.0 Client Logo URI A URL string referencing the client's logo.") public String getLogoUri() { return logoUri; @@ -628,11 +851,11 @@ public OAuth2Client owner(String owner) { } /** - * Owner is a string identifying the owner of the OAuth 2.0 Client. + * 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 = "Owner is a string identifying the owner of the OAuth 2.0 Client.") + @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; @@ -651,11 +874,11 @@ public OAuth2Client policyUri(String policyUri) { } /** - * 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. + * 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 = "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.") + @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; @@ -729,6 +952,75 @@ public void setRedirectUris(List 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; @@ -736,11 +1028,11 @@ public OAuth2Client registrationAccessToken(String registrationAccessToken) { } /** - * RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. + * 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 = "RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client.") + @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; @@ -759,11 +1051,11 @@ public OAuth2Client registrationClientUri(String registrationClientUri) { } /** - * RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + * 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 = "RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.") + @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; @@ -782,11 +1074,11 @@ public OAuth2Client requestObjectSigningAlg(String requestObjectSigningAlg) { } /** - * 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. + * 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 = "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.") + @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; @@ -867,11 +1159,11 @@ public OAuth2Client scope(String 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. * @return scope **/ @javax.annotation.Nullable - @ApiModelProperty(value = "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.") + @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; @@ -890,11 +1182,11 @@ public OAuth2Client sectorIdentifierUri(String sectorIdentifierUri) { } /** - * 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. + * 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 = "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.") + @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; @@ -913,11 +1205,11 @@ public OAuth2Client subjectType(String subjectType) { } /** - * SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + * 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 = "SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.") + @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; @@ -936,11 +1228,11 @@ public OAuth2Client tokenEndpointAuthMethod(String tokenEndpointAuthMethod) { } /** - * Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. + * OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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 = "Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none.") + @ApiModelProperty(value = "OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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; @@ -959,11 +1251,11 @@ public OAuth2Client tokenEndpointAuthSigningAlg(String tokenEndpointAuthSigningA } /** - * Requested Client Authentication signing algorithm for the Token Endpoint. + * OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. * @return tokenEndpointAuthSigningAlg **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Requested Client Authentication signing algorithm for the Token Endpoint.") + @ApiModelProperty(value = "OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.") public String getTokenEndpointAuthSigningAlg() { return tokenEndpointAuthSigningAlg; @@ -982,11 +1274,11 @@ public OAuth2Client tosUri(String tosUri) { } /** - * TermsOfServiceURI is a URL string that points 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 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 = "TermsOfServiceURI is a URL string that points 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.") + @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; @@ -1005,11 +1297,11 @@ public OAuth2Client updatedAt(OffsetDateTime updatedAt) { } /** - * UpdatedAt returns the timestamp of the last update. + * OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "UpdatedAt returns the timestamp of the last update.") + @ApiModelProperty(value = "OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.") public OffsetDateTime getUpdatedAt() { return updatedAt; @@ -1028,11 +1320,11 @@ public OAuth2Client userinfoSignedResponseAlg(String userinfoSignedResponseAlg) } /** - * 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. + * 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 = "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.") + @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; @@ -1044,6 +1336,7 @@ public void setUserinfoSignedResponseAlg(String userinfoSignedResponseAlg) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -1055,8 +1348,12 @@ public boolean equals(Object o) { OAuth2Client oAuth2Client = (OAuth2Client) o; return Objects.equals(this.allowedCorsOrigins, oAuth2Client.allowedCorsOrigins) && Objects.equals(this.audience, oAuth2Client.audience) && + Objects.equals(this.authorizationCodeGrantAccessTokenLifespan, oAuth2Client.authorizationCodeGrantAccessTokenLifespan) && + Objects.equals(this.authorizationCodeGrantIdTokenLifespan, oAuth2Client.authorizationCodeGrantIdTokenLifespan) && + Objects.equals(this.authorizationCodeGrantRefreshTokenLifespan, oAuth2Client.authorizationCodeGrantRefreshTokenLifespan) && Objects.equals(this.backchannelLogoutSessionRequired, oAuth2Client.backchannelLogoutSessionRequired) && Objects.equals(this.backchannelLogoutUri, oAuth2Client.backchannelLogoutUri) && + Objects.equals(this.clientCredentialsGrantAccessTokenLifespan, oAuth2Client.clientCredentialsGrantAccessTokenLifespan) && Objects.equals(this.clientId, oAuth2Client.clientId) && Objects.equals(this.clientName, oAuth2Client.clientName) && Objects.equals(this.clientSecret, oAuth2Client.clientSecret) && @@ -1067,14 +1364,20 @@ public boolean equals(Object o) { Objects.equals(this.frontchannelLogoutSessionRequired, oAuth2Client.frontchannelLogoutSessionRequired) && Objects.equals(this.frontchannelLogoutUri, oAuth2Client.frontchannelLogoutUri) && Objects.equals(this.grantTypes, oAuth2Client.grantTypes) && + Objects.equals(this.implicitGrantAccessTokenLifespan, oAuth2Client.implicitGrantAccessTokenLifespan) && + Objects.equals(this.implicitGrantIdTokenLifespan, oAuth2Client.implicitGrantIdTokenLifespan) && Objects.equals(this.jwks, oAuth2Client.jwks) && Objects.equals(this.jwksUri, oAuth2Client.jwksUri) && + Objects.equals(this.jwtBearerGrantAccessTokenLifespan, oAuth2Client.jwtBearerGrantAccessTokenLifespan) && Objects.equals(this.logoUri, oAuth2Client.logoUri) && Objects.equals(this.metadata, oAuth2Client.metadata) && Objects.equals(this.owner, oAuth2Client.owner) && Objects.equals(this.policyUri, oAuth2Client.policyUri) && Objects.equals(this.postLogoutRedirectUris, oAuth2Client.postLogoutRedirectUris) && Objects.equals(this.redirectUris, oAuth2Client.redirectUris) && + Objects.equals(this.refreshTokenGrantAccessTokenLifespan, oAuth2Client.refreshTokenGrantAccessTokenLifespan) && + Objects.equals(this.refreshTokenGrantIdTokenLifespan, oAuth2Client.refreshTokenGrantIdTokenLifespan) && + Objects.equals(this.refreshTokenGrantRefreshTokenLifespan, oAuth2Client.refreshTokenGrantRefreshTokenLifespan) && Objects.equals(this.registrationAccessToken, oAuth2Client.registrationAccessToken) && Objects.equals(this.registrationClientUri, oAuth2Client.registrationClientUri) && Objects.equals(this.requestObjectSigningAlg, oAuth2Client.requestObjectSigningAlg) && @@ -1090,9 +1393,20 @@ public boolean equals(Object o) { Objects.equals(this.userinfoSignedResponseAlg, oAuth2Client.userinfoSignedResponseAlg); } + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + @Override public int hashCode() { - return Objects.hash(allowedCorsOrigins, audience, backchannelLogoutSessionRequired, backchannelLogoutUri, clientId, clientName, clientSecret, clientSecretExpiresAt, clientUri, contacts, createdAt, frontchannelLogoutSessionRequired, frontchannelLogoutUri, grantTypes, jwks, jwksUri, logoUri, metadata, owner, policyUri, postLogoutRedirectUris, redirectUris, registrationAccessToken, registrationClientUri, requestObjectSigningAlg, requestUris, responseTypes, scope, sectorIdentifierUri, subjectType, tokenEndpointAuthMethod, tokenEndpointAuthSigningAlg, tosUri, updatedAt, userinfoSignedResponseAlg); + return Objects.hash(allowedCorsOrigins, audience, authorizationCodeGrantAccessTokenLifespan, authorizationCodeGrantIdTokenLifespan, authorizationCodeGrantRefreshTokenLifespan, backchannelLogoutSessionRequired, backchannelLogoutUri, clientCredentialsGrantAccessTokenLifespan, clientId, clientName, clientSecret, clientSecretExpiresAt, clientUri, contacts, createdAt, frontchannelLogoutSessionRequired, frontchannelLogoutUri, grantTypes, implicitGrantAccessTokenLifespan, implicitGrantIdTokenLifespan, jwks, jwksUri, jwtBearerGrantAccessTokenLifespan, logoUri, metadata, owner, policyUri, postLogoutRedirectUris, redirectUris, refreshTokenGrantAccessTokenLifespan, refreshTokenGrantIdTokenLifespan, refreshTokenGrantRefreshTokenLifespan, registrationAccessToken, registrationClientUri, requestObjectSigningAlg, requestUris, responseTypes, scope, sectorIdentifierUri, subjectType, tokenEndpointAuthMethod, tokenEndpointAuthSigningAlg, tosUri, updatedAt, userinfoSignedResponseAlg); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -1101,8 +1415,12 @@ public String toString() { sb.append("class OAuth2Client {\n"); sb.append(" allowedCorsOrigins: ").append(toIndentedString(allowedCorsOrigins)).append("\n"); sb.append(" audience: ").append(toIndentedString(audience)).append("\n"); + sb.append(" authorizationCodeGrantAccessTokenLifespan: ").append(toIndentedString(authorizationCodeGrantAccessTokenLifespan)).append("\n"); + sb.append(" authorizationCodeGrantIdTokenLifespan: ").append(toIndentedString(authorizationCodeGrantIdTokenLifespan)).append("\n"); + sb.append(" authorizationCodeGrantRefreshTokenLifespan: ").append(toIndentedString(authorizationCodeGrantRefreshTokenLifespan)).append("\n"); sb.append(" backchannelLogoutSessionRequired: ").append(toIndentedString(backchannelLogoutSessionRequired)).append("\n"); sb.append(" backchannelLogoutUri: ").append(toIndentedString(backchannelLogoutUri)).append("\n"); + sb.append(" clientCredentialsGrantAccessTokenLifespan: ").append(toIndentedString(clientCredentialsGrantAccessTokenLifespan)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); sb.append(" clientName: ").append(toIndentedString(clientName)).append("\n"); sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); @@ -1113,14 +1431,20 @@ public String toString() { sb.append(" frontchannelLogoutSessionRequired: ").append(toIndentedString(frontchannelLogoutSessionRequired)).append("\n"); sb.append(" frontchannelLogoutUri: ").append(toIndentedString(frontchannelLogoutUri)).append("\n"); sb.append(" grantTypes: ").append(toIndentedString(grantTypes)).append("\n"); + sb.append(" implicitGrantAccessTokenLifespan: ").append(toIndentedString(implicitGrantAccessTokenLifespan)).append("\n"); + sb.append(" implicitGrantIdTokenLifespan: ").append(toIndentedString(implicitGrantIdTokenLifespan)).append("\n"); sb.append(" jwks: ").append(toIndentedString(jwks)).append("\n"); sb.append(" jwksUri: ").append(toIndentedString(jwksUri)).append("\n"); + sb.append(" jwtBearerGrantAccessTokenLifespan: ").append(toIndentedString(jwtBearerGrantAccessTokenLifespan)).append("\n"); sb.append(" logoUri: ").append(toIndentedString(logoUri)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); sb.append(" policyUri: ").append(toIndentedString(policyUri)).append("\n"); sb.append(" postLogoutRedirectUris: ").append(toIndentedString(postLogoutRedirectUris)).append("\n"); sb.append(" redirectUris: ").append(toIndentedString(redirectUris)).append("\n"); + sb.append(" refreshTokenGrantAccessTokenLifespan: ").append(toIndentedString(refreshTokenGrantAccessTokenLifespan)).append("\n"); + sb.append(" refreshTokenGrantIdTokenLifespan: ").append(toIndentedString(refreshTokenGrantIdTokenLifespan)).append("\n"); + sb.append(" refreshTokenGrantRefreshTokenLifespan: ").append(toIndentedString(refreshTokenGrantRefreshTokenLifespan)).append("\n"); sb.append(" registrationAccessToken: ").append(toIndentedString(registrationAccessToken)).append("\n"); sb.append(" registrationClientUri: ").append(toIndentedString(registrationClientUri)).append("\n"); sb.append(" requestObjectSigningAlg: ").append(toIndentedString(requestObjectSigningAlg)).append("\n"); @@ -1149,5 +1473,256 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("allowed_cors_origins"); + openapiFields.add("audience"); + openapiFields.add("authorization_code_grant_access_token_lifespan"); + openapiFields.add("authorization_code_grant_id_token_lifespan"); + openapiFields.add("authorization_code_grant_refresh_token_lifespan"); + openapiFields.add("backchannel_logout_session_required"); + openapiFields.add("backchannel_logout_uri"); + openapiFields.add("client_credentials_grant_access_token_lifespan"); + openapiFields.add("client_id"); + openapiFields.add("client_name"); + openapiFields.add("client_secret"); + openapiFields.add("client_secret_expires_at"); + openapiFields.add("client_uri"); + openapiFields.add("contacts"); + openapiFields.add("created_at"); + openapiFields.add("frontchannel_logout_session_required"); + openapiFields.add("frontchannel_logout_uri"); + openapiFields.add("grant_types"); + openapiFields.add("implicit_grant_access_token_lifespan"); + openapiFields.add("implicit_grant_id_token_lifespan"); + openapiFields.add("jwks"); + openapiFields.add("jwks_uri"); + openapiFields.add("jwt_bearer_grant_access_token_lifespan"); + openapiFields.add("logo_uri"); + openapiFields.add("metadata"); + openapiFields.add("owner"); + openapiFields.add("policy_uri"); + openapiFields.add("post_logout_redirect_uris"); + openapiFields.add("redirect_uris"); + openapiFields.add("refresh_token_grant_access_token_lifespan"); + openapiFields.add("refresh_token_grant_id_token_lifespan"); + openapiFields.add("refresh_token_grant_refresh_token_lifespan"); + openapiFields.add("registration_access_token"); + openapiFields.add("registration_client_uri"); + openapiFields.add("request_object_signing_alg"); + openapiFields.add("request_uris"); + openapiFields.add("response_types"); + openapiFields.add("scope"); + openapiFields.add("sector_identifier_uri"); + openapiFields.add("subject_type"); + openapiFields.add("token_endpoint_auth_method"); + openapiFields.add("token_endpoint_auth_signing_alg"); + openapiFields.add("tos_uri"); + openapiFields.add("updated_at"); + openapiFields.add("userinfo_signed_response_alg"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2Client is not found in the empty JSON string", OAuth2Client.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2Client.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2Client` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + // ensure the json data is an array + if (jsonObj.get("allowed_cors_origins") != null && !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 json data is an array + if (jsonObj.get("audience") != null && !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").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())); + } + if (jsonObj.get("authorization_code_grant_id_token_lifespan") != null && !jsonObj.get("authorization_code_grant_id_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authorization_code_grant_id_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorization_code_grant_id_token_lifespan").toString())); + } + if (jsonObj.get("authorization_code_grant_refresh_token_lifespan") != null && !jsonObj.get("authorization_code_grant_refresh_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authorization_code_grant_refresh_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorization_code_grant_refresh_token_lifespan").toString())); + } + if (jsonObj.get("backchannel_logout_uri") != null && !jsonObj.get("backchannel_logout_uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `backchannel_logout_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("backchannel_logout_uri").toString())); + } + if (jsonObj.get("client_credentials_grant_access_token_lifespan") != null && !jsonObj.get("client_credentials_grant_access_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client_credentials_grant_access_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_credentials_grant_access_token_lifespan").toString())); + } + if (jsonObj.get("client_id") != null && !jsonObj.get("client_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_id").toString())); + } + if (jsonObj.get("client_name") != null && !jsonObj.get("client_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_name").toString())); + } + if (jsonObj.get("client_secret") != null && !jsonObj.get("client_secret").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client_secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_secret").toString())); + } + if (jsonObj.get("client_uri") != null && !jsonObj.get("client_uri").isJsonPrimitive()) { + 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 json data is an array + if (jsonObj.get("contacts") != null && !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").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 json data is an array + if (jsonObj.get("grant_types") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `implicit_grant_access_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("implicit_grant_access_token_lifespan").toString())); + } + if (jsonObj.get("implicit_grant_id_token_lifespan") != null && !jsonObj.get("implicit_grant_id_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `implicit_grant_id_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("implicit_grant_id_token_lifespan").toString())); + } + if (jsonObj.get("jwks_uri") != null && !jsonObj.get("jwks_uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `jwks_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwks_uri").toString())); + } + if (jsonObj.get("jwt_bearer_grant_access_token_lifespan") != null && !jsonObj.get("jwt_bearer_grant_access_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `jwt_bearer_grant_access_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwt_bearer_grant_access_token_lifespan").toString())); + } + if (jsonObj.get("logo_uri") != null && !jsonObj.get("logo_uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `logo_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("logo_uri").toString())); + } + if (jsonObj.get("owner") != null && !jsonObj.get("owner").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + } + if (jsonObj.get("policy_uri") != null && !jsonObj.get("policy_uri").isJsonPrimitive()) { + 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 json data is an array + if (jsonObj.get("post_logout_redirect_uris") != null && !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 json data is an array + if (jsonObj.get("redirect_uris") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `refresh_token_grant_access_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token_grant_access_token_lifespan").toString())); + } + if (jsonObj.get("refresh_token_grant_id_token_lifespan") != null && !jsonObj.get("refresh_token_grant_id_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `refresh_token_grant_id_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token_grant_id_token_lifespan").toString())); + } + if (jsonObj.get("refresh_token_grant_refresh_token_lifespan") != null && !jsonObj.get("refresh_token_grant_refresh_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `refresh_token_grant_refresh_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token_grant_refresh_token_lifespan").toString())); + } + if (jsonObj.get("registration_access_token") != null && !jsonObj.get("registration_access_token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `registration_access_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("registration_access_token").toString())); + } + if (jsonObj.get("registration_client_uri") != null && !jsonObj.get("registration_client_uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `registration_client_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("registration_client_uri").toString())); + } + if (jsonObj.get("request_object_signing_alg") != null && !jsonObj.get("request_object_signing_alg").isJsonPrimitive()) { + 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 json data is an array + if (jsonObj.get("request_uris") != null && !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 json data is an array + if (jsonObj.get("response_types") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + } + if (jsonObj.get("sector_identifier_uri") != null && !jsonObj.get("sector_identifier_uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sector_identifier_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sector_identifier_uri").toString())); + } + if (jsonObj.get("subject_type") != null && !jsonObj.get("subject_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subject_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject_type").toString())); + } + if (jsonObj.get("token_endpoint_auth_method") != null && !jsonObj.get("token_endpoint_auth_method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token_endpoint_auth_method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token_endpoint_auth_method").toString())); + } + if (jsonObj.get("token_endpoint_auth_signing_alg") != null && !jsonObj.get("token_endpoint_auth_signing_alg").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token_endpoint_auth_signing_alg` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token_endpoint_auth_signing_alg").toString())); + } + if (jsonObj.get("tos_uri") != null && !jsonObj.get("tos_uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `tos_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tos_uri").toString())); + } + if (jsonObj.get("userinfo_signed_response_alg") != null && !jsonObj.get("userinfo_signed_response_alg").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userinfo_signed_response_alg` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userinfo_signed_response_alg").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2Client.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2Client' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2Client.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2Client value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2Client read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..cbf8acaa84d --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ClientTokenLifespans.java @@ -0,0 +1,507 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * 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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +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) + private String authorizationCodeGrantAccessTokenLifespan; + + public static final String SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_ID_TOKEN_LIFESPAN = "authorization_code_grant_id_token_lifespan"; + @SerializedName(SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_ID_TOKEN_LIFESPAN) + private String authorizationCodeGrantIdTokenLifespan; + + public static final String SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_REFRESH_TOKEN_LIFESPAN = "authorization_code_grant_refresh_token_lifespan"; + @SerializedName(SERIALIZED_NAME_AUTHORIZATION_CODE_GRANT_REFRESH_TOKEN_LIFESPAN) + private String authorizationCodeGrantRefreshTokenLifespan; + + public static final String SERIALIZED_NAME_CLIENT_CREDENTIALS_GRANT_ACCESS_TOKEN_LIFESPAN = "client_credentials_grant_access_token_lifespan"; + @SerializedName(SERIALIZED_NAME_CLIENT_CREDENTIALS_GRANT_ACCESS_TOKEN_LIFESPAN) + private String clientCredentialsGrantAccessTokenLifespan; + + public static final String SERIALIZED_NAME_IMPLICIT_GRANT_ACCESS_TOKEN_LIFESPAN = "implicit_grant_access_token_lifespan"; + @SerializedName(SERIALIZED_NAME_IMPLICIT_GRANT_ACCESS_TOKEN_LIFESPAN) + private String implicitGrantAccessTokenLifespan; + + public static final String SERIALIZED_NAME_IMPLICIT_GRANT_ID_TOKEN_LIFESPAN = "implicit_grant_id_token_lifespan"; + @SerializedName(SERIALIZED_NAME_IMPLICIT_GRANT_ID_TOKEN_LIFESPAN) + private String implicitGrantIdTokenLifespan; + + public static final String SERIALIZED_NAME_JWT_BEARER_GRANT_ACCESS_TOKEN_LIFESPAN = "jwt_bearer_grant_access_token_lifespan"; + @SerializedName(SERIALIZED_NAME_JWT_BEARER_GRANT_ACCESS_TOKEN_LIFESPAN) + private String jwtBearerGrantAccessTokenLifespan; + + 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) + private String refreshTokenGrantAccessTokenLifespan; + + public static final String SERIALIZED_NAME_REFRESH_TOKEN_GRANT_ID_TOKEN_LIFESPAN = "refresh_token_grant_id_token_lifespan"; + @SerializedName(SERIALIZED_NAME_REFRESH_TOKEN_GRANT_ID_TOKEN_LIFESPAN) + private String refreshTokenGrantIdTokenLifespan; + + public static final String SERIALIZED_NAME_REFRESH_TOKEN_GRANT_REFRESH_TOKEN_LIFESPAN = "refresh_token_grant_refresh_token_lifespan"; + @SerializedName(SERIALIZED_NAME_REFRESH_TOKEN_GRANT_REFRESH_TOKEN_LIFESPAN) + private String refreshTokenGrantRefreshTokenLifespan; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuth2ClientTokenLifespans oAuth2ClientTokenLifespans = (OAuth2ClientTokenLifespans) o; + return Objects.equals(this.authorizationCodeGrantAccessTokenLifespan, oAuth2ClientTokenLifespans.authorizationCodeGrantAccessTokenLifespan) && + Objects.equals(this.authorizationCodeGrantIdTokenLifespan, oAuth2ClientTokenLifespans.authorizationCodeGrantIdTokenLifespan) && + Objects.equals(this.authorizationCodeGrantRefreshTokenLifespan, oAuth2ClientTokenLifespans.authorizationCodeGrantRefreshTokenLifespan) && + Objects.equals(this.clientCredentialsGrantAccessTokenLifespan, oAuth2ClientTokenLifespans.clientCredentialsGrantAccessTokenLifespan) && + Objects.equals(this.implicitGrantAccessTokenLifespan, oAuth2ClientTokenLifespans.implicitGrantAccessTokenLifespan) && + Objects.equals(this.implicitGrantIdTokenLifespan, oAuth2ClientTokenLifespans.implicitGrantIdTokenLifespan) && + Objects.equals(this.jwtBearerGrantAccessTokenLifespan, oAuth2ClientTokenLifespans.jwtBearerGrantAccessTokenLifespan) && + Objects.equals(this.refreshTokenGrantAccessTokenLifespan, oAuth2ClientTokenLifespans.refreshTokenGrantAccessTokenLifespan) && + Objects.equals(this.refreshTokenGrantIdTokenLifespan, oAuth2ClientTokenLifespans.refreshTokenGrantIdTokenLifespan) && + Objects.equals(this.refreshTokenGrantRefreshTokenLifespan, oAuth2ClientTokenLifespans.refreshTokenGrantRefreshTokenLifespan); + } + + @Override + public int hashCode() { + return Objects.hash(authorizationCodeGrantAccessTokenLifespan, authorizationCodeGrantIdTokenLifespan, authorizationCodeGrantRefreshTokenLifespan, clientCredentialsGrantAccessTokenLifespan, implicitGrantAccessTokenLifespan, implicitGrantIdTokenLifespan, jwtBearerGrantAccessTokenLifespan, refreshTokenGrantAccessTokenLifespan, refreshTokenGrantIdTokenLifespan, refreshTokenGrantRefreshTokenLifespan); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuth2ClientTokenLifespans {\n"); + sb.append(" authorizationCodeGrantAccessTokenLifespan: ").append(toIndentedString(authorizationCodeGrantAccessTokenLifespan)).append("\n"); + sb.append(" authorizationCodeGrantIdTokenLifespan: ").append(toIndentedString(authorizationCodeGrantIdTokenLifespan)).append("\n"); + sb.append(" authorizationCodeGrantRefreshTokenLifespan: ").append(toIndentedString(authorizationCodeGrantRefreshTokenLifespan)).append("\n"); + sb.append(" clientCredentialsGrantAccessTokenLifespan: ").append(toIndentedString(clientCredentialsGrantAccessTokenLifespan)).append("\n"); + sb.append(" implicitGrantAccessTokenLifespan: ").append(toIndentedString(implicitGrantAccessTokenLifespan)).append("\n"); + sb.append(" implicitGrantIdTokenLifespan: ").append(toIndentedString(implicitGrantIdTokenLifespan)).append("\n"); + sb.append(" jwtBearerGrantAccessTokenLifespan: ").append(toIndentedString(jwtBearerGrantAccessTokenLifespan)).append("\n"); + sb.append(" refreshTokenGrantAccessTokenLifespan: ").append(toIndentedString(refreshTokenGrantAccessTokenLifespan)).append("\n"); + sb.append(" refreshTokenGrantIdTokenLifespan: ").append(toIndentedString(refreshTokenGrantIdTokenLifespan)).append("\n"); + sb.append(" refreshTokenGrantRefreshTokenLifespan: ").append(toIndentedString(refreshTokenGrantRefreshTokenLifespan)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authorization_code_grant_access_token_lifespan"); + openapiFields.add("authorization_code_grant_id_token_lifespan"); + openapiFields.add("authorization_code_grant_refresh_token_lifespan"); + openapiFields.add("client_credentials_grant_access_token_lifespan"); + openapiFields.add("implicit_grant_access_token_lifespan"); + openapiFields.add("implicit_grant_id_token_lifespan"); + openapiFields.add("jwt_bearer_grant_access_token_lifespan"); + openapiFields.add("refresh_token_grant_access_token_lifespan"); + openapiFields.add("refresh_token_grant_id_token_lifespan"); + openapiFields.add("refresh_token_grant_refresh_token_lifespan"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ClientTokenLifespans is not found in the empty JSON string", OAuth2ClientTokenLifespans.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2ClientTokenLifespans.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2ClientTokenLifespans` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("authorization_code_grant_access_token_lifespan") != null && !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())); + } + if (jsonObj.get("authorization_code_grant_id_token_lifespan") != null && !jsonObj.get("authorization_code_grant_id_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authorization_code_grant_id_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorization_code_grant_id_token_lifespan").toString())); + } + if (jsonObj.get("authorization_code_grant_refresh_token_lifespan") != null && !jsonObj.get("authorization_code_grant_refresh_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `authorization_code_grant_refresh_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("authorization_code_grant_refresh_token_lifespan").toString())); + } + if (jsonObj.get("client_credentials_grant_access_token_lifespan") != null && !jsonObj.get("client_credentials_grant_access_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `client_credentials_grant_access_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("client_credentials_grant_access_token_lifespan").toString())); + } + if (jsonObj.get("implicit_grant_access_token_lifespan") != null && !jsonObj.get("implicit_grant_access_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `implicit_grant_access_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("implicit_grant_access_token_lifespan").toString())); + } + if (jsonObj.get("implicit_grant_id_token_lifespan") != null && !jsonObj.get("implicit_grant_id_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `implicit_grant_id_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("implicit_grant_id_token_lifespan").toString())); + } + if (jsonObj.get("jwt_bearer_grant_access_token_lifespan") != null && !jsonObj.get("jwt_bearer_grant_access_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `jwt_bearer_grant_access_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwt_bearer_grant_access_token_lifespan").toString())); + } + if (jsonObj.get("refresh_token_grant_access_token_lifespan") != null && !jsonObj.get("refresh_token_grant_access_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `refresh_token_grant_access_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token_grant_access_token_lifespan").toString())); + } + if (jsonObj.get("refresh_token_grant_id_token_lifespan") != null && !jsonObj.get("refresh_token_grant_id_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `refresh_token_grant_id_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token_grant_id_token_lifespan").toString())); + } + if (jsonObj.get("refresh_token_grant_refresh_token_lifespan") != null && !jsonObj.get("refresh_token_grant_refresh_token_lifespan").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `refresh_token_grant_refresh_token_lifespan` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token_grant_refresh_token_lifespan").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2ClientTokenLifespans.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2ClientTokenLifespans' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2ClientTokenLifespans.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2ClientTokenLifespans value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2ClientTokenLifespans read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/ConsentRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequest.java similarity index 52% rename from clients/hydra/java/src/main/java/sh/ory/hydra/model/ConsentRequest.java rename to clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequest.java index 66e11b297fa..b6ef4ab6781 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/ConsentRequest.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -25,14 +25,35 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; import sh.ory.hydra.model.OAuth2Client; -import sh.ory.hydra.model.OpenIDConnectContext; +import sh.ory.hydra.model.OAuth2ConsentRequestOpenIDConnectContext; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; /** - * ConsentRequest + * OAuth2ConsentRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class ConsentRequest { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OAuth2ConsentRequest { public static final String SERIALIZED_NAME_ACR = "acr"; @SerializedName(SERIALIZED_NAME_ACR) private String acr; @@ -51,7 +72,7 @@ public class ConsentRequest { public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) - private Object context; + private Object context = null; public static final String SERIALIZED_NAME_LOGIN_CHALLENGE = "login_challenge"; @SerializedName(SERIALIZED_NAME_LOGIN_CHALLENGE) @@ -63,7 +84,7 @@ public class ConsentRequest { public static final String SERIALIZED_NAME_OIDC_CONTEXT = "oidc_context"; @SerializedName(SERIALIZED_NAME_OIDC_CONTEXT) - private OpenIDConnectContext oidcContext; + private OAuth2ConsentRequestOpenIDConnectContext oidcContext; public static final String SERIALIZED_NAME_REQUEST_URL = "request_url"; @SerializedName(SERIALIZED_NAME_REQUEST_URL) @@ -85,10 +106,10 @@ public class ConsentRequest { @SerializedName(SERIALIZED_NAME_SUBJECT) private String subject; - public ConsentRequest() { + public OAuth2ConsentRequest() { } - public ConsentRequest acr(String acr) { + public OAuth2ConsentRequest acr(String acr) { this.acr = acr; return this; @@ -111,13 +132,13 @@ public void setAcr(String acr) { } - public ConsentRequest amr(List amr) { + public OAuth2ConsentRequest amr(List amr) { this.amr = amr; return this; } - public ConsentRequest addAmrItem(String amrItem) { + public OAuth2ConsentRequest addAmrItem(String amrItem) { if (this.amr == null) { this.amr = new ArrayList<>(); } @@ -142,7 +163,7 @@ public void setAmr(List amr) { } - public ConsentRequest challenge(String challenge) { + public OAuth2ConsentRequest challenge(String challenge) { this.challenge = challenge; return this; @@ -165,7 +186,7 @@ public void setChallenge(String challenge) { } - public ConsentRequest client(OAuth2Client client) { + public OAuth2ConsentRequest client(OAuth2Client client) { this.client = client; return this; @@ -188,7 +209,7 @@ public void setClient(OAuth2Client client) { } - public ConsentRequest context(Object context) { + public OAuth2ConsentRequest context(Object context) { this.context = context; return this; @@ -211,7 +232,7 @@ public void setContext(Object context) { } - public ConsentRequest loginChallenge(String loginChallenge) { + public OAuth2ConsentRequest loginChallenge(String loginChallenge) { this.loginChallenge = loginChallenge; return this; @@ -234,7 +255,7 @@ public void setLoginChallenge(String loginChallenge) { } - public ConsentRequest loginSessionId(String loginSessionId) { + public OAuth2ConsentRequest loginSessionId(String loginSessionId) { this.loginSessionId = loginSessionId; return this; @@ -257,7 +278,7 @@ public void setLoginSessionId(String loginSessionId) { } - public ConsentRequest oidcContext(OpenIDConnectContext oidcContext) { + public OAuth2ConsentRequest oidcContext(OAuth2ConsentRequestOpenIDConnectContext oidcContext) { this.oidcContext = oidcContext; return this; @@ -270,17 +291,17 @@ public ConsentRequest oidcContext(OpenIDConnectContext oidcContext) { @javax.annotation.Nullable @ApiModelProperty(value = "") - public OpenIDConnectContext getOidcContext() { + public OAuth2ConsentRequestOpenIDConnectContext getOidcContext() { return oidcContext; } - public void setOidcContext(OpenIDConnectContext oidcContext) { + public void setOidcContext(OAuth2ConsentRequestOpenIDConnectContext oidcContext) { this.oidcContext = oidcContext; } - public ConsentRequest requestUrl(String requestUrl) { + public OAuth2ConsentRequest requestUrl(String requestUrl) { this.requestUrl = requestUrl; return this; @@ -303,13 +324,13 @@ public void setRequestUrl(String requestUrl) { } - public ConsentRequest requestedAccessTokenAudience(List requestedAccessTokenAudience) { + public OAuth2ConsentRequest requestedAccessTokenAudience(List requestedAccessTokenAudience) { this.requestedAccessTokenAudience = requestedAccessTokenAudience; return this; } - public ConsentRequest addRequestedAccessTokenAudienceItem(String requestedAccessTokenAudienceItem) { + public OAuth2ConsentRequest addRequestedAccessTokenAudienceItem(String requestedAccessTokenAudienceItem) { if (this.requestedAccessTokenAudience == null) { this.requestedAccessTokenAudience = new ArrayList<>(); } @@ -334,13 +355,13 @@ public void setRequestedAccessTokenAudience(List requestedAccessTokenAud } - public ConsentRequest requestedScope(List requestedScope) { + public OAuth2ConsentRequest requestedScope(List requestedScope) { this.requestedScope = requestedScope; return this; } - public ConsentRequest addRequestedScopeItem(String requestedScopeItem) { + public OAuth2ConsentRequest addRequestedScopeItem(String requestedScopeItem) { if (this.requestedScope == null) { this.requestedScope = new ArrayList<>(); } @@ -365,7 +386,7 @@ public void setRequestedScope(List requestedScope) { } - public ConsentRequest skip(Boolean skip) { + public OAuth2ConsentRequest skip(Boolean skip) { this.skip = skip; return this; @@ -388,7 +409,7 @@ public void setSkip(Boolean skip) { } - public ConsentRequest subject(String subject) { + public OAuth2ConsentRequest subject(String subject) { this.subject = subject; return this; @@ -411,6 +432,7 @@ public void setSubject(String subject) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -419,20 +441,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ConsentRequest consentRequest = (ConsentRequest) o; - return Objects.equals(this.acr, consentRequest.acr) && - Objects.equals(this.amr, consentRequest.amr) && - Objects.equals(this.challenge, consentRequest.challenge) && - Objects.equals(this.client, consentRequest.client) && - Objects.equals(this.context, consentRequest.context) && - Objects.equals(this.loginChallenge, consentRequest.loginChallenge) && - Objects.equals(this.loginSessionId, consentRequest.loginSessionId) && - Objects.equals(this.oidcContext, consentRequest.oidcContext) && - Objects.equals(this.requestUrl, consentRequest.requestUrl) && - Objects.equals(this.requestedAccessTokenAudience, consentRequest.requestedAccessTokenAudience) && - Objects.equals(this.requestedScope, consentRequest.requestedScope) && - Objects.equals(this.skip, consentRequest.skip) && - Objects.equals(this.subject, consentRequest.subject); + OAuth2ConsentRequest oAuth2ConsentRequest = (OAuth2ConsentRequest) o; + return Objects.equals(this.acr, oAuth2ConsentRequest.acr) && + Objects.equals(this.amr, oAuth2ConsentRequest.amr) && + Objects.equals(this.challenge, oAuth2ConsentRequest.challenge) && + Objects.equals(this.client, oAuth2ConsentRequest.client) && + Objects.equals(this.context, oAuth2ConsentRequest.context) && + Objects.equals(this.loginChallenge, oAuth2ConsentRequest.loginChallenge) && + Objects.equals(this.loginSessionId, oAuth2ConsentRequest.loginSessionId) && + Objects.equals(this.oidcContext, oAuth2ConsentRequest.oidcContext) && + Objects.equals(this.requestUrl, oAuth2ConsentRequest.requestUrl) && + Objects.equals(this.requestedAccessTokenAudience, oAuth2ConsentRequest.requestedAccessTokenAudience) && + Objects.equals(this.requestedScope, oAuth2ConsentRequest.requestedScope) && + Objects.equals(this.skip, oAuth2ConsentRequest.skip) && + Objects.equals(this.subject, oAuth2ConsentRequest.subject); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override @@ -440,10 +466,17 @@ public int hashCode() { return Objects.hash(acr, amr, challenge, client, context, loginChallenge, loginSessionId, oidcContext, requestUrl, requestedAccessTokenAudience, requestedScope, skip, subject); } + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ConsentRequest {\n"); + sb.append("class OAuth2ConsentRequest {\n"); sb.append(" acr: ").append(toIndentedString(acr)).append("\n"); sb.append(" amr: ").append(toIndentedString(amr)).append("\n"); sb.append(" challenge: ").append(toIndentedString(challenge)).append("\n"); @@ -472,5 +505,148 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("acr"); + openapiFields.add("amr"); + openapiFields.add("challenge"); + openapiFields.add("client"); + openapiFields.add("context"); + openapiFields.add("login_challenge"); + openapiFields.add("login_session_id"); + openapiFields.add("oidc_context"); + openapiFields.add("request_url"); + openapiFields.add("requested_access_token_audience"); + openapiFields.add("requested_scope"); + openapiFields.add("skip"); + openapiFields.add("subject"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ConsentRequest is not found in the empty JSON string", OAuth2ConsentRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2ConsentRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2ConsentRequest` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("acr") != null && !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 json data is an array + if (jsonObj.get("amr") != null && !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") != null && !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.getAsJsonObject("client") != null) { + OAuth2Client.validateJsonObject(jsonObj.getAsJsonObject("client")); + } + if (jsonObj.get("login_challenge") != null && !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())); + } + if (jsonObj.get("login_session_id") != null && !jsonObj.get("login_session_id").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `login_session_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("login_session_id").toString())); + } + // validate the optional field `oidc_context` + if (jsonObj.getAsJsonObject("oidc_context") != null) { + OAuth2ConsentRequestOpenIDConnectContext.validateJsonObject(jsonObj.getAsJsonObject("oidc_context")); + } + if (jsonObj.get("request_url") != null && !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 json data is an array + if (jsonObj.get("requested_access_token_audience") != null && !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 json data is an array + if (jsonObj.get("requested_scope") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2ConsentRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2ConsentRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2ConsentRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2ConsentRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2ConsentRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OpenIDConnectContext.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContext.java similarity index 56% rename from clients/hydra/java/src/main/java/sh/ory/hydra/model/OpenIDConnectContext.java rename to clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContext.java index 8346b8ed64e..4b0b9ca293f 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/OpenIDConnectContext.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContext.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,13 +24,35 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; /** - * OpenIDConnectContext + * OAuth2ConsentRequestOpenIDConnectContext */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class OpenIDConnectContext { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OAuth2ConsentRequestOpenIDConnectContext { public static final String SERIALIZED_NAME_ACR_VALUES = "acr_values"; @SerializedName(SERIALIZED_NAME_ACR_VALUES) private List acrValues = null; @@ -41,7 +63,7 @@ public class OpenIDConnectContext { public static final String SERIALIZED_NAME_ID_TOKEN_HINT_CLAIMS = "id_token_hint_claims"; @SerializedName(SERIALIZED_NAME_ID_TOKEN_HINT_CLAIMS) - private Object idTokenHintClaims; + private Map idTokenHintClaims = null; public static final String SERIALIZED_NAME_LOGIN_HINT = "login_hint"; @SerializedName(SERIALIZED_NAME_LOGIN_HINT) @@ -51,16 +73,16 @@ public class OpenIDConnectContext { @SerializedName(SERIALIZED_NAME_UI_LOCALES) private List uiLocales = null; - public OpenIDConnectContext() { + public OAuth2ConsentRequestOpenIDConnectContext() { } - public OpenIDConnectContext acrValues(List acrValues) { + public OAuth2ConsentRequestOpenIDConnectContext acrValues(List acrValues) { this.acrValues = acrValues; return this; } - public OpenIDConnectContext addAcrValuesItem(String acrValuesItem) { + public OAuth2ConsentRequestOpenIDConnectContext addAcrValuesItem(String acrValuesItem) { if (this.acrValues == null) { this.acrValues = new ArrayList<>(); } @@ -85,7 +107,7 @@ public void setAcrValues(List acrValues) { } - public OpenIDConnectContext display(String display) { + public OAuth2ConsentRequestOpenIDConnectContext display(String display) { this.display = display; return this; @@ -108,12 +130,20 @@ public void setDisplay(String display) { } - public OpenIDConnectContext idTokenHintClaims(Object idTokenHintClaims) { + public OAuth2ConsentRequestOpenIDConnectContext idTokenHintClaims(Map idTokenHintClaims) { this.idTokenHintClaims = idTokenHintClaims; return this; } + public OAuth2ConsentRequestOpenIDConnectContext putIdTokenHintClaimsItem(String key, Object idTokenHintClaimsItem) { + if (this.idTokenHintClaims == null) { + this.idTokenHintClaims = new HashMap<>(); + } + this.idTokenHintClaims.put(key, idTokenHintClaimsItem); + 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 @@ -121,17 +151,17 @@ public OpenIDConnectContext idTokenHintClaims(Object 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 Object getIdTokenHintClaims() { + public Map getIdTokenHintClaims() { return idTokenHintClaims; } - public void setIdTokenHintClaims(Object idTokenHintClaims) { + public void setIdTokenHintClaims(Map idTokenHintClaims) { this.idTokenHintClaims = idTokenHintClaims; } - public OpenIDConnectContext loginHint(String loginHint) { + public OAuth2ConsentRequestOpenIDConnectContext loginHint(String loginHint) { this.loginHint = loginHint; return this; @@ -154,13 +184,13 @@ public void setLoginHint(String loginHint) { } - public OpenIDConnectContext uiLocales(List uiLocales) { + public OAuth2ConsentRequestOpenIDConnectContext uiLocales(List uiLocales) { this.uiLocales = uiLocales; return this; } - public OpenIDConnectContext addUiLocalesItem(String uiLocalesItem) { + public OAuth2ConsentRequestOpenIDConnectContext addUiLocalesItem(String uiLocalesItem) { if (this.uiLocales == null) { this.uiLocales = new ArrayList<>(); } @@ -185,6 +215,7 @@ public void setUiLocales(List uiLocales) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -193,12 +224,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpenIDConnectContext openIDConnectContext = (OpenIDConnectContext) o; - return Objects.equals(this.acrValues, openIDConnectContext.acrValues) && - Objects.equals(this.display, openIDConnectContext.display) && - Objects.equals(this.idTokenHintClaims, openIDConnectContext.idTokenHintClaims) && - Objects.equals(this.loginHint, openIDConnectContext.loginHint) && - Objects.equals(this.uiLocales, openIDConnectContext.uiLocales); + OAuth2ConsentRequestOpenIDConnectContext oAuth2ConsentRequestOpenIDConnectContext = (OAuth2ConsentRequestOpenIDConnectContext) o; + return Objects.equals(this.acrValues, oAuth2ConsentRequestOpenIDConnectContext.acrValues) && + Objects.equals(this.display, oAuth2ConsentRequestOpenIDConnectContext.display) && + Objects.equals(this.idTokenHintClaims, oAuth2ConsentRequestOpenIDConnectContext.idTokenHintClaims) && + Objects.equals(this.loginHint, oAuth2ConsentRequestOpenIDConnectContext.loginHint) && + Objects.equals(this.uiLocales, oAuth2ConsentRequestOpenIDConnectContext.uiLocales); } @Override @@ -209,7 +240,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OpenIDConnectContext {\n"); + sb.append("class OAuth2ConsentRequestOpenIDConnectContext {\n"); sb.append(" acrValues: ").append(toIndentedString(acrValues)).append("\n"); sb.append(" display: ").append(toIndentedString(display)).append("\n"); sb.append(" idTokenHintClaims: ").append(toIndentedString(idTokenHintClaims)).append("\n"); @@ -230,5 +261,108 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("acr_values"); + openapiFields.add("display"); + openapiFields.add("id_token_hint_claims"); + openapiFields.add("login_hint"); + openapiFields.add("ui_locales"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ConsentRequestOpenIDConnectContext is not found in the empty JSON string", OAuth2ConsentRequestOpenIDConnectContext.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2ConsentRequestOpenIDConnectContext.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2ConsentRequestOpenIDConnectContext` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + // ensure the json data is an array + if (jsonObj.get("acr_values") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `display` to be a primitive type in the JSON string but got `%s`", jsonObj.get("display").toString())); + } + if (jsonObj.get("login_hint") != null && !jsonObj.get("login_hint").isJsonPrimitive()) { + 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 json data is an array + if (jsonObj.get("ui_locales") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2ConsentRequestOpenIDConnectContext.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2ConsentRequestOpenIDConnectContext' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2ConsentRequestOpenIDConnectContext.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2ConsentRequestOpenIDConnectContext value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2ConsentRequestOpenIDConnectContext read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..2a7acf2e26a --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSession.java @@ -0,0 +1,459 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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.List; +import sh.ory.hydra.model.AcceptOAuth2ConsentRequestSession; +import sh.ory.hydra.model.OAuth2ConsentRequest; +import sh.ory.hydra.model.OAuth2ConsentSessionExpiresAt; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * 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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OAuth2ConsentSession { + public static final String SERIALIZED_NAME_CONSENT_REQUEST = "consent_request"; + @SerializedName(SERIALIZED_NAME_CONSENT_REQUEST) + private OAuth2ConsentRequest consentRequest; + + public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; + @SerializedName(SERIALIZED_NAME_EXPIRES_AT) + private OAuth2ConsentSessionExpiresAt expiresAt; + + 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; + + public static final String SERIALIZED_NAME_GRANT_SCOPE = "grant_scope"; + @SerializedName(SERIALIZED_NAME_GRANT_SCOPE) + private List grantScope = null; + + public static final String SERIALIZED_NAME_HANDLED_AT = "handled_at"; + @SerializedName(SERIALIZED_NAME_HANDLED_AT) + private OffsetDateTime handledAt; + + public static final String SERIALIZED_NAME_REMEMBER = "remember"; + @SerializedName(SERIALIZED_NAME_REMEMBER) + private Boolean remember; + + public static final String SERIALIZED_NAME_REMEMBER_FOR = "remember_for"; + @SerializedName(SERIALIZED_NAME_REMEMBER_FOR) + private Long rememberFor; + + public static final String SERIALIZED_NAME_SESSION = "session"; + @SerializedName(SERIALIZED_NAME_SESSION) + private AcceptOAuth2ConsentRequestSession session; + + 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 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; + } + + public OAuth2ConsentSession addGrantAccessTokenAudienceItem(String grantAccessTokenAudienceItem) { + if (this.grantAccessTokenAudience == null) { + this.grantAccessTokenAudience = new ArrayList<>(); + } + this.grantAccessTokenAudience.add(grantAccessTokenAudienceItem); + 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; + } + + public OAuth2ConsentSession addGrantScopeItem(String grantScopeItem) { + if (this.grantScope == null) { + this.grantScope = new ArrayList<>(); + } + this.grantScope.add(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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuth2ConsentSession oAuth2ConsentSession = (OAuth2ConsentSession) o; + return Objects.equals(this.consentRequest, oAuth2ConsentSession.consentRequest) && + Objects.equals(this.expiresAt, oAuth2ConsentSession.expiresAt) && + Objects.equals(this.grantAccessTokenAudience, oAuth2ConsentSession.grantAccessTokenAudience) && + Objects.equals(this.grantScope, oAuth2ConsentSession.grantScope) && + Objects.equals(this.handledAt, oAuth2ConsentSession.handledAt) && + Objects.equals(this.remember, oAuth2ConsentSession.remember) && + Objects.equals(this.rememberFor, oAuth2ConsentSession.rememberFor) && + Objects.equals(this.session, oAuth2ConsentSession.session); + } + + @Override + public int hashCode() { + return Objects.hash(consentRequest, expiresAt, grantAccessTokenAudience, grantScope, handledAt, remember, rememberFor, session); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuth2ConsentSession {\n"); + sb.append(" consentRequest: ").append(toIndentedString(consentRequest)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" grantAccessTokenAudience: ").append(toIndentedString(grantAccessTokenAudience)).append("\n"); + sb.append(" grantScope: ").append(toIndentedString(grantScope)).append("\n"); + sb.append(" handledAt: ").append(toIndentedString(handledAt)).append("\n"); + sb.append(" remember: ").append(toIndentedString(remember)).append("\n"); + sb.append(" rememberFor: ").append(toIndentedString(rememberFor)).append("\n"); + sb.append(" session: ").append(toIndentedString(session)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("consent_request"); + openapiFields.add("expires_at"); + openapiFields.add("grant_access_token_audience"); + openapiFields.add("grant_scope"); + openapiFields.add("handled_at"); + openapiFields.add("remember"); + openapiFields.add("remember_for"); + openapiFields.add("session"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ConsentSession is not found in the empty JSON string", OAuth2ConsentSession.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2ConsentSession.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2ConsentSession` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + // validate the optional field `consent_request` + if (jsonObj.getAsJsonObject("consent_request") != null) { + OAuth2ConsentRequest.validateJsonObject(jsonObj.getAsJsonObject("consent_request")); + } + // validate the optional field `expires_at` + if (jsonObj.getAsJsonObject("expires_at") != null) { + OAuth2ConsentSessionExpiresAt.validateJsonObject(jsonObj.getAsJsonObject("expires_at")); + } + // ensure the json data is an array + if (jsonObj.get("grant_access_token_audience") != null && !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 json data is an array + if (jsonObj.get("grant_scope") != null && !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.getAsJsonObject("session") != null) { + AcceptOAuth2ConsentRequestSession.validateJsonObject(jsonObj.getAsJsonObject("session")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2ConsentSession.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2ConsentSession' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2ConsentSession.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2ConsentSession value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2ConsentSession read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..2e9da35c8b1 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAt.java @@ -0,0 +1,327 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * OAuth2ConsentSessionExpiresAt + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OAuth2ConsentSessionExpiresAt { + public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; + @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) + private OffsetDateTime accessToken; + + public static final String SERIALIZED_NAME_AUTHORIZE_CODE = "authorize_code"; + @SerializedName(SERIALIZED_NAME_AUTHORIZE_CODE) + private OffsetDateTime authorizeCode; + + public static final String SERIALIZED_NAME_ID_TOKEN = "id_token"; + @SerializedName(SERIALIZED_NAME_ID_TOKEN) + private OffsetDateTime idToken; + + public static final String SERIALIZED_NAME_PAR_CONTEXT = "par_context"; + @SerializedName(SERIALIZED_NAME_PAR_CONTEXT) + private OffsetDateTime parContext; + + public static final String SERIALIZED_NAME_REFRESH_TOKEN = "refresh_token"; + @SerializedName(SERIALIZED_NAME_REFRESH_TOKEN) + private OffsetDateTime refreshToken; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuth2ConsentSessionExpiresAt oAuth2ConsentSessionExpiresAt = (OAuth2ConsentSessionExpiresAt) o; + return Objects.equals(this.accessToken, oAuth2ConsentSessionExpiresAt.accessToken) && + Objects.equals(this.authorizeCode, oAuth2ConsentSessionExpiresAt.authorizeCode) && + Objects.equals(this.idToken, oAuth2ConsentSessionExpiresAt.idToken) && + Objects.equals(this.parContext, oAuth2ConsentSessionExpiresAt.parContext) && + Objects.equals(this.refreshToken, oAuth2ConsentSessionExpiresAt.refreshToken); + } + + @Override + public int hashCode() { + return Objects.hash(accessToken, authorizeCode, idToken, parContext, refreshToken); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuth2ConsentSessionExpiresAt {\n"); + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" authorizeCode: ").append(toIndentedString(authorizeCode)).append("\n"); + sb.append(" idToken: ").append(toIndentedString(idToken)).append("\n"); + sb.append(" parContext: ").append(toIndentedString(parContext)).append("\n"); + sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("access_token"); + openapiFields.add("authorize_code"); + openapiFields.add("id_token"); + openapiFields.add("par_context"); + openapiFields.add("refresh_token"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2ConsentSessionExpiresAt is not found in the empty JSON string", OAuth2ConsentSessionExpiresAt.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2ConsentSessionExpiresAt.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2ConsentSessionExpiresAt` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2ConsentSessionExpiresAt.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2ConsentSessionExpiresAt' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2ConsentSessionExpiresAt.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2ConsentSessionExpiresAt value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2ConsentSessionExpiresAt read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/LoginRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LoginRequest.java similarity index 50% rename from clients/hydra/java/src/main/java/sh/ory/hydra/model/LoginRequest.java rename to clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LoginRequest.java index 9d97b0e747c..fd6c9338e1f 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/LoginRequest.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LoginRequest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,13 +26,33 @@ import java.util.ArrayList; import java.util.List; import sh.ory.hydra.model.OAuth2Client; -import sh.ory.hydra.model.OpenIDConnectContext; +import sh.ory.hydra.model.OAuth2ConsentRequestOpenIDConnectContext; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; /** - * LoginRequest + * OAuth2LoginRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class LoginRequest { +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OAuth2LoginRequest { public static final String SERIALIZED_NAME_CHALLENGE = "challenge"; @SerializedName(SERIALIZED_NAME_CHALLENGE) private String challenge; @@ -43,7 +63,7 @@ public class LoginRequest { public static final String SERIALIZED_NAME_OIDC_CONTEXT = "oidc_context"; @SerializedName(SERIALIZED_NAME_OIDC_CONTEXT) - private OpenIDConnectContext oidcContext; + private OAuth2ConsentRequestOpenIDConnectContext oidcContext; public static final String SERIALIZED_NAME_REQUEST_URL = "request_url"; @SerializedName(SERIALIZED_NAME_REQUEST_URL) @@ -69,10 +89,10 @@ public class LoginRequest { @SerializedName(SERIALIZED_NAME_SUBJECT) private String subject; - public LoginRequest() { + public OAuth2LoginRequest() { } - public LoginRequest challenge(String challenge) { + public OAuth2LoginRequest challenge(String challenge) { this.challenge = challenge; return this; @@ -95,7 +115,7 @@ public void setChallenge(String challenge) { } - public LoginRequest client(OAuth2Client client) { + public OAuth2LoginRequest client(OAuth2Client client) { this.client = client; return this; @@ -118,7 +138,7 @@ public void setClient(OAuth2Client client) { } - public LoginRequest oidcContext(OpenIDConnectContext oidcContext) { + public OAuth2LoginRequest oidcContext(OAuth2ConsentRequestOpenIDConnectContext oidcContext) { this.oidcContext = oidcContext; return this; @@ -131,17 +151,17 @@ public LoginRequest oidcContext(OpenIDConnectContext oidcContext) { @javax.annotation.Nullable @ApiModelProperty(value = "") - public OpenIDConnectContext getOidcContext() { + public OAuth2ConsentRequestOpenIDConnectContext getOidcContext() { return oidcContext; } - public void setOidcContext(OpenIDConnectContext oidcContext) { + public void setOidcContext(OAuth2ConsentRequestOpenIDConnectContext oidcContext) { this.oidcContext = oidcContext; } - public LoginRequest requestUrl(String requestUrl) { + public OAuth2LoginRequest requestUrl(String requestUrl) { this.requestUrl = requestUrl; return this; @@ -164,13 +184,13 @@ public void setRequestUrl(String requestUrl) { } - public LoginRequest requestedAccessTokenAudience(List requestedAccessTokenAudience) { + public OAuth2LoginRequest requestedAccessTokenAudience(List requestedAccessTokenAudience) { this.requestedAccessTokenAudience = requestedAccessTokenAudience; return this; } - public LoginRequest addRequestedAccessTokenAudienceItem(String requestedAccessTokenAudienceItem) { + public OAuth2LoginRequest addRequestedAccessTokenAudienceItem(String requestedAccessTokenAudienceItem) { this.requestedAccessTokenAudience.add(requestedAccessTokenAudienceItem); return this; } @@ -192,13 +212,13 @@ public void setRequestedAccessTokenAudience(List requestedAccessTokenAud } - public LoginRequest requestedScope(List requestedScope) { + public OAuth2LoginRequest requestedScope(List requestedScope) { this.requestedScope = requestedScope; return this; } - public LoginRequest addRequestedScopeItem(String requestedScopeItem) { + public OAuth2LoginRequest addRequestedScopeItem(String requestedScopeItem) { this.requestedScope.add(requestedScopeItem); return this; } @@ -220,7 +240,7 @@ public void setRequestedScope(List requestedScope) { } - public LoginRequest sessionId(String sessionId) { + public OAuth2LoginRequest sessionId(String sessionId) { this.sessionId = sessionId; return this; @@ -243,7 +263,7 @@ public void setSessionId(String sessionId) { } - public LoginRequest skip(Boolean skip) { + public OAuth2LoginRequest skip(Boolean skip) { this.skip = skip; return this; @@ -266,7 +286,7 @@ public void setSkip(Boolean skip) { } - public LoginRequest subject(String subject) { + public OAuth2LoginRequest subject(String subject) { this.subject = subject; return this; @@ -289,6 +309,7 @@ public void setSubject(String subject) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -297,16 +318,16 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - LoginRequest loginRequest = (LoginRequest) o; - return Objects.equals(this.challenge, loginRequest.challenge) && - Objects.equals(this.client, loginRequest.client) && - Objects.equals(this.oidcContext, loginRequest.oidcContext) && - Objects.equals(this.requestUrl, loginRequest.requestUrl) && - Objects.equals(this.requestedAccessTokenAudience, loginRequest.requestedAccessTokenAudience) && - Objects.equals(this.requestedScope, loginRequest.requestedScope) && - Objects.equals(this.sessionId, loginRequest.sessionId) && - Objects.equals(this.skip, loginRequest.skip) && - Objects.equals(this.subject, loginRequest.subject); + OAuth2LoginRequest oAuth2LoginRequest = (OAuth2LoginRequest) o; + return Objects.equals(this.challenge, oAuth2LoginRequest.challenge) && + Objects.equals(this.client, oAuth2LoginRequest.client) && + Objects.equals(this.oidcContext, oAuth2LoginRequest.oidcContext) && + Objects.equals(this.requestUrl, oAuth2LoginRequest.requestUrl) && + Objects.equals(this.requestedAccessTokenAudience, oAuth2LoginRequest.requestedAccessTokenAudience) && + Objects.equals(this.requestedScope, oAuth2LoginRequest.requestedScope) && + Objects.equals(this.sessionId, oAuth2LoginRequest.sessionId) && + Objects.equals(this.skip, oAuth2LoginRequest.skip) && + Objects.equals(this.subject, oAuth2LoginRequest.subject); } @Override @@ -317,7 +338,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LoginRequest {\n"); + sb.append("class OAuth2LoginRequest {\n"); sb.append(" challenge: ").append(toIndentedString(challenge)).append("\n"); sb.append(" client: ").append(toIndentedString(client)).append("\n"); sb.append(" oidcContext: ").append(toIndentedString(oidcContext)).append("\n"); @@ -342,5 +363,140 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("challenge"); + openapiFields.add("client"); + openapiFields.add("oidc_context"); + openapiFields.add("request_url"); + openapiFields.add("requested_access_token_audience"); + openapiFields.add("requested_scope"); + openapiFields.add("session_id"); + openapiFields.add("skip"); + openapiFields.add("subject"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("challenge"); + openapiRequiredFields.add("client"); + openapiRequiredFields.add("request_url"); + openapiRequiredFields.add("requested_access_token_audience"); + openapiRequiredFields.add("requested_scope"); + openapiRequiredFields.add("skip"); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2LoginRequest is not found in the empty JSON string", OAuth2LoginRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2LoginRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2LoginRequest` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("challenge") != null && !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.getAsJsonObject("client") != null) { + OAuth2Client.validateJsonObject(jsonObj.getAsJsonObject("client")); + } + // validate the optional field `oidc_context` + if (jsonObj.getAsJsonObject("oidc_context") != null) { + OAuth2ConsentRequestOpenIDConnectContext.validateJsonObject(jsonObj.getAsJsonObject("oidc_context")); + } + if (jsonObj.get("request_url") != null && !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 json data is an array + if (jsonObj.get("requested_access_token_audience") != null && !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 json data is an array + if (jsonObj.get("requested_scope") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `session_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("session_id").toString())); + } + if (jsonObj.get("subject") != null && !jsonObj.get("subject").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2LoginRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2LoginRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2LoginRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2LoginRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2LoginRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..8979af87518 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2LogoutRequest.java @@ -0,0 +1,373 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 sh.ory.hydra.model.OAuth2Client; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * OAuth2LogoutRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OAuth2LogoutRequest { + public static final String SERIALIZED_NAME_CHALLENGE = "challenge"; + @SerializedName(SERIALIZED_NAME_CHALLENGE) + private String challenge; + + public static final String SERIALIZED_NAME_CLIENT = "client"; + @SerializedName(SERIALIZED_NAME_CLIENT) + private OAuth2Client client; + + public static final String SERIALIZED_NAME_REQUEST_URL = "request_url"; + @SerializedName(SERIALIZED_NAME_REQUEST_URL) + private String requestUrl; + + public static final String SERIALIZED_NAME_RP_INITIATED = "rp_initiated"; + @SerializedName(SERIALIZED_NAME_RP_INITIATED) + private Boolean rpInitiated; + + public static final String SERIALIZED_NAME_SID = "sid"; + @SerializedName(SERIALIZED_NAME_SID) + private String sid; + + public static final String SERIALIZED_NAME_SUBJECT = "subject"; + @SerializedName(SERIALIZED_NAME_SUBJECT) + private String subject; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuth2LogoutRequest oAuth2LogoutRequest = (OAuth2LogoutRequest) o; + return Objects.equals(this.challenge, oAuth2LogoutRequest.challenge) && + Objects.equals(this.client, oAuth2LogoutRequest.client) && + Objects.equals(this.requestUrl, oAuth2LogoutRequest.requestUrl) && + Objects.equals(this.rpInitiated, oAuth2LogoutRequest.rpInitiated) && + Objects.equals(this.sid, oAuth2LogoutRequest.sid) && + Objects.equals(this.subject, oAuth2LogoutRequest.subject); + } + + @Override + public int hashCode() { + return Objects.hash(challenge, client, requestUrl, rpInitiated, sid, subject); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuth2LogoutRequest {\n"); + sb.append(" challenge: ").append(toIndentedString(challenge)).append("\n"); + sb.append(" client: ").append(toIndentedString(client)).append("\n"); + sb.append(" requestUrl: ").append(toIndentedString(requestUrl)).append("\n"); + sb.append(" rpInitiated: ").append(toIndentedString(rpInitiated)).append("\n"); + sb.append(" sid: ").append(toIndentedString(sid)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("challenge"); + openapiFields.add("client"); + openapiFields.add("request_url"); + openapiFields.add("rp_initiated"); + openapiFields.add("sid"); + openapiFields.add("subject"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2LogoutRequest is not found in the empty JSON string", OAuth2LogoutRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2LogoutRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2LogoutRequest` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("challenge") != null && !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.getAsJsonObject("client") != null) { + OAuth2Client.validateJsonObject(jsonObj.getAsJsonObject("client")); + } + if (jsonObj.get("request_url") != null && !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())); + } + if (jsonObj.get("sid") != null && !jsonObj.get("sid").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sid").toString())); + } + if (jsonObj.get("subject") != null && !jsonObj.get("subject").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2LogoutRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2LogoutRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2LogoutRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2LogoutRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2LogoutRequest read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..2e107ac7248 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2RedirectTo.java @@ -0,0 +1,218 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * 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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OAuth2RedirectTo { + public static final String SERIALIZED_NAME_REDIRECT_TO = "redirect_to"; + @SerializedName(SERIALIZED_NAME_REDIRECT_TO) + private String redirectTo; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuth2RedirectTo oAuth2RedirectTo = (OAuth2RedirectTo) o; + return Objects.equals(this.redirectTo, oAuth2RedirectTo.redirectTo); + } + + @Override + public int hashCode() { + return Objects.hash(redirectTo); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuth2RedirectTo {\n"); + sb.append(" redirectTo: ").append(toIndentedString(redirectTo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("redirect_to"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2RedirectTo is not found in the empty JSON string", OAuth2RedirectTo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2RedirectTo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2RedirectTo` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("redirect_to") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2RedirectTo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2RedirectTo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2RedirectTo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2RedirectTo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2RedirectTo read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..850d0cd133e --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OAuth2TokenExchange.java @@ -0,0 +1,366 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * OAuth2 Token Exchange Result + */ +@ApiModel(description = "OAuth2 Token Exchange Result") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OAuth2TokenExchange { + public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; + @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) + private String accessToken; + + public static final String SERIALIZED_NAME_EXPIRES_IN = "expires_in"; + @SerializedName(SERIALIZED_NAME_EXPIRES_IN) + private Long expiresIn; + + public static final String SERIALIZED_NAME_ID_TOKEN = "id_token"; + @SerializedName(SERIALIZED_NAME_ID_TOKEN) + private Long idToken; + + public static final String SERIALIZED_NAME_REFRESH_TOKEN = "refresh_token"; + @SerializedName(SERIALIZED_NAME_REFRESH_TOKEN) + private String refreshToken; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + private Long scope; + + public static final String SERIALIZED_NAME_TOKEN_TYPE = "token_type"; + @SerializedName(SERIALIZED_NAME_TOKEN_TYPE) + private String tokenType; + + 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(Long 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 Long getIdToken() { + return idToken; + } + + + public void setIdToken(Long 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(Long 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 Long getScope() { + return scope; + } + + + public void setScope(Long 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuth2TokenExchange oAuth2TokenExchange = (OAuth2TokenExchange) o; + return Objects.equals(this.accessToken, oAuth2TokenExchange.accessToken) && + Objects.equals(this.expiresIn, oAuth2TokenExchange.expiresIn) && + Objects.equals(this.idToken, oAuth2TokenExchange.idToken) && + Objects.equals(this.refreshToken, oAuth2TokenExchange.refreshToken) && + Objects.equals(this.scope, oAuth2TokenExchange.scope) && + Objects.equals(this.tokenType, oAuth2TokenExchange.tokenType); + } + + @Override + public int hashCode() { + return Objects.hash(accessToken, expiresIn, idToken, refreshToken, scope, tokenType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuth2TokenExchange {\n"); + sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); + sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).append("\n"); + sb.append(" idToken: ").append(toIndentedString(idToken)).append("\n"); + sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" tokenType: ").append(toIndentedString(tokenType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("access_token"); + openapiFields.add("expires_in"); + openapiFields.add("id_token"); + openapiFields.add("refresh_token"); + openapiFields.add("scope"); + openapiFields.add("token_type"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OAuth2TokenExchange is not found in the empty JSON string", OAuth2TokenExchange.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OAuth2TokenExchange.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OAuth2TokenExchange` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("access_token") != null && !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())); + } + if (jsonObj.get("refresh_token") != null && !jsonObj.get("refresh_token").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `refresh_token` to be a primitive type in the JSON string but got `%s`", jsonObj.get("refresh_token").toString())); + } + if (jsonObj.get("token_type") != null && !jsonObj.get("token_type").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `token_type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("token_type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OAuth2TokenExchange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OAuth2TokenExchange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OAuth2TokenExchange.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OAuth2TokenExchange value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OAuth2TokenExchange read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/Oauth2TokenResponse.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/Oauth2TokenResponse.java deleted file mode 100644 index 5bd414ee4c0..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/Oauth2TokenResponse.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * The Access Token Response - */ -@ApiModel(description = "The Access Token Response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class Oauth2TokenResponse { - public static final String SERIALIZED_NAME_ACCESS_TOKEN = "access_token"; - @SerializedName(SERIALIZED_NAME_ACCESS_TOKEN) - private String accessToken; - - public static final String SERIALIZED_NAME_EXPIRES_IN = "expires_in"; - @SerializedName(SERIALIZED_NAME_EXPIRES_IN) - private Long expiresIn; - - public static final String SERIALIZED_NAME_ID_TOKEN = "id_token"; - @SerializedName(SERIALIZED_NAME_ID_TOKEN) - private String idToken; - - public static final String SERIALIZED_NAME_REFRESH_TOKEN = "refresh_token"; - @SerializedName(SERIALIZED_NAME_REFRESH_TOKEN) - private String refreshToken; - - public static final String SERIALIZED_NAME_SCOPE = "scope"; - @SerializedName(SERIALIZED_NAME_SCOPE) - private String scope; - - public static final String SERIALIZED_NAME_TOKEN_TYPE = "token_type"; - @SerializedName(SERIALIZED_NAME_TOKEN_TYPE) - private String tokenType; - - public Oauth2TokenResponse() { - } - - public Oauth2TokenResponse accessToken(String accessToken) { - - this.accessToken = accessToken; - return this; - } - - /** - * Get accessToken - * @return accessToken - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getAccessToken() { - return accessToken; - } - - - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - - public Oauth2TokenResponse expiresIn(Long expiresIn) { - - this.expiresIn = expiresIn; - return this; - } - - /** - * Get expiresIn - * @return expiresIn - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public Long getExpiresIn() { - return expiresIn; - } - - - public void setExpiresIn(Long expiresIn) { - this.expiresIn = expiresIn; - } - - - public Oauth2TokenResponse idToken(String idToken) { - - this.idToken = idToken; - return this; - } - - /** - * Get idToken - * @return idToken - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getIdToken() { - return idToken; - } - - - public void setIdToken(String idToken) { - this.idToken = idToken; - } - - - public Oauth2TokenResponse refreshToken(String refreshToken) { - - this.refreshToken = refreshToken; - return this; - } - - /** - * Get refreshToken - * @return refreshToken - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getRefreshToken() { - return refreshToken; - } - - - public void setRefreshToken(String refreshToken) { - this.refreshToken = refreshToken; - } - - - public Oauth2TokenResponse scope(String scope) { - - this.scope = scope; - return this; - } - - /** - * Get scope - * @return scope - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getScope() { - return scope; - } - - - public void setScope(String scope) { - this.scope = scope; - } - - - public Oauth2TokenResponse tokenType(String tokenType) { - - this.tokenType = tokenType; - return this; - } - - /** - * Get tokenType - * @return tokenType - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public String getTokenType() { - return tokenType; - } - - - public void setTokenType(String tokenType) { - this.tokenType = tokenType; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Oauth2TokenResponse oauth2TokenResponse = (Oauth2TokenResponse) o; - return Objects.equals(this.accessToken, oauth2TokenResponse.accessToken) && - Objects.equals(this.expiresIn, oauth2TokenResponse.expiresIn) && - Objects.equals(this.idToken, oauth2TokenResponse.idToken) && - Objects.equals(this.refreshToken, oauth2TokenResponse.refreshToken) && - Objects.equals(this.scope, oauth2TokenResponse.scope) && - Objects.equals(this.tokenType, oauth2TokenResponse.tokenType); - } - - @Override - public int hashCode() { - return Objects.hash(accessToken, expiresIn, idToken, refreshToken, scope, tokenType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Oauth2TokenResponse {\n"); - sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); - sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).append("\n"); - sb.append(" idToken: ").append(toIndentedString(idToken)).append("\n"); - sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); - sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" tokenType: ").append(toIndentedString(tokenType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 new file mode 100644 index 00000000000..1c1482e3b5b --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcConfiguration.java @@ -0,0 +1,1230 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * 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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OidcConfiguration { + public static final String SERIALIZED_NAME_AUTHORIZATION_ENDPOINT = "authorization_endpoint"; + @SerializedName(SERIALIZED_NAME_AUTHORIZATION_ENDPOINT) + private String authorizationEndpoint; + + public static final String SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SESSION_SUPPORTED = "backchannel_logout_session_supported"; + @SerializedName(SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SESSION_SUPPORTED) + private Boolean backchannelLogoutSessionSupported; + + public static final String SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SUPPORTED = "backchannel_logout_supported"; + @SerializedName(SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SUPPORTED) + private Boolean backchannelLogoutSupported; + + public static final String SERIALIZED_NAME_CLAIMS_PARAMETER_SUPPORTED = "claims_parameter_supported"; + @SerializedName(SERIALIZED_NAME_CLAIMS_PARAMETER_SUPPORTED) + private Boolean claimsParameterSupported; + + public static final String SERIALIZED_NAME_CLAIMS_SUPPORTED = "claims_supported"; + @SerializedName(SERIALIZED_NAME_CLAIMS_SUPPORTED) + private List claimsSupported = null; + + 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; + + public static final String SERIALIZED_NAME_END_SESSION_ENDPOINT = "end_session_endpoint"; + @SerializedName(SERIALIZED_NAME_END_SESSION_ENDPOINT) + private String endSessionEndpoint; + + public static final String SERIALIZED_NAME_FRONTCHANNEL_LOGOUT_SESSION_SUPPORTED = "frontchannel_logout_session_supported"; + @SerializedName(SERIALIZED_NAME_FRONTCHANNEL_LOGOUT_SESSION_SUPPORTED) + private Boolean frontchannelLogoutSessionSupported; + + public static final String SERIALIZED_NAME_FRONTCHANNEL_LOGOUT_SUPPORTED = "frontchannel_logout_supported"; + @SerializedName(SERIALIZED_NAME_FRONTCHANNEL_LOGOUT_SUPPORTED) + private Boolean frontchannelLogoutSupported; + + public static final String SERIALIZED_NAME_GRANT_TYPES_SUPPORTED = "grant_types_supported"; + @SerializedName(SERIALIZED_NAME_GRANT_TYPES_SUPPORTED) + private List grantTypesSupported = null; + + public static final String SERIALIZED_NAME_ID_TOKEN_SIGNED_RESPONSE_ALG = "id_token_signed_response_alg"; + @SerializedName(SERIALIZED_NAME_ID_TOKEN_SIGNED_RESPONSE_ALG) + private List idTokenSignedResponseAlg = new ArrayList<>(); + + public static final String SERIALIZED_NAME_ID_TOKEN_SIGNING_ALG_VALUES_SUPPORTED = "id_token_signing_alg_values_supported"; + @SerializedName(SERIALIZED_NAME_ID_TOKEN_SIGNING_ALG_VALUES_SUPPORTED) + private List idTokenSigningAlgValuesSupported = new ArrayList<>(); + + public static final String SERIALIZED_NAME_ISSUER = "issuer"; + @SerializedName(SERIALIZED_NAME_ISSUER) + private String issuer; + + public static final String SERIALIZED_NAME_JWKS_URI = "jwks_uri"; + @SerializedName(SERIALIZED_NAME_JWKS_URI) + private String jwksUri; + + public static final String SERIALIZED_NAME_REGISTRATION_ENDPOINT = "registration_endpoint"; + @SerializedName(SERIALIZED_NAME_REGISTRATION_ENDPOINT) + private String registrationEndpoint; + + 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; + + public static final String SERIALIZED_NAME_REQUEST_PARAMETER_SUPPORTED = "request_parameter_supported"; + @SerializedName(SERIALIZED_NAME_REQUEST_PARAMETER_SUPPORTED) + private Boolean requestParameterSupported; + + public static final String SERIALIZED_NAME_REQUEST_URI_PARAMETER_SUPPORTED = "request_uri_parameter_supported"; + @SerializedName(SERIALIZED_NAME_REQUEST_URI_PARAMETER_SUPPORTED) + private Boolean requestUriParameterSupported; + + public static final String SERIALIZED_NAME_REQUIRE_REQUEST_URI_REGISTRATION = "require_request_uri_registration"; + @SerializedName(SERIALIZED_NAME_REQUIRE_REQUEST_URI_REGISTRATION) + private Boolean requireRequestUriRegistration; + + public static final String SERIALIZED_NAME_RESPONSE_MODES_SUPPORTED = "response_modes_supported"; + @SerializedName(SERIALIZED_NAME_RESPONSE_MODES_SUPPORTED) + private List responseModesSupported = null; + + public static final String SERIALIZED_NAME_RESPONSE_TYPES_SUPPORTED = "response_types_supported"; + @SerializedName(SERIALIZED_NAME_RESPONSE_TYPES_SUPPORTED) + private List responseTypesSupported = new ArrayList<>(); + + public static final String SERIALIZED_NAME_REVOCATION_ENDPOINT = "revocation_endpoint"; + @SerializedName(SERIALIZED_NAME_REVOCATION_ENDPOINT) + private String revocationEndpoint; + + public static final String SERIALIZED_NAME_SCOPES_SUPPORTED = "scopes_supported"; + @SerializedName(SERIALIZED_NAME_SCOPES_SUPPORTED) + private List scopesSupported = null; + + public static final String SERIALIZED_NAME_SUBJECT_TYPES_SUPPORTED = "subject_types_supported"; + @SerializedName(SERIALIZED_NAME_SUBJECT_TYPES_SUPPORTED) + private List subjectTypesSupported = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TOKEN_ENDPOINT = "token_endpoint"; + @SerializedName(SERIALIZED_NAME_TOKEN_ENDPOINT) + private String tokenEndpoint; + + 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; + + public static final String SERIALIZED_NAME_USERINFO_ENDPOINT = "userinfo_endpoint"; + @SerializedName(SERIALIZED_NAME_USERINFO_ENDPOINT) + private String userinfoEndpoint; + + public static final String SERIALIZED_NAME_USERINFO_SIGNED_RESPONSE_ALG = "userinfo_signed_response_alg"; + @SerializedName(SERIALIZED_NAME_USERINFO_SIGNED_RESPONSE_ALG) + private List userinfoSignedResponseAlg = new ArrayList<>(); + + 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; + + 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; + } + + public OidcConfiguration addClaimsSupportedItem(String claimsSupportedItem) { + if (this.claimsSupported == null) { + this.claimsSupported = new ArrayList<>(); + } + this.claimsSupported.add(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; + } + + public OidcConfiguration addCodeChallengeMethodsSupportedItem(String codeChallengeMethodsSupportedItem) { + if (this.codeChallengeMethodsSupported == null) { + this.codeChallengeMethodsSupported = new ArrayList<>(); + } + this.codeChallengeMethodsSupported.add(codeChallengeMethodsSupportedItem); + 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 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; + } + + public OidcConfiguration addGrantTypesSupportedItem(String grantTypesSupportedItem) { + if (this.grantTypesSupported == null) { + this.grantTypesSupported = new ArrayList<>(); + } + this.grantTypesSupported.add(grantTypesSupportedItem); + 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) { + 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) { + 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; + } + + public OidcConfiguration addRequestObjectSigningAlgValuesSupportedItem(String requestObjectSigningAlgValuesSupportedItem) { + if (this.requestObjectSigningAlgValuesSupported == null) { + this.requestObjectSigningAlgValuesSupported = new ArrayList<>(); + } + this.requestObjectSigningAlgValuesSupported.add(requestObjectSigningAlgValuesSupportedItem); + 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; + } + + public OidcConfiguration addResponseModesSupportedItem(String responseModesSupportedItem) { + if (this.responseModesSupported == null) { + this.responseModesSupported = new ArrayList<>(); + } + this.responseModesSupported.add(responseModesSupportedItem); + 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) { + 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; + } + + public OidcConfiguration addScopesSupportedItem(String scopesSupportedItem) { + if (this.scopesSupported == null) { + this.scopesSupported = new ArrayList<>(); + } + this.scopesSupported.add(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) { + 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; + } + + public OidcConfiguration addTokenEndpointAuthMethodsSupportedItem(String tokenEndpointAuthMethodsSupportedItem) { + if (this.tokenEndpointAuthMethodsSupported == null) { + this.tokenEndpointAuthMethodsSupported = new ArrayList<>(); + } + this.tokenEndpointAuthMethodsSupported.add(tokenEndpointAuthMethodsSupportedItem); + 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) { + 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; + } + + public OidcConfiguration addUserinfoSigningAlgValuesSupportedItem(String userinfoSigningAlgValuesSupportedItem) { + if (this.userinfoSigningAlgValuesSupported == null) { + this.userinfoSigningAlgValuesSupported = new ArrayList<>(); + } + this.userinfoSigningAlgValuesSupported.add(userinfoSigningAlgValuesSupportedItem); + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OidcConfiguration oidcConfiguration = (OidcConfiguration) o; + return Objects.equals(this.authorizationEndpoint, oidcConfiguration.authorizationEndpoint) && + Objects.equals(this.backchannelLogoutSessionSupported, oidcConfiguration.backchannelLogoutSessionSupported) && + Objects.equals(this.backchannelLogoutSupported, oidcConfiguration.backchannelLogoutSupported) && + Objects.equals(this.claimsParameterSupported, oidcConfiguration.claimsParameterSupported) && + Objects.equals(this.claimsSupported, oidcConfiguration.claimsSupported) && + Objects.equals(this.codeChallengeMethodsSupported, oidcConfiguration.codeChallengeMethodsSupported) && + Objects.equals(this.endSessionEndpoint, oidcConfiguration.endSessionEndpoint) && + Objects.equals(this.frontchannelLogoutSessionSupported, oidcConfiguration.frontchannelLogoutSessionSupported) && + Objects.equals(this.frontchannelLogoutSupported, oidcConfiguration.frontchannelLogoutSupported) && + Objects.equals(this.grantTypesSupported, oidcConfiguration.grantTypesSupported) && + Objects.equals(this.idTokenSignedResponseAlg, oidcConfiguration.idTokenSignedResponseAlg) && + Objects.equals(this.idTokenSigningAlgValuesSupported, oidcConfiguration.idTokenSigningAlgValuesSupported) && + Objects.equals(this.issuer, oidcConfiguration.issuer) && + Objects.equals(this.jwksUri, oidcConfiguration.jwksUri) && + Objects.equals(this.registrationEndpoint, oidcConfiguration.registrationEndpoint) && + Objects.equals(this.requestObjectSigningAlgValuesSupported, oidcConfiguration.requestObjectSigningAlgValuesSupported) && + Objects.equals(this.requestParameterSupported, oidcConfiguration.requestParameterSupported) && + Objects.equals(this.requestUriParameterSupported, oidcConfiguration.requestUriParameterSupported) && + Objects.equals(this.requireRequestUriRegistration, oidcConfiguration.requireRequestUriRegistration) && + Objects.equals(this.responseModesSupported, oidcConfiguration.responseModesSupported) && + Objects.equals(this.responseTypesSupported, oidcConfiguration.responseTypesSupported) && + Objects.equals(this.revocationEndpoint, oidcConfiguration.revocationEndpoint) && + Objects.equals(this.scopesSupported, oidcConfiguration.scopesSupported) && + Objects.equals(this.subjectTypesSupported, oidcConfiguration.subjectTypesSupported) && + Objects.equals(this.tokenEndpoint, oidcConfiguration.tokenEndpoint) && + Objects.equals(this.tokenEndpointAuthMethodsSupported, oidcConfiguration.tokenEndpointAuthMethodsSupported) && + Objects.equals(this.userinfoEndpoint, oidcConfiguration.userinfoEndpoint) && + Objects.equals(this.userinfoSignedResponseAlg, oidcConfiguration.userinfoSignedResponseAlg) && + Objects.equals(this.userinfoSigningAlgValuesSupported, oidcConfiguration.userinfoSigningAlgValuesSupported); + } + + @Override + public int hashCode() { + return Objects.hash(authorizationEndpoint, backchannelLogoutSessionSupported, backchannelLogoutSupported, claimsParameterSupported, claimsSupported, codeChallengeMethodsSupported, endSessionEndpoint, frontchannelLogoutSessionSupported, frontchannelLogoutSupported, grantTypesSupported, idTokenSignedResponseAlg, idTokenSigningAlgValuesSupported, issuer, jwksUri, registrationEndpoint, requestObjectSigningAlgValuesSupported, requestParameterSupported, requestUriParameterSupported, requireRequestUriRegistration, responseModesSupported, responseTypesSupported, revocationEndpoint, scopesSupported, subjectTypesSupported, tokenEndpoint, tokenEndpointAuthMethodsSupported, userinfoEndpoint, userinfoSignedResponseAlg, userinfoSigningAlgValuesSupported); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OidcConfiguration {\n"); + sb.append(" authorizationEndpoint: ").append(toIndentedString(authorizationEndpoint)).append("\n"); + sb.append(" backchannelLogoutSessionSupported: ").append(toIndentedString(backchannelLogoutSessionSupported)).append("\n"); + sb.append(" backchannelLogoutSupported: ").append(toIndentedString(backchannelLogoutSupported)).append("\n"); + sb.append(" claimsParameterSupported: ").append(toIndentedString(claimsParameterSupported)).append("\n"); + sb.append(" claimsSupported: ").append(toIndentedString(claimsSupported)).append("\n"); + sb.append(" codeChallengeMethodsSupported: ").append(toIndentedString(codeChallengeMethodsSupported)).append("\n"); + sb.append(" endSessionEndpoint: ").append(toIndentedString(endSessionEndpoint)).append("\n"); + sb.append(" frontchannelLogoutSessionSupported: ").append(toIndentedString(frontchannelLogoutSessionSupported)).append("\n"); + sb.append(" frontchannelLogoutSupported: ").append(toIndentedString(frontchannelLogoutSupported)).append("\n"); + sb.append(" grantTypesSupported: ").append(toIndentedString(grantTypesSupported)).append("\n"); + sb.append(" idTokenSignedResponseAlg: ").append(toIndentedString(idTokenSignedResponseAlg)).append("\n"); + sb.append(" idTokenSigningAlgValuesSupported: ").append(toIndentedString(idTokenSigningAlgValuesSupported)).append("\n"); + sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); + sb.append(" jwksUri: ").append(toIndentedString(jwksUri)).append("\n"); + sb.append(" registrationEndpoint: ").append(toIndentedString(registrationEndpoint)).append("\n"); + sb.append(" requestObjectSigningAlgValuesSupported: ").append(toIndentedString(requestObjectSigningAlgValuesSupported)).append("\n"); + sb.append(" requestParameterSupported: ").append(toIndentedString(requestParameterSupported)).append("\n"); + sb.append(" requestUriParameterSupported: ").append(toIndentedString(requestUriParameterSupported)).append("\n"); + sb.append(" requireRequestUriRegistration: ").append(toIndentedString(requireRequestUriRegistration)).append("\n"); + sb.append(" responseModesSupported: ").append(toIndentedString(responseModesSupported)).append("\n"); + sb.append(" responseTypesSupported: ").append(toIndentedString(responseTypesSupported)).append("\n"); + sb.append(" revocationEndpoint: ").append(toIndentedString(revocationEndpoint)).append("\n"); + sb.append(" scopesSupported: ").append(toIndentedString(scopesSupported)).append("\n"); + sb.append(" subjectTypesSupported: ").append(toIndentedString(subjectTypesSupported)).append("\n"); + sb.append(" tokenEndpoint: ").append(toIndentedString(tokenEndpoint)).append("\n"); + sb.append(" tokenEndpointAuthMethodsSupported: ").append(toIndentedString(tokenEndpointAuthMethodsSupported)).append("\n"); + sb.append(" userinfoEndpoint: ").append(toIndentedString(userinfoEndpoint)).append("\n"); + sb.append(" userinfoSignedResponseAlg: ").append(toIndentedString(userinfoSignedResponseAlg)).append("\n"); + sb.append(" userinfoSigningAlgValuesSupported: ").append(toIndentedString(userinfoSigningAlgValuesSupported)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("authorization_endpoint"); + openapiFields.add("backchannel_logout_session_supported"); + openapiFields.add("backchannel_logout_supported"); + openapiFields.add("claims_parameter_supported"); + openapiFields.add("claims_supported"); + openapiFields.add("code_challenge_methods_supported"); + openapiFields.add("end_session_endpoint"); + openapiFields.add("frontchannel_logout_session_supported"); + openapiFields.add("frontchannel_logout_supported"); + openapiFields.add("grant_types_supported"); + openapiFields.add("id_token_signed_response_alg"); + openapiFields.add("id_token_signing_alg_values_supported"); + openapiFields.add("issuer"); + openapiFields.add("jwks_uri"); + openapiFields.add("registration_endpoint"); + openapiFields.add("request_object_signing_alg_values_supported"); + openapiFields.add("request_parameter_supported"); + openapiFields.add("request_uri_parameter_supported"); + openapiFields.add("require_request_uri_registration"); + openapiFields.add("response_modes_supported"); + openapiFields.add("response_types_supported"); + openapiFields.add("revocation_endpoint"); + openapiFields.add("scopes_supported"); + openapiFields.add("subject_types_supported"); + openapiFields.add("token_endpoint"); + openapiFields.add("token_endpoint_auth_methods_supported"); + openapiFields.add("userinfo_endpoint"); + openapiFields.add("userinfo_signed_response_alg"); + openapiFields.add("userinfo_signing_alg_values_supported"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("authorization_endpoint"); + openapiRequiredFields.add("id_token_signed_response_alg"); + openapiRequiredFields.add("id_token_signing_alg_values_supported"); + openapiRequiredFields.add("issuer"); + openapiRequiredFields.add("jwks_uri"); + openapiRequiredFields.add("response_types_supported"); + openapiRequiredFields.add("subject_types_supported"); + openapiRequiredFields.add("token_endpoint"); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OidcConfiguration is not found in the empty JSON string", OidcConfiguration.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OidcConfiguration.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OidcConfiguration` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("authorization_endpoint") != null && !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 json data is an array + if (jsonObj.get("claims_supported") != null && !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 json data is an array + if (jsonObj.get("code_challenge_methods_supported") != null && !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("end_session_endpoint") != null && !jsonObj.get("end_session_endpoint").isJsonPrimitive()) { + 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 json data is an array + if (jsonObj.get("grant_types_supported") != null && !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 json data is an array + if (jsonObj.get("id_token_signed_response_alg") != null && !jsonObj.get("id_token_signed_response_alg").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `id_token_signed_response_alg` to be an array in the JSON string but got `%s`", jsonObj.get("id_token_signed_response_alg").toString())); + } + // ensure the json data is an array + if (jsonObj.get("id_token_signing_alg_values_supported") != null && !jsonObj.get("id_token_signing_alg_values_supported").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `id_token_signing_alg_values_supported` to be an array in the JSON string but got `%s`", jsonObj.get("id_token_signing_alg_values_supported").toString())); + } + if (jsonObj.get("issuer") != null && !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())); + } + if (jsonObj.get("jwks_uri") != null && !jsonObj.get("jwks_uri").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `jwks_uri` to be a primitive type in the JSON string but got `%s`", jsonObj.get("jwks_uri").toString())); + } + if (jsonObj.get("registration_endpoint") != null && !jsonObj.get("registration_endpoint").isJsonPrimitive()) { + 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 json data is an array + if (jsonObj.get("request_object_signing_alg_values_supported") != null && !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 json data is an array + if (jsonObj.get("response_modes_supported") != null && !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 json data is an array + if (jsonObj.get("response_types_supported") != null && !jsonObj.get("response_types_supported").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `response_types_supported` to be an array in the JSON string but got `%s`", jsonObj.get("response_types_supported").toString())); + } + if (jsonObj.get("revocation_endpoint") != null && !jsonObj.get("revocation_endpoint").isJsonPrimitive()) { + 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 json data is an array + if (jsonObj.get("scopes_supported") != null && !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 json data is an array + if (jsonObj.get("subject_types_supported") != null && !jsonObj.get("subject_types_supported").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `subject_types_supported` to be an array in the JSON string but got `%s`", jsonObj.get("subject_types_supported").toString())); + } + if (jsonObj.get("token_endpoint") != null && !jsonObj.get("token_endpoint").isJsonPrimitive()) { + 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 json data is an array + if (jsonObj.get("token_endpoint_auth_methods_supported") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `userinfo_endpoint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userinfo_endpoint").toString())); + } + // ensure the json data is an array + if (jsonObj.get("userinfo_signed_response_alg") != null && !jsonObj.get("userinfo_signed_response_alg").isJsonArray()) { + 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 json data is an array + if (jsonObj.get("userinfo_signing_alg_values_supported") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OidcConfiguration.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OidcConfiguration' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OidcConfiguration.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OidcConfiguration value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OidcConfiguration read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/UserinfoResponse.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcUserInfo.java similarity index 64% rename from clients/hydra/java/src/main/java/sh/ory/hydra/model/UserinfoResponse.java rename to clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcUserInfo.java index 3bb9b227ad3..2ead78cd9ff 100644 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/UserinfoResponse.java +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/OidcUserInfo.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,12 +24,32 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + /** - * The userinfo response + * OpenID Connect Userinfo */ -@ApiModel(description = "The userinfo response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class UserinfoResponse { +@ApiModel(description = "OpenID Connect Userinfo") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class OidcUserInfo { public static final String SERIALIZED_NAME_BIRTHDATE = "birthdate"; @SerializedName(SERIALIZED_NAME_BIRTHDATE) private String birthdate; @@ -106,10 +126,10 @@ public class UserinfoResponse { @SerializedName(SERIALIZED_NAME_ZONEINFO) private String zoneinfo; - public UserinfoResponse() { + public OidcUserInfo() { } - public UserinfoResponse birthdate(String birthdate) { + public OidcUserInfo birthdate(String birthdate) { this.birthdate = birthdate; return this; @@ -132,7 +152,7 @@ public void setBirthdate(String birthdate) { } - public UserinfoResponse email(String email) { + public OidcUserInfo email(String email) { this.email = email; return this; @@ -155,7 +175,7 @@ public void setEmail(String email) { } - public UserinfoResponse emailVerified(Boolean emailVerified) { + public OidcUserInfo emailVerified(Boolean emailVerified) { this.emailVerified = emailVerified; return this; @@ -178,7 +198,7 @@ public void setEmailVerified(Boolean emailVerified) { } - public UserinfoResponse familyName(String familyName) { + public OidcUserInfo familyName(String familyName) { this.familyName = familyName; return this; @@ -201,7 +221,7 @@ public void setFamilyName(String familyName) { } - public UserinfoResponse gender(String gender) { + public OidcUserInfo gender(String gender) { this.gender = gender; return this; @@ -224,7 +244,7 @@ public void setGender(String gender) { } - public UserinfoResponse givenName(String givenName) { + public OidcUserInfo givenName(String givenName) { this.givenName = givenName; return this; @@ -247,7 +267,7 @@ public void setGivenName(String givenName) { } - public UserinfoResponse locale(String locale) { + public OidcUserInfo locale(String locale) { this.locale = locale; return this; @@ -270,7 +290,7 @@ public void setLocale(String locale) { } - public UserinfoResponse middleName(String middleName) { + public OidcUserInfo middleName(String middleName) { this.middleName = middleName; return this; @@ -293,7 +313,7 @@ public void setMiddleName(String middleName) { } - public UserinfoResponse name(String name) { + public OidcUserInfo name(String name) { this.name = name; return this; @@ -316,7 +336,7 @@ public void setName(String name) { } - public UserinfoResponse nickname(String nickname) { + public OidcUserInfo nickname(String nickname) { this.nickname = nickname; return this; @@ -339,7 +359,7 @@ public void setNickname(String nickname) { } - public UserinfoResponse phoneNumber(String phoneNumber) { + public OidcUserInfo phoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; return this; @@ -362,7 +382,7 @@ public void setPhoneNumber(String phoneNumber) { } - public UserinfoResponse phoneNumberVerified(Boolean phoneNumberVerified) { + public OidcUserInfo phoneNumberVerified(Boolean phoneNumberVerified) { this.phoneNumberVerified = phoneNumberVerified; return this; @@ -385,7 +405,7 @@ public void setPhoneNumberVerified(Boolean phoneNumberVerified) { } - public UserinfoResponse picture(String picture) { + public OidcUserInfo picture(String picture) { this.picture = picture; return this; @@ -408,7 +428,7 @@ public void setPicture(String picture) { } - public UserinfoResponse preferredUsername(String preferredUsername) { + public OidcUserInfo preferredUsername(String preferredUsername) { this.preferredUsername = preferredUsername; return this; @@ -431,7 +451,7 @@ public void setPreferredUsername(String preferredUsername) { } - public UserinfoResponse profile(String profile) { + public OidcUserInfo profile(String profile) { this.profile = profile; return this; @@ -454,7 +474,7 @@ public void setProfile(String profile) { } - public UserinfoResponse sub(String sub) { + public OidcUserInfo sub(String sub) { this.sub = sub; return this; @@ -477,7 +497,7 @@ public void setSub(String sub) { } - public UserinfoResponse updatedAt(Long updatedAt) { + public OidcUserInfo updatedAt(Long updatedAt) { this.updatedAt = updatedAt; return this; @@ -500,7 +520,7 @@ public void setUpdatedAt(Long updatedAt) { } - public UserinfoResponse website(String website) { + public OidcUserInfo website(String website) { this.website = website; return this; @@ -523,7 +543,7 @@ public void setWebsite(String website) { } - public UserinfoResponse zoneinfo(String zoneinfo) { + public OidcUserInfo zoneinfo(String zoneinfo) { this.zoneinfo = zoneinfo; return this; @@ -546,6 +566,7 @@ public void setZoneinfo(String zoneinfo) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -554,26 +575,26 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UserinfoResponse userinfoResponse = (UserinfoResponse) o; - return Objects.equals(this.birthdate, userinfoResponse.birthdate) && - Objects.equals(this.email, userinfoResponse.email) && - Objects.equals(this.emailVerified, userinfoResponse.emailVerified) && - Objects.equals(this.familyName, userinfoResponse.familyName) && - Objects.equals(this.gender, userinfoResponse.gender) && - Objects.equals(this.givenName, userinfoResponse.givenName) && - Objects.equals(this.locale, userinfoResponse.locale) && - Objects.equals(this.middleName, userinfoResponse.middleName) && - Objects.equals(this.name, userinfoResponse.name) && - Objects.equals(this.nickname, userinfoResponse.nickname) && - Objects.equals(this.phoneNumber, userinfoResponse.phoneNumber) && - Objects.equals(this.phoneNumberVerified, userinfoResponse.phoneNumberVerified) && - Objects.equals(this.picture, userinfoResponse.picture) && - Objects.equals(this.preferredUsername, userinfoResponse.preferredUsername) && - Objects.equals(this.profile, userinfoResponse.profile) && - Objects.equals(this.sub, userinfoResponse.sub) && - Objects.equals(this.updatedAt, userinfoResponse.updatedAt) && - Objects.equals(this.website, userinfoResponse.website) && - Objects.equals(this.zoneinfo, userinfoResponse.zoneinfo); + OidcUserInfo oidcUserInfo = (OidcUserInfo) o; + return Objects.equals(this.birthdate, oidcUserInfo.birthdate) && + Objects.equals(this.email, oidcUserInfo.email) && + Objects.equals(this.emailVerified, oidcUserInfo.emailVerified) && + Objects.equals(this.familyName, oidcUserInfo.familyName) && + Objects.equals(this.gender, oidcUserInfo.gender) && + Objects.equals(this.givenName, oidcUserInfo.givenName) && + Objects.equals(this.locale, oidcUserInfo.locale) && + Objects.equals(this.middleName, oidcUserInfo.middleName) && + Objects.equals(this.name, oidcUserInfo.name) && + Objects.equals(this.nickname, oidcUserInfo.nickname) && + Objects.equals(this.phoneNumber, oidcUserInfo.phoneNumber) && + Objects.equals(this.phoneNumberVerified, oidcUserInfo.phoneNumberVerified) && + Objects.equals(this.picture, oidcUserInfo.picture) && + Objects.equals(this.preferredUsername, oidcUserInfo.preferredUsername) && + Objects.equals(this.profile, oidcUserInfo.profile) && + Objects.equals(this.sub, oidcUserInfo.sub) && + Objects.equals(this.updatedAt, oidcUserInfo.updatedAt) && + Objects.equals(this.website, oidcUserInfo.website) && + Objects.equals(this.zoneinfo, oidcUserInfo.zoneinfo); } @Override @@ -584,7 +605,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class UserinfoResponse {\n"); + sb.append("class OidcUserInfo {\n"); sb.append(" birthdate: ").append(toIndentedString(birthdate)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" emailVerified: ").append(toIndentedString(emailVerified)).append("\n"); @@ -619,5 +640,156 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("birthdate"); + openapiFields.add("email"); + openapiFields.add("email_verified"); + openapiFields.add("family_name"); + openapiFields.add("gender"); + openapiFields.add("given_name"); + openapiFields.add("locale"); + openapiFields.add("middle_name"); + openapiFields.add("name"); + openapiFields.add("nickname"); + openapiFields.add("phone_number"); + openapiFields.add("phone_number_verified"); + openapiFields.add("picture"); + openapiFields.add("preferred_username"); + openapiFields.add("profile"); + openapiFields.add("sub"); + openapiFields.add("updated_at"); + openapiFields.add("website"); + openapiFields.add("zoneinfo"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in OidcUserInfo is not found in the empty JSON string", OidcUserInfo.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OidcUserInfo.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OidcUserInfo` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("birthdate") != null && !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())); + } + if (jsonObj.get("email") != null && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + if (jsonObj.get("family_name") != null && !jsonObj.get("family_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `family_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("family_name").toString())); + } + if (jsonObj.get("gender") != null && !jsonObj.get("gender").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `gender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("gender").toString())); + } + if (jsonObj.get("given_name") != null && !jsonObj.get("given_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `given_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("given_name").toString())); + } + if (jsonObj.get("locale") != null && !jsonObj.get("locale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locale").toString())); + } + if (jsonObj.get("middle_name") != null && !jsonObj.get("middle_name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `middle_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("middle_name").toString())); + } + if (jsonObj.get("name") != null && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (jsonObj.get("nickname") != null && !jsonObj.get("nickname").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `nickname` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nickname").toString())); + } + if (jsonObj.get("phone_number") != null && !jsonObj.get("phone_number").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phone_number` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phone_number").toString())); + } + if (jsonObj.get("picture") != null && !jsonObj.get("picture").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `picture` to be a primitive type in the JSON string but got `%s`", jsonObj.get("picture").toString())); + } + if (jsonObj.get("preferred_username") != null && !jsonObj.get("preferred_username").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `preferred_username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("preferred_username").toString())); + } + if (jsonObj.get("profile") != null && !jsonObj.get("profile").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `profile` to be a primitive type in the JSON string but got `%s`", jsonObj.get("profile").toString())); + } + if (jsonObj.get("sub") != null && !jsonObj.get("sub").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `sub` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sub").toString())); + } + if (jsonObj.get("website") != null && !jsonObj.get("website").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `website` to be a primitive type in the JSON string but got `%s`", jsonObj.get("website").toString())); + } + if (jsonObj.get("zoneinfo") != null && !jsonObj.get("zoneinfo").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `zoneinfo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zoneinfo").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OidcUserInfo.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OidcUserInfo' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OidcUserInfo.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OidcUserInfo value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OidcUserInfo read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..d4462231acb --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/Pagination.java @@ -0,0 +1,241 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * Pagination + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class Pagination { + public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + private Long pageSize = 250l; + + public static final String SERIALIZED_NAME_PAGE_TOKEN = "page_token"; + @SerializedName(SERIALIZED_NAME_PAGE_TOKEN) + private String pageToken = "1"; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pagination pagination = (Pagination) o; + return Objects.equals(this.pageSize, pagination.pageSize) && + Objects.equals(this.pageToken, pagination.pageToken); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pagination {\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" pageToken: ").append(toIndentedString(pageToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("page_size"); + openapiFields.add("page_token"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in Pagination is not found in the empty JSON string", Pagination.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!Pagination.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Pagination` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("page_token") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Pagination.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Pagination' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Pagination.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Pagination value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Pagination read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..2276ab084af --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PaginationHeaders.java @@ -0,0 +1,242 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * PaginationHeaders + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class PaginationHeaders { + public static final String SERIALIZED_NAME_LINK = "link"; + @SerializedName(SERIALIZED_NAME_LINK) + private String link; + + public static final String SERIALIZED_NAME_X_TOTAL_COUNT = "x-total-count"; + @SerializedName(SERIALIZED_NAME_X_TOTAL_COUNT) + private String xTotalCount; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaginationHeaders paginationHeaders = (PaginationHeaders) o; + return Objects.equals(this.link, paginationHeaders.link) && + Objects.equals(this.xTotalCount, paginationHeaders.xTotalCount); + } + + @Override + public int hashCode() { + return Objects.hash(link, xTotalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaginationHeaders {\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" xTotalCount: ").append(toIndentedString(xTotalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("link"); + openapiFields.add("x-total-count"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in PaginationHeaders is not found in the empty JSON string", PaginationHeaders.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!PaginationHeaders.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PaginationHeaders` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("link") != null && !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())); + } + if (jsonObj.get("x-total-count") != null && !jsonObj.get("x-total-count").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `x-total-count` to be a primitive type in the JSON string but got `%s`", jsonObj.get("x-total-count").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PaginationHeaders.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PaginationHeaders' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PaginationHeaders.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PaginationHeaders value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PaginationHeaders read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PatchDocument.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PatchDocument.java deleted file mode 100644 index 17d92fb3ad9..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PatchDocument.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * 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 = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PatchDocument { - public static final String SERIALIZED_NAME_FROM = "from"; - @SerializedName(SERIALIZED_NAME_FROM) - private String from; - - public static final String SERIALIZED_NAME_OP = "op"; - @SerializedName(SERIALIZED_NAME_OP) - private String op; - - public static final String SERIALIZED_NAME_PATH = "path"; - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private Object value; - - public PatchDocument() { - } - - public PatchDocument from(String from) { - - this.from = from; - return this; - } - - /** - * A JSON-pointer - * @return from - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "A JSON-pointer") - - public String getFrom() { - return from; - } - - - public void setFrom(String from) { - this.from = from; - } - - - public PatchDocument op(String op) { - - this.op = op; - return this; - } - - /** - * The operation to be performed - * @return op - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "\"replace\"", required = true, value = "The operation to be performed") - - public String getOp() { - return op; - } - - - public void setOp(String op) { - this.op = op; - } - - - public PatchDocument path(String path) { - - this.path = path; - return this; - } - - /** - * A JSON-pointer - * @return path - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "\"/name\"", required = true, value = "A JSON-pointer") - - public String getPath() { - return path; - } - - - public void setPath(String path) { - this.path = path; - } - - - public PatchDocument value(Object value) { - - this.value = value; - return this; - } - - /** - * The value to be used within the operations - * @return value - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "The value to be used within the operations") - - public Object getValue() { - return value; - } - - - public void setValue(Object value) { - this.value = value; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PatchDocument patchDocument = (PatchDocument) o; - return Objects.equals(this.from, patchDocument.from) && - Objects.equals(this.op, patchDocument.op) && - Objects.equals(this.path, patchDocument.path) && - Objects.equals(this.value, patchDocument.value); - } - - @Override - public int hashCode() { - return Objects.hash(from, op, path, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PatchDocument {\n"); - sb.append(" from: ").append(toIndentedString(from)).append("\n"); - sb.append(" op: ").append(toIndentedString(op)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfig.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfig.java deleted file mode 100644 index 5ffdfba23c9..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfig.java +++ /dev/null @@ -1,560 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; -import sh.ory.hydra.model.PluginConfigArgs; -import sh.ory.hydra.model.PluginConfigInterface; -import sh.ory.hydra.model.PluginConfigLinux; -import sh.ory.hydra.model.PluginConfigNetwork; -import sh.ory.hydra.model.PluginConfigRootfs; -import sh.ory.hydra.model.PluginConfigUser; -import sh.ory.hydra.model.PluginEnv; -import sh.ory.hydra.model.PluginMount; - -/** - * PluginConfig - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginConfig { - public static final String SERIALIZED_NAME_ARGS = "Args"; - @SerializedName(SERIALIZED_NAME_ARGS) - private PluginConfigArgs args; - - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DOCKER_VERSION = "DockerVersion"; - @SerializedName(SERIALIZED_NAME_DOCKER_VERSION) - private String dockerVersion; - - public static final String SERIALIZED_NAME_DOCUMENTATION = "Documentation"; - @SerializedName(SERIALIZED_NAME_DOCUMENTATION) - private String documentation; - - public static final String SERIALIZED_NAME_ENTRYPOINT = "Entrypoint"; - @SerializedName(SERIALIZED_NAME_ENTRYPOINT) - private List entrypoint = new ArrayList<>(); - - public static final String SERIALIZED_NAME_ENV = "Env"; - @SerializedName(SERIALIZED_NAME_ENV) - private List env = new ArrayList<>(); - - public static final String SERIALIZED_NAME_INTERFACE = "Interface"; - @SerializedName(SERIALIZED_NAME_INTERFACE) - private PluginConfigInterface _interface; - - public static final String SERIALIZED_NAME_IPC_HOST = "IpcHost"; - @SerializedName(SERIALIZED_NAME_IPC_HOST) - private Boolean ipcHost; - - public static final String SERIALIZED_NAME_LINUX = "Linux"; - @SerializedName(SERIALIZED_NAME_LINUX) - private PluginConfigLinux linux; - - public static final String SERIALIZED_NAME_MOUNTS = "Mounts"; - @SerializedName(SERIALIZED_NAME_MOUNTS) - private List mounts = new ArrayList<>(); - - public static final String SERIALIZED_NAME_NETWORK = "Network"; - @SerializedName(SERIALIZED_NAME_NETWORK) - private PluginConfigNetwork network; - - public static final String SERIALIZED_NAME_PID_HOST = "PidHost"; - @SerializedName(SERIALIZED_NAME_PID_HOST) - private Boolean pidHost; - - public static final String SERIALIZED_NAME_PROPAGATED_MOUNT = "PropagatedMount"; - @SerializedName(SERIALIZED_NAME_PROPAGATED_MOUNT) - private String propagatedMount; - - public static final String SERIALIZED_NAME_USER = "User"; - @SerializedName(SERIALIZED_NAME_USER) - private PluginConfigUser user; - - public static final String SERIALIZED_NAME_WORK_DIR = "WorkDir"; - @SerializedName(SERIALIZED_NAME_WORK_DIR) - private String workDir; - - public static final String SERIALIZED_NAME_ROOTFS = "rootfs"; - @SerializedName(SERIALIZED_NAME_ROOTFS) - private PluginConfigRootfs rootfs; - - public PluginConfig() { - } - - public PluginConfig args(PluginConfigArgs args) { - - this.args = args; - return this; - } - - /** - * Get args - * @return args - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public PluginConfigArgs getArgs() { - return args; - } - - - public void setArgs(PluginConfigArgs args) { - this.args = args; - } - - - public PluginConfig description(String description) { - - this.description = description; - return this; - } - - /** - * description - * @return description - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "description") - - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public PluginConfig dockerVersion(String dockerVersion) { - - this.dockerVersion = dockerVersion; - return this; - } - - /** - * Docker Version used to create the plugin - * @return dockerVersion - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Docker Version used to create the plugin") - - public String getDockerVersion() { - return dockerVersion; - } - - - public void setDockerVersion(String dockerVersion) { - this.dockerVersion = dockerVersion; - } - - - public PluginConfig documentation(String documentation) { - - this.documentation = documentation; - return this; - } - - /** - * documentation - * @return documentation - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "documentation") - - public String getDocumentation() { - return documentation; - } - - - public void setDocumentation(String documentation) { - this.documentation = documentation; - } - - - public PluginConfig entrypoint(List entrypoint) { - - this.entrypoint = entrypoint; - return this; - } - - public PluginConfig addEntrypointItem(String entrypointItem) { - this.entrypoint.add(entrypointItem); - return this; - } - - /** - * entrypoint - * @return entrypoint - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "entrypoint") - - public List getEntrypoint() { - return entrypoint; - } - - - public void setEntrypoint(List entrypoint) { - this.entrypoint = entrypoint; - } - - - public PluginConfig env(List env) { - - this.env = env; - return this; - } - - public PluginConfig addEnvItem(PluginEnv envItem) { - this.env.add(envItem); - return this; - } - - /** - * env - * @return env - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "env") - - public List getEnv() { - return env; - } - - - public void setEnv(List env) { - this.env = env; - } - - - public PluginConfig _interface(PluginConfigInterface _interface) { - - this._interface = _interface; - return this; - } - - /** - * Get _interface - * @return _interface - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public PluginConfigInterface getInterface() { - return _interface; - } - - - public void setInterface(PluginConfigInterface _interface) { - this._interface = _interface; - } - - - public PluginConfig ipcHost(Boolean ipcHost) { - - this.ipcHost = ipcHost; - return this; - } - - /** - * ipc host - * @return ipcHost - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "ipc host") - - public Boolean getIpcHost() { - return ipcHost; - } - - - public void setIpcHost(Boolean ipcHost) { - this.ipcHost = ipcHost; - } - - - public PluginConfig linux(PluginConfigLinux linux) { - - this.linux = linux; - return this; - } - - /** - * Get linux - * @return linux - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public PluginConfigLinux getLinux() { - return linux; - } - - - public void setLinux(PluginConfigLinux linux) { - this.linux = linux; - } - - - public PluginConfig mounts(List mounts) { - - this.mounts = mounts; - return this; - } - - public PluginConfig addMountsItem(PluginMount mountsItem) { - this.mounts.add(mountsItem); - return this; - } - - /** - * mounts - * @return mounts - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "mounts") - - public List getMounts() { - return mounts; - } - - - public void setMounts(List mounts) { - this.mounts = mounts; - } - - - public PluginConfig network(PluginConfigNetwork network) { - - this.network = network; - return this; - } - - /** - * Get network - * @return network - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "") - - public PluginConfigNetwork getNetwork() { - return network; - } - - - public void setNetwork(PluginConfigNetwork network) { - this.network = network; - } - - - public PluginConfig pidHost(Boolean pidHost) { - - this.pidHost = pidHost; - return this; - } - - /** - * pid host - * @return pidHost - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "pid host") - - public Boolean getPidHost() { - return pidHost; - } - - - public void setPidHost(Boolean pidHost) { - this.pidHost = pidHost; - } - - - public PluginConfig propagatedMount(String propagatedMount) { - - this.propagatedMount = propagatedMount; - return this; - } - - /** - * propagated mount - * @return propagatedMount - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "propagated mount") - - public String getPropagatedMount() { - return propagatedMount; - } - - - public void setPropagatedMount(String propagatedMount) { - this.propagatedMount = propagatedMount; - } - - - public PluginConfig user(PluginConfigUser user) { - - this.user = user; - return this; - } - - /** - * Get user - * @return user - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public PluginConfigUser getUser() { - return user; - } - - - public void setUser(PluginConfigUser user) { - this.user = user; - } - - - public PluginConfig workDir(String workDir) { - - this.workDir = workDir; - return this; - } - - /** - * work dir - * @return workDir - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "work dir") - - public String getWorkDir() { - return workDir; - } - - - public void setWorkDir(String workDir) { - this.workDir = workDir; - } - - - public PluginConfig rootfs(PluginConfigRootfs rootfs) { - - this.rootfs = rootfs; - return this; - } - - /** - * Get rootfs - * @return rootfs - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public PluginConfigRootfs getRootfs() { - return rootfs; - } - - - public void setRootfs(PluginConfigRootfs rootfs) { - this.rootfs = rootfs; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginConfig pluginConfig = (PluginConfig) o; - return Objects.equals(this.args, pluginConfig.args) && - Objects.equals(this.description, pluginConfig.description) && - Objects.equals(this.dockerVersion, pluginConfig.dockerVersion) && - Objects.equals(this.documentation, pluginConfig.documentation) && - Objects.equals(this.entrypoint, pluginConfig.entrypoint) && - Objects.equals(this.env, pluginConfig.env) && - Objects.equals(this._interface, pluginConfig._interface) && - Objects.equals(this.ipcHost, pluginConfig.ipcHost) && - Objects.equals(this.linux, pluginConfig.linux) && - Objects.equals(this.mounts, pluginConfig.mounts) && - Objects.equals(this.network, pluginConfig.network) && - Objects.equals(this.pidHost, pluginConfig.pidHost) && - Objects.equals(this.propagatedMount, pluginConfig.propagatedMount) && - Objects.equals(this.user, pluginConfig.user) && - Objects.equals(this.workDir, pluginConfig.workDir) && - Objects.equals(this.rootfs, pluginConfig.rootfs); - } - - @Override - public int hashCode() { - return Objects.hash(args, description, dockerVersion, documentation, entrypoint, env, _interface, ipcHost, linux, mounts, network, pidHost, propagatedMount, user, workDir, rootfs); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginConfig {\n"); - sb.append(" args: ").append(toIndentedString(args)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" dockerVersion: ").append(toIndentedString(dockerVersion)).append("\n"); - sb.append(" documentation: ").append(toIndentedString(documentation)).append("\n"); - sb.append(" entrypoint: ").append(toIndentedString(entrypoint)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" _interface: ").append(toIndentedString(_interface)).append("\n"); - sb.append(" ipcHost: ").append(toIndentedString(ipcHost)).append("\n"); - sb.append(" linux: ").append(toIndentedString(linux)).append("\n"); - sb.append(" mounts: ").append(toIndentedString(mounts)).append("\n"); - sb.append(" network: ").append(toIndentedString(network)).append("\n"); - sb.append(" pidHost: ").append(toIndentedString(pidHost)).append("\n"); - sb.append(" propagatedMount: ").append(toIndentedString(propagatedMount)).append("\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append(" workDir: ").append(toIndentedString(workDir)).append("\n"); - sb.append(" rootfs: ").append(toIndentedString(rootfs)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigArgs.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigArgs.java deleted file mode 100644 index e59a1e8c90c..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigArgs.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; - -/** - * PluginConfigArgs plugin config args - */ -@ApiModel(description = "PluginConfigArgs plugin config args") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginConfigArgs { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_NAME = "Name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_SETTABLE = "Settable"; - @SerializedName(SERIALIZED_NAME_SETTABLE) - private List settable = new ArrayList<>(); - - public static final String SERIALIZED_NAME_VALUE = "Value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private List value = new ArrayList<>(); - - public PluginConfigArgs() { - } - - public PluginConfigArgs description(String description) { - - this.description = description; - return this; - } - - /** - * description - * @return description - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "description") - - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public PluginConfigArgs name(String name) { - - this.name = name; - return this; - } - - /** - * name - * @return name - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "name") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public PluginConfigArgs settable(List settable) { - - this.settable = settable; - return this; - } - - public PluginConfigArgs addSettableItem(String settableItem) { - this.settable.add(settableItem); - return this; - } - - /** - * settable - * @return settable - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "settable") - - public List getSettable() { - return settable; - } - - - public void setSettable(List settable) { - this.settable = settable; - } - - - public PluginConfigArgs value(List value) { - - this.value = value; - return this; - } - - public PluginConfigArgs addValueItem(String valueItem) { - this.value.add(valueItem); - return this; - } - - /** - * value - * @return value - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "value") - - public List getValue() { - return value; - } - - - public void setValue(List value) { - this.value = value; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginConfigArgs pluginConfigArgs = (PluginConfigArgs) o; - return Objects.equals(this.description, pluginConfigArgs.description) && - Objects.equals(this.name, pluginConfigArgs.name) && - Objects.equals(this.settable, pluginConfigArgs.settable) && - Objects.equals(this.value, pluginConfigArgs.value); - } - - @Override - public int hashCode() { - return Objects.hash(description, name, settable, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginConfigArgs {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" settable: ").append(toIndentedString(settable)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigInterface.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigInterface.java deleted file mode 100644 index f5625c3f538..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigInterface.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; -import sh.ory.hydra.model.PluginInterfaceType; - -/** - * PluginConfigInterface The interface between Docker and the plugin - */ -@ApiModel(description = "PluginConfigInterface The interface between Docker and the plugin") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginConfigInterface { - public static final String SERIALIZED_NAME_PROTOCOL_SCHEME = "ProtocolScheme"; - @SerializedName(SERIALIZED_NAME_PROTOCOL_SCHEME) - private String protocolScheme; - - public static final String SERIALIZED_NAME_SOCKET = "Socket"; - @SerializedName(SERIALIZED_NAME_SOCKET) - private String socket; - - public static final String SERIALIZED_NAME_TYPES = "Types"; - @SerializedName(SERIALIZED_NAME_TYPES) - private List types = new ArrayList<>(); - - public PluginConfigInterface() { - } - - public PluginConfigInterface protocolScheme(String protocolScheme) { - - this.protocolScheme = protocolScheme; - return this; - } - - /** - * Protocol to use for clients connecting to the plugin. - * @return protocolScheme - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Protocol to use for clients connecting to the plugin.") - - public String getProtocolScheme() { - return protocolScheme; - } - - - public void setProtocolScheme(String protocolScheme) { - this.protocolScheme = protocolScheme; - } - - - public PluginConfigInterface socket(String socket) { - - this.socket = socket; - return this; - } - - /** - * socket - * @return socket - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "socket") - - public String getSocket() { - return socket; - } - - - public void setSocket(String socket) { - this.socket = socket; - } - - - public PluginConfigInterface types(List types) { - - this.types = types; - return this; - } - - public PluginConfigInterface addTypesItem(PluginInterfaceType typesItem) { - this.types.add(typesItem); - return this; - } - - /** - * types - * @return types - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "types") - - public List getTypes() { - return types; - } - - - public void setTypes(List types) { - this.types = types; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginConfigInterface pluginConfigInterface = (PluginConfigInterface) o; - return Objects.equals(this.protocolScheme, pluginConfigInterface.protocolScheme) && - Objects.equals(this.socket, pluginConfigInterface.socket) && - Objects.equals(this.types, pluginConfigInterface.types); - } - - @Override - public int hashCode() { - return Objects.hash(protocolScheme, socket, types); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginConfigInterface {\n"); - sb.append(" protocolScheme: ").append(toIndentedString(protocolScheme)).append("\n"); - sb.append(" socket: ").append(toIndentedString(socket)).append("\n"); - sb.append(" types: ").append(toIndentedString(types)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigLinux.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigLinux.java deleted file mode 100644 index 098983898e6..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigLinux.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; -import sh.ory.hydra.model.PluginDevice; - -/** - * PluginConfigLinux plugin config linux - */ -@ApiModel(description = "PluginConfigLinux plugin config linux") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginConfigLinux { - public static final String SERIALIZED_NAME_ALLOW_ALL_DEVICES = "AllowAllDevices"; - @SerializedName(SERIALIZED_NAME_ALLOW_ALL_DEVICES) - private Boolean allowAllDevices; - - public static final String SERIALIZED_NAME_CAPABILITIES = "Capabilities"; - @SerializedName(SERIALIZED_NAME_CAPABILITIES) - private List capabilities = new ArrayList<>(); - - public static final String SERIALIZED_NAME_DEVICES = "Devices"; - @SerializedName(SERIALIZED_NAME_DEVICES) - private List devices = new ArrayList<>(); - - public PluginConfigLinux() { - } - - public PluginConfigLinux allowAllDevices(Boolean allowAllDevices) { - - this.allowAllDevices = allowAllDevices; - return this; - } - - /** - * allow all devices - * @return allowAllDevices - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "allow all devices") - - public Boolean getAllowAllDevices() { - return allowAllDevices; - } - - - public void setAllowAllDevices(Boolean allowAllDevices) { - this.allowAllDevices = allowAllDevices; - } - - - public PluginConfigLinux capabilities(List capabilities) { - - this.capabilities = capabilities; - return this; - } - - public PluginConfigLinux addCapabilitiesItem(String capabilitiesItem) { - this.capabilities.add(capabilitiesItem); - return this; - } - - /** - * capabilities - * @return capabilities - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "capabilities") - - public List getCapabilities() { - return capabilities; - } - - - public void setCapabilities(List capabilities) { - this.capabilities = capabilities; - } - - - public PluginConfigLinux devices(List devices) { - - this.devices = devices; - return this; - } - - public PluginConfigLinux addDevicesItem(PluginDevice devicesItem) { - this.devices.add(devicesItem); - return this; - } - - /** - * devices - * @return devices - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "devices") - - public List getDevices() { - return devices; - } - - - public void setDevices(List devices) { - this.devices = devices; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginConfigLinux pluginConfigLinux = (PluginConfigLinux) o; - return Objects.equals(this.allowAllDevices, pluginConfigLinux.allowAllDevices) && - Objects.equals(this.capabilities, pluginConfigLinux.capabilities) && - Objects.equals(this.devices, pluginConfigLinux.devices); - } - - @Override - public int hashCode() { - return Objects.hash(allowAllDevices, capabilities, devices); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginConfigLinux {\n"); - sb.append(" allowAllDevices: ").append(toIndentedString(allowAllDevices)).append("\n"); - sb.append(" capabilities: ").append(toIndentedString(capabilities)).append("\n"); - sb.append(" devices: ").append(toIndentedString(devices)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigNetwork.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigNetwork.java deleted file mode 100644 index d5770bfadb5..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigNetwork.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * PluginConfigNetwork plugin config network - */ -@ApiModel(description = "PluginConfigNetwork plugin config network") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginConfigNetwork { - public static final String SERIALIZED_NAME_TYPE = "Type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public PluginConfigNetwork() { - } - - public PluginConfigNetwork type(String type) { - - this.type = type; - return this; - } - - /** - * type - * @return type - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "type") - - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginConfigNetwork pluginConfigNetwork = (PluginConfigNetwork) o; - return Objects.equals(this.type, pluginConfigNetwork.type); - } - - @Override - public int hashCode() { - return Objects.hash(type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginConfigNetwork {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigRootfs.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigRootfs.java deleted file mode 100644 index 92c83eaa5f4..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigRootfs.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; - -/** - * PluginConfigRootfs plugin config rootfs - */ -@ApiModel(description = "PluginConfigRootfs plugin config rootfs") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginConfigRootfs { - public static final String SERIALIZED_NAME_DIFF_IDS = "diff_ids"; - @SerializedName(SERIALIZED_NAME_DIFF_IDS) - private List diffIds = null; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public PluginConfigRootfs() { - } - - public PluginConfigRootfs diffIds(List diffIds) { - - this.diffIds = diffIds; - return this; - } - - public PluginConfigRootfs addDiffIdsItem(String diffIdsItem) { - if (this.diffIds == null) { - this.diffIds = new ArrayList<>(); - } - this.diffIds.add(diffIdsItem); - return this; - } - - /** - * diff ids - * @return diffIds - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "diff ids") - - public List getDiffIds() { - return diffIds; - } - - - public void setDiffIds(List diffIds) { - this.diffIds = diffIds; - } - - - public PluginConfigRootfs type(String type) { - - this.type = type; - return this; - } - - /** - * type - * @return type - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "type") - - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginConfigRootfs pluginConfigRootfs = (PluginConfigRootfs) o; - return Objects.equals(this.diffIds, pluginConfigRootfs.diffIds) && - Objects.equals(this.type, pluginConfigRootfs.type); - } - - @Override - public int hashCode() { - return Objects.hash(diffIds, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginConfigRootfs {\n"); - sb.append(" diffIds: ").append(toIndentedString(diffIds)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigUser.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigUser.java deleted file mode 100644 index 6c106850988..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginConfigUser.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * PluginConfigUser plugin config user - */ -@ApiModel(description = "PluginConfigUser plugin config user") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginConfigUser { - public static final String SERIALIZED_NAME_G_I_D = "GID"; - @SerializedName(SERIALIZED_NAME_G_I_D) - private Integer GID; - - public static final String SERIALIZED_NAME_U_I_D = "UID"; - @SerializedName(SERIALIZED_NAME_U_I_D) - private Integer UID; - - public PluginConfigUser() { - } - - public PluginConfigUser GID(Integer GID) { - - this.GID = GID; - return this; - } - - /** - * g ID - * @return GID - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "g ID") - - public Integer getGID() { - return GID; - } - - - public void setGID(Integer GID) { - this.GID = GID; - } - - - public PluginConfigUser UID(Integer UID) { - - this.UID = UID; - return this; - } - - /** - * UID - * @return UID - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "UID") - - public Integer getUID() { - return UID; - } - - - public void setUID(Integer UID) { - this.UID = UID; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginConfigUser pluginConfigUser = (PluginConfigUser) o; - return Objects.equals(this.GID, pluginConfigUser.GID) && - Objects.equals(this.UID, pluginConfigUser.UID); - } - - @Override - public int hashCode() { - return Objects.hash(GID, UID); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginConfigUser {\n"); - sb.append(" GID: ").append(toIndentedString(GID)).append("\n"); - sb.append(" UID: ").append(toIndentedString(UID)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginDevice.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginDevice.java deleted file mode 100644 index 9f0e58e1c4d..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginDevice.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; - -/** - * PluginDevice plugin device - */ -@ApiModel(description = "PluginDevice plugin device") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginDevice { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_NAME = "Name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_PATH = "Path"; - @SerializedName(SERIALIZED_NAME_PATH) - private String path; - - public static final String SERIALIZED_NAME_SETTABLE = "Settable"; - @SerializedName(SERIALIZED_NAME_SETTABLE) - private List settable = new ArrayList<>(); - - public PluginDevice() { - } - - public PluginDevice description(String description) { - - this.description = description; - return this; - } - - /** - * description - * @return description - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "description") - - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public PluginDevice name(String name) { - - this.name = name; - return this; - } - - /** - * name - * @return name - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "name") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public PluginDevice path(String path) { - - this.path = path; - return this; - } - - /** - * path - * @return path - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "path") - - public String getPath() { - return path; - } - - - public void setPath(String path) { - this.path = path; - } - - - public PluginDevice settable(List settable) { - - this.settable = settable; - return this; - } - - public PluginDevice addSettableItem(String settableItem) { - this.settable.add(settableItem); - return this; - } - - /** - * settable - * @return settable - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "settable") - - public List getSettable() { - return settable; - } - - - public void setSettable(List settable) { - this.settable = settable; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginDevice pluginDevice = (PluginDevice) o; - return Objects.equals(this.description, pluginDevice.description) && - Objects.equals(this.name, pluginDevice.name) && - Objects.equals(this.path, pluginDevice.path) && - Objects.equals(this.settable, pluginDevice.settable); - } - - @Override - public int hashCode() { - return Objects.hash(description, name, path, settable); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginDevice {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" path: ").append(toIndentedString(path)).append("\n"); - sb.append(" settable: ").append(toIndentedString(settable)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginEnv.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginEnv.java deleted file mode 100644 index 4741d778202..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginEnv.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; - -/** - * PluginEnv plugin env - */ -@ApiModel(description = "PluginEnv plugin env") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginEnv { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_NAME = "Name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_SETTABLE = "Settable"; - @SerializedName(SERIALIZED_NAME_SETTABLE) - private List settable = new ArrayList<>(); - - public static final String SERIALIZED_NAME_VALUE = "Value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - public PluginEnv() { - } - - public PluginEnv description(String description) { - - this.description = description; - return this; - } - - /** - * description - * @return description - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "description") - - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public PluginEnv name(String name) { - - this.name = name; - return this; - } - - /** - * name - * @return name - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "name") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public PluginEnv settable(List settable) { - - this.settable = settable; - return this; - } - - public PluginEnv addSettableItem(String settableItem) { - this.settable.add(settableItem); - return this; - } - - /** - * settable - * @return settable - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "settable") - - public List getSettable() { - return settable; - } - - - public void setSettable(List settable) { - this.settable = settable; - } - - - public PluginEnv value(String value) { - - this.value = value; - return this; - } - - /** - * value - * @return value - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "value") - - public String getValue() { - return value; - } - - - public void setValue(String value) { - this.value = value; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginEnv pluginEnv = (PluginEnv) o; - return Objects.equals(this.description, pluginEnv.description) && - Objects.equals(this.name, pluginEnv.name) && - Objects.equals(this.settable, pluginEnv.settable) && - Objects.equals(this.value, pluginEnv.value); - } - - @Override - public int hashCode() { - return Objects.hash(description, name, settable, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginEnv {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" settable: ").append(toIndentedString(settable)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginInterfaceType.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginInterfaceType.java deleted file mode 100644 index c73b43fbf5e..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginInterfaceType.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * PluginInterfaceType plugin interface type - */ -@ApiModel(description = "PluginInterfaceType plugin interface type") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginInterfaceType { - public static final String SERIALIZED_NAME_CAPABILITY = "Capability"; - @SerializedName(SERIALIZED_NAME_CAPABILITY) - private String capability; - - public static final String SERIALIZED_NAME_PREFIX = "Prefix"; - @SerializedName(SERIALIZED_NAME_PREFIX) - private String prefix; - - public static final String SERIALIZED_NAME_VERSION = "Version"; - @SerializedName(SERIALIZED_NAME_VERSION) - private String version; - - public PluginInterfaceType() { - } - - public PluginInterfaceType capability(String capability) { - - this.capability = capability; - return this; - } - - /** - * capability - * @return capability - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "capability") - - public String getCapability() { - return capability; - } - - - public void setCapability(String capability) { - this.capability = capability; - } - - - public PluginInterfaceType prefix(String prefix) { - - this.prefix = prefix; - return this; - } - - /** - * prefix - * @return prefix - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "prefix") - - public String getPrefix() { - return prefix; - } - - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - - - public PluginInterfaceType version(String version) { - - this.version = version; - return this; - } - - /** - * version - * @return version - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "version") - - public String getVersion() { - return version; - } - - - public void setVersion(String version) { - this.version = version; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginInterfaceType pluginInterfaceType = (PluginInterfaceType) o; - return Objects.equals(this.capability, pluginInterfaceType.capability) && - Objects.equals(this.prefix, pluginInterfaceType.prefix) && - Objects.equals(this.version, pluginInterfaceType.version); - } - - @Override - public int hashCode() { - return Objects.hash(capability, prefix, version); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginInterfaceType {\n"); - sb.append(" capability: ").append(toIndentedString(capability)).append("\n"); - sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginMount.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginMount.java deleted file mode 100644 index 239149f4272..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginMount.java +++ /dev/null @@ -1,287 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; - -/** - * PluginMount plugin mount - */ -@ApiModel(description = "PluginMount plugin mount") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginMount { - public static final String SERIALIZED_NAME_DESCRIPTION = "Description"; - @SerializedName(SERIALIZED_NAME_DESCRIPTION) - private String description; - - public static final String SERIALIZED_NAME_DESTINATION = "Destination"; - @SerializedName(SERIALIZED_NAME_DESTINATION) - private String destination; - - public static final String SERIALIZED_NAME_NAME = "Name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_OPTIONS = "Options"; - @SerializedName(SERIALIZED_NAME_OPTIONS) - private List options = new ArrayList<>(); - - public static final String SERIALIZED_NAME_SETTABLE = "Settable"; - @SerializedName(SERIALIZED_NAME_SETTABLE) - private List settable = new ArrayList<>(); - - public static final String SERIALIZED_NAME_SOURCE = "Source"; - @SerializedName(SERIALIZED_NAME_SOURCE) - private String source; - - public static final String SERIALIZED_NAME_TYPE = "Type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private String type; - - public PluginMount() { - } - - public PluginMount description(String description) { - - this.description = description; - return this; - } - - /** - * description - * @return description - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "description") - - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public PluginMount destination(String destination) { - - this.destination = destination; - return this; - } - - /** - * destination - * @return destination - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "destination") - - public String getDestination() { - return destination; - } - - - public void setDestination(String destination) { - this.destination = destination; - } - - - public PluginMount name(String name) { - - this.name = name; - return this; - } - - /** - * name - * @return name - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "name") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public PluginMount options(List options) { - - this.options = options; - return this; - } - - public PluginMount addOptionsItem(String optionsItem) { - this.options.add(optionsItem); - return this; - } - - /** - * options - * @return options - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "options") - - public List getOptions() { - return options; - } - - - public void setOptions(List options) { - this.options = options; - } - - - public PluginMount settable(List settable) { - - this.settable = settable; - return this; - } - - public PluginMount addSettableItem(String settableItem) { - this.settable.add(settableItem); - return this; - } - - /** - * settable - * @return settable - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "settable") - - public List getSettable() { - return settable; - } - - - public void setSettable(List settable) { - this.settable = settable; - } - - - public PluginMount source(String source) { - - this.source = source; - return this; - } - - /** - * source - * @return source - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "source") - - public String getSource() { - return source; - } - - - public void setSource(String source) { - this.source = source; - } - - - public PluginMount type(String type) { - - this.type = type; - return this; - } - - /** - * type - * @return type - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "type") - - public String getType() { - return type; - } - - - public void setType(String type) { - this.type = type; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginMount pluginMount = (PluginMount) o; - return Objects.equals(this.description, pluginMount.description) && - Objects.equals(this.destination, pluginMount.destination) && - Objects.equals(this.name, pluginMount.name) && - Objects.equals(this.options, pluginMount.options) && - Objects.equals(this.settable, pluginMount.settable) && - Objects.equals(this.source, pluginMount.source) && - Objects.equals(this.type, pluginMount.type); - } - - @Override - public int hashCode() { - return Objects.hash(description, destination, name, options, settable, source, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginMount {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" options: ").append(toIndentedString(options)).append("\n"); - sb.append(" settable: ").append(toIndentedString(settable)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginSettings.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginSettings.java deleted file mode 100644 index 01d9586ec21..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PluginSettings.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; -import sh.ory.hydra.model.PluginDevice; -import sh.ory.hydra.model.PluginMount; - -/** - * PluginSettings - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PluginSettings { - public static final String SERIALIZED_NAME_ARGS = "Args"; - @SerializedName(SERIALIZED_NAME_ARGS) - private List args = new ArrayList<>(); - - public static final String SERIALIZED_NAME_DEVICES = "Devices"; - @SerializedName(SERIALIZED_NAME_DEVICES) - private List devices = new ArrayList<>(); - - public static final String SERIALIZED_NAME_ENV = "Env"; - @SerializedName(SERIALIZED_NAME_ENV) - private List env = new ArrayList<>(); - - public static final String SERIALIZED_NAME_MOUNTS = "Mounts"; - @SerializedName(SERIALIZED_NAME_MOUNTS) - private List mounts = new ArrayList<>(); - - public PluginSettings() { - } - - public PluginSettings args(List args) { - - this.args = args; - return this; - } - - public PluginSettings addArgsItem(String argsItem) { - this.args.add(argsItem); - return this; - } - - /** - * args - * @return args - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "args") - - public List getArgs() { - return args; - } - - - public void setArgs(List args) { - this.args = args; - } - - - public PluginSettings devices(List devices) { - - this.devices = devices; - return this; - } - - public PluginSettings addDevicesItem(PluginDevice devicesItem) { - this.devices.add(devicesItem); - return this; - } - - /** - * devices - * @return devices - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "devices") - - public List getDevices() { - return devices; - } - - - public void setDevices(List devices) { - this.devices = devices; - } - - - public PluginSettings env(List env) { - - this.env = env; - return this; - } - - public PluginSettings addEnvItem(String envItem) { - this.env.add(envItem); - return this; - } - - /** - * env - * @return env - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "env") - - public List getEnv() { - return env; - } - - - public void setEnv(List env) { - this.env = env; - } - - - public PluginSettings mounts(List mounts) { - - this.mounts = mounts; - return this; - } - - public PluginSettings addMountsItem(PluginMount mountsItem) { - this.mounts.add(mountsItem); - return this; - } - - /** - * mounts - * @return mounts - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "mounts") - - public List getMounts() { - return mounts; - } - - - public void setMounts(List mounts) { - this.mounts = mounts; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PluginSettings pluginSettings = (PluginSettings) o; - return Objects.equals(this.args, pluginSettings.args) && - Objects.equals(this.devices, pluginSettings.devices) && - Objects.equals(this.env, pluginSettings.env) && - Objects.equals(this.mounts, pluginSettings.mounts); - } - - @Override - public int hashCode() { - return Objects.hash(args, devices, env, mounts); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PluginSettings {\n"); - sb.append(" args: ").append(toIndentedString(args)).append("\n"); - sb.append(" devices: ").append(toIndentedString(devices)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" mounts: ").append(toIndentedString(mounts)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PreviousConsentSession.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/PreviousConsentSession.java deleted file mode 100644 index a81eee85db6..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/PreviousConsentSession.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; -import sh.ory.hydra.model.ConsentRequest; -import sh.ory.hydra.model.ConsentRequestSession; - -/** - * The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - */ -@ApiModel(description = "The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class PreviousConsentSession { - public static final String SERIALIZED_NAME_CONSENT_REQUEST = "consent_request"; - @SerializedName(SERIALIZED_NAME_CONSENT_REQUEST) - private ConsentRequest consentRequest; - - 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; - - public static final String SERIALIZED_NAME_GRANT_SCOPE = "grant_scope"; - @SerializedName(SERIALIZED_NAME_GRANT_SCOPE) - private List grantScope = null; - - public static final String SERIALIZED_NAME_HANDLED_AT = "handled_at"; - @SerializedName(SERIALIZED_NAME_HANDLED_AT) - private OffsetDateTime handledAt; - - public static final String SERIALIZED_NAME_REMEMBER = "remember"; - @SerializedName(SERIALIZED_NAME_REMEMBER) - private Boolean remember; - - public static final String SERIALIZED_NAME_REMEMBER_FOR = "remember_for"; - @SerializedName(SERIALIZED_NAME_REMEMBER_FOR) - private Long rememberFor; - - public static final String SERIALIZED_NAME_SESSION = "session"; - @SerializedName(SERIALIZED_NAME_SESSION) - private ConsentRequestSession session; - - public PreviousConsentSession() { - } - - public PreviousConsentSession consentRequest(ConsentRequest consentRequest) { - - this.consentRequest = consentRequest; - return this; - } - - /** - * Get consentRequest - * @return consentRequest - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public ConsentRequest getConsentRequest() { - return consentRequest; - } - - - public void setConsentRequest(ConsentRequest consentRequest) { - this.consentRequest = consentRequest; - } - - - public PreviousConsentSession grantAccessTokenAudience(List grantAccessTokenAudience) { - - this.grantAccessTokenAudience = grantAccessTokenAudience; - return this; - } - - public PreviousConsentSession addGrantAccessTokenAudienceItem(String grantAccessTokenAudienceItem) { - if (this.grantAccessTokenAudience == null) { - this.grantAccessTokenAudience = new ArrayList<>(); - } - this.grantAccessTokenAudience.add(grantAccessTokenAudienceItem); - 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 PreviousConsentSession grantScope(List grantScope) { - - this.grantScope = grantScope; - return this; - } - - public PreviousConsentSession addGrantScopeItem(String grantScopeItem) { - if (this.grantScope == null) { - this.grantScope = new ArrayList<>(); - } - this.grantScope.add(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 PreviousConsentSession 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 PreviousConsentSession 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 PreviousConsentSession 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 PreviousConsentSession session(ConsentRequestSession session) { - - this.session = session; - return this; - } - - /** - * Get session - * @return session - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public ConsentRequestSession getSession() { - return session; - } - - - public void setSession(ConsentRequestSession session) { - this.session = session; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PreviousConsentSession previousConsentSession = (PreviousConsentSession) o; - return Objects.equals(this.consentRequest, previousConsentSession.consentRequest) && - Objects.equals(this.grantAccessTokenAudience, previousConsentSession.grantAccessTokenAudience) && - Objects.equals(this.grantScope, previousConsentSession.grantScope) && - Objects.equals(this.handledAt, previousConsentSession.handledAt) && - Objects.equals(this.remember, previousConsentSession.remember) && - Objects.equals(this.rememberFor, previousConsentSession.rememberFor) && - Objects.equals(this.session, previousConsentSession.session); - } - - @Override - public int hashCode() { - return Objects.hash(consentRequest, grantAccessTokenAudience, grantScope, handledAt, remember, rememberFor, session); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PreviousConsentSession {\n"); - sb.append(" consentRequest: ").append(toIndentedString(consentRequest)).append("\n"); - sb.append(" grantAccessTokenAudience: ").append(toIndentedString(grantAccessTokenAudience)).append("\n"); - sb.append(" grantScope: ").append(toIndentedString(grantScope)).append("\n"); - sb.append(" handledAt: ").append(toIndentedString(handledAt)).append("\n"); - sb.append(" remember: ").append(toIndentedString(remember)).append("\n"); - sb.append(" rememberFor: ").append(toIndentedString(rememberFor)).append("\n"); - sb.append(" session: ").append(toIndentedString(session)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 new file mode 100644 index 00000000000..cafa63099c7 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectOAuth2Request.java @@ -0,0 +1,338 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * RejectOAuth2Request + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class RejectOAuth2Request { + public static final String SERIALIZED_NAME_ERROR = "error"; + @SerializedName(SERIALIZED_NAME_ERROR) + private String error; + + public static final String SERIALIZED_NAME_ERROR_DEBUG = "error_debug"; + @SerializedName(SERIALIZED_NAME_ERROR_DEBUG) + private String errorDebug; + + public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; + @SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION) + private String errorDescription; + + public static final String SERIALIZED_NAME_ERROR_HINT = "error_hint"; + @SerializedName(SERIALIZED_NAME_ERROR_HINT) + private String errorHint; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + private Long statusCode; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RejectOAuth2Request rejectOAuth2Request = (RejectOAuth2Request) o; + return Objects.equals(this.error, rejectOAuth2Request.error) && + Objects.equals(this.errorDebug, rejectOAuth2Request.errorDebug) && + Objects.equals(this.errorDescription, rejectOAuth2Request.errorDescription) && + Objects.equals(this.errorHint, rejectOAuth2Request.errorHint) && + Objects.equals(this.statusCode, rejectOAuth2Request.statusCode); + } + + @Override + public int hashCode() { + return Objects.hash(error, errorDebug, errorDescription, errorHint, statusCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RejectOAuth2Request {\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" errorDebug: ").append(toIndentedString(errorDebug)).append("\n"); + sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append(" errorHint: ").append(toIndentedString(errorHint)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("error"); + openapiFields.add("error_debug"); + openapiFields.add("error_description"); + openapiFields.add("error_hint"); + openapiFields.add("status_code"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in RejectOAuth2Request is not found in the empty JSON string", RejectOAuth2Request.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!RejectOAuth2Request.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RejectOAuth2Request` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("error") != null && !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())); + } + if (jsonObj.get("error_debug") != null && !jsonObj.get("error_debug").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error_debug` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_debug").toString())); + } + if (jsonObj.get("error_description") != null && !jsonObj.get("error_description").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error_description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_description").toString())); + } + if (jsonObj.get("error_hint") != null && !jsonObj.get("error_hint").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error_hint` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_hint").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RejectOAuth2Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RejectOAuth2Request' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(RejectOAuth2Request.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, RejectOAuth2Request value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public RejectOAuth2Request read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectRequest.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectRequest.java deleted file mode 100644 index 0de4dc750b4..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/RejectRequest.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * RejectRequest - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class RejectRequest { - public static final String SERIALIZED_NAME_ERROR = "error"; - @SerializedName(SERIALIZED_NAME_ERROR) - private String error; - - public static final String SERIALIZED_NAME_ERROR_DEBUG = "error_debug"; - @SerializedName(SERIALIZED_NAME_ERROR_DEBUG) - private String errorDebug; - - public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; - @SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION) - private String errorDescription; - - public static final String SERIALIZED_NAME_ERROR_HINT = "error_hint"; - @SerializedName(SERIALIZED_NAME_ERROR_HINT) - private String errorHint; - - public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; - @SerializedName(SERIALIZED_NAME_STATUS_CODE) - private Long statusCode; - - public RejectRequest() { - } - - public RejectRequest 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 RejectRequest 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 RejectRequest 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 RejectRequest 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 RejectRequest 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; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RejectRequest rejectRequest = (RejectRequest) o; - return Objects.equals(this.error, rejectRequest.error) && - Objects.equals(this.errorDebug, rejectRequest.errorDebug) && - Objects.equals(this.errorDescription, rejectRequest.errorDescription) && - Objects.equals(this.errorHint, rejectRequest.errorHint) && - Objects.equals(this.statusCode, rejectRequest.statusCode); - } - - @Override - public int hashCode() { - return Objects.hash(error, errorDebug, errorDescription, errorHint, statusCode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RejectRequest {\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" errorDebug: ").append(toIndentedString(errorDebug)).append("\n"); - sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); - sb.append(" errorHint: ").append(toIndentedString(errorHint)).append("\n"); - sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/RequestWasHandledResponse.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/RequestWasHandledResponse.java deleted file mode 100644 index 499f56284f1..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/RequestWasHandledResponse.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * RequestWasHandledResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class RequestWasHandledResponse { - public static final String SERIALIZED_NAME_REDIRECT_TO = "redirect_to"; - @SerializedName(SERIALIZED_NAME_REDIRECT_TO) - private String redirectTo; - - public RequestWasHandledResponse() { - } - - public RequestWasHandledResponse redirectTo(String redirectTo) { - - this.redirectTo = redirectTo; - return this; - } - - /** - * Original request URL to which you should redirect the user if request was already handled. - * @return redirectTo - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Original request URL to which you should redirect the user if request was already handled.") - - public String getRedirectTo() { - return redirectTo; - } - - - public void setRedirectTo(String redirectTo) { - this.redirectTo = redirectTo; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RequestWasHandledResponse requestWasHandledResponse = (RequestWasHandledResponse) o; - return Objects.equals(this.redirectTo, requestWasHandledResponse.redirectTo); - } - - @Override - public int hashCode() { - return Objects.hash(redirectTo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RequestWasHandledResponse {\n"); - sb.append(" redirectTo: ").append(toIndentedString(redirectTo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 new file mode 100644 index 00000000000..b5206357fb7 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPagination.java @@ -0,0 +1,241 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * TokenPagination + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class TokenPagination { + public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + private Long pageSize = 250l; + + public static final String SERIALIZED_NAME_PAGE_TOKEN = "page_token"; + @SerializedName(SERIALIZED_NAME_PAGE_TOKEN) + private String pageToken = "1"; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenPagination tokenPagination = (TokenPagination) o; + return Objects.equals(this.pageSize, tokenPagination.pageSize) && + Objects.equals(this.pageToken, tokenPagination.pageToken); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenPagination {\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" pageToken: ").append(toIndentedString(pageToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("page_size"); + openapiFields.add("page_token"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in TokenPagination is not found in the empty JSON string", TokenPagination.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!TokenPagination.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TokenPagination` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("page_token") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TokenPagination.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TokenPagination' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TokenPagination.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TokenPagination value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TokenPagination read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..309e8aa0a0a --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationHeaders.java @@ -0,0 +1,242 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * TokenPaginationHeaders + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class TokenPaginationHeaders { + public static final String SERIALIZED_NAME_LINK = "link"; + @SerializedName(SERIALIZED_NAME_LINK) + private String link; + + public static final String SERIALIZED_NAME_X_TOTAL_COUNT = "x-total-count"; + @SerializedName(SERIALIZED_NAME_X_TOTAL_COUNT) + private String xTotalCount; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenPaginationHeaders tokenPaginationHeaders = (TokenPaginationHeaders) o; + return Objects.equals(this.link, tokenPaginationHeaders.link) && + Objects.equals(this.xTotalCount, tokenPaginationHeaders.xTotalCount); + } + + @Override + public int hashCode() { + return Objects.hash(link, xTotalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenPaginationHeaders {\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" xTotalCount: ").append(toIndentedString(xTotalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("link"); + openapiFields.add("x-total-count"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in TokenPaginationHeaders is not found in the empty JSON string", TokenPaginationHeaders.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!TokenPaginationHeaders.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TokenPaginationHeaders` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("link") != null && !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())); + } + if (jsonObj.get("x-total-count") != null && !jsonObj.get("x-total-count").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `x-total-count` to be a primitive type in the JSON string but got `%s`", jsonObj.get("x-total-count").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TokenPaginationHeaders.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TokenPaginationHeaders' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TokenPaginationHeaders.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TokenPaginationHeaders value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TokenPaginationHeaders read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..291eba803f8 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationRequestParameters.java @@ -0,0 +1,242 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?limit={limit}&offset={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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class TokenPaginationRequestParameters { + public static final String SERIALIZED_NAME_PAGE_SIZE = "page_size"; + @SerializedName(SERIALIZED_NAME_PAGE_SIZE) + private Long pageSize = 250l; + + public static final String SERIALIZED_NAME_PAGE_TOKEN = "page_token"; + @SerializedName(SERIALIZED_NAME_PAGE_TOKEN) + private String pageToken = "1"; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenPaginationRequestParameters tokenPaginationRequestParameters = (TokenPaginationRequestParameters) o; + return Objects.equals(this.pageSize, tokenPaginationRequestParameters.pageSize) && + Objects.equals(this.pageToken, tokenPaginationRequestParameters.pageToken); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenPaginationRequestParameters {\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" pageToken: ").append(toIndentedString(pageToken)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("page_size"); + openapiFields.add("page_token"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in TokenPaginationRequestParameters is not found in the empty JSON string", TokenPaginationRequestParameters.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!TokenPaginationRequestParameters.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TokenPaginationRequestParameters` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("page_token") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TokenPaginationRequestParameters.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TokenPaginationRequestParameters' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TokenPaginationRequestParameters.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TokenPaginationRequestParameters value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TokenPaginationRequestParameters read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..73ac564822e --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TokenPaginationResponseHeaders.java @@ -0,0 +1,240 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * The `Link` HTTP header contains multiple links (`first`, `next`, `last`, `previous`) formatted as: `<https://{project-slug}.projects.oryapis.com/admin/clients?limit={limit}&offset={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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class TokenPaginationResponseHeaders { + public static final String SERIALIZED_NAME_LINK = "link"; + @SerializedName(SERIALIZED_NAME_LINK) + private String link; + + public static final String SERIALIZED_NAME_X_TOTAL_COUNT = "x-total-count"; + @SerializedName(SERIALIZED_NAME_X_TOTAL_COUNT) + private Long xTotalCount; + + 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TokenPaginationResponseHeaders tokenPaginationResponseHeaders = (TokenPaginationResponseHeaders) o; + return Objects.equals(this.link, tokenPaginationResponseHeaders.link) && + Objects.equals(this.xTotalCount, tokenPaginationResponseHeaders.xTotalCount); + } + + @Override + public int hashCode() { + return Objects.hash(link, xTotalCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TokenPaginationResponseHeaders {\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); + sb.append(" xTotalCount: ").append(toIndentedString(xTotalCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("link"); + openapiFields.add("x-total-count"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in TokenPaginationResponseHeaders is not found in the empty JSON string", TokenPaginationResponseHeaders.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!TokenPaginationResponseHeaders.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TokenPaginationResponseHeaders` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("link") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TokenPaginationResponseHeaders.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TokenPaginationResponseHeaders' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TokenPaginationResponseHeaders.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TokenPaginationResponseHeaders value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TokenPaginationResponseHeaders read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustJwtGrantIssuerBody.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustJwtGrantIssuerBody.java deleted file mode 100644 index 29e2bbc9ab0..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustJwtGrantIssuerBody.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; -import sh.ory.hydra.model.JSONWebKey; - -/** - * TrustJwtGrantIssuerBody - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class TrustJwtGrantIssuerBody { - public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; - @SerializedName(SERIALIZED_NAME_EXPIRES_AT) - private OffsetDateTime expiresAt; - - public static final String SERIALIZED_NAME_ISSUER = "issuer"; - @SerializedName(SERIALIZED_NAME_ISSUER) - private String issuer; - - public static final String SERIALIZED_NAME_JWK = "jwk"; - @SerializedName(SERIALIZED_NAME_JWK) - private JSONWebKey jwk; - - public static final String SERIALIZED_NAME_SCOPE = "scope"; - @SerializedName(SERIALIZED_NAME_SCOPE) - private List scope = new ArrayList<>(); - - public static final String SERIALIZED_NAME_SUBJECT = "subject"; - @SerializedName(SERIALIZED_NAME_SUBJECT) - private String subject; - - public TrustJwtGrantIssuerBody() { - } - - public TrustJwtGrantIssuerBody 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 TrustJwtGrantIssuerBody 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 TrustJwtGrantIssuerBody 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 TrustJwtGrantIssuerBody scope(List scope) { - - this.scope = scope; - return this; - } - - public TrustJwtGrantIssuerBody addScopeItem(String scopeItem) { - 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 TrustJwtGrantIssuerBody subject(String subject) { - - this.subject = subject; - return this; - } - - /** - * The \"subject\" identifies the principal that is the subject of the JWT. - * @return subject - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "mike@example.com", required = true, 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; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrustJwtGrantIssuerBody trustJwtGrantIssuerBody = (TrustJwtGrantIssuerBody) o; - return Objects.equals(this.expiresAt, trustJwtGrantIssuerBody.expiresAt) && - Objects.equals(this.issuer, trustJwtGrantIssuerBody.issuer) && - Objects.equals(this.jwk, trustJwtGrantIssuerBody.jwk) && - Objects.equals(this.scope, trustJwtGrantIssuerBody.scope) && - Objects.equals(this.subject, trustJwtGrantIssuerBody.subject); - } - - @Override - public int hashCode() { - return Objects.hash(expiresAt, issuer, jwk, scope, subject); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrustJwtGrantIssuerBody {\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); - sb.append(" jwk: ").append(toIndentedString(jwk)).append("\n"); - sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 new file mode 100644 index 00000000000..565bb551398 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuer.java @@ -0,0 +1,391 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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.List; +import sh.ory.hydra.model.JsonWebKey; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * 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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class TrustOAuth2JwtGrantIssuer { + public static final String SERIALIZED_NAME_ALLOW_ANY_SUBJECT = "allow_any_subject"; + @SerializedName(SERIALIZED_NAME_ALLOW_ANY_SUBJECT) + private Boolean allowAnySubject; + + public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; + @SerializedName(SERIALIZED_NAME_EXPIRES_AT) + private OffsetDateTime expiresAt; + + public static final String SERIALIZED_NAME_ISSUER = "issuer"; + @SerializedName(SERIALIZED_NAME_ISSUER) + private String issuer; + + public static final String SERIALIZED_NAME_JWK = "jwk"; + @SerializedName(SERIALIZED_NAME_JWK) + private JsonWebKey jwk; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + private List scope = new ArrayList<>(); + + public static final String SERIALIZED_NAME_SUBJECT = "subject"; + @SerializedName(SERIALIZED_NAME_SUBJECT) + private String subject; + + 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) { + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer = (TrustOAuth2JwtGrantIssuer) o; + return Objects.equals(this.allowAnySubject, trustOAuth2JwtGrantIssuer.allowAnySubject) && + Objects.equals(this.expiresAt, trustOAuth2JwtGrantIssuer.expiresAt) && + Objects.equals(this.issuer, trustOAuth2JwtGrantIssuer.issuer) && + Objects.equals(this.jwk, trustOAuth2JwtGrantIssuer.jwk) && + Objects.equals(this.scope, trustOAuth2JwtGrantIssuer.scope) && + Objects.equals(this.subject, trustOAuth2JwtGrantIssuer.subject); + } + + @Override + public int hashCode() { + return Objects.hash(allowAnySubject, expiresAt, issuer, jwk, scope, subject); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrustOAuth2JwtGrantIssuer {\n"); + sb.append(" allowAnySubject: ").append(toIndentedString(allowAnySubject)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); + sb.append(" jwk: ").append(toIndentedString(jwk)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("allow_any_subject"); + openapiFields.add("expires_at"); + openapiFields.add("issuer"); + openapiFields.add("jwk"); + openapiFields.add("scope"); + openapiFields.add("subject"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("expires_at"); + openapiRequiredFields.add("issuer"); + openapiRequiredFields.add("jwk"); + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in TrustOAuth2JwtGrantIssuer is not found in the empty JSON string", TrustOAuth2JwtGrantIssuer.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!TrustOAuth2JwtGrantIssuer.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TrustOAuth2JwtGrantIssuer` properties. JSON: %s", entry.getKey(), jsonObj.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 (jsonObj.get("issuer") != null && !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 optional field `jwk` + if (jsonObj.getAsJsonObject("jwk") != null) { + JsonWebKey.validateJsonObject(jsonObj.getAsJsonObject("jwk")); + } + // ensure the json data is an array + if (jsonObj.get("scope") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TrustOAuth2JwtGrantIssuer.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TrustOAuth2JwtGrantIssuer' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TrustOAuth2JwtGrantIssuer.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TrustOAuth2JwtGrantIssuer value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TrustOAuth2JwtGrantIssuer read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedJsonWebKey.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedJsonWebKey.java deleted file mode 100644 index 42397592fac..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedJsonWebKey.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * TrustedJsonWebKey - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class TrustedJsonWebKey { - public static final String SERIALIZED_NAME_KID = "kid"; - @SerializedName(SERIALIZED_NAME_KID) - private String kid; - - public static final String SERIALIZED_NAME_SET = "set"; - @SerializedName(SERIALIZED_NAME_SET) - private String set; - - public TrustedJsonWebKey() { - } - - public TrustedJsonWebKey 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 TrustedJsonWebKey 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; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrustedJsonWebKey trustedJsonWebKey = (TrustedJsonWebKey) o; - return Objects.equals(this.kid, trustedJsonWebKey.kid) && - Objects.equals(this.set, trustedJsonWebKey.set); - } - - @Override - public int hashCode() { - return Objects.hash(kid, set); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrustedJsonWebKey {\n"); - sb.append(" kid: ").append(toIndentedString(kid)).append("\n"); - sb.append(" set: ").append(toIndentedString(set)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedJwtGrantIssuer.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedJwtGrantIssuer.java deleted file mode 100644 index 47ca38f005b..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedJwtGrantIssuer.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; -import sh.ory.hydra.model.TrustedJsonWebKey; - -/** - * TrustedJwtGrantIssuer - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class TrustedJwtGrantIssuer { - public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private OffsetDateTime createdAt; - - public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; - @SerializedName(SERIALIZED_NAME_EXPIRES_AT) - private OffsetDateTime expiresAt; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_ISSUER = "issuer"; - @SerializedName(SERIALIZED_NAME_ISSUER) - private String issuer; - - public static final String SERIALIZED_NAME_PUBLIC_KEY = "public_key"; - @SerializedName(SERIALIZED_NAME_PUBLIC_KEY) - private TrustedJsonWebKey publicKey; - - public static final String SERIALIZED_NAME_SCOPE = "scope"; - @SerializedName(SERIALIZED_NAME_SCOPE) - private List scope = null; - - public static final String SERIALIZED_NAME_SUBJECT = "subject"; - @SerializedName(SERIALIZED_NAME_SUBJECT) - private String subject; - - public TrustedJwtGrantIssuer() { - } - - public TrustedJwtGrantIssuer 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 TrustedJwtGrantIssuer 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 TrustedJwtGrantIssuer 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 TrustedJwtGrantIssuer 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 TrustedJwtGrantIssuer publicKey(TrustedJsonWebKey publicKey) { - - this.publicKey = publicKey; - return this; - } - - /** - * Get publicKey - * @return publicKey - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public TrustedJsonWebKey getPublicKey() { - return publicKey; - } - - - public void setPublicKey(TrustedJsonWebKey publicKey) { - this.publicKey = publicKey; - } - - - public TrustedJwtGrantIssuer scope(List scope) { - - this.scope = scope; - return this; - } - - public TrustedJwtGrantIssuer 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.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 TrustedJwtGrantIssuer 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; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TrustedJwtGrantIssuer trustedJwtGrantIssuer = (TrustedJwtGrantIssuer) o; - return Objects.equals(this.createdAt, trustedJwtGrantIssuer.createdAt) && - Objects.equals(this.expiresAt, trustedJwtGrantIssuer.expiresAt) && - Objects.equals(this.id, trustedJwtGrantIssuer.id) && - Objects.equals(this.issuer, trustedJwtGrantIssuer.issuer) && - Objects.equals(this.publicKey, trustedJwtGrantIssuer.publicKey) && - Objects.equals(this.scope, trustedJwtGrantIssuer.scope) && - Objects.equals(this.subject, trustedJwtGrantIssuer.subject); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, expiresAt, id, issuer, publicKey, scope, subject); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TrustedJwtGrantIssuer {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); - sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); - sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - 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 new file mode 100644 index 00000000000..e54d6664d1a --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuer.java @@ -0,0 +1,446 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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.List; +import sh.ory.hydra.model.TrustedOAuth2JwtGrantJsonWebKey; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * 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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class TrustedOAuth2JwtGrantIssuer { + public static final String SERIALIZED_NAME_ALLOW_ANY_SUBJECT = "allow_any_subject"; + @SerializedName(SERIALIZED_NAME_ALLOW_ANY_SUBJECT) + private Boolean allowAnySubject; + + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_EXPIRES_AT = "expires_at"; + @SerializedName(SERIALIZED_NAME_EXPIRES_AT) + private OffsetDateTime expiresAt; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_ISSUER = "issuer"; + @SerializedName(SERIALIZED_NAME_ISSUER) + private String issuer; + + public static final String SERIALIZED_NAME_PUBLIC_KEY = "public_key"; + @SerializedName(SERIALIZED_NAME_PUBLIC_KEY) + private TrustedOAuth2JwtGrantJsonWebKey publicKey; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + private List scope = null; + + public static final String SERIALIZED_NAME_SUBJECT = "subject"; + @SerializedName(SERIALIZED_NAME_SUBJECT) + private String subject; + + 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; + } + + public TrustedOAuth2JwtGrantIssuer 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.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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrustedOAuth2JwtGrantIssuer trustedOAuth2JwtGrantIssuer = (TrustedOAuth2JwtGrantIssuer) o; + return Objects.equals(this.allowAnySubject, trustedOAuth2JwtGrantIssuer.allowAnySubject) && + Objects.equals(this.createdAt, trustedOAuth2JwtGrantIssuer.createdAt) && + Objects.equals(this.expiresAt, trustedOAuth2JwtGrantIssuer.expiresAt) && + Objects.equals(this.id, trustedOAuth2JwtGrantIssuer.id) && + Objects.equals(this.issuer, trustedOAuth2JwtGrantIssuer.issuer) && + Objects.equals(this.publicKey, trustedOAuth2JwtGrantIssuer.publicKey) && + Objects.equals(this.scope, trustedOAuth2JwtGrantIssuer.scope) && + Objects.equals(this.subject, trustedOAuth2JwtGrantIssuer.subject); + } + + @Override + public int hashCode() { + return Objects.hash(allowAnySubject, createdAt, expiresAt, id, issuer, publicKey, scope, subject); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrustedOAuth2JwtGrantIssuer {\n"); + sb.append(" allowAnySubject: ").append(toIndentedString(allowAnySubject)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); + sb.append(" publicKey: ").append(toIndentedString(publicKey)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("allow_any_subject"); + openapiFields.add("created_at"); + openapiFields.add("expires_at"); + openapiFields.add("id"); + openapiFields.add("issuer"); + openapiFields.add("public_key"); + openapiFields.add("scope"); + openapiFields.add("subject"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in TrustedOAuth2JwtGrantIssuer is not found in the empty JSON string", TrustedOAuth2JwtGrantIssuer.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!TrustedOAuth2JwtGrantIssuer.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TrustedOAuth2JwtGrantIssuer` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("id") != null && !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())); + } + if (jsonObj.get("issuer") != null && !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 optional field `public_key` + if (jsonObj.getAsJsonObject("public_key") != null) { + TrustedOAuth2JwtGrantJsonWebKey.validateJsonObject(jsonObj.getAsJsonObject("public_key")); + } + // ensure the json data is an array + if (jsonObj.get("scope") != null && !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").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `subject` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subject").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TrustedOAuth2JwtGrantIssuer.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TrustedOAuth2JwtGrantIssuer' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TrustedOAuth2JwtGrantIssuer.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TrustedOAuth2JwtGrantIssuer value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TrustedOAuth2JwtGrantIssuer read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 new file mode 100644 index 00000000000..7ff22ed3911 --- /dev/null +++ b/clients/hydra/java/src/main/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKey.java @@ -0,0 +1,243 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + +/** + * 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 = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") +public class TrustedOAuth2JwtGrantJsonWebKey { + public static final String SERIALIZED_NAME_KID = "kid"; + @SerializedName(SERIALIZED_NAME_KID) + private String kid; + + public static final String SERIALIZED_NAME_SET = "set"; + @SerializedName(SERIALIZED_NAME_SET) + private String set; + + 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; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrustedOAuth2JwtGrantJsonWebKey trustedOAuth2JwtGrantJsonWebKey = (TrustedOAuth2JwtGrantJsonWebKey) o; + return Objects.equals(this.kid, trustedOAuth2JwtGrantJsonWebKey.kid) && + Objects.equals(this.set, trustedOAuth2JwtGrantJsonWebKey.set); + } + + @Override + public int hashCode() { + return Objects.hash(kid, set); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrustedOAuth2JwtGrantJsonWebKey {\n"); + sb.append(" kid: ").append(toIndentedString(kid)).append("\n"); + sb.append(" set: ").append(toIndentedString(set)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("kid"); + openapiFields.add("set"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in TrustedOAuth2JwtGrantJsonWebKey is not found in the empty JSON string", TrustedOAuth2JwtGrantJsonWebKey.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!TrustedOAuth2JwtGrantJsonWebKey.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TrustedOAuth2JwtGrantJsonWebKey` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("kid") != null && !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())); + } + if (jsonObj.get("set") != null && !jsonObj.get("set").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `set` to be a primitive type in the JSON string but got `%s`", jsonObj.get("set").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TrustedOAuth2JwtGrantJsonWebKey.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TrustedOAuth2JwtGrantJsonWebKey' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TrustedOAuth2JwtGrantJsonWebKey.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TrustedOAuth2JwtGrantJsonWebKey value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TrustedOAuth2JwtGrantJsonWebKey read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + 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 f20ce4760ab..d8630c3d02c 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,10 +24,30 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import sh.ory.hydra.JSON; + /** * Version */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-10-27T11:58:55.719856908Z[Etc/UTC]") public class Version { public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) @@ -59,6 +79,7 @@ public void setVersion(String version) { } + @Override public boolean equals(Object o) { if (this == o) { @@ -96,5 +117,93 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("version"); + + // a set of required properties/fields (JSON key names) + 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()) { + return; + } else { // has required fields + throw new IllegalArgumentException(String.format("The required field(s) %s in Version is not found in the empty JSON string", Version.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!Version.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Version` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if (jsonObj.get("version") != null && !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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!Version.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'Version' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(Version.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, Version value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public Version read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * 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 + */ + public String toJson() { + return JSON.getGson().toJson(this); + } } diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/Volume.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/Volume.java deleted file mode 100644 index e6bb8f96b1d..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/Volume.java +++ /dev/null @@ -1,347 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.HashMap; -import java.util.List; -import java.util.Map; -import sh.ory.hydra.model.VolumeUsageData; - -/** - * Volume volume - */ -@ApiModel(description = "Volume volume") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class Volume { - public static final String SERIALIZED_NAME_CREATED_AT = "CreatedAt"; - @SerializedName(SERIALIZED_NAME_CREATED_AT) - private String createdAt; - - public static final String SERIALIZED_NAME_DRIVER = "Driver"; - @SerializedName(SERIALIZED_NAME_DRIVER) - private String driver; - - public static final String SERIALIZED_NAME_LABELS = "Labels"; - @SerializedName(SERIALIZED_NAME_LABELS) - private Map labels = new HashMap<>(); - - public static final String SERIALIZED_NAME_MOUNTPOINT = "Mountpoint"; - @SerializedName(SERIALIZED_NAME_MOUNTPOINT) - private String mountpoint; - - public static final String SERIALIZED_NAME_NAME = "Name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_OPTIONS = "Options"; - @SerializedName(SERIALIZED_NAME_OPTIONS) - private Map options = new HashMap<>(); - - public static final String SERIALIZED_NAME_SCOPE = "Scope"; - @SerializedName(SERIALIZED_NAME_SCOPE) - private String scope; - - public static final String SERIALIZED_NAME_STATUS = "Status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private Object status; - - public static final String SERIALIZED_NAME_USAGE_DATA = "UsageData"; - @SerializedName(SERIALIZED_NAME_USAGE_DATA) - private VolumeUsageData usageData; - - public Volume() { - } - - public Volume createdAt(String createdAt) { - - this.createdAt = createdAt; - return this; - } - - /** - * Date/Time the volume was created. - * @return createdAt - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Date/Time the volume was created.") - - public String getCreatedAt() { - return createdAt; - } - - - public void setCreatedAt(String createdAt) { - this.createdAt = createdAt; - } - - - public Volume driver(String driver) { - - this.driver = driver; - return this; - } - - /** - * Name of the volume driver used by the volume. - * @return driver - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Name of the volume driver used by the volume.") - - public String getDriver() { - return driver; - } - - - public void setDriver(String driver) { - this.driver = driver; - } - - - public Volume labels(Map labels) { - - this.labels = labels; - return this; - } - - public Volume putLabelsItem(String key, String labelsItem) { - this.labels.put(key, labelsItem); - return this; - } - - /** - * User-defined key/value metadata. - * @return labels - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "User-defined key/value metadata.") - - public Map getLabels() { - return labels; - } - - - public void setLabels(Map labels) { - this.labels = labels; - } - - - public Volume mountpoint(String mountpoint) { - - this.mountpoint = mountpoint; - return this; - } - - /** - * Mount path of the volume on the host. - * @return mountpoint - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Mount path of the volume on the host.") - - public String getMountpoint() { - return mountpoint; - } - - - public void setMountpoint(String mountpoint) { - this.mountpoint = mountpoint; - } - - - public Volume name(String name) { - - this.name = name; - return this; - } - - /** - * Name of the volume. - * @return name - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Name of the volume.") - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Volume options(Map options) { - - this.options = options; - return this; - } - - public Volume putOptionsItem(String key, String optionsItem) { - this.options.put(key, optionsItem); - return this; - } - - /** - * The driver specific options used when creating the volume. - * @return options - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The driver specific options used when creating the volume.") - - public Map getOptions() { - return options; - } - - - public void setOptions(Map options) { - this.options = options; - } - - - public Volume scope(String scope) { - - this.scope = scope; - return this; - } - - /** - * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - * @return scope - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level.") - - public String getScope() { - return scope; - } - - - public void setScope(String scope) { - this.scope = scope; - } - - - public Volume status(Object status) { - - this.status = status; - return this; - } - - /** - * Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - * @return status - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature.") - - public Object getStatus() { - return status; - } - - - public void setStatus(Object status) { - this.status = status; - } - - - public Volume usageData(VolumeUsageData usageData) { - - this.usageData = usageData; - return this; - } - - /** - * Get usageData - * @return usageData - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - - public VolumeUsageData getUsageData() { - return usageData; - } - - - public void setUsageData(VolumeUsageData usageData) { - this.usageData = usageData; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Volume volume = (Volume) o; - return Objects.equals(this.createdAt, volume.createdAt) && - Objects.equals(this.driver, volume.driver) && - Objects.equals(this.labels, volume.labels) && - Objects.equals(this.mountpoint, volume.mountpoint) && - Objects.equals(this.name, volume.name) && - Objects.equals(this.options, volume.options) && - Objects.equals(this.scope, volume.scope) && - Objects.equals(this.status, volume.status) && - Objects.equals(this.usageData, volume.usageData); - } - - @Override - public int hashCode() { - return Objects.hash(createdAt, driver, labels, mountpoint, name, options, scope, status, usageData); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Volume {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" driver: ").append(toIndentedString(driver)).append("\n"); - sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); - sb.append(" mountpoint: ").append(toIndentedString(mountpoint)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" options: ").append(toIndentedString(options)).append("\n"); - sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" usageData: ").append(toIndentedString(usageData)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/VolumeUsageData.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/VolumeUsageData.java deleted file mode 100644 index f5c0481a5d5..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/VolumeUsageData.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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; - -/** - * VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - */ -@ApiModel(description = "VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class VolumeUsageData { - public static final String SERIALIZED_NAME_REF_COUNT = "RefCount"; - @SerializedName(SERIALIZED_NAME_REF_COUNT) - private Long refCount; - - public static final String SERIALIZED_NAME_SIZE = "Size"; - @SerializedName(SERIALIZED_NAME_SIZE) - private Long size; - - public VolumeUsageData() { - } - - public VolumeUsageData refCount(Long refCount) { - - this.refCount = refCount; - return this; - } - - /** - * The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - * @return refCount - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available.") - - public Long getRefCount() { - return refCount; - } - - - public void setRefCount(Long refCount) { - this.refCount = refCount; - } - - - public VolumeUsageData size(Long size) { - - this.size = size; - return this; - } - - /** - * Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - * @return size - **/ - @javax.annotation.Nonnull - @ApiModelProperty(required = true, value = "Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\")") - - public Long getSize() { - return size; - } - - - public void setSize(Long size) { - this.size = size; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - VolumeUsageData volumeUsageData = (VolumeUsageData) o; - return Objects.equals(this.refCount, volumeUsageData.refCount) && - Objects.equals(this.size, volumeUsageData.size); - } - - @Override - public int hashCode() { - return Objects.hash(refCount, size); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class VolumeUsageData {\n"); - sb.append(" refCount: ").append(toIndentedString(refCount)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/main/java/sh/ory/hydra/model/WellKnown.java b/clients/hydra/java/src/main/java/sh/ory/hydra/model/WellKnown.java deleted file mode 100644 index e90ed2b8fe6..00000000000 --- a/clients/hydra/java/src/main/java/sh/ory/hydra/model/WellKnown.java +++ /dev/null @@ -1,936 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -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.List; - -/** - * It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. - */ -@ApiModel(description = "It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-05-27T08:52:01.831221547Z[Etc/UTC]") -public class WellKnown { - public static final String SERIALIZED_NAME_AUTHORIZATION_ENDPOINT = "authorization_endpoint"; - @SerializedName(SERIALIZED_NAME_AUTHORIZATION_ENDPOINT) - private String authorizationEndpoint; - - public static final String SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SESSION_SUPPORTED = "backchannel_logout_session_supported"; - @SerializedName(SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SESSION_SUPPORTED) - private Boolean backchannelLogoutSessionSupported; - - public static final String SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SUPPORTED = "backchannel_logout_supported"; - @SerializedName(SERIALIZED_NAME_BACKCHANNEL_LOGOUT_SUPPORTED) - private Boolean backchannelLogoutSupported; - - public static final String SERIALIZED_NAME_CLAIMS_PARAMETER_SUPPORTED = "claims_parameter_supported"; - @SerializedName(SERIALIZED_NAME_CLAIMS_PARAMETER_SUPPORTED) - private Boolean claimsParameterSupported; - - public static final String SERIALIZED_NAME_CLAIMS_SUPPORTED = "claims_supported"; - @SerializedName(SERIALIZED_NAME_CLAIMS_SUPPORTED) - private List claimsSupported = null; - - 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; - - public static final String SERIALIZED_NAME_END_SESSION_ENDPOINT = "end_session_endpoint"; - @SerializedName(SERIALIZED_NAME_END_SESSION_ENDPOINT) - private String endSessionEndpoint; - - public static final String SERIALIZED_NAME_FRONTCHANNEL_LOGOUT_SESSION_SUPPORTED = "frontchannel_logout_session_supported"; - @SerializedName(SERIALIZED_NAME_FRONTCHANNEL_LOGOUT_SESSION_SUPPORTED) - private Boolean frontchannelLogoutSessionSupported; - - public static final String SERIALIZED_NAME_FRONTCHANNEL_LOGOUT_SUPPORTED = "frontchannel_logout_supported"; - @SerializedName(SERIALIZED_NAME_FRONTCHANNEL_LOGOUT_SUPPORTED) - private Boolean frontchannelLogoutSupported; - - public static final String SERIALIZED_NAME_GRANT_TYPES_SUPPORTED = "grant_types_supported"; - @SerializedName(SERIALIZED_NAME_GRANT_TYPES_SUPPORTED) - private List grantTypesSupported = null; - - public static final String SERIALIZED_NAME_ID_TOKEN_SIGNING_ALG_VALUES_SUPPORTED = "id_token_signing_alg_values_supported"; - @SerializedName(SERIALIZED_NAME_ID_TOKEN_SIGNING_ALG_VALUES_SUPPORTED) - private List idTokenSigningAlgValuesSupported = new ArrayList<>(); - - public static final String SERIALIZED_NAME_ISSUER = "issuer"; - @SerializedName(SERIALIZED_NAME_ISSUER) - private String issuer; - - public static final String SERIALIZED_NAME_JWKS_URI = "jwks_uri"; - @SerializedName(SERIALIZED_NAME_JWKS_URI) - private String jwksUri; - - public static final String SERIALIZED_NAME_REGISTRATION_ENDPOINT = "registration_endpoint"; - @SerializedName(SERIALIZED_NAME_REGISTRATION_ENDPOINT) - private String registrationEndpoint; - - 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; - - public static final String SERIALIZED_NAME_REQUEST_PARAMETER_SUPPORTED = "request_parameter_supported"; - @SerializedName(SERIALIZED_NAME_REQUEST_PARAMETER_SUPPORTED) - private Boolean requestParameterSupported; - - public static final String SERIALIZED_NAME_REQUEST_URI_PARAMETER_SUPPORTED = "request_uri_parameter_supported"; - @SerializedName(SERIALIZED_NAME_REQUEST_URI_PARAMETER_SUPPORTED) - private Boolean requestUriParameterSupported; - - public static final String SERIALIZED_NAME_REQUIRE_REQUEST_URI_REGISTRATION = "require_request_uri_registration"; - @SerializedName(SERIALIZED_NAME_REQUIRE_REQUEST_URI_REGISTRATION) - private Boolean requireRequestUriRegistration; - - public static final String SERIALIZED_NAME_RESPONSE_MODES_SUPPORTED = "response_modes_supported"; - @SerializedName(SERIALIZED_NAME_RESPONSE_MODES_SUPPORTED) - private List responseModesSupported = null; - - public static final String SERIALIZED_NAME_RESPONSE_TYPES_SUPPORTED = "response_types_supported"; - @SerializedName(SERIALIZED_NAME_RESPONSE_TYPES_SUPPORTED) - private List responseTypesSupported = new ArrayList<>(); - - public static final String SERIALIZED_NAME_REVOCATION_ENDPOINT = "revocation_endpoint"; - @SerializedName(SERIALIZED_NAME_REVOCATION_ENDPOINT) - private String revocationEndpoint; - - public static final String SERIALIZED_NAME_SCOPES_SUPPORTED = "scopes_supported"; - @SerializedName(SERIALIZED_NAME_SCOPES_SUPPORTED) - private List scopesSupported = null; - - public static final String SERIALIZED_NAME_SUBJECT_TYPES_SUPPORTED = "subject_types_supported"; - @SerializedName(SERIALIZED_NAME_SUBJECT_TYPES_SUPPORTED) - private List subjectTypesSupported = new ArrayList<>(); - - public static final String SERIALIZED_NAME_TOKEN_ENDPOINT = "token_endpoint"; - @SerializedName(SERIALIZED_NAME_TOKEN_ENDPOINT) - private String tokenEndpoint; - - 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; - - public static final String SERIALIZED_NAME_USERINFO_ENDPOINT = "userinfo_endpoint"; - @SerializedName(SERIALIZED_NAME_USERINFO_ENDPOINT) - private String userinfoEndpoint; - - 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; - - public WellKnown() { - } - - public WellKnown authorizationEndpoint(String authorizationEndpoint) { - - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - /** - * URL of the OP's OAuth 2.0 Authorization Endpoint. - * @return authorizationEndpoint - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "https://playground.ory.sh/ory-hydra/public/oauth2/auth", required = true, value = "URL of the OP's OAuth 2.0 Authorization Endpoint.") - - public String getAuthorizationEndpoint() { - return authorizationEndpoint; - } - - - public void setAuthorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - } - - - public WellKnown backchannelLogoutSessionSupported(Boolean backchannelLogoutSessionSupported) { - - this.backchannelLogoutSessionSupported = backchannelLogoutSessionSupported; - return this; - } - - /** - * 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 = "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 WellKnown backchannelLogoutSupported(Boolean backchannelLogoutSupported) { - - this.backchannelLogoutSupported = backchannelLogoutSupported; - return this; - } - - /** - * Boolean value specifying whether the OP supports back-channel logout, with true indicating support. - * @return backchannelLogoutSupported - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "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 WellKnown claimsParameterSupported(Boolean claimsParameterSupported) { - - this.claimsParameterSupported = claimsParameterSupported; - return this; - } - - /** - * Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. - * @return claimsParameterSupported - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "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 WellKnown claimsSupported(List claimsSupported) { - - this.claimsSupported = claimsSupported; - return this; - } - - public WellKnown addClaimsSupportedItem(String claimsSupportedItem) { - if (this.claimsSupported == null) { - this.claimsSupported = new ArrayList<>(); - } - this.claimsSupported.add(claimsSupportedItem); - return this; - } - - /** - * 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 = "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 WellKnown codeChallengeMethodsSupported(List codeChallengeMethodsSupported) { - - this.codeChallengeMethodsSupported = codeChallengeMethodsSupported; - return this; - } - - public WellKnown addCodeChallengeMethodsSupportedItem(String codeChallengeMethodsSupportedItem) { - if (this.codeChallengeMethodsSupported == null) { - this.codeChallengeMethodsSupported = new ArrayList<>(); - } - this.codeChallengeMethodsSupported.add(codeChallengeMethodsSupportedItem); - return this; - } - - /** - * 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 = "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 WellKnown endSessionEndpoint(String endSessionEndpoint) { - - this.endSessionEndpoint = endSessionEndpoint; - return this; - } - - /** - * 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 = "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 WellKnown frontchannelLogoutSessionSupported(Boolean frontchannelLogoutSessionSupported) { - - this.frontchannelLogoutSessionSupported = frontchannelLogoutSessionSupported; - return this; - } - - /** - * 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 = "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 WellKnown frontchannelLogoutSupported(Boolean frontchannelLogoutSupported) { - - this.frontchannelLogoutSupported = frontchannelLogoutSupported; - return this; - } - - /** - * Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. - * @return frontchannelLogoutSupported - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "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 WellKnown grantTypesSupported(List grantTypesSupported) { - - this.grantTypesSupported = grantTypesSupported; - return this; - } - - public WellKnown addGrantTypesSupportedItem(String grantTypesSupportedItem) { - if (this.grantTypesSupported == null) { - this.grantTypesSupported = new ArrayList<>(); - } - this.grantTypesSupported.add(grantTypesSupportedItem); - return this; - } - - /** - * JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. - * @return grantTypesSupported - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "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 WellKnown idTokenSigningAlgValuesSupported(List idTokenSigningAlgValuesSupported) { - - this.idTokenSigningAlgValuesSupported = idTokenSigningAlgValuesSupported; - return this; - } - - public WellKnown addIdTokenSigningAlgValuesSupportedItem(String idTokenSigningAlgValuesSupportedItem) { - this.idTokenSigningAlgValuesSupported.add(idTokenSigningAlgValuesSupportedItem); - return this; - } - - /** - * 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 = "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 WellKnown issuer(String issuer) { - - this.issuer = issuer; - return this; - } - - /** - * 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 = "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 WellKnown jwksUri(String jwksUri) { - - this.jwksUri = jwksUri; - return this; - } - - /** - * 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://playground.ory.sh/ory-hydra/public/.well-known/jwks.json", required = true, value = "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 WellKnown registrationEndpoint(String registrationEndpoint) { - - this.registrationEndpoint = registrationEndpoint; - return this; - } - - /** - * URL of the OP's Dynamic Client Registration Endpoint. - * @return registrationEndpoint - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "https://playground.ory.sh/ory-hydra/admin/client", value = "URL of the OP's Dynamic Client Registration Endpoint.") - - public String getRegistrationEndpoint() { - return registrationEndpoint; - } - - - public void setRegistrationEndpoint(String registrationEndpoint) { - this.registrationEndpoint = registrationEndpoint; - } - - - public WellKnown requestObjectSigningAlgValuesSupported(List requestObjectSigningAlgValuesSupported) { - - this.requestObjectSigningAlgValuesSupported = requestObjectSigningAlgValuesSupported; - return this; - } - - public WellKnown addRequestObjectSigningAlgValuesSupportedItem(String requestObjectSigningAlgValuesSupportedItem) { - if (this.requestObjectSigningAlgValuesSupported == null) { - this.requestObjectSigningAlgValuesSupported = new ArrayList<>(); - } - this.requestObjectSigningAlgValuesSupported.add(requestObjectSigningAlgValuesSupportedItem); - return this; - } - - /** - * 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 = "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 WellKnown requestParameterSupported(Boolean requestParameterSupported) { - - this.requestParameterSupported = requestParameterSupported; - return this; - } - - /** - * Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. - * @return requestParameterSupported - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "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 WellKnown requestUriParameterSupported(Boolean requestUriParameterSupported) { - - this.requestUriParameterSupported = requestUriParameterSupported; - return this; - } - - /** - * Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. - * @return requestUriParameterSupported - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "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 WellKnown requireRequestUriRegistration(Boolean requireRequestUriRegistration) { - - this.requireRequestUriRegistration = requireRequestUriRegistration; - return this; - } - - /** - * 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 = "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 WellKnown responseModesSupported(List responseModesSupported) { - - this.responseModesSupported = responseModesSupported; - return this; - } - - public WellKnown addResponseModesSupportedItem(String responseModesSupportedItem) { - if (this.responseModesSupported == null) { - this.responseModesSupported = new ArrayList<>(); - } - this.responseModesSupported.add(responseModesSupportedItem); - return this; - } - - /** - * JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. - * @return responseModesSupported - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "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 WellKnown responseTypesSupported(List responseTypesSupported) { - - this.responseTypesSupported = responseTypesSupported; - return this; - } - - public WellKnown addResponseTypesSupportedItem(String responseTypesSupportedItem) { - this.responseTypesSupported.add(responseTypesSupportedItem); - return this; - } - - /** - * 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 = "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 WellKnown revocationEndpoint(String revocationEndpoint) { - - this.revocationEndpoint = revocationEndpoint; - return this; - } - - /** - * URL of the authorization server's OAuth 2.0 revocation endpoint. - * @return revocationEndpoint - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "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 WellKnown scopesSupported(List scopesSupported) { - - this.scopesSupported = scopesSupported; - return this; - } - - public WellKnown addScopesSupportedItem(String scopesSupportedItem) { - if (this.scopesSupported == null) { - this.scopesSupported = new ArrayList<>(); - } - this.scopesSupported.add(scopesSupportedItem); - return this; - } - - /** - * SON 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 = "SON 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 WellKnown subjectTypesSupported(List subjectTypesSupported) { - - this.subjectTypesSupported = subjectTypesSupported; - return this; - } - - public WellKnown addSubjectTypesSupportedItem(String subjectTypesSupportedItem) { - this.subjectTypesSupported.add(subjectTypesSupportedItem); - return this; - } - - /** - * 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 = "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 WellKnown tokenEndpoint(String tokenEndpoint) { - - this.tokenEndpoint = tokenEndpoint; - return this; - } - - /** - * URL of the OP's OAuth 2.0 Token Endpoint - * @return tokenEndpoint - **/ - @javax.annotation.Nonnull - @ApiModelProperty(example = "https://playground.ory.sh/ory-hydra/public/oauth2/token", required = true, value = "URL of the OP's OAuth 2.0 Token Endpoint") - - public String getTokenEndpoint() { - return tokenEndpoint; - } - - - public void setTokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - } - - - public WellKnown tokenEndpointAuthMethodsSupported(List tokenEndpointAuthMethodsSupported) { - - this.tokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported; - return this; - } - - public WellKnown addTokenEndpointAuthMethodsSupportedItem(String tokenEndpointAuthMethodsSupportedItem) { - if (this.tokenEndpointAuthMethodsSupported == null) { - this.tokenEndpointAuthMethodsSupported = new ArrayList<>(); - } - this.tokenEndpointAuthMethodsSupported.add(tokenEndpointAuthMethodsSupportedItem); - return this; - } - - /** - * 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 = "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 WellKnown userinfoEndpoint(String userinfoEndpoint) { - - this.userinfoEndpoint = userinfoEndpoint; - return this; - } - - /** - * URL of the OP's UserInfo Endpoint. - * @return userinfoEndpoint - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "URL of the OP's UserInfo Endpoint.") - - public String getUserinfoEndpoint() { - return userinfoEndpoint; - } - - - public void setUserinfoEndpoint(String userinfoEndpoint) { - this.userinfoEndpoint = userinfoEndpoint; - } - - - public WellKnown userinfoSigningAlgValuesSupported(List userinfoSigningAlgValuesSupported) { - - this.userinfoSigningAlgValuesSupported = userinfoSigningAlgValuesSupported; - return this; - } - - public WellKnown addUserinfoSigningAlgValuesSupportedItem(String userinfoSigningAlgValuesSupportedItem) { - if (this.userinfoSigningAlgValuesSupported == null) { - this.userinfoSigningAlgValuesSupported = new ArrayList<>(); - } - this.userinfoSigningAlgValuesSupported.add(userinfoSigningAlgValuesSupportedItem); - return this; - } - - /** - * 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 = "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; - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WellKnown wellKnown = (WellKnown) o; - return Objects.equals(this.authorizationEndpoint, wellKnown.authorizationEndpoint) && - Objects.equals(this.backchannelLogoutSessionSupported, wellKnown.backchannelLogoutSessionSupported) && - Objects.equals(this.backchannelLogoutSupported, wellKnown.backchannelLogoutSupported) && - Objects.equals(this.claimsParameterSupported, wellKnown.claimsParameterSupported) && - Objects.equals(this.claimsSupported, wellKnown.claimsSupported) && - Objects.equals(this.codeChallengeMethodsSupported, wellKnown.codeChallengeMethodsSupported) && - Objects.equals(this.endSessionEndpoint, wellKnown.endSessionEndpoint) && - Objects.equals(this.frontchannelLogoutSessionSupported, wellKnown.frontchannelLogoutSessionSupported) && - Objects.equals(this.frontchannelLogoutSupported, wellKnown.frontchannelLogoutSupported) && - Objects.equals(this.grantTypesSupported, wellKnown.grantTypesSupported) && - Objects.equals(this.idTokenSigningAlgValuesSupported, wellKnown.idTokenSigningAlgValuesSupported) && - Objects.equals(this.issuer, wellKnown.issuer) && - Objects.equals(this.jwksUri, wellKnown.jwksUri) && - Objects.equals(this.registrationEndpoint, wellKnown.registrationEndpoint) && - Objects.equals(this.requestObjectSigningAlgValuesSupported, wellKnown.requestObjectSigningAlgValuesSupported) && - Objects.equals(this.requestParameterSupported, wellKnown.requestParameterSupported) && - Objects.equals(this.requestUriParameterSupported, wellKnown.requestUriParameterSupported) && - Objects.equals(this.requireRequestUriRegistration, wellKnown.requireRequestUriRegistration) && - Objects.equals(this.responseModesSupported, wellKnown.responseModesSupported) && - Objects.equals(this.responseTypesSupported, wellKnown.responseTypesSupported) && - Objects.equals(this.revocationEndpoint, wellKnown.revocationEndpoint) && - Objects.equals(this.scopesSupported, wellKnown.scopesSupported) && - Objects.equals(this.subjectTypesSupported, wellKnown.subjectTypesSupported) && - Objects.equals(this.tokenEndpoint, wellKnown.tokenEndpoint) && - Objects.equals(this.tokenEndpointAuthMethodsSupported, wellKnown.tokenEndpointAuthMethodsSupported) && - Objects.equals(this.userinfoEndpoint, wellKnown.userinfoEndpoint) && - Objects.equals(this.userinfoSigningAlgValuesSupported, wellKnown.userinfoSigningAlgValuesSupported); - } - - @Override - public int hashCode() { - return Objects.hash(authorizationEndpoint, backchannelLogoutSessionSupported, backchannelLogoutSupported, claimsParameterSupported, claimsSupported, codeChallengeMethodsSupported, endSessionEndpoint, frontchannelLogoutSessionSupported, frontchannelLogoutSupported, grantTypesSupported, idTokenSigningAlgValuesSupported, issuer, jwksUri, registrationEndpoint, requestObjectSigningAlgValuesSupported, requestParameterSupported, requestUriParameterSupported, requireRequestUriRegistration, responseModesSupported, responseTypesSupported, revocationEndpoint, scopesSupported, subjectTypesSupported, tokenEndpoint, tokenEndpointAuthMethodsSupported, userinfoEndpoint, userinfoSigningAlgValuesSupported); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WellKnown {\n"); - sb.append(" authorizationEndpoint: ").append(toIndentedString(authorizationEndpoint)).append("\n"); - sb.append(" backchannelLogoutSessionSupported: ").append(toIndentedString(backchannelLogoutSessionSupported)).append("\n"); - sb.append(" backchannelLogoutSupported: ").append(toIndentedString(backchannelLogoutSupported)).append("\n"); - sb.append(" claimsParameterSupported: ").append(toIndentedString(claimsParameterSupported)).append("\n"); - sb.append(" claimsSupported: ").append(toIndentedString(claimsSupported)).append("\n"); - sb.append(" codeChallengeMethodsSupported: ").append(toIndentedString(codeChallengeMethodsSupported)).append("\n"); - sb.append(" endSessionEndpoint: ").append(toIndentedString(endSessionEndpoint)).append("\n"); - sb.append(" frontchannelLogoutSessionSupported: ").append(toIndentedString(frontchannelLogoutSessionSupported)).append("\n"); - sb.append(" frontchannelLogoutSupported: ").append(toIndentedString(frontchannelLogoutSupported)).append("\n"); - sb.append(" grantTypesSupported: ").append(toIndentedString(grantTypesSupported)).append("\n"); - sb.append(" idTokenSigningAlgValuesSupported: ").append(toIndentedString(idTokenSigningAlgValuesSupported)).append("\n"); - sb.append(" issuer: ").append(toIndentedString(issuer)).append("\n"); - sb.append(" jwksUri: ").append(toIndentedString(jwksUri)).append("\n"); - sb.append(" registrationEndpoint: ").append(toIndentedString(registrationEndpoint)).append("\n"); - sb.append(" requestObjectSigningAlgValuesSupported: ").append(toIndentedString(requestObjectSigningAlgValuesSupported)).append("\n"); - sb.append(" requestParameterSupported: ").append(toIndentedString(requestParameterSupported)).append("\n"); - sb.append(" requestUriParameterSupported: ").append(toIndentedString(requestUriParameterSupported)).append("\n"); - sb.append(" requireRequestUriRegistration: ").append(toIndentedString(requireRequestUriRegistration)).append("\n"); - sb.append(" responseModesSupported: ").append(toIndentedString(responseModesSupported)).append("\n"); - sb.append(" responseTypesSupported: ").append(toIndentedString(responseTypesSupported)).append("\n"); - sb.append(" revocationEndpoint: ").append(toIndentedString(revocationEndpoint)).append("\n"); - sb.append(" scopesSupported: ").append(toIndentedString(scopesSupported)).append("\n"); - sb.append(" subjectTypesSupported: ").append(toIndentedString(subjectTypesSupported)).append("\n"); - sb.append(" tokenEndpoint: ").append(toIndentedString(tokenEndpoint)).append("\n"); - sb.append(" tokenEndpointAuthMethodsSupported: ").append(toIndentedString(tokenEndpointAuthMethodsSupported)).append("\n"); - sb.append(" userinfoEndpoint: ").append(toIndentedString(userinfoEndpoint)).append("\n"); - sb.append(" userinfoSigningAlgValuesSupported: ").append(toIndentedString(userinfoSigningAlgValuesSupported)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/api/AdminApiTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/api/AdminApiTest.java deleted file mode 100644 index 61f5a5ff993..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/api/AdminApiTest.java +++ /dev/null @@ -1,585 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.api; - -import sh.ory.hydra.ApiException; -import sh.ory.hydra.model.AcceptConsentRequest; -import sh.ory.hydra.model.AcceptLoginRequest; -import sh.ory.hydra.model.CompletedRequest; -import sh.ory.hydra.model.ConsentRequest; -import sh.ory.hydra.model.FlushInactiveOAuth2TokensRequest; -import sh.ory.hydra.model.GenericError; -import sh.ory.hydra.model.HealthStatus; -import sh.ory.hydra.model.JSONWebKey; -import sh.ory.hydra.model.JSONWebKeySet; -import sh.ory.hydra.model.JsonError; -import sh.ory.hydra.model.JsonWebKeySetGeneratorRequest; -import sh.ory.hydra.model.LoginRequest; -import sh.ory.hydra.model.LogoutRequest; -import sh.ory.hydra.model.OAuth2Client; -import sh.ory.hydra.model.OAuth2TokenIntrospection; -import sh.ory.hydra.model.PatchDocument; -import sh.ory.hydra.model.PreviousConsentSession; -import sh.ory.hydra.model.RejectRequest; -import sh.ory.hydra.model.RequestWasHandledResponse; -import sh.ory.hydra.model.TrustJwtGrantIssuerBody; -import sh.ory.hydra.model.TrustedJwtGrantIssuer; -import sh.ory.hydra.model.Version; -import org.junit.Test; -import org.junit.Ignore; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AdminApi - */ -@Ignore -public class AdminApiTest { - - private final AdminApi api = new AdminApi(); - - - /** - * Accept a Consent Request - * - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void acceptConsentRequestTest() throws ApiException { - String consentChallenge = null; - AcceptConsentRequest body = null; - CompletedRequest response = api.acceptConsentRequest(consentChallenge, body); - // TODO: test validations - } - - /** - * Accept a Login Request - * - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void acceptLoginRequestTest() throws ApiException { - String loginChallenge = null; - AcceptLoginRequest body = null; - CompletedRequest response = api.acceptLoginRequest(loginChallenge, body); - // TODO: test validations - } - - /** - * Accept a Logout Request - * - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void acceptLogoutRequestTest() throws ApiException { - String logoutChallenge = null; - CompletedRequest response = api.acceptLogoutRequest(logoutChallenge); - // TODO: test validations - } - - /** - * Generate a New 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createJsonWebKeySetTest() throws ApiException { - String set = null; - JsonWebKeySetGeneratorRequest body = null; - JSONWebKeySet response = api.createJsonWebKeySet(set, body); - // TODO: test validations - } - - /** - * Create an OAuth 2.0 Client - * - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createOAuth2ClientTest() throws ApiException { - OAuth2Client body = null; - OAuth2Client response = api.createOAuth2Client(body); - // TODO: test validations - } - - /** - * Delete a 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteJsonWebKeyTest() throws ApiException { - String kid = null; - String set = null; - api.deleteJsonWebKey(kid, set); - // TODO: test validations - } - - /** - * Delete a 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteJsonWebKeySetTest() throws ApiException { - String set = null; - api.deleteJsonWebKeySet(set); - // TODO: test validations - } - - /** - * Deletes an 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteOAuth2ClientTest() throws ApiException { - String id = null; - api.deleteOAuth2Client(id); - // TODO: test validations - } - - /** - * Delete OAuth2 Access Tokens from a Client - * - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteOAuth2TokenTest() throws ApiException { - String clientId = null; - api.deleteOAuth2Token(clientId); - // TODO: test validations - } - - /** - * Delete a 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteTrustedJwtGrantIssuerTest() throws ApiException { - String id = null; - api.deleteTrustedJwtGrantIssuer(id); - // TODO: test validations - } - - /** - * Flush Expired OAuth2 Access Tokens - * - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void flushInactiveOAuth2TokensTest() throws ApiException { - FlushInactiveOAuth2TokensRequest body = null; - api.flushInactiveOAuth2Tokens(body); - // TODO: test validations - } - - /** - * Get Consent Request Information - * - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getConsentRequestTest() throws ApiException { - String consentChallenge = null; - ConsentRequest response = api.getConsentRequest(consentChallenge); - // TODO: test validations - } - - /** - * Fetch a JSON Web Key - * - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getJsonWebKeyTest() throws ApiException { - String kid = null; - String set = null; - JSONWebKeySet response = api.getJsonWebKey(kid, set); - // TODO: test validations - } - - /** - * 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getJsonWebKeySetTest() throws ApiException { - String set = null; - JSONWebKeySet response = api.getJsonWebKeySet(set); - // TODO: test validations - } - - /** - * Get a Login Request - * - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getLoginRequestTest() throws ApiException { - String loginChallenge = null; - LoginRequest response = api.getLoginRequest(loginChallenge); - // TODO: test validations - } - - /** - * Get a Logout Request - * - * Use this endpoint to fetch a logout request. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getLogoutRequestTest() throws ApiException { - String logoutChallenge = null; - LogoutRequest response = api.getLogoutRequest(logoutChallenge); - // TODO: test validations - } - - /** - * 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getOAuth2ClientTest() throws ApiException { - String id = null; - OAuth2Client response = api.getOAuth2Client(id); - // TODO: test validations - } - - /** - * Get a 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getTrustedJwtGrantIssuerTest() throws ApiException { - String id = null; - TrustedJwtGrantIssuer response = api.getTrustedJwtGrantIssuer(id); - // TODO: test validations - } - - /** - * Get Service Version - * - * This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getVersionTest() throws ApiException { - Version response = api.getVersion(); - // TODO: test validations - } - - /** - * Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void introspectOAuth2TokenTest() throws ApiException { - String token = null; - String scope = null; - OAuth2TokenIntrospection response = api.introspectOAuth2Token(token, scope); - // TODO: test validations - } - - /** - * Check Alive Status - * - * This endpoint returns a 200 status code when the HTTP server is up running. 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void isInstanceAliveTest() throws ApiException { - HealthStatus response = api.isInstanceAlive(); - // TODO: test validations - } - - /** - * 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void listOAuth2ClientsTest() throws ApiException { - Long limit = null; - Long offset = null; - String clientName = null; - String owner = null; - List response = api.listOAuth2Clients(limit, offset, clientName, owner); - // TODO: test validations - } - - /** - * Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void listSubjectConsentSessionsTest() throws ApiException { - String subject = null; - List response = api.listSubjectConsentSessions(subject); - // TODO: test validations - } - - /** - * List Trusted OAuth2 JWT Bearer Grant Type Issuers - * - * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void listTrustedJwtGrantIssuersTest() throws ApiException { - String issuer = null; - Long limit = null; - Long offset = null; - List response = api.listTrustedJwtGrantIssuers(issuer, limit, offset); - // TODO: test validations - } - - /** - * Patch an OAuth 2.0 Client - * - * Patch an existing OAuth 2.0 Client. 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void patchOAuth2ClientTest() throws ApiException { - String id = null; - List body = null; - OAuth2Client response = api.patchOAuth2Client(id, body); - // TODO: test validations - } - - /** - * Reject a Consent Request - * - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void rejectConsentRequestTest() throws ApiException { - String consentChallenge = null; - RejectRequest body = null; - CompletedRequest response = api.rejectConsentRequest(consentChallenge, body); - // TODO: test validations - } - - /** - * Reject a Login Request - * - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void rejectLoginRequestTest() throws ApiException { - String loginChallenge = null; - RejectRequest body = null; - CompletedRequest response = api.rejectLoginRequest(loginChallenge, body); - // TODO: test validations - } - - /** - * Reject a Logout Request - * - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void rejectLogoutRequestTest() throws ApiException { - String logoutChallenge = null; - RejectRequest body = null; - api.rejectLogoutRequest(logoutChallenge, body); - // TODO: test validations - } - - /** - * Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - * - * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void revokeAuthenticationSessionTest() throws ApiException { - String subject = null; - api.revokeAuthenticationSession(subject); - // TODO: test validations - } - - /** - * Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * - * This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void revokeConsentSessionsTest() throws ApiException { - String subject = null; - String client = null; - Boolean all = null; - api.revokeConsentSessions(subject, client, all); - // TODO: test validations - } - - /** - * Trust an 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). - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void trustJwtGrantIssuerTest() throws ApiException { - TrustJwtGrantIssuerBody body = null; - TrustedJwtGrantIssuer response = api.trustJwtGrantIssuer(body); - // TODO: test validations - } - - /** - * Update a 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updateJsonWebKeyTest() throws ApiException { - String kid = null; - String set = null; - JSONWebKey body = null; - JSONWebKey response = api.updateJsonWebKey(kid, set, body); - // TODO: test validations - } - - /** - * 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updateJsonWebKeySetTest() throws ApiException { - String set = null; - JSONWebKeySet body = null; - JSONWebKeySet response = api.updateJsonWebKeySet(set, body); - // TODO: test validations - } - - /** - * Update an OAuth 2.0 Client - * - * Update an existing OAuth 2.0 Client. 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updateOAuth2ClientTest() throws ApiException { - String id = null; - OAuth2Client body = null; - OAuth2Client response = api.updateOAuth2Client(id, body); - // TODO: test validations - } - -} 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 new file mode 100644 index 00000000000..7d017e95062 --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/api/JwkApiTest.java @@ -0,0 +1,141 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.api; + +import sh.ory.hydra.ApiException; +import sh.ory.hydra.model.CreateJsonWebKeySet; +import sh.ory.hydra.model.ErrorOAuth2; +import sh.ory.hydra.model.JsonWebKey; +import sh.ory.hydra.model.JsonWebKeySet; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for JwkApi + */ +@Disabled +public class JwkApiTest { + + private final JwkApi api = new JwkApi(); + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createJsonWebKeySetTest() throws ApiException { + String set = null; + CreateJsonWebKeySet createJsonWebKeySet = null; + JsonWebKeySet response = api.createJsonWebKeySet(set, createJsonWebKeySet); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteJsonWebKeyTest() throws ApiException { + String set = null; + String kid = null; + api.deleteJsonWebKey(set, kid); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteJsonWebKeySetTest() throws ApiException { + String set = null; + api.deleteJsonWebKeySet(set); + // TODO: test validations + } + + /** + * 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). + * + * @throws ApiException if the Api call fails + */ + @Test + public void getJsonWebKeyTest() throws ApiException { + String set = null; + String kid = null; + JsonWebKeySet response = api.getJsonWebKey(set, kid); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getJsonWebKeySetTest() throws ApiException { + String set = null; + JsonWebKeySet response = api.getJsonWebKeySet(set); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void setJsonWebKeyTest() throws ApiException { + String set = null; + String kid = null; + JsonWebKey jsonWebKey = null; + JsonWebKey response = api.setJsonWebKey(set, kid, jsonWebKey); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void setJsonWebKeySetTest() throws ApiException { + String set = null; + JsonWebKeySet jsonWebKeySet = null; + JsonWebKeySet response = api.setJsonWebKeySet(set, jsonWebKeySet); + // TODO: test validations + } + +} 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 3ecabf38bb0..5746f3a1fb0 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,8 +14,13 @@ package sh.ory.hydra.api; import sh.ory.hydra.ApiException; -import org.junit.Test; -import org.junit.Ignore; +import sh.ory.hydra.model.GenericError; +import sh.ory.hydra.model.GetVersion200Response; +import sh.ory.hydra.model.HealthStatus; +import sh.ory.hydra.model.IsReady200Response; +import sh.ory.hydra.model.IsReady503Response; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -25,24 +30,48 @@ /** * API tests for MetadataApi */ -@Ignore +@Disabled public class MetadataApiTest { private final MetadataApi api = new MetadataApi(); - /** - * Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + * Return Running Software Version. * - * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + * 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. * - * @throws ApiException - * if the Api call fails + * @throws ApiException if the Api call fails */ @Test - public void prometheusTest() throws ApiException { - api.prometheus(); + public void getVersionTest() throws ApiException { + GetVersion200Response response = api.getVersion(); // TODO: test validations } - + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void isAliveTest() throws ApiException { + HealthStatus response = api.isAlive(); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void isReadyTest() throws ApiException { + IsReady200Response response = api.isReady(); + // TODO: test validations + } + } 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 new file mode 100644 index 00000000000..75af7da28ee --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/api/OAuth2ApiTest.java @@ -0,0 +1,462 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.api; + +import sh.ory.hydra.ApiException; +import sh.ory.hydra.model.AcceptOAuth2ConsentRequest; +import sh.ory.hydra.model.AcceptOAuth2LoginRequest; +import sh.ory.hydra.model.ErrorOAuth2; +import sh.ory.hydra.model.GenericError; +import sh.ory.hydra.model.IntrospectedOAuth2Token; +import sh.ory.hydra.model.JsonPatch; +import sh.ory.hydra.model.OAuth2Client; +import sh.ory.hydra.model.OAuth2ClientTokenLifespans; +import sh.ory.hydra.model.OAuth2ConsentRequest; +import sh.ory.hydra.model.OAuth2ConsentSession; +import sh.ory.hydra.model.OAuth2LoginRequest; +import sh.ory.hydra.model.OAuth2LogoutRequest; +import sh.ory.hydra.model.OAuth2RedirectTo; +import sh.ory.hydra.model.OAuth2TokenExchange; +import sh.ory.hydra.model.RejectOAuth2Request; +import sh.ory.hydra.model.TrustOAuth2JwtGrantIssuer; +import sh.ory.hydra.model.TrustedOAuth2JwtGrantIssuer; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OAuth2Api + */ +@Disabled +public class OAuth2ApiTest { + + private final OAuth2Api api = new OAuth2Api(); + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void acceptOAuth2ConsentRequestTest() throws ApiException { + String consentChallenge = null; + AcceptOAuth2ConsentRequest acceptOAuth2ConsentRequest = null; + OAuth2RedirectTo response = api.acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void acceptOAuth2LoginRequestTest() throws ApiException { + String loginChallenge = null; + AcceptOAuth2LoginRequest acceptOAuth2LoginRequest = null; + OAuth2RedirectTo response = api.acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void acceptOAuth2LogoutRequestTest() throws ApiException { + String logoutChallenge = null; + OAuth2RedirectTo response = api.acceptOAuth2LogoutRequest(logoutChallenge); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createOAuth2ClientTest() throws ApiException { + OAuth2Client oauth2Client = null; + OAuth2Client response = api.createOAuth2Client(oauth2Client); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOAuth2ClientTest() throws ApiException { + String id = null; + api.deleteOAuth2Client(id); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOAuth2TokenTest() throws ApiException { + String clientId = null; + api.deleteOAuth2Token(clientId); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteTrustedOAuth2JwtGrantIssuerTest() throws ApiException { + String id = null; + api.deleteTrustedOAuth2JwtGrantIssuer(id); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOAuth2ClientTest() throws ApiException { + String id = null; + OAuth2Client response = api.getOAuth2Client(id); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOAuth2ConsentRequestTest() throws ApiException { + String consentChallenge = null; + OAuth2ConsentRequest response = api.getOAuth2ConsentRequest(consentChallenge); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOAuth2LoginRequestTest() throws ApiException { + String loginChallenge = null; + OAuth2LoginRequest response = api.getOAuth2LoginRequest(loginChallenge); + // TODO: test validations + } + + /** + * Get OAuth 2.0 Session Logout Request + * + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOAuth2LogoutRequestTest() throws ApiException { + String logoutChallenge = null; + OAuth2LogoutRequest response = api.getOAuth2LogoutRequest(logoutChallenge); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getTrustedOAuth2JwtGrantIssuerTest() throws ApiException { + String id = null; + TrustedOAuth2JwtGrantIssuer response = api.getTrustedOAuth2JwtGrantIssuer(id); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void introspectOAuth2TokenTest() throws ApiException { + String token = null; + String scope = null; + IntrospectedOAuth2Token response = api.introspectOAuth2Token(token, scope); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void listOAuth2ClientsTest() throws ApiException { + Long pageSize = null; + String pageToken = null; + String clientName = null; + String owner = null; + List response = api.listOAuth2Clients(pageSize, pageToken, clientName, owner); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void listOAuth2ConsentSessionsTest() throws ApiException { + String subject = null; + Long pageSize = null; + String pageToken = null; + List response = api.listOAuth2ConsentSessions(subject, pageSize, pageToken); + // TODO: test validations + } + + /** + * List Trusted OAuth2 JWT Bearer Grant Type Issuers + * + * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + * + * @throws ApiException if the Api call fails + */ + @Test + public void listTrustedOAuth2JwtGrantIssuersTest() throws ApiException { + Long maxItems = null; + Long defaultItems = null; + String issuer = null; + List response = api.listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void oAuth2AuthorizeTest() throws ApiException { + ErrorOAuth2 response = api.oAuth2Authorize(); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void oauth2TokenExchangeTest() throws ApiException { + String grantType = null; + String clientId = null; + String code = null; + String redirectUri = null; + String refreshToken = null; + OAuth2TokenExchange response = api.oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void patchOAuth2ClientTest() throws ApiException { + String id = null; + List jsonPatch = null; + OAuth2Client response = api.patchOAuth2Client(id, jsonPatch); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void rejectOAuth2ConsentRequestTest() throws ApiException { + String consentChallenge = null; + RejectOAuth2Request rejectOAuth2Request = null; + OAuth2RedirectTo response = api.rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void rejectOAuth2LoginRequestTest() throws ApiException { + String loginChallenge = null; + RejectOAuth2Request rejectOAuth2Request = null; + OAuth2RedirectTo response = api.rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void rejectOAuth2LogoutRequestTest() throws ApiException { + String logoutChallenge = null; + api.rejectOAuth2LogoutRequest(logoutChallenge); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void revokeOAuth2ConsentSessionsTest() throws ApiException { + String subject = null; + String client = null; + Boolean all = null; + api.revokeOAuth2ConsentSessions(subject, client, all); + // TODO: test validations + } + + /** + * Revokes All OAuth 2.0 Login Sessions of a Subject + * + * This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + * + * @throws ApiException if the Api call fails + */ + @Test + public void revokeOAuth2LoginSessionsTest() throws ApiException { + String subject = null; + api.revokeOAuth2LoginSessions(subject); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void revokeOAuth2TokenTest() throws ApiException { + String token = null; + api.revokeOAuth2Token(token); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void setOAuth2ClientTest() throws ApiException { + String id = null; + OAuth2Client oauth2Client = null; + OAuth2Client response = api.setOAuth2Client(id, oauth2Client); + // TODO: test validations + } + + /** + * Set OAuth2 Client Token Lifespans + * + * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + * + * @throws ApiException if the Api call fails + */ + @Test + public void setOAuth2ClientLifespansTest() throws ApiException { + String id = null; + OAuth2ClientTokenLifespans oauth2ClientTokenLifespans = null; + OAuth2Client response = api.setOAuth2ClientLifespans(id, oauth2ClientTokenLifespans); + // TODO: test validations + } + + /** + * 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). + * + * @throws ApiException if the Api call fails + */ + @Test + public void trustOAuth2JwtGrantIssuerTest() throws ApiException { + TrustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer = null; + TrustedOAuth2JwtGrantIssuer response = api.trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer); + // TODO: test validations + } + +} 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 new file mode 100644 index 00000000000..672ee1179a5 --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/api/OidcApiTest.java @@ -0,0 +1,134 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.api; + +import sh.ory.hydra.ApiException; +import sh.ory.hydra.model.ErrorOAuth2; +import sh.ory.hydra.model.GenericError; +import sh.ory.hydra.model.OAuth2Client; +import sh.ory.hydra.model.OidcConfiguration; +import sh.ory.hydra.model.OidcUserInfo; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OidcApi + */ +@Disabled +public class OidcApiTest { + + private final OidcApi api = new OidcApi(); + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createOidcDynamicClientTest() throws ApiException { + OAuth2Client oauth2Client = null; + OAuth2Client response = api.createOidcDynamicClient(oauth2Client); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteOidcDynamicClientTest() throws ApiException { + String id = null; + api.deleteOidcDynamicClient(id); + // TODO: test validations + } + + /** + * 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/ + * + * @throws ApiException if the Api call fails + */ + @Test + public void discoverOidcConfigurationTest() throws ApiException { + OidcConfiguration response = api.discoverOidcConfiguration(); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOidcDynamicClientTest() throws ApiException { + String id = null; + OAuth2Client response = api.getOidcDynamicClient(id); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOidcUserInfoTest() throws ApiException { + OidcUserInfo response = api.getOidcUserInfo(); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void revokeOidcSessionTest() throws ApiException { + api.revokeOidcSession(); + // TODO: test validations + } + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void setOidcDynamicClientTest() throws ApiException { + String id = null; + OAuth2Client oauth2Client = null; + OAuth2Client response = api.setOidcDynamicClient(id, oauth2Client); + // TODO: test validations + } + +} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/api/PublicApiTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/api/PublicApiTest.java deleted file mode 100644 index bc36f7722f4..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/api/PublicApiTest.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.api; - -import sh.ory.hydra.ApiException; -import sh.ory.hydra.model.HealthNotReadyStatus; -import sh.ory.hydra.model.HealthStatus; -import sh.ory.hydra.model.JSONWebKeySet; -import sh.ory.hydra.model.JsonError; -import sh.ory.hydra.model.OAuth2Client; -import sh.ory.hydra.model.Oauth2TokenResponse; -import sh.ory.hydra.model.UserinfoResponse; -import sh.ory.hydra.model.WellKnown; -import org.junit.Test; -import org.junit.Ignore; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PublicApi - */ -@Ignore -public class PublicApiTest { - - private final PublicApi api = new PublicApi(); - - - /** - * OpenID Connect Front-Backchannel Enabled Logout - * - * This endpoint initiates and completes user logout at Ory Hydra 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 - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void disconnectUserTest() throws ApiException { - api.disconnectUser(); - // TODO: test validations - } - - /** - * OpenID Connect Discovery - * - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void discoverOpenIDConfigurationTest() throws ApiException { - WellKnown response = api.discoverOpenIDConfiguration(); - // TODO: test validations - } - - /** - * Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void dynamicClientRegistrationCreateOAuth2ClientTest() throws ApiException { - OAuth2Client body = null; - OAuth2Client response = api.dynamicClientRegistrationCreateOAuth2Client(body); - // TODO: test validations - } - - /** - * Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void dynamicClientRegistrationDeleteOAuth2ClientTest() throws ApiException { - String id = null; - api.dynamicClientRegistrationDeleteOAuth2Client(id); - // TODO: test validations - } - - /** - * Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * 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. 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void dynamicClientRegistrationGetOAuth2ClientTest() throws ApiException { - String id = null; - OAuth2Client response = api.dynamicClientRegistrationGetOAuth2Client(id); - // TODO: test validations - } - - /** - * Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void dynamicClientRegistrationUpdateOAuth2ClientTest() throws ApiException { - String id = null; - OAuth2Client body = null; - OAuth2Client response = api.dynamicClientRegistrationUpdateOAuth2Client(id, body); - // TODO: test validations - } - - /** - * Check Readiness Status - * - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void isInstanceReadyTest() throws ApiException { - HealthStatus response = api.isInstanceReady(); - // TODO: test validations - } - - /** - * The OAuth 2.0 Token Endpoint - * - * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void oauth2TokenTest() throws ApiException { - String grantType = null; - String code = null; - String refreshToken = null; - String redirectUri = null; - String clientId = null; - Oauth2TokenResponse response = api.oauth2Token(grantType, code, refreshToken, redirectUri, clientId); - // TODO: test validations - } - - /** - * The OAuth 2.0 Authorize Endpoint - * - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void oauthAuthTest() throws ApiException { - api.oauthAuth(); - // TODO: test validations - } - - /** - * Revoke OAuth2 Tokens - * - * 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void revokeOAuth2TokenTest() throws ApiException { - String token = null; - api.revokeOAuth2Token(token); - // TODO: test validations - } - - /** - * OpenID Connect Userinfo - * - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void userinfoTest() throws ApiException { - UserinfoResponse response = api.userinfo(); - // TODO: test validations - } - - /** - * JSON Web Keys Discovery - * - * This endpoint returns JSON Web Keys to be used as public keys for 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. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void wellKnownTest() throws ApiException { - JSONWebKeySet response = api.wellKnown(); - // TODO: test validations - } - -} 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 new file mode 100644 index 00000000000..97bd4724dda --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/api/WellknownApiTest.java @@ -0,0 +1,48 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.api; + +import sh.ory.hydra.ApiException; +import sh.ory.hydra.model.ErrorOAuth2; +import sh.ory.hydra.model.JsonWebKeySet; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for WellknownApi + */ +@Disabled +public class WellknownApiTest { + + private final WellknownApi api = new WellknownApi(); + + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void discoverJsonWebKeysTest() throws ApiException { + JsonWebKeySet response = api.discoverJsonWebKeys(); + // TODO: test validations + } + +} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/ConsentRequestSessionTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSessionTest.java similarity index 57% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/ConsentRequestSessionTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSessionTest.java index b6f0bac54e0..e16c365fcbd 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/ConsentRequestSessionTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestSessionTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,23 +21,23 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for ConsentRequestSession + * Model tests for AcceptOAuth2ConsentRequestSession */ -public class ConsentRequestSessionTest { - private final ConsentRequestSession model = new ConsentRequestSession(); +public class AcceptOAuth2ConsentRequestSessionTest { + private final AcceptOAuth2ConsentRequestSession model = new AcceptOAuth2ConsentRequestSession(); /** - * Model tests for ConsentRequestSession + * Model tests for AcceptOAuth2ConsentRequestSession */ @Test - public void testConsentRequestSession() { - // TODO: test ConsentRequestSession + public void testAcceptOAuth2ConsentRequestSession() { + // TODO: test AcceptOAuth2ConsentRequestSession } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptConsentRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestTest.java similarity index 71% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptConsentRequestTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestTest.java index 091c2e719b1..f3ae9597f86 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptConsentRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2ConsentRequestTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,24 +24,23 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; -import sh.ory.hydra.model.ConsentRequestSession; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import sh.ory.hydra.model.AcceptOAuth2ConsentRequestSession; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for AcceptConsentRequest + * Model tests for AcceptOAuth2ConsentRequest */ -public class AcceptConsentRequestTest { - private final AcceptConsentRequest model = new AcceptConsentRequest(); +public class AcceptOAuth2ConsentRequestTest { + private final AcceptOAuth2ConsentRequest model = new AcceptOAuth2ConsentRequest(); /** - * Model tests for AcceptConsentRequest + * Model tests for AcceptOAuth2ConsentRequest */ @Test - public void testAcceptConsentRequest() { - // TODO: test AcceptConsentRequest + public void testAcceptOAuth2ConsentRequest() { + // TODO: test AcceptOAuth2ConsentRequest } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptLoginRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2LoginRequestTest.java similarity index 73% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptLoginRequestTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2LoginRequestTest.java index b2bea83cbf0..e47219503d7 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptLoginRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/AcceptOAuth2LoginRequestTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,23 +23,23 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for AcceptLoginRequest + * Model tests for AcceptOAuth2LoginRequest */ -public class AcceptLoginRequestTest { - private final AcceptLoginRequest model = new AcceptLoginRequest(); +public class AcceptOAuth2LoginRequestTest { + private final AcceptOAuth2LoginRequest model = new AcceptOAuth2LoginRequest(); /** - * Model tests for AcceptLoginRequest + * Model tests for AcceptOAuth2LoginRequest */ @Test - public void testAcceptLoginRequest() { - // TODO: test AcceptLoginRequest + public void testAcceptOAuth2LoginRequest() { + // TODO: test AcceptOAuth2LoginRequest } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/ContainerWaitOKBodyErrorTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/ContainerWaitOKBodyErrorTest.java deleted file mode 100644 index 289b8c17997..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/ContainerWaitOKBodyErrorTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for ContainerWaitOKBodyError - */ -public class ContainerWaitOKBodyErrorTest { - private final ContainerWaitOKBodyError model = new ContainerWaitOKBodyError(); - - /** - * Model tests for ContainerWaitOKBodyError - */ - @Test - public void testContainerWaitOKBodyError() { - // TODO: test ContainerWaitOKBodyError - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeySetGeneratorRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateJsonWebKeySetTest.java similarity index 61% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeySetGeneratorRequestTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateJsonWebKeySetTest.java index c6f158e6e01..4e0be3ba3e7 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeySetGeneratorRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/CreateJsonWebKeySetTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,23 +21,22 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for JsonWebKeySetGeneratorRequest + * Model tests for CreateJsonWebKeySet */ -public class JsonWebKeySetGeneratorRequestTest { - private final JsonWebKeySetGeneratorRequest model = new JsonWebKeySetGeneratorRequest(); +public class CreateJsonWebKeySetTest { + private final CreateJsonWebKeySet model = new CreateJsonWebKeySet(); /** - * Model tests for JsonWebKeySetGeneratorRequest + * Model tests for CreateJsonWebKeySet */ @Test - public void testJsonWebKeySetGeneratorRequest() { - // TODO: test JsonWebKeySetGeneratorRequest + public void testCreateJsonWebKeySet() { + // TODO: test CreateJsonWebKeySet } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/ErrorOAuth2Test.java similarity index 72% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectRequestTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/ErrorOAuth2Test.java index fcff92a8347..069ef704e4b 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/ErrorOAuth2Test.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,23 +21,22 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for RejectRequest + * Model tests for ErrorOAuth2 */ -public class RejectRequestTest { - private final RejectRequest model = new RejectRequest(); +public class ErrorOAuth2Test { + private final ErrorOAuth2 model = new ErrorOAuth2(); /** - * Model tests for RejectRequest + * Model tests for ErrorOAuth2 */ @Test - public void testRejectRequest() { - // TODO: test RejectRequest + public void testErrorOAuth2() { + // TODO: test ErrorOAuth2 } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequestTest.java deleted file mode 100644 index f52790a47d2..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/FlushInactiveOAuth2TokensRequestTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for FlushInactiveOAuth2TokensRequest - */ -public class FlushInactiveOAuth2TokensRequestTest { - private final FlushInactiveOAuth2TokensRequest model = new FlushInactiveOAuth2TokensRequest(); - - /** - * Model tests for FlushInactiveOAuth2TokensRequest - */ - @Test - public void testFlushInactiveOAuth2TokensRequest() { - // TODO: test FlushInactiveOAuth2TokensRequest - } - - /** - * Test the property 'notAfter' - */ - @Test - public void notAfterTest() { - // TODO: test notAfter - } - -} 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 8c99669c96f..e00b8d8309d 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,9 +21,9 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigNetworkTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/GetVersion200ResponseTest.java similarity index 50% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigNetworkTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/GetVersion200ResponseTest.java index d6bff233c19..81ef8170cc4 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigNetworkTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/GetVersion200ResponseTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,31 +21,30 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for PluginConfigNetwork + * Model tests for GetVersion200Response */ -public class PluginConfigNetworkTest { - private final PluginConfigNetwork model = new PluginConfigNetwork(); +public class GetVersion200ResponseTest { + private final GetVersion200Response model = new GetVersion200Response(); /** - * Model tests for PluginConfigNetwork + * Model tests for GetVersion200Response */ @Test - public void testPluginConfigNetwork() { - // TODO: test PluginConfigNetwork + public void testGetVersion200Response() { + // TODO: test GetVersion200Response } /** - * Test the property 'type' + * Test the property 'version' */ @Test - public void typeTest() { - // TODO: test type + public void versionTest() { + // TODO: test version } } 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 c3d01b3a9d3..cec01562e81 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,9 +24,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** 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 cb0034aaef6..e0874b7c851 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenIntrospectionTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IntrospectedOAuth2TokenTest.java similarity index 81% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenIntrospectionTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/IntrospectedOAuth2TokenTest.java index d5a2336032a..9a035c880a4 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenIntrospectionTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IntrospectedOAuth2TokenTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -22,24 +22,25 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import java.util.Map; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for OAuth2TokenIntrospection + * Model tests for IntrospectedOAuth2Token */ -public class OAuth2TokenIntrospectionTest { - private final OAuth2TokenIntrospection model = new OAuth2TokenIntrospection(); +public class IntrospectedOAuth2TokenTest { + private final IntrospectedOAuth2Token model = new IntrospectedOAuth2Token(); /** - * Model tests for OAuth2TokenIntrospection + * Model tests for IntrospectedOAuth2Token */ @Test - public void testOAuth2TokenIntrospection() { - // TODO: test OAuth2TokenIntrospection + public void testIntrospectedOAuth2Token() { + // TODO: test 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 new file mode 100644 index 00000000000..4fdbdce7f1a --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady200ResponseTest.java @@ -0,0 +1,50 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for IsReady200Response + */ +public class IsReady200ResponseTest { + private final IsReady200Response model = new IsReady200Response(); + + /** + * Model tests for IsReady200Response + */ + @Test + public void testIsReady200Response() { + // TODO: test IsReady200Response + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} 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 new file mode 100644 index 00000000000..733bc1d4aa0 --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/IsReady503ResponseTest.java @@ -0,0 +1,53 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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.HashMap; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for IsReady503Response + */ +public class IsReady503ResponseTest { + private final IsReady503Response model = new IsReady503Response(); + + /** + * Model tests for IsReady503Response + */ + @Test + public void testIsReady503Response() { + // TODO: test IsReady503Response + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + // TODO: test errors + } + +} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PatchDocumentTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonPatchTest.java similarity index 68% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/PatchDocumentTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonPatchTest.java index f4a31c338cf..316932d03ca 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PatchDocumentTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonPatchTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,23 +21,23 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for PatchDocument + * Model tests for JsonPatch */ -public class PatchDocumentTest { - private final PatchDocument model = new PatchDocument(); +public class JsonPatchTest { + private final JsonPatch model = new JsonPatch(); /** - * Model tests for PatchDocument + * Model tests for JsonPatch */ @Test - public void testPatchDocument() { - // TODO: test PatchDocument + public void testJsonPatch() { + // TODO: test 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 similarity index 59% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/JSONWebKeySetTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeySetTest.java index 8f1ada165d9..3ff5ecbc0cc 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,24 +23,23 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import sh.ory.hydra.model.JSONWebKey; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import sh.ory.hydra.model.JsonWebKey; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for JSONWebKeySet + * Model tests for JsonWebKeySet */ -public class JSONWebKeySetTest { - private final JSONWebKeySet model = new JSONWebKeySet(); +public class JsonWebKeySetTest { + private final JsonWebKeySet model = new JsonWebKeySet(); /** - * Model tests for JSONWebKeySet + * Model tests for JsonWebKeySet */ @Test - public void testJSONWebKeySet() { - // TODO: test JSONWebKeySet + public void testJsonWebKeySet() { + // TODO: test 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 similarity index 84% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/JSONWebKeyTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonWebKeyTest.java index bb75d4e8f93..4c7e9e40319 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,23 +23,22 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for JSONWebKey + * Model tests for JsonWebKey */ -public class JSONWebKeyTest { - private final JSONWebKey model = new JSONWebKey(); +public class JsonWebKeyTest { + private final JsonWebKey model = new JsonWebKey(); /** - * Model tests for JSONWebKey + * Model tests for JsonWebKey */ @Test - public void testJSONWebKey() { - // TODO: test JSONWebKey + public void testJsonWebKey() { + // TODO: test 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 1533341a1b2..176f5324072 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,9 +24,9 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** @@ -59,6 +59,30 @@ public void audienceTest() { // TODO: test audience } + /** + * Test the property 'authorizationCodeGrantAccessTokenLifespan' + */ + @Test + public void authorizationCodeGrantAccessTokenLifespanTest() { + // TODO: test authorizationCodeGrantAccessTokenLifespan + } + + /** + * Test the property 'authorizationCodeGrantIdTokenLifespan' + */ + @Test + public void authorizationCodeGrantIdTokenLifespanTest() { + // TODO: test authorizationCodeGrantIdTokenLifespan + } + + /** + * Test the property 'authorizationCodeGrantRefreshTokenLifespan' + */ + @Test + public void authorizationCodeGrantRefreshTokenLifespanTest() { + // TODO: test authorizationCodeGrantRefreshTokenLifespan + } + /** * Test the property 'backchannelLogoutSessionRequired' */ @@ -75,6 +99,14 @@ public void backchannelLogoutUriTest() { // TODO: test backchannelLogoutUri } + /** + * Test the property 'clientCredentialsGrantAccessTokenLifespan' + */ + @Test + public void clientCredentialsGrantAccessTokenLifespanTest() { + // TODO: test clientCredentialsGrantAccessTokenLifespan + } + /** * Test the property 'clientId' */ @@ -155,6 +187,22 @@ public void grantTypesTest() { // TODO: test grantTypes } + /** + * Test the property 'implicitGrantAccessTokenLifespan' + */ + @Test + public void implicitGrantAccessTokenLifespanTest() { + // TODO: test implicitGrantAccessTokenLifespan + } + + /** + * Test the property 'implicitGrantIdTokenLifespan' + */ + @Test + public void implicitGrantIdTokenLifespanTest() { + // TODO: test implicitGrantIdTokenLifespan + } + /** * Test the property 'jwks' */ @@ -171,6 +219,14 @@ public void jwksUriTest() { // TODO: test jwksUri } + /** + * Test the property 'jwtBearerGrantAccessTokenLifespan' + */ + @Test + public void jwtBearerGrantAccessTokenLifespanTest() { + // TODO: test jwtBearerGrantAccessTokenLifespan + } + /** * Test the property 'logoUri' */ @@ -219,6 +275,30 @@ public void redirectUrisTest() { // TODO: test redirectUris } + /** + * Test the property 'refreshTokenGrantAccessTokenLifespan' + */ + @Test + public void refreshTokenGrantAccessTokenLifespanTest() { + // TODO: test refreshTokenGrantAccessTokenLifespan + } + + /** + * Test the property 'refreshTokenGrantIdTokenLifespan' + */ + @Test + public void refreshTokenGrantIdTokenLifespanTest() { + // TODO: test refreshTokenGrantIdTokenLifespan + } + + /** + * Test the property 'refreshTokenGrantRefreshTokenLifespan' + */ + @Test + public void refreshTokenGrantRefreshTokenLifespanTest() { + // TODO: test refreshTokenGrantRefreshTokenLifespan + } + /** * Test the property 'registrationAccessToken' */ 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 new file mode 100644 index 00000000000..bc6224c9c0f --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ClientTokenLifespansTest.java @@ -0,0 +1,122 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for OAuth2ClientTokenLifespans + */ +public class OAuth2ClientTokenLifespansTest { + private final OAuth2ClientTokenLifespans model = new OAuth2ClientTokenLifespans(); + + /** + * Model tests for OAuth2ClientTokenLifespans + */ + @Test + public void testOAuth2ClientTokenLifespans() { + // TODO: test OAuth2ClientTokenLifespans + } + + /** + * Test the property 'authorizationCodeGrantAccessTokenLifespan' + */ + @Test + public void authorizationCodeGrantAccessTokenLifespanTest() { + // TODO: test authorizationCodeGrantAccessTokenLifespan + } + + /** + * Test the property 'authorizationCodeGrantIdTokenLifespan' + */ + @Test + public void authorizationCodeGrantIdTokenLifespanTest() { + // TODO: test authorizationCodeGrantIdTokenLifespan + } + + /** + * Test the property 'authorizationCodeGrantRefreshTokenLifespan' + */ + @Test + public void authorizationCodeGrantRefreshTokenLifespanTest() { + // TODO: test authorizationCodeGrantRefreshTokenLifespan + } + + /** + * Test the property 'clientCredentialsGrantAccessTokenLifespan' + */ + @Test + public void clientCredentialsGrantAccessTokenLifespanTest() { + // TODO: test clientCredentialsGrantAccessTokenLifespan + } + + /** + * Test the property 'implicitGrantAccessTokenLifespan' + */ + @Test + public void implicitGrantAccessTokenLifespanTest() { + // TODO: test implicitGrantAccessTokenLifespan + } + + /** + * Test the property 'implicitGrantIdTokenLifespan' + */ + @Test + public void implicitGrantIdTokenLifespanTest() { + // TODO: test implicitGrantIdTokenLifespan + } + + /** + * Test the property 'jwtBearerGrantAccessTokenLifespan' + */ + @Test + public void jwtBearerGrantAccessTokenLifespanTest() { + // TODO: test jwtBearerGrantAccessTokenLifespan + } + + /** + * Test the property 'refreshTokenGrantAccessTokenLifespan' + */ + @Test + public void refreshTokenGrantAccessTokenLifespanTest() { + // TODO: test refreshTokenGrantAccessTokenLifespan + } + + /** + * Test the property 'refreshTokenGrantIdTokenLifespan' + */ + @Test + public void refreshTokenGrantIdTokenLifespanTest() { + // TODO: test refreshTokenGrantIdTokenLifespan + } + + /** + * Test the property 'refreshTokenGrantRefreshTokenLifespan' + */ + @Test + public void refreshTokenGrantRefreshTokenLifespanTest() { + // TODO: test refreshTokenGrantRefreshTokenLifespan + } + +} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OpenIDConnectContextTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContextTest.java similarity index 66% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/OpenIDConnectContextTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContextTest.java index 46735278a8c..fe27e8873d2 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/OpenIDConnectContextTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestOpenIDConnectContextTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -22,24 +22,25 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import java.util.Map; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for OpenIDConnectContext + * Model tests for OAuth2ConsentRequestOpenIDConnectContext */ -public class OpenIDConnectContextTest { - private final OpenIDConnectContext model = new OpenIDConnectContext(); +public class OAuth2ConsentRequestOpenIDConnectContextTest { + private final OAuth2ConsentRequestOpenIDConnectContext model = new OAuth2ConsentRequestOpenIDConnectContext(); /** - * Model tests for OpenIDConnectContext + * Model tests for OAuth2ConsentRequestOpenIDConnectContext */ @Test - public void testOpenIDConnectContext() { - // TODO: test OpenIDConnectContext + public void testOAuth2ConsentRequestOpenIDConnectContext() { + // TODO: test OAuth2ConsentRequestOpenIDConnectContext } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/ConsentRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestTest.java similarity index 80% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/ConsentRequestTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestTest.java index ee4fcf1f7ae..84ca25fd0ff 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/ConsentRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentRequestTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,25 +23,25 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; import sh.ory.hydra.model.OAuth2Client; -import sh.ory.hydra.model.OpenIDConnectContext; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import sh.ory.hydra.model.OAuth2ConsentRequestOpenIDConnectContext; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for ConsentRequest + * Model tests for OAuth2ConsentRequest */ -public class ConsentRequestTest { - private final ConsentRequest model = new ConsentRequest(); +public class OAuth2ConsentRequestTest { + private final OAuth2ConsentRequest model = new OAuth2ConsentRequest(); /** - * Model tests for ConsentRequest + * Model tests for OAuth2ConsentRequest */ @Test - public void testConsentRequest() { - // TODO: test ConsentRequest + public void testOAuth2ConsentRequest() { + // TODO: test 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 new file mode 100644 index 00000000000..ee4dd2a7cd8 --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionExpiresAtTest.java @@ -0,0 +1,83 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for OAuth2ConsentSessionExpiresAt + */ +public class OAuth2ConsentSessionExpiresAtTest { + private final OAuth2ConsentSessionExpiresAt model = new OAuth2ConsentSessionExpiresAt(); + + /** + * Model tests for OAuth2ConsentSessionExpiresAt + */ + @Test + public void testOAuth2ConsentSessionExpiresAt() { + // TODO: test OAuth2ConsentSessionExpiresAt + } + + /** + * Test the property 'accessToken' + */ + @Test + public void accessTokenTest() { + // TODO: test accessToken + } + + /** + * Test the property 'authorizeCode' + */ + @Test + public void authorizeCodeTest() { + // TODO: test authorizeCode + } + + /** + * Test the property 'idToken' + */ + @Test + public void idTokenTest() { + // TODO: test idToken + } + + /** + * Test the property 'parContext' + */ + @Test + public void parContextTest() { + // TODO: test parContext + } + + /** + * Test the property 'refreshToken' + */ + @Test + public void refreshTokenTest() { + // TODO: test refreshToken + } + +} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PreviousConsentSessionTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionTest.java similarity index 67% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/PreviousConsentSessionTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionTest.java index f5489b398c6..0656af02951 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PreviousConsentSessionTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2ConsentSessionTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,25 +24,25 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; -import sh.ory.hydra.model.ConsentRequest; -import sh.ory.hydra.model.ConsentRequestSession; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import sh.ory.hydra.model.AcceptOAuth2ConsentRequestSession; +import sh.ory.hydra.model.OAuth2ConsentRequest; +import sh.ory.hydra.model.OAuth2ConsentSessionExpiresAt; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for PreviousConsentSession + * Model tests for OAuth2ConsentSession */ -public class PreviousConsentSessionTest { - private final PreviousConsentSession model = new PreviousConsentSession(); +public class OAuth2ConsentSessionTest { + private final OAuth2ConsentSession model = new OAuth2ConsentSession(); /** - * Model tests for PreviousConsentSession + * Model tests for OAuth2ConsentSession */ @Test - public void testPreviousConsentSession() { - // TODO: test PreviousConsentSession + public void testOAuth2ConsentSession() { + // TODO: test OAuth2ConsentSession } /** @@ -53,6 +53,14 @@ public void consentRequestTest() { // TODO: test consentRequest } + /** + * Test the property 'expiresAt' + */ + @Test + public void expiresAtTest() { + // TODO: test expiresAt + } + /** * Test the property 'grantAccessTokenAudience' */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/LoginRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LoginRequestTest.java similarity index 78% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/LoginRequestTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LoginRequestTest.java index f5a11bba4c5..9c808aff8dd 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/LoginRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LoginRequestTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,24 +24,23 @@ import java.util.ArrayList; import java.util.List; import sh.ory.hydra.model.OAuth2Client; -import sh.ory.hydra.model.OpenIDConnectContext; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import sh.ory.hydra.model.OAuth2ConsentRequestOpenIDConnectContext; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for LoginRequest + * Model tests for OAuth2LoginRequest */ -public class LoginRequestTest { - private final LoginRequest model = new LoginRequest(); +public class OAuth2LoginRequestTest { + private final OAuth2LoginRequest model = new OAuth2LoginRequest(); /** - * Model tests for LoginRequest + * Model tests for OAuth2LoginRequest */ @Test - public void testLoginRequest() { - // TODO: test LoginRequest + public void testOAuth2LoginRequest() { + // TODO: test OAuth2LoginRequest } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/LogoutRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LogoutRequestTest.java similarity index 74% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/LogoutRequestTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LogoutRequestTest.java index 6139f501a98..707c230ca24 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/LogoutRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2LogoutRequestTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -22,23 +22,22 @@ import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import sh.ory.hydra.model.OAuth2Client; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for LogoutRequest + * Model tests for OAuth2LogoutRequest */ -public class LogoutRequestTest { - private final LogoutRequest model = new LogoutRequest(); +public class OAuth2LogoutRequestTest { + private final OAuth2LogoutRequest model = new OAuth2LogoutRequest(); /** - * Model tests for LogoutRequest + * Model tests for OAuth2LogoutRequest */ @Test - public void testLogoutRequest() { - // TODO: test LogoutRequest + public void testOAuth2LogoutRequest() { + // TODO: test OAuth2LogoutRequest } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/CompletedRequestTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2RedirectToTest.java similarity index 59% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/CompletedRequestTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2RedirectToTest.java index 089167714b0..45e74b64fc6 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/CompletedRequestTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2RedirectToTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,23 +21,22 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for CompletedRequest + * Model tests for OAuth2RedirectTo */ -public class CompletedRequestTest { - private final CompletedRequest model = new CompletedRequest(); +public class OAuth2RedirectToTest { + private final OAuth2RedirectTo model = new OAuth2RedirectTo(); /** - * Model tests for CompletedRequest + * Model tests for OAuth2RedirectTo */ @Test - public void testCompletedRequest() { - // TODO: test CompletedRequest + public void testOAuth2RedirectTo() { + // TODO: test OAuth2RedirectTo } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/Oauth2TokenResponseTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenExchangeTest.java similarity index 72% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/Oauth2TokenResponseTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenExchangeTest.java index b97accfb858..d9713c48e5d 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/Oauth2TokenResponseTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OAuth2TokenExchangeTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,23 +21,22 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for Oauth2TokenResponse + * Model tests for OAuth2TokenExchange */ -public class Oauth2TokenResponseTest { - private final Oauth2TokenResponse model = new Oauth2TokenResponse(); +public class OAuth2TokenExchangeTest { + private final OAuth2TokenExchange model = new OAuth2TokenExchange(); /** - * Model tests for Oauth2TokenResponse + * Model tests for OAuth2TokenExchange */ @Test - public void testOauth2TokenResponse() { - // TODO: test Oauth2TokenResponse + public void testOAuth2TokenExchange() { + // TODO: test OAuth2TokenExchange } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/WellKnownTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcConfigurationTest.java similarity index 86% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/WellKnownTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcConfigurationTest.java index cf69908e45c..f5f040a6a4a 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/WellKnownTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcConfigurationTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,23 +23,22 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for WellKnown + * Model tests for OidcConfiguration */ -public class WellKnownTest { - private final WellKnown model = new WellKnown(); +public class OidcConfigurationTest { + private final OidcConfiguration model = new OidcConfiguration(); /** - * Model tests for WellKnown + * Model tests for OidcConfiguration */ @Test - public void testWellKnown() { - // TODO: test WellKnown + public void testOidcConfiguration() { + // TODO: test OidcConfiguration } /** @@ -122,6 +121,14 @@ public void grantTypesSupportedTest() { // TODO: test grantTypesSupported } + /** + * Test the property 'idTokenSignedResponseAlg' + */ + @Test + public void idTokenSignedResponseAlgTest() { + // TODO: test idTokenSignedResponseAlg + } + /** * Test the property 'idTokenSigningAlgValuesSupported' */ @@ -250,6 +257,14 @@ public void userinfoEndpointTest() { // TODO: test userinfoEndpoint } + /** + * Test the property 'userinfoSignedResponseAlg' + */ + @Test + public void userinfoSignedResponseAlgTest() { + // TODO: test userinfoSignedResponseAlg + } + /** * Test the property 'userinfoSigningAlgValuesSupported' */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/UserinfoResponseTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcUserInfoTest.java similarity index 86% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/UserinfoResponseTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcUserInfoTest.java index 39858530431..4d5c9d0c167 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/UserinfoResponseTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/OidcUserInfoTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,23 +21,22 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for UserinfoResponse + * Model tests for OidcUserInfo */ -public class UserinfoResponseTest { - private final UserinfoResponse model = new UserinfoResponse(); +public class OidcUserInfoTest { + private final OidcUserInfo model = new OidcUserInfo(); /** - * Model tests for UserinfoResponse + * Model tests for OidcUserInfo */ @Test - public void testUserinfoResponse() { - // TODO: test UserinfoResponse + public void testOidcUserInfo() { + // TODO: test 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 new file mode 100644 index 00000000000..7471dd07926 --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationHeadersTest.java @@ -0,0 +1,58 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for PaginationHeaders + */ +public class PaginationHeadersTest { + private final PaginationHeaders model = new PaginationHeaders(); + + /** + * Model tests for PaginationHeaders + */ + @Test + public void testPaginationHeaders() { + // TODO: test PaginationHeaders + } + + /** + * Test the property 'link' + */ + @Test + public void linkTest() { + // TODO: test link + } + + /** + * Test the property 'xTotalCount' + */ + @Test + public void xTotalCountTest() { + // TODO: test xTotalCount + } + +} 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 new file mode 100644 index 00000000000..2bb9ec86eba --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PaginationTest.java @@ -0,0 +1,58 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for Pagination + */ +public class PaginationTest { + private final Pagination model = new Pagination(); + + /** + * Model tests for Pagination + */ + @Test + public void testPagination() { + // TODO: test Pagination + } + + /** + * Test the property 'pageSize' + */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** + * Test the property 'pageToken' + */ + @Test + public void pageTokenTest() { + // TODO: test pageToken + } + +} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigArgsTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigArgsTest.java deleted file mode 100644 index 4d3a2259de4..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigArgsTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginConfigArgs - */ -public class PluginConfigArgsTest { - private final PluginConfigArgs model = new PluginConfigArgs(); - - /** - * Model tests for PluginConfigArgs - */ - @Test - public void testPluginConfigArgs() { - // TODO: test PluginConfigArgs - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'settable' - */ - @Test - public void settableTest() { - // TODO: test settable - } - - /** - * Test the property 'value' - */ - @Test - public void valueTest() { - // TODO: test value - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigInterfaceTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigInterfaceTest.java deleted file mode 100644 index f40ef6482dc..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigInterfaceTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.List; -import sh.ory.hydra.model.PluginInterfaceType; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginConfigInterface - */ -public class PluginConfigInterfaceTest { - private final PluginConfigInterface model = new PluginConfigInterface(); - - /** - * Model tests for PluginConfigInterface - */ - @Test - public void testPluginConfigInterface() { - // TODO: test PluginConfigInterface - } - - /** - * Test the property 'protocolScheme' - */ - @Test - public void protocolSchemeTest() { - // TODO: test protocolScheme - } - - /** - * Test the property 'socket' - */ - @Test - public void socketTest() { - // TODO: test socket - } - - /** - * Test the property 'types' - */ - @Test - public void typesTest() { - // TODO: test types - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigLinuxTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigLinuxTest.java deleted file mode 100644 index d0d801e395e..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigLinuxTest.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.List; -import sh.ory.hydra.model.PluginDevice; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginConfigLinux - */ -public class PluginConfigLinuxTest { - private final PluginConfigLinux model = new PluginConfigLinux(); - - /** - * Model tests for PluginConfigLinux - */ - @Test - public void testPluginConfigLinux() { - // TODO: test PluginConfigLinux - } - - /** - * Test the property 'allowAllDevices' - */ - @Test - public void allowAllDevicesTest() { - // TODO: test allowAllDevices - } - - /** - * Test the property 'capabilities' - */ - @Test - public void capabilitiesTest() { - // TODO: test capabilities - } - - /** - * Test the property 'devices' - */ - @Test - public void devicesTest() { - // TODO: test devices - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigRootfsTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigRootfsTest.java deleted file mode 100644 index 798dc7a7df2..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigRootfsTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginConfigRootfs - */ -public class PluginConfigRootfsTest { - private final PluginConfigRootfs model = new PluginConfigRootfs(); - - /** - * Model tests for PluginConfigRootfs - */ - @Test - public void testPluginConfigRootfs() { - // TODO: test PluginConfigRootfs - } - - /** - * Test the property 'diffIds' - */ - @Test - public void diffIdsTest() { - // TODO: test diffIds - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigTest.java deleted file mode 100644 index 79fa369e684..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigTest.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.List; -import sh.ory.hydra.model.PluginConfigArgs; -import sh.ory.hydra.model.PluginConfigInterface; -import sh.ory.hydra.model.PluginConfigLinux; -import sh.ory.hydra.model.PluginConfigNetwork; -import sh.ory.hydra.model.PluginConfigRootfs; -import sh.ory.hydra.model.PluginConfigUser; -import sh.ory.hydra.model.PluginEnv; -import sh.ory.hydra.model.PluginMount; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginConfig - */ -public class PluginConfigTest { - private final PluginConfig model = new PluginConfig(); - - /** - * Model tests for PluginConfig - */ - @Test - public void testPluginConfig() { - // TODO: test PluginConfig - } - - /** - * Test the property 'args' - */ - @Test - public void argsTest() { - // TODO: test args - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'dockerVersion' - */ - @Test - public void dockerVersionTest() { - // TODO: test dockerVersion - } - - /** - * Test the property 'documentation' - */ - @Test - public void documentationTest() { - // TODO: test documentation - } - - /** - * Test the property 'entrypoint' - */ - @Test - public void entrypointTest() { - // TODO: test entrypoint - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property '_interface' - */ - @Test - public void _interfaceTest() { - // TODO: test _interface - } - - /** - * Test the property 'ipcHost' - */ - @Test - public void ipcHostTest() { - // TODO: test ipcHost - } - - /** - * Test the property 'linux' - */ - @Test - public void linuxTest() { - // TODO: test linux - } - - /** - * Test the property 'mounts' - */ - @Test - public void mountsTest() { - // TODO: test mounts - } - - /** - * Test the property 'network' - */ - @Test - public void networkTest() { - // TODO: test network - } - - /** - * Test the property 'pidHost' - */ - @Test - public void pidHostTest() { - // TODO: test pidHost - } - - /** - * Test the property 'propagatedMount' - */ - @Test - public void propagatedMountTest() { - // TODO: test propagatedMount - } - - /** - * Test the property 'user' - */ - @Test - public void userTest() { - // TODO: test user - } - - /** - * Test the property 'workDir' - */ - @Test - public void workDirTest() { - // TODO: test workDir - } - - /** - * Test the property 'rootfs' - */ - @Test - public void rootfsTest() { - // TODO: test rootfs - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigUserTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigUserTest.java deleted file mode 100644 index 9dbcc867015..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginConfigUserTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginConfigUser - */ -public class PluginConfigUserTest { - private final PluginConfigUser model = new PluginConfigUser(); - - /** - * Model tests for PluginConfigUser - */ - @Test - public void testPluginConfigUser() { - // TODO: test PluginConfigUser - } - - /** - * Test the property 'GID' - */ - @Test - public void GIDTest() { - // TODO: test GID - } - - /** - * Test the property 'UID' - */ - @Test - public void UIDTest() { - // TODO: test UID - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginDeviceTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginDeviceTest.java deleted file mode 100644 index 56d3e69a17a..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginDeviceTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginDevice - */ -public class PluginDeviceTest { - private final PluginDevice model = new PluginDevice(); - - /** - * Model tests for PluginDevice - */ - @Test - public void testPluginDevice() { - // TODO: test PluginDevice - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'path' - */ - @Test - public void pathTest() { - // TODO: test path - } - - /** - * Test the property 'settable' - */ - @Test - public void settableTest() { - // TODO: test settable - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginEnvTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginEnvTest.java deleted file mode 100644 index edf7ad6c79d..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginEnvTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginEnv - */ -public class PluginEnvTest { - private final PluginEnv model = new PluginEnv(); - - /** - * Model tests for PluginEnv - */ - @Test - public void testPluginEnv() { - // TODO: test PluginEnv - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'settable' - */ - @Test - public void settableTest() { - // TODO: test settable - } - - /** - * Test the property 'value' - */ - @Test - public void valueTest() { - // TODO: test value - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginInterfaceTypeTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginInterfaceTypeTest.java deleted file mode 100644 index d7b7a440b3e..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginInterfaceTypeTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginInterfaceType - */ -public class PluginInterfaceTypeTest { - private final PluginInterfaceType model = new PluginInterfaceType(); - - /** - * Model tests for PluginInterfaceType - */ - @Test - public void testPluginInterfaceType() { - // TODO: test PluginInterfaceType - } - - /** - * Test the property 'capability' - */ - @Test - public void capabilityTest() { - // TODO: test capability - } - - /** - * Test the property 'prefix' - */ - @Test - public void prefixTest() { - // TODO: test prefix - } - - /** - * Test the property 'version' - */ - @Test - public void versionTest() { - // TODO: test version - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginMountTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginMountTest.java deleted file mode 100644 index 8f1b7500268..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginMountTest.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginMount - */ -public class PluginMountTest { - private final PluginMount model = new PluginMount(); - - /** - * Model tests for PluginMount - */ - @Test - public void testPluginMount() { - // TODO: test PluginMount - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'destination' - */ - @Test - public void destinationTest() { - // TODO: test destination - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'options' - */ - @Test - public void optionsTest() { - // TODO: test options - } - - /** - * Test the property 'settable' - */ - @Test - public void settableTest() { - // TODO: test settable - } - - /** - * Test the property 'source' - */ - @Test - public void sourceTest() { - // TODO: test source - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginSettingsTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginSettingsTest.java deleted file mode 100644 index ab3f3318f80..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/PluginSettingsTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.List; -import sh.ory.hydra.model.PluginDevice; -import sh.ory.hydra.model.PluginMount; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for PluginSettings - */ -public class PluginSettingsTest { - private final PluginSettings model = new PluginSettings(); - - /** - * Model tests for PluginSettings - */ - @Test - public void testPluginSettings() { - // TODO: test PluginSettings - } - - /** - * Test the property 'args' - */ - @Test - public void argsTest() { - // TODO: test args - } - - /** - * Test the property 'devices' - */ - @Test - public void devicesTest() { - // TODO: test devices - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'mounts' - */ - @Test - public void mountsTest() { - // TODO: test mounts - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonErrorTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectOAuth2RequestTest.java similarity index 64% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonErrorTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectOAuth2RequestTest.java index 059c16233e7..2c50b290da0 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/JsonErrorTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/RejectOAuth2RequestTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,23 +21,22 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for JsonError + * Model tests for RejectOAuth2Request */ -public class JsonErrorTest { - private final JsonError model = new JsonError(); +public class RejectOAuth2RequestTest { + private final RejectOAuth2Request model = new RejectOAuth2Request(); /** - * Model tests for JsonError + * Model tests for RejectOAuth2Request */ @Test - public void testJsonError() { - // TODO: test JsonError + public void testRejectOAuth2Request() { + // TODO: test RejectOAuth2Request } /** @@ -64,6 +63,14 @@ public void errorDescriptionTest() { // TODO: test errorDescription } + /** + * Test the property 'errorHint' + */ + @Test + public void errorHintTest() { + // TODO: test errorHint + } + /** * Test the property 'statusCode' */ diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/RequestWasHandledResponseTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/RequestWasHandledResponseTest.java deleted file mode 100644 index 14419399853..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/RequestWasHandledResponseTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for RequestWasHandledResponse - */ -public class RequestWasHandledResponseTest { - private final RequestWasHandledResponse model = new RequestWasHandledResponse(); - - /** - * Model tests for RequestWasHandledResponse - */ - @Test - public void testRequestWasHandledResponse() { - // TODO: test RequestWasHandledResponse - } - - /** - * Test the property 'redirectTo' - */ - @Test - public void redirectToTest() { - // TODO: test redirectTo - } - -} 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 new file mode 100644 index 00000000000..c86f9d38c12 --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationHeadersTest.java @@ -0,0 +1,58 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for TokenPaginationHeaders + */ +public class TokenPaginationHeadersTest { + private final TokenPaginationHeaders model = new TokenPaginationHeaders(); + + /** + * Model tests for TokenPaginationHeaders + */ + @Test + public void testTokenPaginationHeaders() { + // TODO: test TokenPaginationHeaders + } + + /** + * Test the property 'link' + */ + @Test + public void linkTest() { + // TODO: test link + } + + /** + * Test the property 'xTotalCount' + */ + @Test + public void xTotalCountTest() { + // TODO: test xTotalCount + } + +} 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 new file mode 100644 index 00000000000..7e41447ec41 --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationRequestParametersTest.java @@ -0,0 +1,58 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for TokenPaginationRequestParameters + */ +public class TokenPaginationRequestParametersTest { + private final TokenPaginationRequestParameters model = new TokenPaginationRequestParameters(); + + /** + * Model tests for TokenPaginationRequestParameters + */ + @Test + public void testTokenPaginationRequestParameters() { + // TODO: test TokenPaginationRequestParameters + } + + /** + * Test the property 'pageSize' + */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** + * Test the property 'pageToken' + */ + @Test + public void pageTokenTest() { + // TODO: test pageToken + } + +} 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 new file mode 100644 index 00000000000..3cc857260e0 --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationResponseHeadersTest.java @@ -0,0 +1,58 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for TokenPaginationResponseHeaders + */ +public class TokenPaginationResponseHeadersTest { + private final TokenPaginationResponseHeaders model = new TokenPaginationResponseHeaders(); + + /** + * Model tests for TokenPaginationResponseHeaders + */ + @Test + public void testTokenPaginationResponseHeaders() { + // TODO: test TokenPaginationResponseHeaders + } + + /** + * Test the property 'link' + */ + @Test + public void linkTest() { + // TODO: test link + } + + /** + * Test the property 'xTotalCount' + */ + @Test + public void xTotalCountTest() { + // TODO: test xTotalCount + } + +} 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 new file mode 100644 index 00000000000..0e93af1d5b5 --- /dev/null +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TokenPaginationTest.java @@ -0,0 +1,58 @@ +/* + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + */ + + +package sh.ory.hydra.model; + +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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for TokenPagination + */ +public class TokenPaginationTest { + private final TokenPagination model = new TokenPagination(); + + /** + * Model tests for TokenPagination + */ + @Test + public void testTokenPagination() { + // TODO: test TokenPagination + } + + /** + * Test the property 'pageSize' + */ + @Test + public void pageSizeTest() { + // TODO: test pageSize + } + + /** + * Test the property 'pageToken' + */ + @Test + public void pageTokenTest() { + // TODO: test pageToken + } + +} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustJwtGrantIssuerBodyTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuerTest.java similarity index 64% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustJwtGrantIssuerBodyTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuerTest.java index 640bee784b2..8a5a2ecb811 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustJwtGrantIssuerBodyTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustOAuth2JwtGrantIssuerTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,24 +24,31 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; -import sh.ory.hydra.model.JSONWebKey; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import sh.ory.hydra.model.JsonWebKey; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for TrustJwtGrantIssuerBody + * Model tests for TrustOAuth2JwtGrantIssuer */ -public class TrustJwtGrantIssuerBodyTest { - private final TrustJwtGrantIssuerBody model = new TrustJwtGrantIssuerBody(); +public class TrustOAuth2JwtGrantIssuerTest { + private final TrustOAuth2JwtGrantIssuer model = new TrustOAuth2JwtGrantIssuer(); /** - * Model tests for TrustJwtGrantIssuerBody + * Model tests for TrustOAuth2JwtGrantIssuer */ @Test - public void testTrustJwtGrantIssuerBody() { - // TODO: test TrustJwtGrantIssuerBody + public void testTrustOAuth2JwtGrantIssuer() { + // TODO: test TrustOAuth2JwtGrantIssuer + } + + /** + * Test the property 'allowAnySubject' + */ + @Test + public void allowAnySubjectTest() { + // TODO: test allowAnySubject } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedJwtGrantIssuerTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuerTest.java similarity index 67% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedJwtGrantIssuerTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuerTest.java index 963bef72f7f..c177d68ad60 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedJwtGrantIssuerTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantIssuerTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,24 +24,31 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; -import sh.ory.hydra.model.TrustedJsonWebKey; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import sh.ory.hydra.model.TrustedOAuth2JwtGrantJsonWebKey; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for TrustedJwtGrantIssuer + * Model tests for TrustedOAuth2JwtGrantIssuer */ -public class TrustedJwtGrantIssuerTest { - private final TrustedJwtGrantIssuer model = new TrustedJwtGrantIssuer(); +public class TrustedOAuth2JwtGrantIssuerTest { + private final TrustedOAuth2JwtGrantIssuer model = new TrustedOAuth2JwtGrantIssuer(); /** - * Model tests for TrustedJwtGrantIssuer + * Model tests for TrustedOAuth2JwtGrantIssuer */ @Test - public void testTrustedJwtGrantIssuer() { - // TODO: test TrustedJwtGrantIssuer + public void testTrustedOAuth2JwtGrantIssuer() { + // TODO: test TrustedOAuth2JwtGrantIssuer + } + + /** + * Test the property 'allowAnySubject' + */ + @Test + public void allowAnySubjectTest() { + // TODO: test allowAnySubject } /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedJsonWebKeyTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKeyTest.java similarity index 59% rename from clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedJsonWebKeyTest.java rename to clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKeyTest.java index 24288e18de8..cb9424244db 100644 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedJsonWebKeyTest.java +++ b/clients/hydra/java/src/test/java/sh/ory/hydra/model/TrustedOAuth2JwtGrantJsonWebKeyTest.java @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,23 +21,22 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** - * Model tests for TrustedJsonWebKey + * Model tests for TrustedOAuth2JwtGrantJsonWebKey */ -public class TrustedJsonWebKeyTest { - private final TrustedJsonWebKey model = new TrustedJsonWebKey(); +public class TrustedOAuth2JwtGrantJsonWebKeyTest { + private final TrustedOAuth2JwtGrantJsonWebKey model = new TrustedOAuth2JwtGrantJsonWebKey(); /** - * Model tests for TrustedJsonWebKey + * Model tests for TrustedOAuth2JwtGrantJsonWebKey */ @Test - public void testTrustedJsonWebKey() { - // TODO: test TrustedJsonWebKey + public void testTrustedOAuth2JwtGrantJsonWebKey() { + // TODO: test TrustedOAuth2JwtGrantJsonWebKey } /** 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 a261d66b28c..8755b9aef26 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 @@ -1,9 +1,9 @@ /* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,9 +21,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VolumeTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VolumeTest.java deleted file mode 100644 index a660456ed70..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VolumeTest.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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.HashMap; -import java.util.List; -import java.util.Map; -import sh.ory.hydra.model.VolumeUsageData; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Volume - */ -public class VolumeTest { - private final Volume model = new Volume(); - - /** - * Model tests for Volume - */ - @Test - public void testVolume() { - // TODO: test Volume - } - - /** - * Test the property 'createdAt' - */ - @Test - public void createdAtTest() { - // TODO: test createdAt - } - - /** - * Test the property 'driver' - */ - @Test - public void driverTest() { - // TODO: test driver - } - - /** - * Test the property 'labels' - */ - @Test - public void labelsTest() { - // TODO: test labels - } - - /** - * Test the property 'mountpoint' - */ - @Test - public void mountpointTest() { - // TODO: test mountpoint - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'options' - */ - @Test - public void optionsTest() { - // TODO: test options - } - - /** - * Test the property 'scope' - */ - @Test - public void scopeTest() { - // TODO: test scope - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'usageData' - */ - @Test - public void usageDataTest() { - // TODO: test usageData - } - -} diff --git a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VolumeUsageDataTest.java b/clients/hydra/java/src/test/java/sh/ory/hydra/model/VolumeUsageDataTest.java deleted file mode 100644 index 400ccd91737..00000000000 --- a/clients/hydra/java/src/test/java/sh/ory/hydra/model/VolumeUsageDataTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package sh.ory.hydra.model; - -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 org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for VolumeUsageData - */ -public class VolumeUsageDataTest { - private final VolumeUsageData model = new VolumeUsageData(); - - /** - * Model tests for VolumeUsageData - */ - @Test - public void testVolumeUsageData() { - // TODO: test VolumeUsageData - } - - /** - * Test the property 'refCount' - */ - @Test - public void refCountTest() { - // TODO: test refCount - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - -} diff --git a/clients/hydra/php/.openapi-generator/FILES b/clients/hydra/php/.openapi-generator/FILES index 8991d08c61e..69ddd817529 100644 --- a/clients/hydra/php/.openapi-generator/FILES +++ b/clients/hydra/php/.openapi-generator/FILES @@ -4,151 +4,139 @@ .travis.yml README.md composer.json -docs/Api/AdminApi.md +docs/Api/JwkApi.md docs/Api/MetadataApi.md -docs/Api/PublicApi.md -docs/Model/AcceptConsentRequest.md -docs/Model/AcceptLoginRequest.md -docs/Model/CompletedRequest.md -docs/Model/ConsentRequest.md -docs/Model/ConsentRequestSession.md -docs/Model/ContainerWaitOKBodyError.md -docs/Model/FlushInactiveOAuth2TokensRequest.md +docs/Api/OAuth2Api.md +docs/Api/OidcApi.md +docs/Api/WellknownApi.md +docs/Model/AcceptOAuth2ConsentRequest.md +docs/Model/AcceptOAuth2ConsentRequestSession.md +docs/Model/AcceptOAuth2LoginRequest.md +docs/Model/CreateJsonWebKeySet.md +docs/Model/ErrorOAuth2.md docs/Model/GenericError.md docs/Model/HealthNotReadyStatus.md docs/Model/HealthStatus.md -docs/Model/JSONWebKey.md -docs/Model/JSONWebKeySet.md -docs/Model/JsonError.md -docs/Model/JsonWebKeySetGeneratorRequest.md -docs/Model/LoginRequest.md -docs/Model/LogoutRequest.md +docs/Model/InlineResponse200.md +docs/Model/InlineResponse2001.md +docs/Model/InlineResponse503.md +docs/Model/IntrospectedOAuth2Token.md +docs/Model/JsonPatch.md +docs/Model/JsonWebKey.md +docs/Model/JsonWebKeySet.md docs/Model/OAuth2Client.md -docs/Model/OAuth2TokenIntrospection.md -docs/Model/Oauth2TokenResponse.md -docs/Model/OpenIDConnectContext.md -docs/Model/PatchDocument.md -docs/Model/PluginConfig.md -docs/Model/PluginConfigArgs.md -docs/Model/PluginConfigInterface.md -docs/Model/PluginConfigLinux.md -docs/Model/PluginConfigNetwork.md -docs/Model/PluginConfigRootfs.md -docs/Model/PluginConfigUser.md -docs/Model/PluginDevice.md -docs/Model/PluginEnv.md -docs/Model/PluginInterfaceType.md -docs/Model/PluginMount.md -docs/Model/PluginSettings.md -docs/Model/PreviousConsentSession.md -docs/Model/RejectRequest.md -docs/Model/RequestWasHandledResponse.md -docs/Model/TrustJwtGrantIssuerBody.md -docs/Model/TrustedJsonWebKey.md -docs/Model/TrustedJwtGrantIssuer.md -docs/Model/UserinfoResponse.md +docs/Model/OAuth2ClientTokenLifespans.md +docs/Model/OAuth2ConsentRequest.md +docs/Model/OAuth2ConsentRequestOpenIDConnectContext.md +docs/Model/OAuth2ConsentSession.md +docs/Model/OAuth2ConsentSessionExpiresAt.md +docs/Model/OAuth2LoginRequest.md +docs/Model/OAuth2LogoutRequest.md +docs/Model/OAuth2RedirectTo.md +docs/Model/OAuth2TokenExchange.md +docs/Model/OidcConfiguration.md +docs/Model/OidcUserInfo.md +docs/Model/Pagination.md +docs/Model/PaginationHeaders.md +docs/Model/RejectOAuth2Request.md +docs/Model/TokenPagination.md +docs/Model/TokenPaginationHeaders.md +docs/Model/TokenPaginationRequestParameters.md +docs/Model/TokenPaginationResponseHeaders.md +docs/Model/TrustOAuth2JwtGrantIssuer.md +docs/Model/TrustedOAuth2JwtGrantIssuer.md +docs/Model/TrustedOAuth2JwtGrantJsonWebKey.md docs/Model/Version.md -docs/Model/Volume.md -docs/Model/VolumeUsageData.md -docs/Model/WellKnown.md git_push.sh -lib/Api/AdminApi.php +lib/Api/JwkApi.php lib/Api/MetadataApi.php -lib/Api/PublicApi.php +lib/Api/OAuth2Api.php +lib/Api/OidcApi.php +lib/Api/WellknownApi.php lib/ApiException.php lib/Configuration.php lib/HeaderSelector.php -lib/Model/AcceptConsentRequest.php -lib/Model/AcceptLoginRequest.php -lib/Model/CompletedRequest.php -lib/Model/ConsentRequest.php -lib/Model/ConsentRequestSession.php -lib/Model/ContainerWaitOKBodyError.php -lib/Model/FlushInactiveOAuth2TokensRequest.php +lib/Model/AcceptOAuth2ConsentRequest.php +lib/Model/AcceptOAuth2ConsentRequestSession.php +lib/Model/AcceptOAuth2LoginRequest.php +lib/Model/CreateJsonWebKeySet.php +lib/Model/ErrorOAuth2.php lib/Model/GenericError.php lib/Model/HealthNotReadyStatus.php lib/Model/HealthStatus.php -lib/Model/JSONWebKey.php -lib/Model/JSONWebKeySet.php -lib/Model/JsonError.php -lib/Model/JsonWebKeySetGeneratorRequest.php -lib/Model/LoginRequest.php -lib/Model/LogoutRequest.php +lib/Model/InlineResponse200.php +lib/Model/InlineResponse2001.php +lib/Model/InlineResponse503.php +lib/Model/IntrospectedOAuth2Token.php +lib/Model/JsonPatch.php +lib/Model/JsonWebKey.php +lib/Model/JsonWebKeySet.php lib/Model/ModelInterface.php lib/Model/OAuth2Client.php -lib/Model/OAuth2TokenIntrospection.php -lib/Model/Oauth2TokenResponse.php -lib/Model/OpenIDConnectContext.php -lib/Model/PatchDocument.php -lib/Model/PluginConfig.php -lib/Model/PluginConfigArgs.php -lib/Model/PluginConfigInterface.php -lib/Model/PluginConfigLinux.php -lib/Model/PluginConfigNetwork.php -lib/Model/PluginConfigRootfs.php -lib/Model/PluginConfigUser.php -lib/Model/PluginDevice.php -lib/Model/PluginEnv.php -lib/Model/PluginInterfaceType.php -lib/Model/PluginMount.php -lib/Model/PluginSettings.php -lib/Model/PreviousConsentSession.php -lib/Model/RejectRequest.php -lib/Model/RequestWasHandledResponse.php -lib/Model/TrustJwtGrantIssuerBody.php -lib/Model/TrustedJsonWebKey.php -lib/Model/TrustedJwtGrantIssuer.php -lib/Model/UserinfoResponse.php +lib/Model/OAuth2ClientTokenLifespans.php +lib/Model/OAuth2ConsentRequest.php +lib/Model/OAuth2ConsentRequestOpenIDConnectContext.php +lib/Model/OAuth2ConsentSession.php +lib/Model/OAuth2ConsentSessionExpiresAt.php +lib/Model/OAuth2LoginRequest.php +lib/Model/OAuth2LogoutRequest.php +lib/Model/OAuth2RedirectTo.php +lib/Model/OAuth2TokenExchange.php +lib/Model/OidcConfiguration.php +lib/Model/OidcUserInfo.php +lib/Model/Pagination.php +lib/Model/PaginationHeaders.php +lib/Model/RejectOAuth2Request.php +lib/Model/TokenPagination.php +lib/Model/TokenPaginationHeaders.php +lib/Model/TokenPaginationRequestParameters.php +lib/Model/TokenPaginationResponseHeaders.php +lib/Model/TrustOAuth2JwtGrantIssuer.php +lib/Model/TrustedOAuth2JwtGrantIssuer.php +lib/Model/TrustedOAuth2JwtGrantJsonWebKey.php lib/Model/Version.php -lib/Model/Volume.php -lib/Model/VolumeUsageData.php -lib/Model/WellKnown.php lib/ObjectSerializer.php phpunit.xml.dist -test/Api/AdminApiTest.php +test/Api/JwkApiTest.php test/Api/MetadataApiTest.php -test/Api/PublicApiTest.php -test/Model/AcceptConsentRequestTest.php -test/Model/AcceptLoginRequestTest.php -test/Model/CompletedRequestTest.php -test/Model/ConsentRequestSessionTest.php -test/Model/ConsentRequestTest.php -test/Model/ContainerWaitOKBodyErrorTest.php -test/Model/FlushInactiveOAuth2TokensRequestTest.php +test/Api/OAuth2ApiTest.php +test/Api/OidcApiTest.php +test/Api/WellknownApiTest.php +test/Model/AcceptOAuth2ConsentRequestSessionTest.php +test/Model/AcceptOAuth2ConsentRequestTest.php +test/Model/AcceptOAuth2LoginRequestTest.php +test/Model/CreateJsonWebKeySetTest.php +test/Model/ErrorOAuth2Test.php test/Model/GenericErrorTest.php test/Model/HealthNotReadyStatusTest.php test/Model/HealthStatusTest.php -test/Model/JSONWebKeySetTest.php -test/Model/JSONWebKeyTest.php -test/Model/JsonErrorTest.php -test/Model/JsonWebKeySetGeneratorRequestTest.php -test/Model/LoginRequestTest.php -test/Model/LogoutRequestTest.php +test/Model/InlineResponse2001Test.php +test/Model/InlineResponse200Test.php +test/Model/InlineResponse503Test.php +test/Model/IntrospectedOAuth2TokenTest.php +test/Model/JsonPatchTest.php +test/Model/JsonWebKeySetTest.php +test/Model/JsonWebKeyTest.php test/Model/OAuth2ClientTest.php -test/Model/OAuth2TokenIntrospectionTest.php -test/Model/Oauth2TokenResponseTest.php -test/Model/OpenIDConnectContextTest.php -test/Model/PatchDocumentTest.php -test/Model/PluginConfigArgsTest.php -test/Model/PluginConfigInterfaceTest.php -test/Model/PluginConfigLinuxTest.php -test/Model/PluginConfigNetworkTest.php -test/Model/PluginConfigRootfsTest.php -test/Model/PluginConfigTest.php -test/Model/PluginConfigUserTest.php -test/Model/PluginDeviceTest.php -test/Model/PluginEnvTest.php -test/Model/PluginInterfaceTypeTest.php -test/Model/PluginMountTest.php -test/Model/PluginSettingsTest.php -test/Model/PreviousConsentSessionTest.php -test/Model/RejectRequestTest.php -test/Model/RequestWasHandledResponseTest.php -test/Model/TrustJwtGrantIssuerBodyTest.php -test/Model/TrustedJsonWebKeyTest.php -test/Model/TrustedJwtGrantIssuerTest.php -test/Model/UserinfoResponseTest.php +test/Model/OAuth2ClientTokenLifespansTest.php +test/Model/OAuth2ConsentRequestOpenIDConnectContextTest.php +test/Model/OAuth2ConsentRequestTest.php +test/Model/OAuth2ConsentSessionExpiresAtTest.php +test/Model/OAuth2ConsentSessionTest.php +test/Model/OAuth2LoginRequestTest.php +test/Model/OAuth2LogoutRequestTest.php +test/Model/OAuth2RedirectToTest.php +test/Model/OAuth2TokenExchangeTest.php +test/Model/OidcConfigurationTest.php +test/Model/OidcUserInfoTest.php +test/Model/PaginationHeadersTest.php +test/Model/PaginationTest.php +test/Model/RejectOAuth2RequestTest.php +test/Model/TokenPaginationHeadersTest.php +test/Model/TokenPaginationRequestParametersTest.php +test/Model/TokenPaginationResponseHeadersTest.php +test/Model/TokenPaginationTest.php +test/Model/TrustOAuth2JwtGrantIssuerTest.php +test/Model/TrustedOAuth2JwtGrantIssuerTest.php +test/Model/TrustedOAuth2JwtGrantJsonWebKeyTest.php test/Model/VersionTest.php -test/Model/VolumeTest.php -test/Model/VolumeUsageDataTest.php -test/Model/WellKnownTest.php diff --git a/clients/hydra/php/README.md b/clients/hydra/php/README.md index a94b448543f..c212d121702 100644 --- a/clients/hydra/php/README.md +++ b/clients/hydra/php/README.md @@ -1,6 +1,7 @@ # ory/hydra-client-php -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. +Documentation for all of Ory Hydra's APIs. + ## Installation & Usage @@ -50,19 +51,19 @@ require_once(__DIR__ . '/vendor/autoload.php'); -$apiInstance = new Ory\Hydra\Client\Api\AdminApi( +$apiInstance = new Ory\Hydra\Client\Api\JwkApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); -$consentChallenge = 'consentChallenge_example'; // string -$body = new \Ory\Hydra\Client\Model\AcceptConsentRequest(); // \Ory\Hydra\Client\Model\AcceptConsentRequest +$set = 'set_example'; // string | The JSON Web Key Set ID +$createJsonWebKeySet = new \Ory\Hydra\Client\Model\CreateJsonWebKeySet(); // \Ory\Hydra\Client\Model\CreateJsonWebKeySet try { - $result = $apiInstance->acceptConsentRequest($consentChallenge, $body); + $result = $apiInstance->createJsonWebKeySet($set, $createJsonWebKeySet); print_r($result); } catch (Exception $e) { - echo 'Exception when calling AdminApi->acceptConsentRequest: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling JwkApi->createJsonWebKeySet: ', $e->getMessage(), PHP_EOL; } ``` @@ -73,100 +74,93 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdminApi* | [**acceptConsentRequest**](docs/Api/AdminApi.md#acceptconsentrequest) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -*AdminApi* | [**acceptLoginRequest**](docs/Api/AdminApi.md#acceptloginrequest) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -*AdminApi* | [**acceptLogoutRequest**](docs/Api/AdminApi.md#acceptlogoutrequest) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -*AdminApi* | [**createJsonWebKeySet**](docs/Api/AdminApi.md#createjsonwebkeyset) | **POST** /keys/{set} | Generate a New JSON Web Key -*AdminApi* | [**createOAuth2Client**](docs/Api/AdminApi.md#createoauth2client) | **POST** /clients | Create an OAuth 2.0 Client -*AdminApi* | [**deleteJsonWebKey**](docs/Api/AdminApi.md#deletejsonwebkey) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -*AdminApi* | [**deleteJsonWebKeySet**](docs/Api/AdminApi.md#deletejsonwebkeyset) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -*AdminApi* | [**deleteOAuth2Client**](docs/Api/AdminApi.md#deleteoauth2client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -*AdminApi* | [**deleteOAuth2Token**](docs/Api/AdminApi.md#deleteoauth2token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -*AdminApi* | [**deleteTrustedJwtGrantIssuer**](docs/Api/AdminApi.md#deletetrustedjwtgrantissuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**flushInactiveOAuth2Tokens**](docs/Api/AdminApi.md#flushinactiveoauth2tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -*AdminApi* | [**getConsentRequest**](docs/Api/AdminApi.md#getconsentrequest) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -*AdminApi* | [**getJsonWebKey**](docs/Api/AdminApi.md#getjsonwebkey) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -*AdminApi* | [**getJsonWebKeySet**](docs/Api/AdminApi.md#getjsonwebkeyset) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -*AdminApi* | [**getLoginRequest**](docs/Api/AdminApi.md#getloginrequest) | **GET** /oauth2/auth/requests/login | Get a Login Request -*AdminApi* | [**getLogoutRequest**](docs/Api/AdminApi.md#getlogoutrequest) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -*AdminApi* | [**getOAuth2Client**](docs/Api/AdminApi.md#getoauth2client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -*AdminApi* | [**getTrustedJwtGrantIssuer**](docs/Api/AdminApi.md#gettrustedjwtgrantissuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**getVersion**](docs/Api/AdminApi.md#getversion) | **GET** /version | Get Service Version -*AdminApi* | [**introspectOAuth2Token**](docs/Api/AdminApi.md#introspectoauth2token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -*AdminApi* | [**isInstanceAlive**](docs/Api/AdminApi.md#isinstancealive) | **GET** /health/alive | Check Alive Status -*AdminApi* | [**listOAuth2Clients**](docs/Api/AdminApi.md#listoauth2clients) | **GET** /clients | List OAuth 2.0 Clients -*AdminApi* | [**listSubjectConsentSessions**](docs/Api/AdminApi.md#listsubjectconsentsessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -*AdminApi* | [**listTrustedJwtGrantIssuers**](docs/Api/AdminApi.md#listtrustedjwtgrantissuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -*AdminApi* | [**patchOAuth2Client**](docs/Api/AdminApi.md#patchoauth2client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -*AdminApi* | [**rejectConsentRequest**](docs/Api/AdminApi.md#rejectconsentrequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -*AdminApi* | [**rejectLoginRequest**](docs/Api/AdminApi.md#rejectloginrequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -*AdminApi* | [**rejectLogoutRequest**](docs/Api/AdminApi.md#rejectlogoutrequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -*AdminApi* | [**revokeAuthenticationSession**](docs/Api/AdminApi.md#revokeauthenticationsession) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -*AdminApi* | [**revokeConsentSessions**](docs/Api/AdminApi.md#revokeconsentsessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -*AdminApi* | [**trustJwtGrantIssuer**](docs/Api/AdminApi.md#trustjwtgrantissuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**updateJsonWebKey**](docs/Api/AdminApi.md#updatejsonwebkey) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -*AdminApi* | [**updateJsonWebKeySet**](docs/Api/AdminApi.md#updatejsonwebkeyset) | **PUT** /keys/{set} | Update a JSON Web Key Set -*AdminApi* | [**updateOAuth2Client**](docs/Api/AdminApi.md#updateoauth2client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client -*MetadataApi* | [**prometheus**](docs/Api/MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: -*PublicApi* | [**disconnectUser**](docs/Api/PublicApi.md#disconnectuser) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -*PublicApi* | [**discoverOpenIDConfiguration**](docs/Api/PublicApi.md#discoveropenidconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -*PublicApi* | [**dynamicClientRegistrationCreateOAuth2Client**](docs/Api/PublicApi.md#dynamicclientregistrationcreateoauth2client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamicClientRegistrationDeleteOAuth2Client**](docs/Api/PublicApi.md#dynamicclientregistrationdeleteoauth2client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamicClientRegistrationGetOAuth2Client**](docs/Api/PublicApi.md#dynamicclientregistrationgetoauth2client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamicClientRegistrationUpdateOAuth2Client**](docs/Api/PublicApi.md#dynamicclientregistrationupdateoauth2client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**isInstanceReady**](docs/Api/PublicApi.md#isinstanceready) | **GET** /health/ready | Check Readiness Status -*PublicApi* | [**oauth2Token**](docs/Api/PublicApi.md#oauth2token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -*PublicApi* | [**oauthAuth**](docs/Api/PublicApi.md#oauthauth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -*PublicApi* | [**revokeOAuth2Token**](docs/Api/PublicApi.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -*PublicApi* | [**userinfo**](docs/Api/PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -*PublicApi* | [**wellKnown**](docs/Api/PublicApi.md#wellknown) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery +*JwkApi* | [**createJsonWebKeySet**](docs/Api/JwkApi.md#createjsonwebkeyset) | **POST** /admin/keys/{set} | Create JSON Web Key +*JwkApi* | [**deleteJsonWebKey**](docs/Api/JwkApi.md#deletejsonwebkey) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key +*JwkApi* | [**deleteJsonWebKeySet**](docs/Api/JwkApi.md#deletejsonwebkeyset) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set +*JwkApi* | [**getJsonWebKey**](docs/Api/JwkApi.md#getjsonwebkey) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key +*JwkApi* | [**getJsonWebKeySet**](docs/Api/JwkApi.md#getjsonwebkeyset) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set +*JwkApi* | [**setJsonWebKey**](docs/Api/JwkApi.md#setjsonwebkey) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key +*JwkApi* | [**setJsonWebKeySet**](docs/Api/JwkApi.md#setjsonwebkeyset) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set +*MetadataApi* | [**getVersion**](docs/Api/MetadataApi.md#getversion) | **GET** /version | Return Running Software Version. +*MetadataApi* | [**isAlive**](docs/Api/MetadataApi.md#isalive) | **GET** /health/alive | Check HTTP Server Status +*MetadataApi* | [**isReady**](docs/Api/MetadataApi.md#isready) | **GET** /health/ready | Check HTTP Server and Database Status +*OAuth2Api* | [**acceptOAuth2ConsentRequest**](docs/Api/OAuth2Api.md#acceptoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +*OAuth2Api* | [**acceptOAuth2LoginRequest**](docs/Api/OAuth2Api.md#acceptoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +*OAuth2Api* | [**acceptOAuth2LogoutRequest**](docs/Api/OAuth2Api.md#acceptoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +*OAuth2Api* | [**createOAuth2Client**](docs/Api/OAuth2Api.md#createoauth2client) | **POST** /admin/clients | Create OAuth 2.0 Client +*OAuth2Api* | [**deleteOAuth2Client**](docs/Api/OAuth2Api.md#deleteoauth2client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client +*OAuth2Api* | [**deleteOAuth2Token**](docs/Api/OAuth2Api.md#deleteoauth2token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +*OAuth2Api* | [**deleteTrustedOAuth2JwtGrantIssuer**](docs/Api/OAuth2Api.md#deletetrustedoauth2jwtgrantissuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**getOAuth2Client**](docs/Api/OAuth2Api.md#getoauth2client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client +*OAuth2Api* | [**getOAuth2ConsentRequest**](docs/Api/OAuth2Api.md#getoauth2consentrequest) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +*OAuth2Api* | [**getOAuth2LoginRequest**](docs/Api/OAuth2Api.md#getoauth2loginrequest) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +*OAuth2Api* | [**getOAuth2LogoutRequest**](docs/Api/OAuth2Api.md#getoauth2logoutrequest) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +*OAuth2Api* | [**getTrustedOAuth2JwtGrantIssuer**](docs/Api/OAuth2Api.md#gettrustedoauth2jwtgrantissuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**introspectOAuth2Token**](docs/Api/OAuth2Api.md#introspectoauth2token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +*OAuth2Api* | [**listOAuth2Clients**](docs/Api/OAuth2Api.md#listoauth2clients) | **GET** /admin/clients | List OAuth 2.0 Clients +*OAuth2Api* | [**listOAuth2ConsentSessions**](docs/Api/OAuth2Api.md#listoauth2consentsessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**listTrustedOAuth2JwtGrantIssuers**](docs/Api/OAuth2Api.md#listtrustedoauth2jwtgrantissuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +*OAuth2Api* | [**oAuth2Authorize**](docs/Api/OAuth2Api.md#oauth2authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint +*OAuth2Api* | [**oauth2TokenExchange**](docs/Api/OAuth2Api.md#oauth2tokenexchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint +*OAuth2Api* | [**patchOAuth2Client**](docs/Api/OAuth2Api.md#patchoauth2client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client +*OAuth2Api* | [**rejectOAuth2ConsentRequest**](docs/Api/OAuth2Api.md#rejectoauth2consentrequest) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +*OAuth2Api* | [**rejectOAuth2LoginRequest**](docs/Api/OAuth2Api.md#rejectoauth2loginrequest) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +*OAuth2Api* | [**rejectOAuth2LogoutRequest**](docs/Api/OAuth2Api.md#rejectoauth2logoutrequest) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +*OAuth2Api* | [**revokeOAuth2ConsentSessions**](docs/Api/OAuth2Api.md#revokeoauth2consentsessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**revokeOAuth2LoginSessions**](docs/Api/OAuth2Api.md#revokeoauth2loginsessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +*OAuth2Api* | [**revokeOAuth2Token**](docs/Api/OAuth2Api.md#revokeoauth2token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +*OAuth2Api* | [**setOAuth2Client**](docs/Api/OAuth2Api.md#setoauth2client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client +*OAuth2Api* | [**setOAuth2ClientLifespans**](docs/Api/OAuth2Api.md#setoauth2clientlifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +*OAuth2Api* | [**trustOAuth2JwtGrantIssuer**](docs/Api/OAuth2Api.md#trustoauth2jwtgrantissuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer +*OidcApi* | [**createOidcDynamicClient**](docs/Api/OidcApi.md#createoidcdynamicclient) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**deleteOidcDynamicClient**](docs/Api/OidcApi.md#deleteoidcdynamicclient) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +*OidcApi* | [**discoverOidcConfiguration**](docs/Api/OidcApi.md#discoveroidcconfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery +*OidcApi* | [**getOidcDynamicClient**](docs/Api/OidcApi.md#getoidcdynamicclient) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**getOidcUserInfo**](docs/Api/OidcApi.md#getoidcuserinfo) | **GET** /userinfo | OpenID Connect Userinfo +*OidcApi* | [**revokeOidcSession**](docs/Api/OidcApi.md#revokeoidcsession) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +*OidcApi* | [**setOidcDynamicClient**](docs/Api/OidcApi.md#setoidcdynamicclient) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration +*WellknownApi* | [**discoverJsonWebKeys**](docs/Api/WellknownApi.md#discoverjsonwebkeys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys ## Models -- [AcceptConsentRequest](docs/Model/AcceptConsentRequest.md) -- [AcceptLoginRequest](docs/Model/AcceptLoginRequest.md) -- [CompletedRequest](docs/Model/CompletedRequest.md) -- [ConsentRequest](docs/Model/ConsentRequest.md) -- [ConsentRequestSession](docs/Model/ConsentRequestSession.md) -- [ContainerWaitOKBodyError](docs/Model/ContainerWaitOKBodyError.md) -- [FlushInactiveOAuth2TokensRequest](docs/Model/FlushInactiveOAuth2TokensRequest.md) +- [AcceptOAuth2ConsentRequest](docs/Model/AcceptOAuth2ConsentRequest.md) +- [AcceptOAuth2ConsentRequestSession](docs/Model/AcceptOAuth2ConsentRequestSession.md) +- [AcceptOAuth2LoginRequest](docs/Model/AcceptOAuth2LoginRequest.md) +- [CreateJsonWebKeySet](docs/Model/CreateJsonWebKeySet.md) +- [ErrorOAuth2](docs/Model/ErrorOAuth2.md) - [GenericError](docs/Model/GenericError.md) - [HealthNotReadyStatus](docs/Model/HealthNotReadyStatus.md) - [HealthStatus](docs/Model/HealthStatus.md) -- [JSONWebKey](docs/Model/JSONWebKey.md) -- [JSONWebKeySet](docs/Model/JSONWebKeySet.md) -- [JsonError](docs/Model/JsonError.md) -- [JsonWebKeySetGeneratorRequest](docs/Model/JsonWebKeySetGeneratorRequest.md) -- [LoginRequest](docs/Model/LoginRequest.md) -- [LogoutRequest](docs/Model/LogoutRequest.md) +- [InlineResponse200](docs/Model/InlineResponse200.md) +- [InlineResponse2001](docs/Model/InlineResponse2001.md) +- [InlineResponse503](docs/Model/InlineResponse503.md) +- [IntrospectedOAuth2Token](docs/Model/IntrospectedOAuth2Token.md) +- [JsonPatch](docs/Model/JsonPatch.md) +- [JsonWebKey](docs/Model/JsonWebKey.md) +- [JsonWebKeySet](docs/Model/JsonWebKeySet.md) - [OAuth2Client](docs/Model/OAuth2Client.md) -- [OAuth2TokenIntrospection](docs/Model/OAuth2TokenIntrospection.md) -- [Oauth2TokenResponse](docs/Model/Oauth2TokenResponse.md) -- [OpenIDConnectContext](docs/Model/OpenIDConnectContext.md) -- [PatchDocument](docs/Model/PatchDocument.md) -- [PluginConfig](docs/Model/PluginConfig.md) -- [PluginConfigArgs](docs/Model/PluginConfigArgs.md) -- [PluginConfigInterface](docs/Model/PluginConfigInterface.md) -- [PluginConfigLinux](docs/Model/PluginConfigLinux.md) -- [PluginConfigNetwork](docs/Model/PluginConfigNetwork.md) -- [PluginConfigRootfs](docs/Model/PluginConfigRootfs.md) -- [PluginConfigUser](docs/Model/PluginConfigUser.md) -- [PluginDevice](docs/Model/PluginDevice.md) -- [PluginEnv](docs/Model/PluginEnv.md) -- [PluginInterfaceType](docs/Model/PluginInterfaceType.md) -- [PluginMount](docs/Model/PluginMount.md) -- [PluginSettings](docs/Model/PluginSettings.md) -- [PreviousConsentSession](docs/Model/PreviousConsentSession.md) -- [RejectRequest](docs/Model/RejectRequest.md) -- [RequestWasHandledResponse](docs/Model/RequestWasHandledResponse.md) -- [TrustJwtGrantIssuerBody](docs/Model/TrustJwtGrantIssuerBody.md) -- [TrustedJsonWebKey](docs/Model/TrustedJsonWebKey.md) -- [TrustedJwtGrantIssuer](docs/Model/TrustedJwtGrantIssuer.md) -- [UserinfoResponse](docs/Model/UserinfoResponse.md) +- [OAuth2ClientTokenLifespans](docs/Model/OAuth2ClientTokenLifespans.md) +- [OAuth2ConsentRequest](docs/Model/OAuth2ConsentRequest.md) +- [OAuth2ConsentRequestOpenIDConnectContext](docs/Model/OAuth2ConsentRequestOpenIDConnectContext.md) +- [OAuth2ConsentSession](docs/Model/OAuth2ConsentSession.md) +- [OAuth2ConsentSessionExpiresAt](docs/Model/OAuth2ConsentSessionExpiresAt.md) +- [OAuth2LoginRequest](docs/Model/OAuth2LoginRequest.md) +- [OAuth2LogoutRequest](docs/Model/OAuth2LogoutRequest.md) +- [OAuth2RedirectTo](docs/Model/OAuth2RedirectTo.md) +- [OAuth2TokenExchange](docs/Model/OAuth2TokenExchange.md) +- [OidcConfiguration](docs/Model/OidcConfiguration.md) +- [OidcUserInfo](docs/Model/OidcUserInfo.md) +- [Pagination](docs/Model/Pagination.md) +- [PaginationHeaders](docs/Model/PaginationHeaders.md) +- [RejectOAuth2Request](docs/Model/RejectOAuth2Request.md) +- [TokenPagination](docs/Model/TokenPagination.md) +- [TokenPaginationHeaders](docs/Model/TokenPaginationHeaders.md) +- [TokenPaginationRequestParameters](docs/Model/TokenPaginationRequestParameters.md) +- [TokenPaginationResponseHeaders](docs/Model/TokenPaginationResponseHeaders.md) +- [TrustOAuth2JwtGrantIssuer](docs/Model/TrustOAuth2JwtGrantIssuer.md) +- [TrustedOAuth2JwtGrantIssuer](docs/Model/TrustedOAuth2JwtGrantIssuer.md) +- [TrustedOAuth2JwtGrantJsonWebKey](docs/Model/TrustedOAuth2JwtGrantJsonWebKey.md) - [Version](docs/Model/Version.md) -- [Volume](docs/Model/Volume.md) -- [VolumeUsageData](docs/Model/VolumeUsageData.md) -- [WellKnown](docs/Model/WellKnown.md) ## Authorization @@ -175,6 +169,11 @@ Class | Method | HTTP request | Description - **Type**: HTTP basic authentication +### bearer + +- **Type**: Bearer authentication + + ### oauth2 - **Type**: `OAuth` @@ -196,11 +195,11 @@ vendor/bin/phpunit ## Author - +hi@ory.sh ## About this package This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: `v1.11.0` +- API version: `v2.0.1` - Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/clients/hydra/php/composer.json b/clients/hydra/php/composer.json index 844ba282554..1308b77a15c 100644 --- a/clients/hydra/php/composer.json +++ b/clients/hydra/php/composer.json @@ -1,6 +1,6 @@ { - "name": "ory/hydra-client", - "description": "Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.", + "name": "ory/hydra-client-php", + "description": "Documentation for all of Ory Hydra's APIs.", "keywords": [ "openapitools", "openapi-generator", diff --git a/clients/hydra/php/composer.lock b/clients/hydra/php/composer.lock new file mode 100644 index 00000000000..bd602e30118 --- /dev/null +++ b/clients/hydra/php/composer.lock @@ -0,0 +1,3699 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "e38c912340fd9f06ae760be7e76dd4d7", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "7.5.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.9 || ^2.4", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "ext-curl": "*", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "7.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "time": "2022-08-28T15:39:27+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.5.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "b94b2807d85443f9719887892882d0329d1e2598" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2022-08-28T14:55:35+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.4.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "67c26b443f348a51926030c83481b85718457d3d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2022-10-26T14:07:24+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2019-04-30T12:38:16+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "time": "2022-01-02T09:53:40+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/pcre", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "time": "2022-01-21T20:24:37+00:00" + }, + { + "name": "composer/semver", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "time": "2022-04-01T19:23:25+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", + "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "shasum": "" + }, + "require": { + "composer/pcre": "^1", + "php": "^5.3.2 || ^7.0 || ^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" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "time": "2022-02-24T20:20:32+00:00" + }, + { + "name": "doctrine/annotations", + "version": "1.13.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "648b0343343565c4a056bfc8392201385e8d89f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0", + "reference": "648b0343343565c4a056bfc8392201385e8d89f0", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^1.4.10 || ^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2", + "vimeo/psalm": "^4.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "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" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2022-07-02T10:48:51+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "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.22" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2022-03-03T08:28:38+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@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", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "time": "2022-02-28T11:07:21+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.19.3", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/75ac86f33fab4714ea5a39a396784d83ae3b5ed8", + "reference": "75ac86f33fab4714ea5a39a396784d83ae3b5ed8", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.2 || ^2.0", + "doctrine/annotations": "^1.2", + "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" + }, + "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" + }, + "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." + }, + "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" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "time": "2021-11-15T17:17:55+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2022-03-03T13:19:32+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.15.1", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2022-09-04T07:30:47+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "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/" + ] + }, + "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" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.17", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.14", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2022-08-30T12:24:04+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.25", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2022-09-25T03:44:45+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/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "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" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2022-04-03T09:37:03+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "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" + }, + { + "name": "sebastian/type", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "time": "2022-09-12T14:47:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/console", + "version": "v5.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/984ea2c0f45f42dfed01d2f3987b187467c4b16d", + "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "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" + }, + "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" + }, + "provide": { + "psr/log-implementation": "1.0|2.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": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "time": "2022-10-07T08:01:20+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.4.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.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": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "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": "2022-05-05T16:45:39+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "time": "2022-09-21T19:53:16+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "time": "2022-07-29T07:37:50+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "time": "2022-07-20T13:00:38+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "433d05519ce6990bf3530fba6957499d327395c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2022-05-24T11:49:31+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" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "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" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "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" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", + "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "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" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2022-05-10T07:21:04+00:00" + }, + { + "name": "symfony/process", + "version": "v5.4.11", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "time": "2022-06-27T16:58:25+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2022-05-30T19:17:29+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6df7a3effde34d81717bbef4591e5ffe32226d69", + "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1|^2|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "time": "2022-09-28T13:19:49+00:00" + }, + { + "name": "symfony/string", + "version": "v5.4.14", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "089e7237497fae7a9c404d0c3aeb8db3254733e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/089e7237497fae7a9c404d0c3aeb8db3254733e4", + "reference": "089e7237497fae7a9c404d0c3aeb8db3254733e4", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "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" + }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, + "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" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "time": "2022-10-05T15:16:54+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2021-07-28T10:34:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^7.3 || ^8.0", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*" + }, + "platform-dev": [] +} diff --git a/clients/hydra/php/docs/Api/AdminApi.md b/clients/hydra/php/docs/Api/AdminApi.md deleted file mode 100644 index 8a8d132542b..00000000000 --- a/clients/hydra/php/docs/Api/AdminApi.md +++ /dev/null @@ -1,1972 +0,0 @@ -# Ory\Hydra\Client\AdminApi - -All URIs are relative to http://localhost. - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**acceptConsentRequest()**](AdminApi.md#acceptConsentRequest) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -[**acceptLoginRequest()**](AdminApi.md#acceptLoginRequest) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -[**acceptLogoutRequest()**](AdminApi.md#acceptLogoutRequest) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -[**createJsonWebKeySet()**](AdminApi.md#createJsonWebKeySet) | **POST** /keys/{set} | Generate a New JSON Web Key -[**createOAuth2Client()**](AdminApi.md#createOAuth2Client) | **POST** /clients | Create an OAuth 2.0 Client -[**deleteJsonWebKey()**](AdminApi.md#deleteJsonWebKey) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -[**deleteJsonWebKeySet()**](AdminApi.md#deleteJsonWebKeySet) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -[**deleteOAuth2Client()**](AdminApi.md#deleteOAuth2Client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -[**deleteOAuth2Token()**](AdminApi.md#deleteOAuth2Token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -[**deleteTrustedJwtGrantIssuer()**](AdminApi.md#deleteTrustedJwtGrantIssuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**flushInactiveOAuth2Tokens()**](AdminApi.md#flushInactiveOAuth2Tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -[**getConsentRequest()**](AdminApi.md#getConsentRequest) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -[**getJsonWebKey()**](AdminApi.md#getJsonWebKey) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -[**getJsonWebKeySet()**](AdminApi.md#getJsonWebKeySet) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -[**getLoginRequest()**](AdminApi.md#getLoginRequest) | **GET** /oauth2/auth/requests/login | Get a Login Request -[**getLogoutRequest()**](AdminApi.md#getLogoutRequest) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -[**getOAuth2Client()**](AdminApi.md#getOAuth2Client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -[**getTrustedJwtGrantIssuer()**](AdminApi.md#getTrustedJwtGrantIssuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**getVersion()**](AdminApi.md#getVersion) | **GET** /version | Get Service Version -[**introspectOAuth2Token()**](AdminApi.md#introspectOAuth2Token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -[**isInstanceAlive()**](AdminApi.md#isInstanceAlive) | **GET** /health/alive | Check Alive Status -[**listOAuth2Clients()**](AdminApi.md#listOAuth2Clients) | **GET** /clients | List OAuth 2.0 Clients -[**listSubjectConsentSessions()**](AdminApi.md#listSubjectConsentSessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -[**listTrustedJwtGrantIssuers()**](AdminApi.md#listTrustedJwtGrantIssuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -[**patchOAuth2Client()**](AdminApi.md#patchOAuth2Client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -[**rejectConsentRequest()**](AdminApi.md#rejectConsentRequest) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -[**rejectLoginRequest()**](AdminApi.md#rejectLoginRequest) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -[**rejectLogoutRequest()**](AdminApi.md#rejectLogoutRequest) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -[**revokeAuthenticationSession()**](AdminApi.md#revokeAuthenticationSession) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -[**revokeConsentSessions()**](AdminApi.md#revokeConsentSessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -[**trustJwtGrantIssuer()**](AdminApi.md#trustJwtGrantIssuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -[**updateJsonWebKey()**](AdminApi.md#updateJsonWebKey) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -[**updateJsonWebKeySet()**](AdminApi.md#updateJsonWebKeySet) | **PUT** /keys/{set} | Update a JSON Web Key Set -[**updateOAuth2Client()**](AdminApi.md#updateOAuth2Client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client - - -## `acceptConsentRequest()` - -```php -acceptConsentRequest($consentChallenge, $body): \Ory\Hydra\Client\Model\CompletedRequest -``` - -Accept a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example - -```php -acceptConsentRequest($consentChallenge, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->acceptConsentRequest: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| | - **body** | [**\Ory\Hydra\Client\Model\AcceptConsentRequest**](../Model/AcceptConsentRequest.md)| | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\CompletedRequest**](../Model/CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `acceptLoginRequest()` - -```php -acceptLoginRequest($loginChallenge, $body): \Ory\Hydra\Client\Model\CompletedRequest -``` - -Accept a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - -### Example - -```php -acceptLoginRequest($loginChallenge, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->acceptLoginRequest: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| | - **body** | [**\Ory\Hydra\Client\Model\AcceptLoginRequest**](../Model/AcceptLoginRequest.md)| | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\CompletedRequest**](../Model/CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `acceptLogoutRequest()` - -```php -acceptLogoutRequest($logoutChallenge): \Ory\Hydra\Client\Model\CompletedRequest -``` - -Accept a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - -### Example - -```php -acceptLogoutRequest($logoutChallenge); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->acceptLogoutRequest: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | - -### Return type - -[**\Ory\Hydra\Client\Model\CompletedRequest**](../Model/CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `createJsonWebKeySet()` - -```php -createJsonWebKeySet($set, $body): \Ory\Hydra\Client\Model\JSONWebKeySet -``` - -Generate a New 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. - -### Example - -```php -createJsonWebKeySet($set, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->createJsonWebKeySet: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The set | - **body** | [**\Ory\Hydra\Client\Model\JsonWebKeySetGeneratorRequest**](../Model/JsonWebKeySetGeneratorRequest.md)| | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `createOAuth2Client()` - -```php -createOAuth2Client($body): \Ory\Hydra\Client\Model\OAuth2Client -``` - -Create an OAuth 2.0 Client - -Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - -### Example - -```php -createOAuth2Client($body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->createOAuth2Client: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| | - -### Return type - -[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `deleteJsonWebKey()` - -```php -deleteJsonWebKey($kid, $set) -``` - -Delete a 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. - -### Example - -```php -deleteJsonWebKey($kid, $set); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->deleteJsonWebKey: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **string**| The kid of the desired key | - **set** | **string**| The set | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `deleteJsonWebKeySet()` - -```php -deleteJsonWebKeySet($set) -``` - -Delete a 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. - -### Example - -```php -deleteJsonWebKeySet($set); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->deleteJsonWebKeySet: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The set | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `deleteOAuth2Client()` - -```php -deleteOAuth2Client($id) -``` - -Deletes an 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. - -### Example - -```php -deleteOAuth2Client($id); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->deleteOAuth2Client: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `deleteOAuth2Token()` - -```php -deleteOAuth2Token($clientId) -``` - -Delete OAuth2 Access Tokens from a Client - -This endpoint deletes OAuth2 access tokens issued for a client from the database - -### Example - -```php -deleteOAuth2Token($clientId); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->deleteOAuth2Token: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **clientId** | **string**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `deleteTrustedJwtGrantIssuer()` - -```php -deleteTrustedJwtGrantIssuer($id) -``` - -Delete a 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. - -### Example - -```php -deleteTrustedJwtGrantIssuer($id); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->deleteTrustedJwtGrantIssuer: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the desired grant | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `flushInactiveOAuth2Tokens()` - -```php -flushInactiveOAuth2Tokens($body) -``` - -Flush Expired OAuth2 Access Tokens - -This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - -### Example - -```php -flushInactiveOAuth2Tokens($body); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->flushInactiveOAuth2Tokens: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\Ory\Hydra\Client\Model\FlushInactiveOAuth2TokensRequest**](../Model/FlushInactiveOAuth2TokensRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `getConsentRequest()` - -```php -getConsentRequest($consentChallenge): \Ory\Hydra\Client\Model\ConsentRequest -``` - -Get Consent Request Information - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - -### Example - -```php -getConsentRequest($consentChallenge); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->getConsentRequest: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| | - -### Return type - -[**\Ory\Hydra\Client\Model\ConsentRequest**](../Model/ConsentRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `getJsonWebKey()` - -```php -getJsonWebKey($kid, $set): \Ory\Hydra\Client\Model\JSONWebKeySet -``` - -Fetch a JSON Web Key - -This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - -### Example - -```php -getJsonWebKey($kid, $set); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->getJsonWebKey: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **string**| The kid of the desired key | - **set** | **string**| The set | - -### Return type - -[**\Ory\Hydra\Client\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `getJsonWebKeySet()` - -```php -getJsonWebKeySet($set): \Ory\Hydra\Client\Model\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. - -### Example - -```php -getJsonWebKeySet($set); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->getJsonWebKeySet: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The set | - -### Return type - -[**\Ory\Hydra\Client\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `getLoginRequest()` - -```php -getLoginRequest($loginChallenge): \Ory\Hydra\Client\Model\LoginRequest -``` - -Get a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - -### Example - -```php -getLoginRequest($loginChallenge); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->getLoginRequest: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| | - -### Return type - -[**\Ory\Hydra\Client\Model\LoginRequest**](../Model/LoginRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `getLogoutRequest()` - -```php -getLogoutRequest($logoutChallenge): \Ory\Hydra\Client\Model\LogoutRequest -``` - -Get a Logout Request - -Use this endpoint to fetch a logout request. - -### Example - -```php -getLogoutRequest($logoutChallenge); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->getLogoutRequest: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | - -### Return type - -[**\Ory\Hydra\Client\Model\LogoutRequest**](../Model/LogoutRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `getOAuth2Client()` - -```php -getOAuth2Client($id): \Ory\Hydra\Client\Model\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. - -### Example - -```php -getOAuth2Client($id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->getOAuth2Client: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | - -### Return type - -[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `getTrustedJwtGrantIssuer()` - -```php -getTrustedJwtGrantIssuer($id): \Ory\Hydra\Client\Model\TrustedJwtGrantIssuer -``` - -Get a 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. - -### Example - -```php -getTrustedJwtGrantIssuer($id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->getTrustedJwtGrantIssuer: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the desired grant | - -### Return type - -[**\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer**](../Model/TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `getVersion()` - -```php -getVersion(): \Ory\Hydra\Client\Model\Version -``` - -Get Service Version - -This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - -### Example - -```php -getVersion(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->getVersion: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Ory\Hydra\Client\Model\Version**](../Model/Version.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `introspectOAuth2Token()` - -```php -introspectOAuth2Token($token, $scope): \Ory\Hydra\Client\Model\OAuth2TokenIntrospection -``` - -Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - -### Example - -```php -introspectOAuth2Token($token, $scope); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->introspectOAuth2Token: ', $e->getMessage(), PHP_EOL; -} -``` - -### 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] - -### Return type - -[**\Ory\Hydra\Client\Model\OAuth2TokenIntrospection**](../Model/OAuth2TokenIntrospection.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/x-www-form-urlencoded` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `isInstanceAlive()` - -```php -isInstanceAlive(): \Ory\Hydra\Client\Model\HealthStatus -``` - -Check Alive Status - -This endpoint returns a 200 status code when the HTTP server is up running. 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. - -### Example - -```php -isInstanceAlive(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->isInstanceAlive: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Ory\Hydra\Client\Model\HealthStatus**](../Model/HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `listOAuth2Clients()` - -```php -listOAuth2Clients($limit, $offset, $clientName, $owner): \Ory\Hydra\Client\Model\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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example - -```php -listOAuth2Clients($limit, $offset, $clientName, $owner); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->listOAuth2Clients: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int**| The maximum amount of clients to returned, upper bound is 500 clients. | [optional] - **offset** | **int**| The offset from where to start looking. | [optional] - **clientName** | **string**| The name of the clients to filter by. | [optional] - **owner** | **string**| The owner of the clients to filter by. | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\OAuth2Client[]**](../Model/OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `listSubjectConsentSessions()` - -```php -listSubjectConsentSessions($subject): \Ory\Hydra\Client\Model\PreviousConsentSession[] -``` - -Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example - -```php -listSubjectConsentSessions($subject); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->listSubjectConsentSessions: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| | - -### Return type - -[**\Ory\Hydra\Client\Model\PreviousConsentSession[]**](../Model/PreviousConsentSession.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `listTrustedJwtGrantIssuers()` - -```php -listTrustedJwtGrantIssuers($issuer, $limit, $offset): \Ory\Hydra\Client\Model\TrustedJwtGrantIssuer[] -``` - -List Trusted OAuth2 JWT Bearer Grant Type Issuers - -Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - -### Example - -```php -listTrustedJwtGrantIssuers($issuer, $limit, $offset); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->listTrustedJwtGrantIssuers: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **issuer** | **string**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] - **limit** | **int**| The maximum amount of policies returned, upper bound is 500 policies | [optional] - **offset** | **int**| The offset from where to start looking. | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer[]**](../Model/TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `patchOAuth2Client()` - -```php -patchOAuth2Client($id, $body): \Ory\Hydra\Client\Model\OAuth2Client -``` - -Patch an OAuth 2.0 Client - -Patch an existing OAuth 2.0 Client. 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. - -### Example - -```php -patchOAuth2Client($id, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->patchOAuth2Client: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | - **body** | [**\Ory\Hydra\Client\Model\PatchDocument[]**](../Model/PatchDocument.md)| | - -### Return type - -[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `rejectConsentRequest()` - -```php -rejectConsentRequest($consentChallenge, $body): \Ory\Hydra\Client\Model\CompletedRequest -``` - -Reject a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example - -```php -rejectConsentRequest($consentChallenge, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->rejectConsentRequest: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consentChallenge** | **string**| | - **body** | [**\Ory\Hydra\Client\Model\RejectRequest**](../Model/RejectRequest.md)| | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\CompletedRequest**](../Model/CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `rejectLoginRequest()` - -```php -rejectLoginRequest($loginChallenge, $body): \Ory\Hydra\Client\Model\CompletedRequest -``` - -Reject a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - -### Example - -```php -rejectLoginRequest($loginChallenge, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->rejectLoginRequest: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **loginChallenge** | **string**| | - **body** | [**\Ory\Hydra\Client\Model\RejectRequest**](../Model/RejectRequest.md)| | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\CompletedRequest**](../Model/CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `rejectLogoutRequest()` - -```php -rejectLogoutRequest($logoutChallenge, $body) -``` - -Reject a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - -### Example - -```php -rejectLogoutRequest($logoutChallenge, $body); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->rejectLogoutRequest: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logoutChallenge** | **string**| | - **body** | [**\Ory\Hydra\Client\Model\RejectRequest**](../Model/RejectRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json`, `application/x-www-form-urlencoded` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `revokeAuthenticationSession()` - -```php -revokeAuthenticationSession($subject) -``` - -Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - -This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - -### Example - -```php -revokeAuthenticationSession($subject); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->revokeAuthenticationSession: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `revokeConsentSessions()` - -```php -revokeConsentSessions($subject, $client, $all) -``` - -Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - -This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - -### Example - -```php -revokeConsentSessions($subject, $client, $all); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->revokeConsentSessions: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **string**| The subject (Subject) who's consent sessions should be deleted. | - **client** | **string**| If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | [optional] - **all** | **bool**| If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `trustJwtGrantIssuer()` - -```php -trustJwtGrantIssuer($body): \Ory\Hydra\Client\Model\TrustedJwtGrantIssuer -``` - -Trust an 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). - -### Example - -```php -trustJwtGrantIssuer($body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->trustJwtGrantIssuer: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\Ory\Hydra\Client\Model\TrustJwtGrantIssuerBody**](../Model/TrustJwtGrantIssuerBody.md)| | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer**](../Model/TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `updateJsonWebKey()` - -```php -updateJsonWebKey($kid, $set, $body): \Ory\Hydra\Client\Model\JSONWebKey -``` - -Update a 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. - -### Example - -```php -updateJsonWebKey($kid, $set, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->updateJsonWebKey: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **string**| The kid of the desired key | - **set** | **string**| The set | - **body** | [**\Ory\Hydra\Client\Model\JSONWebKey**](../Model/JSONWebKey.md)| | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\JSONWebKey**](../Model/JSONWebKey.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `updateJsonWebKeySet()` - -```php -updateJsonWebKeySet($set, $body): \Ory\Hydra\Client\Model\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. - -### Example - -```php -updateJsonWebKeySet($set, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->updateJsonWebKeySet: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **string**| The set | - **body** | [**\Ory\Hydra\Client\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md)| | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `updateOAuth2Client()` - -```php -updateOAuth2Client($id, $body): \Ory\Hydra\Client\Model\OAuth2Client -``` - -Update an OAuth 2.0 Client - -Update an existing OAuth 2.0 Client. 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. - -### Example - -```php -updateOAuth2Client($id, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling AdminApi->updateOAuth2Client: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | - **body** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| | - -### Return type - -[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Api/JwkApi.md b/clients/hydra/php/docs/Api/JwkApi.md new file mode 100644 index 00000000000..5e6808db7f9 --- /dev/null +++ b/clients/hydra/php/docs/Api/JwkApi.md @@ -0,0 +1,416 @@ +# Ory\Hydra\Client\JwkApi + +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 + + +## `createJsonWebKeySet()` + +```php +createJsonWebKeySet($set, $createJsonWebKeySet): \Ory\Hydra\Client\Model\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. + +### Example + +```php +createJsonWebKeySet($set, $createJsonWebKeySet); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling JwkApi->createJsonWebKeySet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set** | **string**| The JSON Web Key Set ID | + **createJsonWebKeySet** | [**\Ory\Hydra\Client\Model\CreateJsonWebKeySet**](../Model/CreateJsonWebKeySet.md)| | + +### Return type + +[**\Ory\Hydra\Client\Model\JsonWebKeySet**](../Model/JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteJsonWebKey()` + +```php +deleteJsonWebKey($set, $kid) +``` + +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. + +### Example + +```php +deleteJsonWebKey($set, $kid); +} catch (Exception $e) { + echo 'Exception when calling JwkApi->deleteJsonWebKey: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set** | **string**| The JSON Web Key Set | + **kid** | **string**| The JSON Web Key ID (kid) | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteJsonWebKeySet()` + +```php +deleteJsonWebKeySet($set) +``` + +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. + +### Example + +```php +deleteJsonWebKeySet($set); +} catch (Exception $e) { + echo 'Exception when calling JwkApi->deleteJsonWebKeySet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set** | **string**| The JSON Web Key Set | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getJsonWebKey()` + +```php +getJsonWebKey($set, $kid): \Ory\Hydra\Client\Model\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). + +### Example + +```php +getJsonWebKey($set, $kid); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling JwkApi->getJsonWebKey: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set** | **string**| JSON Web Key Set ID | + **kid** | **string**| JSON Web Key ID | + +### Return type + +[**\Ory\Hydra\Client\Model\JsonWebKeySet**](../Model/JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getJsonWebKeySet()` + +```php +getJsonWebKeySet($set): \Ory\Hydra\Client\Model\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. + +### Example + +```php +getJsonWebKeySet($set); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling JwkApi->getJsonWebKeySet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set** | **string**| JSON Web Key Set ID | + +### Return type + +[**\Ory\Hydra\Client\Model\JsonWebKeySet**](../Model/JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `setJsonWebKey()` + +```php +setJsonWebKey($set, $kid, $jsonWebKey): \Ory\Hydra\Client\Model\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. + +### Example + +```php +setJsonWebKey($set, $kid, $jsonWebKey); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling JwkApi->setJsonWebKey: ', $e->getMessage(), PHP_EOL; +} +``` + +### 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] + +### Return type + +[**\Ory\Hydra\Client\Model\JsonWebKey**](../Model/JsonWebKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `setJsonWebKeySet()` + +```php +setJsonWebKeySet($set, $jsonWebKeySet): \Ory\Hydra\Client\Model\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. + +### Example + +```php +setJsonWebKeySet($set, $jsonWebKeySet); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling JwkApi->setJsonWebKeySet: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **set** | **string**| The JSON Web Key Set ID | + **jsonWebKeySet** | [**\Ory\Hydra\Client\Model\JsonWebKeySet**](../Model/JsonWebKeySet.md)| | [optional] + +### Return type + +[**\Ory\Hydra\Client\Model\JsonWebKeySet**](../Model/JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Api/MetadataApi.md b/clients/hydra/php/docs/Api/MetadataApi.md index 549d9d05f0e..13547453a7a 100644 --- a/clients/hydra/php/docs/Api/MetadataApi.md +++ b/clients/hydra/php/docs/Api/MetadataApi.md @@ -4,18 +4,20 @@ All URIs are relative to http://localhost. Method | HTTP request | Description ------------- | ------------- | ------------- -[**prometheus()**](MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +[**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 -## `prometheus()` +## `getVersion()` ```php -prometheus() +getVersion(): \Ory\Hydra\Client\Model\InlineResponse2001 ``` -Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +Return Running Software Version. -``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` +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. ### Example @@ -32,9 +34,10 @@ $apiInstance = new Ory\Hydra\Client\Api\MetadataApi( ); try { - $apiInstance->prometheus(); + $result = $apiInstance->getVersion(); + print_r($result); } catch (Exception $e) { - echo 'Exception when calling MetadataApi->prometheus: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling MetadataApi->getVersion: ', $e->getMessage(), PHP_EOL; } ``` @@ -44,7 +47,7 @@ This endpoint does not need any parameter. ### Return type -void (empty response body) +[**\Ory\Hydra\Client\Model\InlineResponse2001**](../Model/InlineResponse2001.md) ### Authorization @@ -53,7 +56,113 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `isAlive()` + +```php +isAlive(): \Ory\Hydra\Client\Model\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. + +### Example + +```php +isAlive(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MetadataApi->isAlive: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\Ory\Hydra\Client\Model\HealthStatus**](../Model/HealthStatus.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `isReady()` + +```php +isReady(): \Ory\Hydra\Client\Model\InlineResponse200 +``` + +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. + +### Example + +```php +isReady(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MetadataApi->isReady: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\Ory\Hydra\Client\Model\InlineResponse200**](../Model/InlineResponse200.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` [[Back to top]](#) [[Back to API list]](../../README.md#endpoints) [[Back to Model list]](../../README.md#models) diff --git a/clients/hydra/php/docs/Api/OAuth2Api.md b/clients/hydra/php/docs/Api/OAuth2Api.md new file mode 100644 index 00000000000..9a5186b6929 --- /dev/null +++ b/clients/hydra/php/docs/Api/OAuth2Api.md @@ -0,0 +1,1653 @@ +# 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 All OAuth 2.0 Login Sessions of a Subject +[**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()` + +```php +acceptOAuth2ConsentRequest($consentChallenge, $acceptOAuth2ConsentRequest): \Ory\Hydra\Client\Model\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. + +### Example + +```php +acceptOAuth2ConsentRequest($consentChallenge, $acceptOAuth2ConsentRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->acceptOAuth2ConsentRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | + **acceptOAuth2ConsentRequest** | [**\Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest**](../Model/AcceptOAuth2ConsentRequest.md)| | [optional] + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2RedirectTo**](../Model/OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `acceptOAuth2LoginRequest()` + +```php +acceptOAuth2LoginRequest($loginChallenge, $acceptOAuth2LoginRequest): \Ory\Hydra\Client\Model\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. + +### Example + +```php +acceptOAuth2LoginRequest($loginChallenge, $acceptOAuth2LoginRequest); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->acceptOAuth2LoginRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | + **acceptOAuth2LoginRequest** | [**\Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest**](../Model/AcceptOAuth2LoginRequest.md)| | [optional] + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2RedirectTo**](../Model/OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `acceptOAuth2LogoutRequest()` + +```php +acceptOAuth2LogoutRequest($logoutChallenge): \Ory\Hydra\Client\Model\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. + +### Example + +```php +acceptOAuth2LogoutRequest($logoutChallenge); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->acceptOAuth2LogoutRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **string**| OAuth 2.0 Logout Request Challenge | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2RedirectTo**](../Model/OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `createOAuth2Client()` + +```php +createOAuth2Client($oAuth2Client): \Ory\Hydra\Client\Model\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. + +### Example + +```php +createOAuth2Client($oAuth2Client); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->createOAuth2Client: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| OAuth 2.0 Client Request Body | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteOAuth2Client()` + +```php +deleteOAuth2Client($id) +``` + +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. + +### Example + +```php +deleteOAuth2Client($id); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->deleteOAuth2Client: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| The id of the OAuth 2.0 Client. | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteOAuth2Token()` + +```php +deleteOAuth2Token($clientId) +``` + +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. + +### Example + +```php +deleteOAuth2Token($clientId); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->deleteOAuth2Token: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **clientId** | **string**| OAuth 2.0 Client ID | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteTrustedOAuth2JwtGrantIssuer()` + +```php +deleteTrustedOAuth2JwtGrantIssuer($id) +``` + +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. + +### Example + +```php +deleteTrustedOAuth2JwtGrantIssuer($id); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->deleteTrustedOAuth2JwtGrantIssuer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| The id of the desired grant | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getOAuth2Client()` + +```php +getOAuth2Client($id): \Ory\Hydra\Client\Model\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. + +### Example + +```php +getOAuth2Client($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->getOAuth2Client: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| The id of the OAuth 2.0 Client. | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getOAuth2ConsentRequest()` + +```php +getOAuth2ConsentRequest($consentChallenge): \Ory\Hydra\Client\Model\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. + +### Example + +```php +getOAuth2ConsentRequest($consentChallenge); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->getOAuth2ConsentRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2ConsentRequest**](../Model/OAuth2ConsentRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getOAuth2LoginRequest()` + +```php +getOAuth2LoginRequest($loginChallenge): \Ory\Hydra\Client\Model\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. + +### Example + +```php +getOAuth2LoginRequest($loginChallenge); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->getOAuth2LoginRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2LoginRequest**](../Model/OAuth2LoginRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getOAuth2LogoutRequest()` + +```php +getOAuth2LogoutRequest($logoutChallenge): \Ory\Hydra\Client\Model\OAuth2LogoutRequest +``` + +Get OAuth 2.0 Session Logout Request + +Use this endpoint to fetch an Ory OAuth 2.0 logout request. + +### Example + +```php +getOAuth2LogoutRequest($logoutChallenge); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->getOAuth2LogoutRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **string**| | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2LogoutRequest**](../Model/OAuth2LogoutRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getTrustedOAuth2JwtGrantIssuer()` + +```php +getTrustedOAuth2JwtGrantIssuer($id): \Ory\Hydra\Client\Model\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. + +### Example + +```php +getTrustedOAuth2JwtGrantIssuer($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->getTrustedOAuth2JwtGrantIssuer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| The id of the desired grant | + +### Return type + +[**\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer**](../Model/TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `introspectOAuth2Token()` + +```php +introspectOAuth2Token($token, $scope): \Ory\Hydra\Client\Model\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. + +### Example + +```php +introspectOAuth2Token($token, $scope); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->introspectOAuth2Token: ', $e->getMessage(), PHP_EOL; +} +``` + +### 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] + +### Return type + +[**\Ory\Hydra\Client\Model\IntrospectedOAuth2Token**](../Model/IntrospectedOAuth2Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listOAuth2Clients()` + +```php +listOAuth2Clients($pageSize, $pageToken, $clientName, $owner): \Ory\Hydra\Client\Model\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. + +### Example + +```php +listOAuth2Clients($pageSize, $pageToken, $clientName, $owner); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->listOAuth2Clients: ', $e->getMessage(), PHP_EOL; +} +``` + +### 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] + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2Client[]**](../Model/OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listOAuth2ConsentSessions()` + +```php +listOAuth2ConsentSessions($subject, $pageSize, $pageToken): \Ory\Hydra\Client\Model\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. + +### Example + +```php +listOAuth2ConsentSessions($subject, $pageSize, $pageToken); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->listOAuth2ConsentSessions: ', $e->getMessage(), PHP_EOL; +} +``` + +### 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'] + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2ConsentSession[]**](../Model/OAuth2ConsentSession.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listTrustedOAuth2JwtGrantIssuers()` + +```php +listTrustedOAuth2JwtGrantIssuers($maxItems, $defaultItems, $issuer): \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[] +``` + +List Trusted OAuth2 JWT Bearer Grant Type Issuers + +Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + +### Example + +```php +listTrustedOAuth2JwtGrantIssuers($maxItems, $defaultItems, $issuer); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->listTrustedOAuth2JwtGrantIssuers: ', $e->getMessage(), PHP_EOL; +} +``` + +### 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] + +### Return type + +[**\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]**](../Model/TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `oAuth2Authorize()` + +```php +oAuth2Authorize(): \Ory\Hydra\Client\Model\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. + +### Example + +```php +oAuth2Authorize(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->oAuth2Authorize: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\Ory\Hydra\Client\Model\ErrorOAuth2**](../Model/ErrorOAuth2.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `oauth2TokenExchange()` + +```php +oauth2TokenExchange($grantType, $clientId, $code, $redirectUri, $refreshToken): \Ory\Hydra\Client\Model\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. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: oauth2 +$config = Ory\Hydra\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new Ory\Hydra\Client\Api\OAuth2Api( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$grantType = 'grantType_example'; // string +$clientId = 'clientId_example'; // string +$code = 'code_example'; // string +$redirectUri = 'redirectUri_example'; // string +$refreshToken = 'refreshToken_example'; // string + +try { + $result = $apiInstance->oauth2TokenExchange($grantType, $clientId, $code, $redirectUri, $refreshToken); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->oauth2TokenExchange: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **grantType** | **string**| | + **clientId** | **string**| | [optional] + **code** | **string**| | [optional] + **redirectUri** | **string**| | [optional] + **refreshToken** | **string**| | [optional] + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2TokenExchange**](../Model/OAuth2TokenExchange.md) + +### Authorization + +[basic](../../README.md#basic), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `patchOAuth2Client()` + +```php +patchOAuth2Client($id, $jsonPatch): \Ory\Hydra\Client\Model\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. + +### Example + +```php +patchOAuth2Client($id, $jsonPatch); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->patchOAuth2Client: ', $e->getMessage(), PHP_EOL; +} +``` + +### 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 | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `rejectOAuth2ConsentRequest()` + +```php +rejectOAuth2ConsentRequest($consentChallenge, $rejectOAuth2Request): \Ory\Hydra\Client\Model\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. + +### Example + +```php +rejectOAuth2ConsentRequest($consentChallenge, $rejectOAuth2Request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->rejectOAuth2ConsentRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **consentChallenge** | **string**| OAuth 2.0 Consent Request Challenge | + **rejectOAuth2Request** | [**\Ory\Hydra\Client\Model\RejectOAuth2Request**](../Model/RejectOAuth2Request.md)| | [optional] + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2RedirectTo**](../Model/OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `rejectOAuth2LoginRequest()` + +```php +rejectOAuth2LoginRequest($loginChallenge, $rejectOAuth2Request): \Ory\Hydra\Client\Model\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. + +### Example + +```php +rejectOAuth2LoginRequest($loginChallenge, $rejectOAuth2Request); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->rejectOAuth2LoginRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginChallenge** | **string**| OAuth 2.0 Login Request Challenge | + **rejectOAuth2Request** | [**\Ory\Hydra\Client\Model\RejectOAuth2Request**](../Model/RejectOAuth2Request.md)| | [optional] + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2RedirectTo**](../Model/OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `rejectOAuth2LogoutRequest()` + +```php +rejectOAuth2LogoutRequest($logoutChallenge) +``` + +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. + +### Example + +```php +rejectOAuth2LogoutRequest($logoutChallenge); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->rejectOAuth2LogoutRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logoutChallenge** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `revokeOAuth2ConsentSessions()` + +```php +revokeOAuth2ConsentSessions($subject, $client, $all) +``` + +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. + +### Example + +```php +revokeOAuth2ConsentSessions($subject, $client, $all); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->revokeOAuth2ConsentSessions: ', $e->getMessage(), PHP_EOL; +} +``` + +### 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] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `revokeOAuth2LoginSessions()` + +```php +revokeOAuth2LoginSessions($subject) +``` + +Revokes All OAuth 2.0 Login Sessions of a Subject + +This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + +### Example + +```php +revokeOAuth2LoginSessions($subject); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->revokeOAuth2LoginSessions: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **subject** | **string**| OAuth 2.0 Subject The subject to revoke authentication sessions for. | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `revokeOAuth2Token()` + +```php +revokeOAuth2Token($token) +``` + +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. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: oauth2 +$config = Ory\Hydra\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new Ory\Hydra\Client\Api\OAuth2Api( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$token = 'token_example'; // string + +try { + $apiInstance->revokeOAuth2Token($token); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->revokeOAuth2Token: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **string**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../../README.md#basic), [oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: `application/x-www-form-urlencoded` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `setOAuth2Client()` + +```php +setOAuth2Client($id, $oAuth2Client): \Ory\Hydra\Client\Model\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. + +### Example + +```php +setOAuth2Client($id, $oAuth2Client); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->setOAuth2Client: ', $e->getMessage(), PHP_EOL; +} +``` + +### 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 | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `setOAuth2ClientLifespans()` + +```php +setOAuth2ClientLifespans($id, $oAuth2ClientTokenLifespans): \Ory\Hydra\Client\Model\OAuth2Client +``` + +Set OAuth2 Client Token Lifespans + +Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + +### Example + +```php +setOAuth2ClientLifespans($id, $oAuth2ClientTokenLifespans); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->setOAuth2ClientLifespans: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| OAuth 2.0 Client ID | + **oAuth2ClientTokenLifespans** | [**\Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans**](../Model/OAuth2ClientTokenLifespans.md)| | [optional] + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `trustOAuth2JwtGrantIssuer()` + +```php +trustOAuth2JwtGrantIssuer($trustOAuth2JwtGrantIssuer): \Ory\Hydra\Client\Model\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). + +### Example + +```php +trustOAuth2JwtGrantIssuer($trustOAuth2JwtGrantIssuer); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OAuth2Api->trustOAuth2JwtGrantIssuer: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trustOAuth2JwtGrantIssuer** | [**\Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer**](../Model/TrustOAuth2JwtGrantIssuer.md)| | [optional] + +### Return type + +[**\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer**](../Model/TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Api/OidcApi.md b/clients/hydra/php/docs/Api/OidcApi.md new file mode 100644 index 00000000000..d039985c9be --- /dev/null +++ b/clients/hydra/php/docs/Api/OidcApi.md @@ -0,0 +1,413 @@ +# Ory\Hydra\Client\OidcApi + +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 +[**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()` + +```php +createOidcDynamicClient($oAuth2Client): \Ory\Hydra\Client\Model\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. + +### Example + +```php +createOidcDynamicClient($oAuth2Client); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OidcApi->createOidcDynamicClient: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **oAuth2Client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| Dynamic Client Registration Request Body | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteOidcDynamicClient()` + +```php +deleteOidcDynamicClient($id) +``` + +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. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new Ory\Hydra\Client\Api\OidcApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | The id of the OAuth 2.0 Client. + +try { + $apiInstance->deleteOidcDynamicClient($id); +} catch (Exception $e) { + echo 'Exception when calling OidcApi->deleteOidcDynamicClient: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| The id of the OAuth 2.0 Client. | + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `discoverOidcConfiguration()` + +```php +discoverOidcConfiguration(): \Ory\Hydra\Client\Model\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/ + +### Example + +```php +discoverOidcConfiguration(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OidcApi->discoverOidcConfiguration: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\Ory\Hydra\Client\Model\OidcConfiguration**](../Model/OidcConfiguration.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getOidcDynamicClient()` + +```php +getOidcDynamicClient($id): \Ory\Hydra\Client\Model\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. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new Ory\Hydra\Client\Api\OidcApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | The id of the OAuth 2.0 Client. + +try { + $result = $apiInstance->getOidcDynamicClient($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OidcApi->getOidcDynamicClient: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| The id of the OAuth 2.0 Client. | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) + +### Authorization + +[bearer](../../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getOidcUserInfo()` + +```php +getOidcUserInfo(): \Ory\Hydra\Client\Model\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. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new Ory\Hydra\Client\Api\OidcApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +try { + $result = $apiInstance->getOidcUserInfo(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OidcApi->getOidcUserInfo: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\Ory\Hydra\Client\Model\OidcUserInfo**](../Model/OidcUserInfo.md) + +### Authorization + +[oauth2](../../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `revokeOidcSession()` + +```php +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. + +### Example + +```php +revokeOidcSession(); +} catch (Exception $e) { + echo 'Exception when calling OidcApi->revokeOidcSession: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `setOidcDynamicClient()` + +```php +setOidcDynamicClient($id, $oAuth2Client): \Ory\Hydra\Client\Model\OAuth2Client +``` + +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. + +### Example + +```php +setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new Ory\Hydra\Client\Api\OidcApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | OAuth 2.0 Client ID +$oAuth2Client = new \Ory\Hydra\Client\Model\OAuth2Client(); // \Ory\Hydra\Client\Model\OAuth2Client | OAuth 2.0 Client Request Body + +try { + $result = $apiInstance->setOidcDynamicClient($id, $oAuth2Client); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling OidcApi->setOidcDynamicClient: ', $e->getMessage(), PHP_EOL; +} +``` + +### 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 | + +### Return type + +[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) + +### Authorization + +[bearer](../../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Api/PublicApi.md b/clients/hydra/php/docs/Api/PublicApi.md deleted file mode 100644 index e6a7ea308b1..00000000000 --- a/clients/hydra/php/docs/Api/PublicApi.md +++ /dev/null @@ -1,701 +0,0 @@ -# Ory\Hydra\Client\PublicApi - -All URIs are relative to http://localhost. - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disconnectUser()**](PublicApi.md#disconnectUser) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -[**discoverOpenIDConfiguration()**](PublicApi.md#discoverOpenIDConfiguration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -[**dynamicClientRegistrationCreateOAuth2Client()**](PublicApi.md#dynamicClientRegistrationCreateOAuth2Client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamicClientRegistrationDeleteOAuth2Client()**](PublicApi.md#dynamicClientRegistrationDeleteOAuth2Client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamicClientRegistrationGetOAuth2Client()**](PublicApi.md#dynamicClientRegistrationGetOAuth2Client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamicClientRegistrationUpdateOAuth2Client()**](PublicApi.md#dynamicClientRegistrationUpdateOAuth2Client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**isInstanceReady()**](PublicApi.md#isInstanceReady) | **GET** /health/ready | Check Readiness Status -[**oauth2Token()**](PublicApi.md#oauth2Token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -[**oauthAuth()**](PublicApi.md#oauthAuth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -[**revokeOAuth2Token()**](PublicApi.md#revokeOAuth2Token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -[**userinfo()**](PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -[**wellKnown()**](PublicApi.md#wellKnown) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery - - -## `disconnectUser()` - -```php -disconnectUser() -``` - -OpenID Connect Front-Backchannel Enabled Logout - -This endpoint initiates and completes user logout at Ory Hydra 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 - -### Example - -```php -disconnectUser(); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->disconnectUser: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `discoverOpenIDConfiguration()` - -```php -discoverOpenIDConfiguration(): \Ory\Hydra\Client\Model\WellKnown -``` - -OpenID Connect Discovery - -The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - -### Example - -```php -discoverOpenIDConfiguration(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->discoverOpenIDConfiguration: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Ory\Hydra\Client\Model\WellKnown**](../Model/WellKnown.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `dynamicClientRegistrationCreateOAuth2Client()` - -```php -dynamicClientRegistrationCreateOAuth2Client($body): \Ory\Hydra\Client\Model\OAuth2Client -``` - -Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. - -### Example - -```php -dynamicClientRegistrationCreateOAuth2Client($body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->dynamicClientRegistrationCreateOAuth2Client: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| | - -### Return type - -[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `dynamicClientRegistrationDeleteOAuth2Client()` - -```php -dynamicClientRegistrationDeleteOAuth2Client($id) -``` - -Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - -### Example - -```php -dynamicClientRegistrationDeleteOAuth2Client($id); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->dynamicClientRegistrationDeleteOAuth2Client: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `dynamicClientRegistrationGetOAuth2Client()` - -```php -dynamicClientRegistrationGetOAuth2Client($id): \Ory\Hydra\Client\Model\OAuth2Client -``` - -Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. 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. - -### Example - -```php -dynamicClientRegistrationGetOAuth2Client($id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->dynamicClientRegistrationGetOAuth2Client: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | - -### Return type - -[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `dynamicClientRegistrationUpdateOAuth2Client()` - -```php -dynamicClientRegistrationUpdateOAuth2Client($id, $body): \Ory\Hydra\Client\Model\OAuth2Client -``` - -Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - -### Example - -```php -dynamicClientRegistrationUpdateOAuth2Client($id, $body); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->dynamicClientRegistrationUpdateOAuth2Client: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **string**| The id of the OAuth 2.0 Client. | - **body** | [**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md)| | - -### Return type - -[**\Ory\Hydra\Client\Model\OAuth2Client**](../Model/OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `isInstanceReady()` - -```php -isInstanceReady(): \Ory\Hydra\Client\Model\HealthStatus -``` - -Check Readiness Status - -This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - -### Example - -```php -isInstanceReady(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->isInstanceReady: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Ory\Hydra\Client\Model\HealthStatus**](../Model/HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `oauth2Token()` - -```php -oauth2Token($grantType, $code, $refreshToken, $redirectUri, $clientId): \Ory\Hydra\Client\Model\Oauth2TokenResponse -``` - -The OAuth 2.0 Token Endpoint - -The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - -### Example - -```php -setUsername('YOUR_USERNAME') - ->setPassword('YOUR_PASSWORD'); - -// Configure OAuth2 access token for authorization: oauth2 -$config = Ory\Hydra\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); - - -$apiInstance = new Ory\Hydra\Client\Api\PublicApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -$grantType = 'grantType_example'; // string -$code = 'code_example'; // string -$refreshToken = 'refreshToken_example'; // string -$redirectUri = 'redirectUri_example'; // string -$clientId = 'clientId_example'; // string - -try { - $result = $apiInstance->oauth2Token($grantType, $code, $refreshToken, $redirectUri, $clientId); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->oauth2Token: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grantType** | **string**| | - **code** | **string**| | [optional] - **refreshToken** | **string**| | [optional] - **redirectUri** | **string**| | [optional] - **clientId** | **string**| | [optional] - -### Return type - -[**\Ory\Hydra\Client\Model\Oauth2TokenResponse**](../Model/Oauth2TokenResponse.md) - -### Authorization - -[basic](../../README.md#basic), [oauth2](../../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: `application/x-www-form-urlencoded` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `oauthAuth()` - -```php -oauthAuth() -``` - -The OAuth 2.0 Authorize Endpoint - -This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - -### Example - -```php -oauthAuth(); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->oauthAuth: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `revokeOAuth2Token()` - -```php -revokeOAuth2Token($token) -``` - -Revoke OAuth2 Tokens - -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. - -### Example - -```php -setUsername('YOUR_USERNAME') - ->setPassword('YOUR_PASSWORD'); - -// Configure OAuth2 access token for authorization: oauth2 -$config = Ory\Hydra\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); - - -$apiInstance = new Ory\Hydra\Client\Api\PublicApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -$token = 'token_example'; // string - -try { - $apiInstance->revokeOAuth2Token($token); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->revokeOAuth2Token: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **string**| | - -### Return type - -void (empty response body) - -### Authorization - -[basic](../../README.md#basic), [oauth2](../../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: `application/x-www-form-urlencoded` -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `userinfo()` - -```php -userinfo(): \Ory\Hydra\Client\Model\UserinfoResponse -``` - -OpenID Connect Userinfo - -This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - -### Example - -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - - -$apiInstance = new Ory\Hydra\Client\Api\PublicApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); - -try { - $result = $apiInstance->userinfo(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->userinfo: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Ory\Hydra\Client\Model\UserinfoResponse**](../Model/UserinfoResponse.md) - -### Authorization - -[oauth2](../../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) - -## `wellKnown()` - -```php -wellKnown(): \Ory\Hydra\Client\Model\JSONWebKeySet -``` - -JSON Web Keys Discovery - -This endpoint returns JSON Web Keys to be used as public keys for 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. - -### Example - -```php -wellKnown(); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling PublicApi->wellKnown: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**\Ory\Hydra\Client\Model\JSONWebKeySet**](../Model/JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Api/WellknownApi.md b/clients/hydra/php/docs/Api/WellknownApi.md new file mode 100644 index 00000000000..349831271d5 --- /dev/null +++ b/clients/hydra/php/docs/Api/WellknownApi.md @@ -0,0 +1,61 @@ +# Ory\Hydra\Client\WellknownApi + +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 + + +## `discoverJsonWebKeys()` + +```php +discoverJsonWebKeys(): \Ory\Hydra\Client\Model\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. + +### Example + +```php +discoverJsonWebKeys(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling WellknownApi->discoverJsonWebKeys: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**\Ory\Hydra\Client\Model\JsonWebKeySet**](../Model/JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/AcceptConsentRequest.md b/clients/hydra/php/docs/Model/AcceptOAuth2ConsentRequest.md similarity index 83% rename from clients/hydra/php/docs/Model/AcceptConsentRequest.md rename to clients/hydra/php/docs/Model/AcceptOAuth2ConsentRequest.md index 8266e2a0b2d..2fc777866ed 100644 --- a/clients/hydra/php/docs/Model/AcceptConsentRequest.md +++ b/clients/hydra/php/docs/Model/AcceptOAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# # AcceptConsentRequest +# # AcceptOAuth2ConsentRequest ## Properties @@ -9,6 +9,6 @@ Name | Type | Description | Notes **handledAt** | **\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] **rememberFor** | **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** | [**\Ory\Hydra\Client\Model\ConsentRequestSession**](ConsentRequestSession.md) | | [optional] +**session** | [**\Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequestSession**](AcceptOAuth2ConsentRequestSession.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/AcceptOAuth2ConsentRequestSession.md b/clients/hydra/php/docs/Model/AcceptOAuth2ConsentRequestSession.md new file mode 100644 index 00000000000..c7dcc57fb91 --- /dev/null +++ b/clients/hydra/php/docs/Model/AcceptOAuth2ConsentRequestSession.md @@ -0,0 +1,10 @@ +# # AcceptOAuth2ConsentRequestSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessToken** | **mixed** | 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] +**idToken** | **mixed** | 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] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/AcceptLoginRequest.md b/clients/hydra/php/docs/Model/AcceptOAuth2LoginRequest.md similarity index 97% rename from clients/hydra/php/docs/Model/AcceptLoginRequest.md rename to clients/hydra/php/docs/Model/AcceptOAuth2LoginRequest.md index 26c80de2414..f5955dcbf3d 100644 --- a/clients/hydra/php/docs/Model/AcceptLoginRequest.md +++ b/clients/hydra/php/docs/Model/AcceptOAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# # AcceptLoginRequest +# # AcceptOAuth2LoginRequest ## Properties @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **acr** | **string** | 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** | **string[]** | | [optional] -**context** | **object** | | [optional] +**context** | **mixed** | | [optional] **forceSubjectIdentifier** | **string** | 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] **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] **rememberFor** | **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] diff --git a/clients/hydra/php/docs/Model/ConsentRequestSession.md b/clients/hydra/php/docs/Model/ConsentRequestSession.md deleted file mode 100644 index 534069b1791..00000000000 --- a/clients/hydra/php/docs/Model/ConsentRequestSession.md +++ /dev/null @@ -1,10 +0,0 @@ -# # ConsentRequestSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**accessToken** | **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] -**idToken** | **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] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/CreateJsonWebKeySet.md b/clients/hydra/php/docs/Model/CreateJsonWebKeySet.md new file mode 100644 index 00000000000..8b2a161ce33 --- /dev/null +++ b/clients/hydra/php/docs/Model/CreateJsonWebKeySet.md @@ -0,0 +1,11 @@ +# # CreateJsonWebKeySet + +## Properties + +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\". | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/ErrorOAuth2.md b/clients/hydra/php/docs/Model/ErrorOAuth2.md new file mode 100644 index 00000000000..d4f53384439 --- /dev/null +++ b/clients/hydra/php/docs/Model/ErrorOAuth2.md @@ -0,0 +1,13 @@ +# # ErrorOAuth2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **string** | Error | [optional] +**errorDebug** | **string** | Error Debug Information Only available in dev mode. | [optional] +**errorDescription** | **string** | Error Description | [optional] +**errorHint** | **string** | Error Hint Helps the user identify the error cause. | [optional] +**statusCode** | **int** | HTTP Status Code | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/FlushInactiveOAuth2TokensRequest.md b/clients/hydra/php/docs/Model/FlushInactiveOAuth2TokensRequest.md deleted file mode 100644 index 4f9eb5165a9..00000000000 --- a/clients/hydra/php/docs/Model/FlushInactiveOAuth2TokensRequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# # FlushInactiveOAuth2TokensRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**notAfter** | **\DateTime** | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/GenericError.md b/clients/hydra/php/docs/Model/GenericError.md index 5ad5bd67e30..7990d5f08cc 100644 --- a/clients/hydra/php/docs/Model/GenericError.md +++ b/clients/hydra/php/docs/Model/GenericError.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **int** | The status code | [optional] **debug** | **string** | Debug information This field is often not exposed to protect against leaking sensitive information. | [optional] -**details** | **object** | Further error details | [optional] +**details** | **mixed** | Further error details | [optional] **id** | **string** | The error ID Useful when trying to identify various errors in application logic. | [optional] **message** | **string** | Error message The error's message. | **reason** | **string** | A human-readable reason for the error | [optional] diff --git a/clients/hydra/php/docs/Model/PluginConfigNetwork.md b/clients/hydra/php/docs/Model/InlineResponse200.md similarity index 73% rename from clients/hydra/php/docs/Model/PluginConfigNetwork.md rename to clients/hydra/php/docs/Model/InlineResponse200.md index 22f0ac56530..0aefdd463ac 100644 --- a/clients/hydra/php/docs/Model/PluginConfigNetwork.md +++ b/clients/hydra/php/docs/Model/InlineResponse200.md @@ -1,9 +1,9 @@ -# # PluginConfigNetwork +# # InlineResponse200 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **string** | type | +**status** | **string** | Always \"ok\". | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/ContainerWaitOKBodyError.md b/clients/hydra/php/docs/Model/InlineResponse2001.md similarity index 73% rename from clients/hydra/php/docs/Model/ContainerWaitOKBodyError.md rename to clients/hydra/php/docs/Model/InlineResponse2001.md index 69648dbb70e..922a5d23f33 100644 --- a/clients/hydra/php/docs/Model/ContainerWaitOKBodyError.md +++ b/clients/hydra/php/docs/Model/InlineResponse2001.md @@ -1,9 +1,9 @@ -# # ContainerWaitOKBodyError +# # InlineResponse2001 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **string** | Details of an error | [optional] +**version** | **string** | The version of Ory Hydra. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginConfigUser.md b/clients/hydra/php/docs/Model/InlineResponse503.md similarity index 63% rename from clients/hydra/php/docs/Model/PluginConfigUser.md rename to clients/hydra/php/docs/Model/InlineResponse503.md index e5f2aa64ed7..e1ebd482199 100644 --- a/clients/hydra/php/docs/Model/PluginConfigUser.md +++ b/clients/hydra/php/docs/Model/InlineResponse503.md @@ -1,10 +1,9 @@ -# # PluginConfigUser +# # InlineResponse503 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**gID** | **int** | g ID | [optional] -**uID** | **int** | UID | [optional] +**errors** | **array** | Errors contains a list of errors that caused the not ready status. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/OAuth2TokenIntrospection.md b/clients/hydra/php/docs/Model/IntrospectedOAuth2Token.md similarity index 95% rename from clients/hydra/php/docs/Model/OAuth2TokenIntrospection.md rename to clients/hydra/php/docs/Model/IntrospectedOAuth2Token.md index 2efa2b38b99..cfdce884ac0 100644 --- a/clients/hydra/php/docs/Model/OAuth2TokenIntrospection.md +++ b/clients/hydra/php/docs/Model/IntrospectedOAuth2Token.md @@ -1,4 +1,4 @@ -# # OAuth2TokenIntrospection +# # IntrospectedOAuth2Token ## Properties @@ -8,7 +8,7 @@ Name | Type | Description | Notes **aud** | **string[]** | Audience contains a list of the token's intended audiences. | [optional] **clientId** | **string** | 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** | **object** | Extra is arbitrary data set by the session. | [optional] +**ext** | **array** | 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** | **string** | 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] diff --git a/clients/hydra/php/docs/Model/JSONWebKeySet.md b/clients/hydra/php/docs/Model/JSONWebKeySet.md deleted file mode 100644 index b6c613a76cd..00000000000 --- a/clients/hydra/php/docs/Model/JSONWebKeySet.md +++ /dev/null @@ -1,9 +0,0 @@ -# # JSONWebKeySet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**keys** | [**\Ory\Hydra\Client\Model\JSONWebKey[]**](JSONWebKey.md) | The value of the \"keys\" parameter is an array of 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#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/JsonError.md b/clients/hydra/php/docs/Model/JsonError.md deleted file mode 100644 index d429715390f..00000000000 --- a/clients/hydra/php/docs/Model/JsonError.md +++ /dev/null @@ -1,12 +0,0 @@ -# # JsonError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **string** | Name is the error name. | [optional] -**errorDebug** | **string** | Debug contains debug information. This is usually not available and has to be enabled. | [optional] -**errorDescription** | **string** | Description contains further information on the nature of the error. | [optional] -**statusCode** | **int** | Code represents the error status code (404, 403, 401, ...). | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/JsonPatch.md b/clients/hydra/php/docs/Model/JsonPatch.md new file mode 100644 index 00000000000..a0e2b08d12a --- /dev/null +++ b/clients/hydra/php/docs/Model/JsonPatch.md @@ -0,0 +1,12 @@ +# # JsonPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | 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** | **string** | The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". | +**path** | **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). | +**value** | **mixed** | The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/JSONWebKey.md b/clients/hydra/php/docs/Model/JsonWebKey.md similarity index 99% rename from clients/hydra/php/docs/Model/JSONWebKey.md rename to clients/hydra/php/docs/Model/JsonWebKey.md index 12f6c20cb0e..f1cb0a5430d 100644 --- a/clients/hydra/php/docs/Model/JSONWebKey.md +++ b/clients/hydra/php/docs/Model/JsonWebKey.md @@ -1,4 +1,4 @@ -# # JSONWebKey +# # JsonWebKey ## Properties diff --git a/clients/hydra/php/docs/Model/JsonWebKeySet.md b/clients/hydra/php/docs/Model/JsonWebKeySet.md new file mode 100644 index 00000000000..ca607b5af8d --- /dev/null +++ b/clients/hydra/php/docs/Model/JsonWebKeySet.md @@ -0,0 +1,9 @@ +# # JsonWebKeySet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**keys** | [**\Ory\Hydra\Client\Model\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] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/JsonWebKeySetGeneratorRequest.md b/clients/hydra/php/docs/Model/JsonWebKeySetGeneratorRequest.md deleted file mode 100644 index 0d692104263..00000000000 --- a/clients/hydra/php/docs/Model/JsonWebKeySetGeneratorRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# # JsonWebKeySetGeneratorRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alg** | **string** | The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" | -**kid** | **string** | The kid of the key to be created | -**use** | **string** | 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#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/OAuth2Client.md b/clients/hydra/php/docs/Model/OAuth2Client.md index 1be58d7e297..15fcdfbb726 100644 --- a/clients/hydra/php/docs/Model/OAuth2Client.md +++ b/clients/hydra/php/docs/Model/OAuth2Client.md @@ -6,38 +6,48 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allowedCorsOrigins** | **string[]** | | [optional] **audience** | **string[]** | | [optional] -**backchannelLogoutSessionRequired** | **bool** | 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] -**backchannelLogoutUri** | **string** | RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. | [optional] -**clientId** | **string** | ID is the id for this client. | [optional] -**clientName** | **string** | Name is the human-readable string name of the client to be presented to the end-user during authorization. | [optional] -**clientSecret** | **string** | Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. | [optional] -**clientSecretExpiresAt** | **int** | SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. | [optional] -**clientUri** | **string** | ClientURI is an 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] +**authorizationCodeGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorizationCodeGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorizationCodeGrantRefreshTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**backchannelLogoutSessionRequired** | **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] +**backchannelLogoutUri** | **string** | 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] +**clientCredentialsGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**clientId** | **string** | OAuth 2.0 Client ID The ID is autogenerated and immutable. | [optional] +**clientName** | **string** | OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. | [optional] +**clientSecret** | **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. | [optional] +**clientSecretExpiresAt** | **int** | OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. | [optional] +**clientUri** | **string** | 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** | **string[]** | | [optional] -**createdAt** | **\DateTime** | CreatedAt returns the timestamp of the client's creation. | [optional] -**frontchannelLogoutSessionRequired** | **bool** | 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] -**frontchannelLogoutUri** | **string** | 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] +**createdAt** | **\DateTime** | OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. | [optional] +**frontchannelLogoutSessionRequired** | **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] +**frontchannelLogoutUri** | **string** | 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] **grantTypes** | **string[]** | | [optional] -**jwks** | **object** | | [optional] -**jwksUri** | **string** | 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] -**logoUri** | **string** | LogoURI is an URL string that references a logo for the client. | [optional] -**metadata** | **object** | | [optional] -**owner** | **string** | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] -**policyUri** | **string** | 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] +**implicitGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicitGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**jwks** | **mixed** | 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] +**jwksUri** | **string** | OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | [optional] +**jwtBearerGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**logoUri** | **string** | OAuth 2.0 Client Logo URI A URL string referencing the client's logo. | [optional] +**metadata** | **mixed** | | [optional] +**owner** | **string** | OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] +**policyUri** | **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. | [optional] **postLogoutRedirectUris** | **string[]** | | [optional] **redirectUris** | **string[]** | | [optional] -**registrationAccessToken** | **string** | RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. | [optional] -**registrationClientUri** | **string** | RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] -**requestObjectSigningAlg** | **string** | 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] +**refreshTokenGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantRefreshTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**registrationAccessToken** | **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. | [optional] +**registrationClientUri** | **string** | OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] +**requestObjectSigningAlg** | **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. | [optional] **requestUris** | **string[]** | | [optional] **responseTypes** | **string[]** | | [optional] -**scope** | **string** | 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] -**sectorIdentifierUri** | **string** | 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] -**subjectType** | **string** | SubjectType requested for responses to this Client. 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] -**tokenEndpointAuthMethod** | **string** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional] -**tokenEndpointAuthSigningAlg** | **string** | Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] -**tosUri** | **string** | TermsOfServiceURI is a URL string that points 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] -**updatedAt** | **\DateTime** | UpdatedAt returns the timestamp of the last update. | [optional] -**userinfoSignedResponseAlg** | **string** | 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] +**scope** | **string** | 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] +**sectorIdentifierUri** | **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. | [optional] +**subjectType** | **string** | 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] +**tokenEndpointAuthMethod** | **string** | OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] +**tokenEndpointAuthSigningAlg** | **string** | OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] +**tosUri** | **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. | [optional] +**updatedAt** | **\DateTime** | OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. | [optional] +**userinfoSignedResponseAlg** | **string** | 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] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/OAuth2ClientTokenLifespans.md b/clients/hydra/php/docs/Model/OAuth2ClientTokenLifespans.md new file mode 100644 index 00000000000..b8fd6bc50af --- /dev/null +++ b/clients/hydra/php/docs/Model/OAuth2ClientTokenLifespans.md @@ -0,0 +1,18 @@ +# # OAuth2ClientTokenLifespans + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authorizationCodeGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorizationCodeGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorizationCodeGrantRefreshTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**clientCredentialsGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicitGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicitGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**jwtBearerGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantAccessTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantIdTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refreshTokenGrantRefreshTokenLifespan** | **string** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/ConsentRequest.md b/clients/hydra/php/docs/Model/OAuth2ConsentRequest.md similarity index 91% rename from clients/hydra/php/docs/Model/ConsentRequest.md rename to clients/hydra/php/docs/Model/OAuth2ConsentRequest.md index f361059532e..3155c414a47 100644 --- a/clients/hydra/php/docs/Model/ConsentRequest.md +++ b/clients/hydra/php/docs/Model/OAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# # ConsentRequest +# # OAuth2ConsentRequest ## Properties @@ -8,10 +8,10 @@ Name | Type | Description | Notes **amr** | **string[]** | | [optional] **challenge** | **string** | ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. | **client** | [**\Ory\Hydra\Client\Model\OAuth2Client**](OAuth2Client.md) | | [optional] -**context** | **object** | | [optional] +**context** | **mixed** | | [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] -**oidcContext** | [**\Ory\Hydra\Client\Model\OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**oidcContext** | [**\Ory\Hydra\Client\Model\OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.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. | [optional] **requestedAccessTokenAudience** | **string[]** | | [optional] **requestedScope** | **string[]** | | [optional] diff --git a/clients/hydra/php/docs/Model/OpenIDConnectContext.md b/clients/hydra/php/docs/Model/OAuth2ConsentRequestOpenIDConnectContext.md similarity index 91% rename from clients/hydra/php/docs/Model/OpenIDConnectContext.md rename to clients/hydra/php/docs/Model/OAuth2ConsentRequestOpenIDConnectContext.md index 164c0415900..39f0843ec2b 100644 --- a/clients/hydra/php/docs/Model/OpenIDConnectContext.md +++ b/clients/hydra/php/docs/Model/OAuth2ConsentRequestOpenIDConnectContext.md @@ -1,4 +1,4 @@ -# # OpenIDConnectContext +# # OAuth2ConsentRequestOpenIDConnectContext ## Properties @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **acrValues** | **string[]** | 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** | **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] -**idTokenHintClaims** | **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] +**idTokenHintClaims** | **array** | 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] **loginHint** | **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] **uiLocales** | **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. | [optional] diff --git a/clients/hydra/php/docs/Model/OAuth2ConsentSession.md b/clients/hydra/php/docs/Model/OAuth2ConsentSession.md new file mode 100644 index 00000000000..dc749dc1833 --- /dev/null +++ b/clients/hydra/php/docs/Model/OAuth2ConsentSession.md @@ -0,0 +1,16 @@ +# # OAuth2ConsentSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**consentRequest** | [**\Ory\Hydra\Client\Model\OAuth2ConsentRequest**](OAuth2ConsentRequest.md) | | [optional] +**expiresAt** | [**\Ory\Hydra\Client\Model\OAuth2ConsentSessionExpiresAt**](OAuth2ConsentSessionExpiresAt.md) | | [optional] +**grantAccessTokenAudience** | **string[]** | | [optional] +**grantScope** | **string[]** | | [optional] +**handledAt** | **\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] +**rememberFor** | **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** | [**\Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequestSession**](AcceptOAuth2ConsentRequestSession.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/OAuth2ConsentSessionExpiresAt.md b/clients/hydra/php/docs/Model/OAuth2ConsentSessionExpiresAt.md new file mode 100644 index 00000000000..22a2a1932b8 --- /dev/null +++ b/clients/hydra/php/docs/Model/OAuth2ConsentSessionExpiresAt.md @@ -0,0 +1,13 @@ +# # OAuth2ConsentSessionExpiresAt + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessToken** | **\DateTime** | | [optional] +**authorizeCode** | **\DateTime** | | [optional] +**idToken** | **\DateTime** | | [optional] +**parContext** | **\DateTime** | | [optional] +**refreshToken** | **\DateTime** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/LoginRequest.md b/clients/hydra/php/docs/Model/OAuth2LoginRequest.md similarity index 92% rename from clients/hydra/php/docs/Model/LoginRequest.md rename to clients/hydra/php/docs/Model/OAuth2LoginRequest.md index 68c8add55e8..8a6f1c5babf 100644 --- a/clients/hydra/php/docs/Model/LoginRequest.md +++ b/clients/hydra/php/docs/Model/OAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# # LoginRequest +# # OAuth2LoginRequest ## Properties @@ -6,7 +6,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** | [**\Ory\Hydra\Client\Model\OAuth2Client**](OAuth2Client.md) | | -**oidcContext** | [**\Ory\Hydra\Client\Model\OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**oidcContext** | [**\Ory\Hydra\Client\Model\OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.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** | **string[]** | | **requestedScope** | **string[]** | | diff --git a/clients/hydra/php/docs/Model/LogoutRequest.md b/clients/hydra/php/docs/Model/OAuth2LogoutRequest.md similarity index 97% rename from clients/hydra/php/docs/Model/LogoutRequest.md rename to clients/hydra/php/docs/Model/OAuth2LogoutRequest.md index 0489395a718..e42dde24fde 100644 --- a/clients/hydra/php/docs/Model/LogoutRequest.md +++ b/clients/hydra/php/docs/Model/OAuth2LogoutRequest.md @@ -1,4 +1,4 @@ -# # LogoutRequest +# # OAuth2LogoutRequest ## Properties diff --git a/clients/hydra/php/docs/Model/CompletedRequest.md b/clients/hydra/php/docs/Model/OAuth2RedirectTo.md similarity index 73% rename from clients/hydra/php/docs/Model/CompletedRequest.md rename to clients/hydra/php/docs/Model/OAuth2RedirectTo.md index 838606d9d8b..324087d3e06 100644 --- a/clients/hydra/php/docs/Model/CompletedRequest.md +++ b/clients/hydra/php/docs/Model/OAuth2RedirectTo.md @@ -1,9 +1,9 @@ -# # CompletedRequest +# # OAuth2RedirectTo ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**redirectTo** | **string** | RedirectURL is the URL which you should redirect the user to once the authentication process is completed. | +**redirectTo** | **string** | RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/OAuth2TokenExchange.md b/clients/hydra/php/docs/Model/OAuth2TokenExchange.md new file mode 100644 index 00000000000..71ef0756ab1 --- /dev/null +++ b/clients/hydra/php/docs/Model/OAuth2TokenExchange.md @@ -0,0 +1,14 @@ +# # OAuth2TokenExchange + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accessToken** | **string** | The access token issued by the authorization server. | [optional] +**expiresIn** | **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] +**idToken** | **int** | To retrieve a refresh token request the id_token scope. | [optional] +**refreshToken** | **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. | [optional] +**scope** | **int** | The scope of the access token | [optional] +**tokenType** | **string** | The type of the token issued | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/Oauth2TokenResponse.md b/clients/hydra/php/docs/Model/Oauth2TokenResponse.md deleted file mode 100644 index df6dde0d2e7..00000000000 --- a/clients/hydra/php/docs/Model/Oauth2TokenResponse.md +++ /dev/null @@ -1,14 +0,0 @@ -# # Oauth2TokenResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**accessToken** | **string** | | [optional] -**expiresIn** | **int** | | [optional] -**idToken** | **string** | | [optional] -**refreshToken** | **string** | | [optional] -**scope** | **string** | | [optional] -**tokenType** | **string** | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/OidcConfiguration.md b/clients/hydra/php/docs/Model/OidcConfiguration.md new file mode 100644 index 00000000000..3c7628e6252 --- /dev/null +++ b/clients/hydra/php/docs/Model/OidcConfiguration.md @@ -0,0 +1,37 @@ +# # OidcConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authorizationEndpoint** | **string** | OAuth 2.0 Authorization Endpoint URL | +**backchannelLogoutSessionSupported** | **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] +**backchannelLogoutSupported** | **bool** | OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] +**claimsParameterSupported** | **bool** | OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] +**claimsSupported** | **string[]** | 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] +**codeChallengeMethodsSupported** | **string[]** | 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] +**endSessionEndpoint** | **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] +**frontchannelLogoutSessionSupported** | **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] +**frontchannelLogoutSupported** | **bool** | OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] +**grantTypesSupported** | **string[]** | OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] +**idTokenSignedResponseAlg** | **string[]** | OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. | +**idTokenSigningAlgValuesSupported** | **string[]** | 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** | **string** | 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. | +**jwksUri** | **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. | +**registrationEndpoint** | **string** | OpenID Connect Dynamic Client Registration Endpoint URL | [optional] +**requestObjectSigningAlgValuesSupported** | **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). | [optional] +**requestParameterSupported** | **bool** | OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] +**requestUriParameterSupported** | **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] +**requireRequestUriRegistration** | **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] +**responseModesSupported** | **string[]** | OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] +**responseTypesSupported** | **string[]** | 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. | +**revocationEndpoint** | **string** | OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] +**scopesSupported** | **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 | [optional] +**subjectTypesSupported** | **string[]** | 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. | +**tokenEndpoint** | **string** | OAuth 2.0 Token Endpoint URL | +**tokenEndpointAuthMethodsSupported** | **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 | [optional] +**userinfoEndpoint** | **string** | OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. | [optional] +**userinfoSignedResponseAlg** | **string[]** | OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. | +**userinfoSigningAlgValuesSupported** | **string[]** | 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] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/UserinfoResponse.md b/clients/hydra/php/docs/Model/OidcUserInfo.md similarity index 99% rename from clients/hydra/php/docs/Model/UserinfoResponse.md rename to clients/hydra/php/docs/Model/OidcUserInfo.md index 1a3c4489b45..09bb3a2c843 100644 --- a/clients/hydra/php/docs/Model/UserinfoResponse.md +++ b/clients/hydra/php/docs/Model/OidcUserInfo.md @@ -1,4 +1,4 @@ -# # UserinfoResponse +# # OidcUserInfo ## Properties diff --git a/clients/hydra/php/docs/Model/Pagination.md b/clients/hydra/php/docs/Model/Pagination.md new file mode 100644 index 00000000000..f4dd401d09b --- /dev/null +++ b/clients/hydra/php/docs/Model/Pagination.md @@ -0,0 +1,10 @@ +# # Pagination + +## Properties + +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'] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PaginationHeaders.md b/clients/hydra/php/docs/Model/PaginationHeaders.md new file mode 100644 index 00000000000..8e727a25b36 --- /dev/null +++ b/clients/hydra/php/docs/Model/PaginationHeaders.md @@ -0,0 +1,10 @@ +# # PaginationHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **string** | 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] +**xTotalCount** | **string** | The total number of clients. in: header | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PatchDocument.md b/clients/hydra/php/docs/Model/PatchDocument.md deleted file mode 100644 index 53cd58e921b..00000000000 --- a/clients/hydra/php/docs/Model/PatchDocument.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PatchDocument - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**from** | **string** | A JSON-pointer | [optional] -**op** | **string** | The operation to be performed | -**path** | **string** | A JSON-pointer | -**value** | **object** | The value to be used within the operations | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginConfig.md b/clients/hydra/php/docs/Model/PluginConfig.md deleted file mode 100644 index 121fd171d8f..00000000000 --- a/clients/hydra/php/docs/Model/PluginConfig.md +++ /dev/null @@ -1,24 +0,0 @@ -# # PluginConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | [**\Ory\Hydra\Client\Model\PluginConfigArgs**](PluginConfigArgs.md) | | -**description** | **string** | description | -**dockerVersion** | **string** | Docker Version used to create the plugin | [optional] -**documentation** | **string** | documentation | -**entrypoint** | **string[]** | entrypoint | -**env** | [**\Ory\Hydra\Client\Model\PluginEnv[]**](PluginEnv.md) | env | -**interface** | [**\Ory\Hydra\Client\Model\PluginConfigInterface**](PluginConfigInterface.md) | | -**ipcHost** | **bool** | ipc host | -**linux** | [**\Ory\Hydra\Client\Model\PluginConfigLinux**](PluginConfigLinux.md) | | -**mounts** | [**\Ory\Hydra\Client\Model\PluginMount[]**](PluginMount.md) | mounts | -**network** | [**\Ory\Hydra\Client\Model\PluginConfigNetwork**](PluginConfigNetwork.md) | | -**pidHost** | **bool** | pid host | -**propagatedMount** | **string** | propagated mount | -**user** | [**\Ory\Hydra\Client\Model\PluginConfigUser**](PluginConfigUser.md) | | [optional] -**workDir** | **string** | work dir | -**rootfs** | [**\Ory\Hydra\Client\Model\PluginConfigRootfs**](PluginConfigRootfs.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginConfigArgs.md b/clients/hydra/php/docs/Model/PluginConfigArgs.md deleted file mode 100644 index 1f1a7b7c831..00000000000 --- a/clients/hydra/php/docs/Model/PluginConfigArgs.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PluginConfigArgs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **string** | description | -**name** | **string** | name | -**settable** | **string[]** | settable | -**value** | **string[]** | value | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginConfigInterface.md b/clients/hydra/php/docs/Model/PluginConfigInterface.md deleted file mode 100644 index 1f52515e0ba..00000000000 --- a/clients/hydra/php/docs/Model/PluginConfigInterface.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PluginConfigInterface - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**protocolScheme** | **string** | Protocol to use for clients connecting to the plugin. | [optional] -**socket** | **string** | socket | -**types** | [**\Ory\Hydra\Client\Model\PluginInterfaceType[]**](PluginInterfaceType.md) | types | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginConfigLinux.md b/clients/hydra/php/docs/Model/PluginConfigLinux.md deleted file mode 100644 index 2fb65032e54..00000000000 --- a/clients/hydra/php/docs/Model/PluginConfigLinux.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PluginConfigLinux - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allowAllDevices** | **bool** | allow all devices | -**capabilities** | **string[]** | capabilities | -**devices** | [**\Ory\Hydra\Client\Model\PluginDevice[]**](PluginDevice.md) | devices | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginConfigRootfs.md b/clients/hydra/php/docs/Model/PluginConfigRootfs.md deleted file mode 100644 index 89ecd77df6f..00000000000 --- a/clients/hydra/php/docs/Model/PluginConfigRootfs.md +++ /dev/null @@ -1,10 +0,0 @@ -# # PluginConfigRootfs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**diffIds** | **string[]** | diff ids | [optional] -**type** | **string** | type | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginDevice.md b/clients/hydra/php/docs/Model/PluginDevice.md deleted file mode 100644 index 892f1bfaa47..00000000000 --- a/clients/hydra/php/docs/Model/PluginDevice.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PluginDevice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **string** | description | -**name** | **string** | name | -**path** | **string** | path | -**settable** | **string[]** | settable | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginEnv.md b/clients/hydra/php/docs/Model/PluginEnv.md deleted file mode 100644 index 254ea5a422c..00000000000 --- a/clients/hydra/php/docs/Model/PluginEnv.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PluginEnv - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **string** | description | -**name** | **string** | name | -**settable** | **string[]** | settable | -**value** | **string** | value | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginInterfaceType.md b/clients/hydra/php/docs/Model/PluginInterfaceType.md deleted file mode 100644 index 8bd58970700..00000000000 --- a/clients/hydra/php/docs/Model/PluginInterfaceType.md +++ /dev/null @@ -1,11 +0,0 @@ -# # PluginInterfaceType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capability** | **string** | capability | -**prefix** | **string** | prefix | -**version** | **string** | version | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginMount.md b/clients/hydra/php/docs/Model/PluginMount.md deleted file mode 100644 index 27837c2ebc2..00000000000 --- a/clients/hydra/php/docs/Model/PluginMount.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PluginMount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **string** | description | -**destination** | **string** | destination | -**name** | **string** | name | -**options** | **string[]** | options | -**settable** | **string[]** | settable | -**source** | **string** | source | -**type** | **string** | type | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PluginSettings.md b/clients/hydra/php/docs/Model/PluginSettings.md deleted file mode 100644 index 85b72914512..00000000000 --- a/clients/hydra/php/docs/Model/PluginSettings.md +++ /dev/null @@ -1,12 +0,0 @@ -# # PluginSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | **string[]** | args | -**devices** | [**\Ory\Hydra\Client\Model\PluginDevice[]**](PluginDevice.md) | devices | -**env** | **string[]** | env | -**mounts** | [**\Ory\Hydra\Client\Model\PluginMount[]**](PluginMount.md) | mounts | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/PreviousConsentSession.md b/clients/hydra/php/docs/Model/PreviousConsentSession.md deleted file mode 100644 index a72c5b1f7ab..00000000000 --- a/clients/hydra/php/docs/Model/PreviousConsentSession.md +++ /dev/null @@ -1,15 +0,0 @@ -# # PreviousConsentSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**consentRequest** | [**\Ory\Hydra\Client\Model\ConsentRequest**](ConsentRequest.md) | | [optional] -**grantAccessTokenAudience** | **string[]** | | [optional] -**grantScope** | **string[]** | | [optional] -**handledAt** | **\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] -**rememberFor** | **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** | [**\Ory\Hydra\Client\Model\ConsentRequestSession**](ConsentRequestSession.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/RejectRequest.md b/clients/hydra/php/docs/Model/RejectOAuth2Request.md similarity index 97% rename from clients/hydra/php/docs/Model/RejectRequest.md rename to clients/hydra/php/docs/Model/RejectOAuth2Request.md index c5d05d47abc..c2567b8c022 100644 --- a/clients/hydra/php/docs/Model/RejectRequest.md +++ b/clients/hydra/php/docs/Model/RejectOAuth2Request.md @@ -1,4 +1,4 @@ -# # RejectRequest +# # RejectOAuth2Request ## Properties diff --git a/clients/hydra/php/docs/Model/RequestWasHandledResponse.md b/clients/hydra/php/docs/Model/RequestWasHandledResponse.md deleted file mode 100644 index 9b7a31df466..00000000000 --- a/clients/hydra/php/docs/Model/RequestWasHandledResponse.md +++ /dev/null @@ -1,9 +0,0 @@ -# # RequestWasHandledResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**redirectTo** | **string** | Original request URL to which you should redirect the user if request was already handled. | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/TokenPagination.md b/clients/hydra/php/docs/Model/TokenPagination.md new file mode 100644 index 00000000000..b123185a4ac --- /dev/null +++ b/clients/hydra/php/docs/Model/TokenPagination.md @@ -0,0 +1,10 @@ +# # TokenPagination + +## Properties + +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'] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/TokenPaginationHeaders.md b/clients/hydra/php/docs/Model/TokenPaginationHeaders.md new file mode 100644 index 00000000000..a3cf62d8b43 --- /dev/null +++ b/clients/hydra/php/docs/Model/TokenPaginationHeaders.md @@ -0,0 +1,10 @@ +# # TokenPaginationHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **string** | 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] +**xTotalCount** | **string** | The total number of clients. in: header | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/TokenPaginationRequestParameters.md b/clients/hydra/php/docs/Model/TokenPaginationRequestParameters.md new file mode 100644 index 00000000000..c04e7d18a5a --- /dev/null +++ b/clients/hydra/php/docs/Model/TokenPaginationRequestParameters.md @@ -0,0 +1,10 @@ +# # TokenPaginationRequestParameters + +## Properties + +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'] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/TokenPaginationResponseHeaders.md b/clients/hydra/php/docs/Model/TokenPaginationResponseHeaders.md new file mode 100644 index 00000000000..50113fba206 --- /dev/null +++ b/clients/hydra/php/docs/Model/TokenPaginationResponseHeaders.md @@ -0,0 +1,10 @@ +# # TokenPaginationResponseHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | **string** | 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=20>; rel=\"last\" | [optional] +**xTotalCount** | **int** | The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/TrustJwtGrantIssuerBody.md b/clients/hydra/php/docs/Model/TrustOAuth2JwtGrantIssuer.md similarity index 70% rename from clients/hydra/php/docs/Model/TrustJwtGrantIssuerBody.md rename to clients/hydra/php/docs/Model/TrustOAuth2JwtGrantIssuer.md index 1e42ea3b8da..5656a809431 100644 --- a/clients/hydra/php/docs/Model/TrustJwtGrantIssuerBody.md +++ b/clients/hydra/php/docs/Model/TrustOAuth2JwtGrantIssuer.md @@ -1,13 +1,14 @@ -# # TrustJwtGrantIssuerBody +# # TrustOAuth2JwtGrantIssuer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**allowAnySubject** | **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] **expiresAt** | **\DateTime** | 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** | [**\Ory\Hydra\Client\Model\JSONWebKey**](JSONWebKey.md) | | +**jwk** | [**\Ory\Hydra\Client\Model\JsonWebKey**](JsonWebKey.md) | | **scope** | **string[]** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | -**subject** | **string** | The \"subject\" identifies the principal that is the subject of the JWT. | +**subject** | **string** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/TrustedJwtGrantIssuer.md b/clients/hydra/php/docs/Model/TrustedOAuth2JwtGrantIssuer.md similarity index 75% rename from clients/hydra/php/docs/Model/TrustedJwtGrantIssuer.md rename to clients/hydra/php/docs/Model/TrustedOAuth2JwtGrantIssuer.md index f8f35d64294..8a92ea437bc 100644 --- a/clients/hydra/php/docs/Model/TrustedJwtGrantIssuer.md +++ b/clients/hydra/php/docs/Model/TrustedOAuth2JwtGrantIssuer.md @@ -1,14 +1,15 @@ -# # TrustedJwtGrantIssuer +# # TrustedOAuth2JwtGrantIssuer ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**allowAnySubject** | **bool** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] **createdAt** | **\DateTime** | The \"created_at\" indicates, when grant was created. | [optional] **expiresAt** | **\DateTime** | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | [optional] **id** | **string** | | [optional] **issuer** | **string** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] -**publicKey** | [**\Ory\Hydra\Client\Model\TrustedJsonWebKey**](TrustedJsonWebKey.md) | | [optional] +**publicKey** | [**\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantJsonWebKey**](TrustedOAuth2JwtGrantJsonWebKey.md) | | [optional] **scope** | **string[]** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] **subject** | **string** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] diff --git a/clients/hydra/php/docs/Model/TrustedJsonWebKey.md b/clients/hydra/php/docs/Model/TrustedOAuth2JwtGrantJsonWebKey.md similarity index 93% rename from clients/hydra/php/docs/Model/TrustedJsonWebKey.md rename to clients/hydra/php/docs/Model/TrustedOAuth2JwtGrantJsonWebKey.md index 2ebee50a526..0a953c5a4a5 100644 --- a/clients/hydra/php/docs/Model/TrustedJsonWebKey.md +++ b/clients/hydra/php/docs/Model/TrustedOAuth2JwtGrantJsonWebKey.md @@ -1,4 +1,4 @@ -# # TrustedJsonWebKey +# # TrustedOAuth2JwtGrantJsonWebKey ## Properties diff --git a/clients/hydra/php/docs/Model/Volume.md b/clients/hydra/php/docs/Model/Volume.md deleted file mode 100644 index e5b81b6f1fb..00000000000 --- a/clients/hydra/php/docs/Model/Volume.md +++ /dev/null @@ -1,17 +0,0 @@ -# # Volume - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**createdAt** | **string** | Date/Time the volume was created. | [optional] -**driver** | **string** | Name of the volume driver used by the volume. | -**labels** | **array** | User-defined key/value metadata. | -**mountpoint** | **string** | Mount path of the volume on the host. | -**name** | **string** | Name of the volume. | -**options** | **array** | The driver specific options used when creating the volume. | -**scope** | **string** | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | -**status** | **object** | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. | [optional] -**usageData** | [**\Ory\Hydra\Client\Model\VolumeUsageData**](VolumeUsageData.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/VolumeUsageData.md b/clients/hydra/php/docs/Model/VolumeUsageData.md deleted file mode 100644 index 29662e973df..00000000000 --- a/clients/hydra/php/docs/Model/VolumeUsageData.md +++ /dev/null @@ -1,10 +0,0 @@ -# # VolumeUsageData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refCount** | **int** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | -**size** | **int** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/docs/Model/WellKnown.md b/clients/hydra/php/docs/Model/WellKnown.md deleted file mode 100644 index ccff26c5240..00000000000 --- a/clients/hydra/php/docs/Model/WellKnown.md +++ /dev/null @@ -1,35 +0,0 @@ -# # WellKnown - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorizationEndpoint** | **string** | URL of the OP's OAuth 2.0 Authorization Endpoint. | -**backchannelLogoutSessionSupported** | **bool** | 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] -**backchannelLogoutSupported** | **bool** | Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] -**claimsParameterSupported** | **bool** | Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] -**claimsSupported** | **string[]** | 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] -**codeChallengeMethodsSupported** | **string[]** | JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] -**endSessionEndpoint** | **string** | 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] -**frontchannelLogoutSessionSupported** | **bool** | 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] -**frontchannelLogoutSupported** | **bool** | Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] -**grantTypesSupported** | **string[]** | JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] -**idTokenSigningAlgValuesSupported** | **string[]** | 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** | **string** | 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. | -**jwksUri** | **string** | 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. | -**registrationEndpoint** | **string** | URL of the OP's Dynamic Client Registration Endpoint. | [optional] -**requestObjectSigningAlgValuesSupported** | **string[]** | 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] -**requestParameterSupported** | **bool** | Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] -**requestUriParameterSupported** | **bool** | Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] -**requireRequestUriRegistration** | **bool** | Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. | [optional] -**responseModesSupported** | **string[]** | JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] -**responseTypesSupported** | **string[]** | 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. | -**revocationEndpoint** | **string** | URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] -**scopesSupported** | **string[]** | SON 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] -**subjectTypesSupported** | **string[]** | JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | -**tokenEndpoint** | **string** | URL of the OP's OAuth 2.0 Token Endpoint | -**tokenEndpointAuthMethodsSupported** | **string[]** | 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] -**userinfoEndpoint** | **string** | URL of the OP's UserInfo Endpoint. | [optional] -**userinfoSigningAlgValuesSupported** | **string[]** | 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] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/clients/hydra/php/lib/Api/JwkApi.php b/clients/hydra/php/lib/Api/JwkApi.php new file mode 100644 index 00000000000..48048091ddc --- /dev/null +++ b/clients/hydra/php/lib/Api/JwkApi.php @@ -0,0 +1,2156 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createJsonWebKeySet + * + * Create JSON Web Key + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet createJsonWebKeySet (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function createJsonWebKeySet($set, $createJsonWebKeySet) + { + list($response) = $this->createJsonWebKeySetWithHttpInfo($set, $createJsonWebKeySet); + return $response; + } + + /** + * Operation createJsonWebKeySetWithHttpInfo + * + * Create JSON Web Key + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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) + { + $request = $this->createJsonWebKeySetRequest($set, $createJsonWebKeySet); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 201: + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonWebKeySet', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\JsonWebKeySet', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createJsonWebKeySetAsync + * + * Create JSON Web Key + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createJsonWebKeySetAsync($set, $createJsonWebKeySet) + { + return $this->createJsonWebKeySetAsyncWithHttpInfo($set, $createJsonWebKeySet) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createJsonWebKeySetAsyncWithHttpInfo + * + * Create JSON Web Key + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createJsonWebKeySetAsyncWithHttpInfo($set, $createJsonWebKeySet) + { + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + $request = $this->createJsonWebKeySetRequest($set, $createJsonWebKeySet); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createJsonWebKeySet' + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\CreateJsonWebKeySet $createJsonWebKeySet (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createJsonWebKeySetRequest($set, $createJsonWebKeySet) + { + // 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( + 'Missing the required parameter $createJsonWebKeySet when calling createJsonWebKeySet' + ); + } + + $resourcePath = '/admin/keys/{set}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($set !== null) { + $resourcePath = str_replace( + '{' . 'set' . '}', + ObjectSerializer::toPathValue($set), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($createJsonWebKeySet)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($createJsonWebKeySet)); + } else { + $httpBody = $createJsonWebKeySet; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteJsonWebKey + * + * Delete JSON Web Key + * + * @param string $set The JSON Web Key Set (required) + * @param string $kid The JSON Web Key ID (kid) (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteJsonWebKey($set, $kid) + { + $this->deleteJsonWebKeyWithHttpInfo($set, $kid); + } + + /** + * Operation deleteJsonWebKeyWithHttpInfo + * + * Delete JSON Web Key + * + * @param string $set The JSON Web Key Set (required) + * @param string $kid The JSON Web Key ID (kid) (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteJsonWebKeyWithHttpInfo($set, $kid) + { + $request = $this->deleteJsonWebKeyRequest($set, $kid); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteJsonWebKeyAsync + * + * Delete JSON Web Key + * + * @param string $set The JSON Web Key Set (required) + * @param string $kid The JSON Web Key ID (kid) (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteJsonWebKeyAsync($set, $kid) + { + return $this->deleteJsonWebKeyAsyncWithHttpInfo($set, $kid) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteJsonWebKeyAsyncWithHttpInfo + * + * Delete JSON Web Key + * + * @param string $set The JSON Web Key Set (required) + * @param string $kid The JSON Web Key ID (kid) (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteJsonWebKeyAsyncWithHttpInfo($set, $kid) + { + $returnType = ''; + $request = $this->deleteJsonWebKeyRequest($set, $kid); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteJsonWebKey' + * + * @param string $set The JSON Web Key Set (required) + * @param string $kid The JSON Web Key ID (kid) (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteJsonWebKeyRequest($set, $kid) + { + // 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( + 'Missing the required parameter $kid when calling deleteJsonWebKey' + ); + } + + $resourcePath = '/admin/keys/{set}/{kid}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($set !== null) { + $resourcePath = str_replace( + '{' . 'set' . '}', + ObjectSerializer::toPathValue($set), + $resourcePath + ); + } + // path params + if ($kid !== null) { + $resourcePath = str_replace( + '{' . 'kid' . '}', + ObjectSerializer::toPathValue($kid), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteJsonWebKeySet + * + * Delete JSON Web Key Set + * + * @param string $set The JSON Web Key Set (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteJsonWebKeySet($set) + { + $this->deleteJsonWebKeySetWithHttpInfo($set); + } + + /** + * Operation deleteJsonWebKeySetWithHttpInfo + * + * Delete JSON Web Key Set + * + * @param string $set The JSON Web Key Set (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteJsonWebKeySetWithHttpInfo($set) + { + $request = $this->deleteJsonWebKeySetRequest($set); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteJsonWebKeySetAsync + * + * Delete JSON Web Key Set + * + * @param string $set The JSON Web Key Set (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteJsonWebKeySetAsync($set) + { + return $this->deleteJsonWebKeySetAsyncWithHttpInfo($set) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteJsonWebKeySetAsyncWithHttpInfo + * + * Delete JSON Web Key Set + * + * @param string $set The JSON Web Key Set (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteJsonWebKeySetAsyncWithHttpInfo($set) + { + $returnType = ''; + $request = $this->deleteJsonWebKeySetRequest($set); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteJsonWebKeySet' + * + * @param string $set The JSON Web Key Set (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteJsonWebKeySetRequest($set) + { + // 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 deleteJsonWebKeySet' + ); + } + + $resourcePath = '/admin/keys/{set}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($set !== null) { + $resourcePath = str_replace( + '{' . 'set' . '}', + ObjectSerializer::toPathValue($set), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getJsonWebKey + * + * Get JSON Web Key + * + * @param string $set JSON Web Key Set ID (required) + * @param string $kid JSON Web Key ID (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function getJsonWebKey($set, $kid) + { + list($response) = $this->getJsonWebKeyWithHttpInfo($set, $kid); + return $response; + } + + /** + * Operation getJsonWebKeyWithHttpInfo + * + * Get JSON Web Key + * + * @param string $set JSON Web Key Set ID (required) + * @param string $kid JSON Web Key ID (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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) + { + $request = $this->getJsonWebKeyRequest($set, $kid); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonWebKeySet', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\JsonWebKeySet', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getJsonWebKeyAsync + * + * Get JSON Web Key + * + * @param string $set JSON Web Key Set ID (required) + * @param string $kid JSON Web Key ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getJsonWebKeyAsync($set, $kid) + { + return $this->getJsonWebKeyAsyncWithHttpInfo($set, $kid) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getJsonWebKeyAsyncWithHttpInfo + * + * Get JSON Web Key + * + * @param string $set JSON Web Key Set ID (required) + * @param string $kid JSON Web Key ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getJsonWebKeyAsyncWithHttpInfo($set, $kid) + { + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + $request = $this->getJsonWebKeyRequest($set, $kid); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getJsonWebKey' + * + * @param string $set JSON Web Key Set ID (required) + * @param string $kid JSON Web Key ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getJsonWebKeyRequest($set, $kid) + { + // 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( + 'Missing the required parameter $kid when calling getJsonWebKey' + ); + } + + $resourcePath = '/admin/keys/{set}/{kid}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($set !== null) { + $resourcePath = str_replace( + '{' . 'set' . '}', + ObjectSerializer::toPathValue($set), + $resourcePath + ); + } + // path params + if ($kid !== null) { + $resourcePath = str_replace( + '{' . 'kid' . '}', + ObjectSerializer::toPathValue($kid), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getJsonWebKeySet + * + * Retrieve a JSON Web Key Set + * + * @param string $set JSON Web Key Set ID (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function getJsonWebKeySet($set) + { + list($response) = $this->getJsonWebKeySetWithHttpInfo($set); + return $response; + } + + /** + * Operation getJsonWebKeySetWithHttpInfo + * + * Retrieve a JSON Web Key Set + * + * @param string $set JSON Web Key Set ID (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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) + { + $request = $this->getJsonWebKeySetRequest($set); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonWebKeySet', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\JsonWebKeySet', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getJsonWebKeySetAsync + * + * Retrieve a JSON Web Key Set + * + * @param string $set JSON Web Key Set ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getJsonWebKeySetAsync($set) + { + return $this->getJsonWebKeySetAsyncWithHttpInfo($set) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getJsonWebKeySetAsyncWithHttpInfo + * + * Retrieve a JSON Web Key Set + * + * @param string $set JSON Web Key Set ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getJsonWebKeySetAsyncWithHttpInfo($set) + { + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + $request = $this->getJsonWebKeySetRequest($set); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getJsonWebKeySet' + * + * @param string $set JSON Web Key Set ID (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getJsonWebKeySetRequest($set) + { + // 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 getJsonWebKeySet' + ); + } + + $resourcePath = '/admin/keys/{set}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($set !== null) { + $resourcePath = str_replace( + '{' . 'set' . '}', + ObjectSerializer::toPathValue($set), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation setJsonWebKey + * + * Set JSON Web Key + * + * @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) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\JsonWebKey|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function setJsonWebKey($set, $kid, $jsonWebKey = null) + { + list($response) = $this->setJsonWebKeyWithHttpInfo($set, $kid, $jsonWebKey); + return $response; + } + + /** + * Operation setJsonWebKeyWithHttpInfo + * + * Set JSON Web Key + * + * @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) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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) + { + $request = $this->setJsonWebKeyRequest($set, $kid, $jsonWebKey); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\JsonWebKey' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonWebKey', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\JsonWebKey'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\JsonWebKey', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation setJsonWebKeyAsync + * + * Set JSON Web Key + * + * @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) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setJsonWebKeyAsync($set, $kid, $jsonWebKey = null) + { + return $this->setJsonWebKeyAsyncWithHttpInfo($set, $kid, $jsonWebKey) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation setJsonWebKeyAsyncWithHttpInfo + * + * Set JSON Web Key + * + * @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) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setJsonWebKeyAsyncWithHttpInfo($set, $kid, $jsonWebKey = null) + { + $returnType = '\Ory\Hydra\Client\Model\JsonWebKey'; + $request = $this->setJsonWebKeyRequest($set, $kid, $jsonWebKey); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'setJsonWebKey' + * + * @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) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function setJsonWebKeyRequest($set, $kid, $jsonWebKey = null) + { + // 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( + 'Missing the required parameter $kid when calling setJsonWebKey' + ); + } + + $resourcePath = '/admin/keys/{set}/{kid}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($set !== null) { + $resourcePath = str_replace( + '{' . 'set' . '}', + ObjectSerializer::toPathValue($set), + $resourcePath + ); + } + // path params + if ($kid !== null) { + $resourcePath = str_replace( + '{' . 'kid' . '}', + ObjectSerializer::toPathValue($kid), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($jsonWebKey)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($jsonWebKey)); + } else { + $httpBody = $jsonWebKey; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation setJsonWebKeySet + * + * Update a JSON Web Key Set + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet jsonWebKeySet (optional) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function setJsonWebKeySet($set, $jsonWebKeySet = null) + { + list($response) = $this->setJsonWebKeySetWithHttpInfo($set, $jsonWebKeySet); + return $response; + } + + /** + * Operation setJsonWebKeySetWithHttpInfo + * + * Update a JSON Web Key Set + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet (optional) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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) + { + $request = $this->setJsonWebKeySetRequest($set, $jsonWebKeySet); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonWebKeySet', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\JsonWebKeySet', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation setJsonWebKeySetAsync + * + * Update a JSON Web Key Set + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setJsonWebKeySetAsync($set, $jsonWebKeySet = null) + { + return $this->setJsonWebKeySetAsyncWithHttpInfo($set, $jsonWebKeySet) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation setJsonWebKeySetAsyncWithHttpInfo + * + * Update a JSON Web Key Set + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setJsonWebKeySetAsyncWithHttpInfo($set, $jsonWebKeySet = null) + { + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + $request = $this->setJsonWebKeySetRequest($set, $jsonWebKeySet); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'setJsonWebKeySet' + * + * @param string $set The JSON Web Key Set ID (required) + * @param \Ory\Hydra\Client\Model\JsonWebKeySet $jsonWebKeySet (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function setJsonWebKeySetRequest($set, $jsonWebKeySet = null) + { + // 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 setJsonWebKeySet' + ); + } + + $resourcePath = '/admin/keys/{set}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($set !== null) { + $resourcePath = str_replace( + '{' . 'set' . '}', + ObjectSerializer::toPathValue($set), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($jsonWebKeySet)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($jsonWebKeySet)); + } else { + $httpBody = $jsonWebKeySet; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/clients/hydra/php/lib/Api/MetadataApi.php b/clients/hydra/php/lib/Api/MetadataApi.php index fda9f91a7ab..e09ec534f64 100644 --- a/clients/hydra/php/lib/Api/MetadataApi.php +++ b/clients/hydra/php/lib/Api/MetadataApi.php @@ -10,11 +10,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ @@ -116,33 +117,34 @@ public function getConfig() } /** - * Operation prometheus + * Operation getVersion * - * Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + * Return Running Software Version. * * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return void + * @return \Ory\Hydra\Client\Model\InlineResponse2001 */ - public function prometheus() + public function getVersion() { - $this->prometheusWithHttpInfo(); + list($response) = $this->getVersionWithHttpInfo(); + return $response; } /** - * Operation prometheusWithHttpInfo + * Operation getVersionWithHttpInfo * - * Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + * Return Running Software Version. * * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\InlineResponse2001, HTTP status code, HTTP response headers (array of strings) */ - public function prometheusWithHttpInfo() + public function getVersionWithHttpInfo() { - $request = $this->prometheusRequest(); + $request = $this->getVersionRequest(); try { $options = $this->createHttpClientOption(); @@ -179,27 +181,61 @@ public function prometheusWithHttpInfo() ); } - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\InlineResponse2001' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\InlineResponse2001', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\InlineResponse2001'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\InlineResponse2001', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation prometheusAsync + * Operation getVersionAsync * - * Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + * Return Running Software Version. * * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function prometheusAsync() + public function getVersionAsync() { - return $this->prometheusAsyncWithHttpInfo() + return $this->getVersionAsyncWithHttpInfo() ->then( function ($response) { return $response[0]; @@ -208,24 +244,34 @@ function ($response) { } /** - * Operation prometheusAsyncWithHttpInfo + * Operation getVersionAsyncWithHttpInfo * - * Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: + * Return Running Software Version. * * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function prometheusAsyncWithHttpInfo() + public function getVersionAsyncWithHttpInfo() { - $returnType = ''; - $request = $this->prometheusRequest(); + $returnType = '\Ory\Hydra\Client\Model\InlineResponse2001'; + $request = $this->getVersionRequest(); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = $exception->getResponse(); @@ -245,16 +291,16 @@ function ($exception) { } /** - * Create request for operation 'prometheus' + * Create request for operation 'getVersion' * * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function prometheusRequest() + public function getVersionRequest() { - $resourcePath = '/metrics/prometheus'; + $resourcePath = '/version'; $formParams = []; $queryParams = []; $headerParams = []; @@ -267,11 +313,555 @@ public function prometheusRequest() if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], [] ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation isAlive + * + * Check HTTP Server Status + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\HealthStatus|\Ory\Hydra\Client\Model\GenericError + */ + public function isAlive() + { + list($response) = $this->isAliveWithHttpInfo(); + return $response; + } + + /** + * Operation isAliveWithHttpInfo + * + * Check HTTP Server Status + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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() + { + $request = $this->isAliveRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\HealthStatus' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\HealthStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GenericError', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\HealthStatus'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\HealthStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\GenericError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation isAliveAsync + * + * Check HTTP Server Status + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function isAliveAsync() + { + return $this->isAliveAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation isAliveAsyncWithHttpInfo + * + * Check HTTP Server Status + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function isAliveAsyncWithHttpInfo() + { + $returnType = '\Ory\Hydra\Client\Model\HealthStatus'; + $request = $this->isAliveRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'isAlive' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function isAliveRequest() + { + + $resourcePath = '/health/alive'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation isReady + * + * Check HTTP Server and Database Status + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\InlineResponse200|\Ory\Hydra\Client\Model\InlineResponse503 + */ + public function isReady() + { + list($response) = $this->isReadyWithHttpInfo(); + return $response; + } + + /** + * Operation isReadyWithHttpInfo + * + * Check HTTP Server and Database Status + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Ory\Hydra\Client\Model\InlineResponse200|\Ory\Hydra\Client\Model\InlineResponse503, HTTP status code, HTTP response headers (array of strings) + */ + public function isReadyWithHttpInfo() + { + $request = $this->isReadyRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\InlineResponse200' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\InlineResponse200', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 503: + if ('\Ory\Hydra\Client\Model\InlineResponse503' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\InlineResponse503', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\InlineResponse200'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\InlineResponse200', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\InlineResponse503', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation isReadyAsync + * + * Check HTTP Server and Database Status + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function isReadyAsync() + { + return $this->isReadyAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation isReadyAsyncWithHttpInfo + * + * Check HTTP Server and Database Status + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function isReadyAsyncWithHttpInfo() + { + $returnType = '\Ory\Hydra\Client\Model\InlineResponse200'; + $request = $this->isReadyRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'isReady' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function isReadyRequest() + { + + $resourcePath = '/health/ready'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); } else { $headers = $this->headerSelector->selectHeaders( - [], + ['application/json'], [] ); } diff --git a/clients/hydra/php/lib/Api/AdminApi.php b/clients/hydra/php/lib/Api/OAuth2Api.php similarity index 61% rename from clients/hydra/php/lib/Api/AdminApi.php rename to clients/hydra/php/lib/Api/OAuth2Api.php index 29a94851e80..239ebbb5f0c 100644 --- a/clients/hydra/php/lib/Api/AdminApi.php +++ b/clients/hydra/php/lib/Api/OAuth2Api.php @@ -1,6 +1,6 @@ acceptConsentRequestWithHttpInfo($consentChallenge, $body); + list($response) = $this->acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest); return $response; } /** - * Operation acceptConsentRequestWithHttpInfo + * Operation acceptOAuth2ConsentRequestWithHttpInfo * - * Accept a Consent Request + * Accept OAuth 2.0 Consent Request * - * @param string $consentChallenge (required) - * @param \Ory\Hydra\Client\Model\AcceptConsentRequest $body (optional) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest $acceptOAuth2ConsentRequest (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\CompletedRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function acceptConsentRequestWithHttpInfo($consentChallenge, $body = null) + public function acceptOAuth2ConsentRequestWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest = null) { - $request = $this->acceptConsentRequestRequest($consentChallenge, $body); + $request = $this->acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAuth2ConsentRequest); try { $options = $this->createHttpClientOption(); @@ -186,44 +187,32 @@ public function acceptConsentRequestWithHttpInfo($consentChallenge, $body = null switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\CompletedRequest' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\CompletedRequest', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2RedirectTo', []), $response->getStatusCode(), $response->getHeaders() ]; - case 404: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -241,23 +230,15 @@ public function acceptConsentRequestWithHttpInfo($consentChallenge, $body = null case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\CompletedRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2RedirectTo', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -268,19 +249,19 @@ public function acceptConsentRequestWithHttpInfo($consentChallenge, $body = null } /** - * Operation acceptConsentRequestAsync + * Operation acceptOAuth2ConsentRequestAsync * - * Accept a Consent Request + * Accept OAuth 2.0 Consent Request * - * @param string $consentChallenge (required) - * @param \Ory\Hydra\Client\Model\AcceptConsentRequest $body (optional) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest $acceptOAuth2ConsentRequest (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptConsentRequestAsync($consentChallenge, $body = null) + public function acceptOAuth2ConsentRequestAsync($consentChallenge, $acceptOAuth2ConsentRequest = null) { - return $this->acceptConsentRequestAsyncWithHttpInfo($consentChallenge, $body) + return $this->acceptOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest) ->then( function ($response) { return $response[0]; @@ -289,20 +270,20 @@ function ($response) { } /** - * Operation acceptConsentRequestAsyncWithHttpInfo + * Operation acceptOAuth2ConsentRequestAsyncWithHttpInfo * - * Accept a Consent Request + * Accept OAuth 2.0 Consent Request * - * @param string $consentChallenge (required) - * @param \Ory\Hydra\Client\Model\AcceptConsentRequest $body (optional) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest $acceptOAuth2ConsentRequest (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptConsentRequestAsyncWithHttpInfo($consentChallenge, $body = null) + public function acceptOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $acceptOAuth2ConsentRequest = null) { - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; - $request = $this->acceptConsentRequestRequest($consentChallenge, $body); + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; + $request = $this->acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAuth2ConsentRequest); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -338,24 +319,24 @@ function ($exception) { } /** - * Create request for operation 'acceptConsentRequest' + * Create request for operation 'acceptOAuth2ConsentRequest' * - * @param string $consentChallenge (required) - * @param \Ory\Hydra\Client\Model\AcceptConsentRequest $body (optional) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequest $acceptOAuth2ConsentRequest (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function acceptConsentRequestRequest($consentChallenge, $body = null) + public function acceptOAuth2ConsentRequestRequest($consentChallenge, $acceptOAuth2ConsentRequest = null) { // verify the required parameter 'consentChallenge' is set if ($consentChallenge === null || (is_array($consentChallenge) && count($consentChallenge) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $consentChallenge when calling acceptConsentRequest' + 'Missing the required parameter $consentChallenge when calling acceptOAuth2ConsentRequest' ); } - $resourcePath = '/oauth2/auth/requests/consent/accept'; + $resourcePath = '/admin/oauth2/auth/requests/consent/accept'; $formParams = []; $queryParams = []; $headerParams = []; @@ -363,11 +344,15 @@ public function acceptConsentRequestRequest($consentChallenge, $body = null) $multipart = false; // query params - if (is_array($consentChallenge)) { - $consentChallenge = ObjectSerializer::serializeCollection($consentChallenge, '', true); - } if ($consentChallenge !== null) { - $queryParams['consent_challenge'] = $consentChallenge; + if('form' === 'form' && is_array($consentChallenge)) { + foreach($consentChallenge as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['consent_challenge'] = $consentChallenge; + } } @@ -385,11 +370,11 @@ public function acceptConsentRequestRequest($consentChallenge, $body = null) } // for model (json/xml) - if (isset($body)) { + if (isset($acceptOAuth2ConsentRequest)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($acceptOAuth2ConsentRequest)); } else { - $httpBody = $body; + $httpBody = $acceptOAuth2ConsentRequest; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -437,38 +422,38 @@ public function acceptConsentRequestRequest($consentChallenge, $body = null) } /** - * Operation acceptLoginRequest + * Operation acceptOAuth2LoginRequest * - * Accept a Login Request + * Accept OAuth 2.0 Login Request * - * @param string $loginChallenge loginChallenge (required) - * @param \Ory\Hydra\Client\Model\AcceptLoginRequest $body body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest acceptOAuth2LoginRequest (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\CompletedRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function acceptLoginRequest($loginChallenge, $body = null) + public function acceptOAuth2LoginRequest($loginChallenge, $acceptOAuth2LoginRequest = null) { - list($response) = $this->acceptLoginRequestWithHttpInfo($loginChallenge, $body); + list($response) = $this->acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest); return $response; } /** - * Operation acceptLoginRequestWithHttpInfo + * Operation acceptOAuth2LoginRequestWithHttpInfo * - * Accept a Login Request + * Accept OAuth 2.0 Login Request * - * @param string $loginChallenge (required) - * @param \Ory\Hydra\Client\Model\AcceptLoginRequest $body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\CompletedRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function acceptLoginRequestWithHttpInfo($loginChallenge, $body = null) + public function acceptOAuth2LoginRequestWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest = null) { - $request = $this->acceptLoginRequestRequest($loginChallenge, $body); + $request = $this->acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2LoginRequest); try { $options = $this->createHttpClientOption(); @@ -507,68 +492,32 @@ public function acceptLoginRequestWithHttpInfo($loginChallenge, $body = null) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\CompletedRequest' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\CompletedRequest', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2RedirectTo', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -586,39 +535,15 @@ public function acceptLoginRequestWithHttpInfo($loginChallenge, $body = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\CompletedRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2RedirectTo', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -629,19 +554,19 @@ public function acceptLoginRequestWithHttpInfo($loginChallenge, $body = null) } /** - * Operation acceptLoginRequestAsync + * Operation acceptOAuth2LoginRequestAsync * - * Accept a Login Request + * Accept OAuth 2.0 Login Request * - * @param string $loginChallenge (required) - * @param \Ory\Hydra\Client\Model\AcceptLoginRequest $body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptLoginRequestAsync($loginChallenge, $body = null) + public function acceptOAuth2LoginRequestAsync($loginChallenge, $acceptOAuth2LoginRequest = null) { - return $this->acceptLoginRequestAsyncWithHttpInfo($loginChallenge, $body) + return $this->acceptOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest) ->then( function ($response) { return $response[0]; @@ -650,20 +575,20 @@ function ($response) { } /** - * Operation acceptLoginRequestAsyncWithHttpInfo + * Operation acceptOAuth2LoginRequestAsyncWithHttpInfo * - * Accept a Login Request + * Accept OAuth 2.0 Login Request * - * @param string $loginChallenge (required) - * @param \Ory\Hydra\Client\Model\AcceptLoginRequest $body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptLoginRequestAsyncWithHttpInfo($loginChallenge, $body = null) + public function acceptOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $acceptOAuth2LoginRequest = null) { - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; - $request = $this->acceptLoginRequestRequest($loginChallenge, $body); + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; + $request = $this->acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2LoginRequest); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -699,24 +624,24 @@ function ($exception) { } /** - * Create request for operation 'acceptLoginRequest' + * Create request for operation 'acceptOAuth2LoginRequest' * - * @param string $loginChallenge (required) - * @param \Ory\Hydra\Client\Model\AcceptLoginRequest $body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\AcceptOAuth2LoginRequest $acceptOAuth2LoginRequest (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function acceptLoginRequestRequest($loginChallenge, $body = null) + public function acceptOAuth2LoginRequestRequest($loginChallenge, $acceptOAuth2LoginRequest = null) { // verify the required parameter 'loginChallenge' is set if ($loginChallenge === null || (is_array($loginChallenge) && count($loginChallenge) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loginChallenge when calling acceptLoginRequest' + 'Missing the required parameter $loginChallenge when calling acceptOAuth2LoginRequest' ); } - $resourcePath = '/oauth2/auth/requests/login/accept'; + $resourcePath = '/admin/oauth2/auth/requests/login/accept'; $formParams = []; $queryParams = []; $headerParams = []; @@ -724,11 +649,15 @@ public function acceptLoginRequestRequest($loginChallenge, $body = null) $multipart = false; // query params - if (is_array($loginChallenge)) { - $loginChallenge = ObjectSerializer::serializeCollection($loginChallenge, '', true); - } if ($loginChallenge !== null) { - $queryParams['login_challenge'] = $loginChallenge; + if('form' === 'form' && is_array($loginChallenge)) { + foreach($loginChallenge as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['login_challenge'] = $loginChallenge; + } } @@ -746,11 +675,11 @@ public function acceptLoginRequestRequest($loginChallenge, $body = null) } // for model (json/xml) - if (isset($body)) { + if (isset($acceptOAuth2LoginRequest)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($acceptOAuth2LoginRequest)); } else { - $httpBody = $body; + $httpBody = $acceptOAuth2LoginRequest; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -798,36 +727,36 @@ public function acceptLoginRequestRequest($loginChallenge, $body = null) } /** - * Operation acceptLogoutRequest + * Operation acceptOAuth2LogoutRequest * - * Accept a Logout Request + * Accept OAuth 2.0 Session Logout Request * - * @param string $logoutChallenge logoutChallenge (required) + * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\CompletedRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function acceptLogoutRequest($logoutChallenge) + public function acceptOAuth2LogoutRequest($logoutChallenge) { - list($response) = $this->acceptLogoutRequestWithHttpInfo($logoutChallenge); + list($response) = $this->acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge); return $response; } /** - * Operation acceptLogoutRequestWithHttpInfo + * Operation acceptOAuth2LogoutRequestWithHttpInfo * - * Accept a Logout Request + * Accept OAuth 2.0 Session Logout Request * - * @param string $logoutChallenge (required) + * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\CompletedRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function acceptLogoutRequestWithHttpInfo($logoutChallenge) + public function acceptOAuth2LogoutRequestWithHttpInfo($logoutChallenge) { - $request = $this->acceptLogoutRequestRequest($logoutChallenge); + $request = $this->acceptOAuth2LogoutRequestRequest($logoutChallenge); try { $options = $this->createHttpClientOption(); @@ -866,44 +795,32 @@ public function acceptLogoutRequestWithHttpInfo($logoutChallenge) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\CompletedRequest' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\CompletedRequest', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2RedirectTo', []), $response->getStatusCode(), $response->getHeaders() ]; - case 404: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -921,23 +838,15 @@ public function acceptLogoutRequestWithHttpInfo($logoutChallenge) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\CompletedRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2RedirectTo', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -948,18 +857,18 @@ public function acceptLogoutRequestWithHttpInfo($logoutChallenge) } /** - * Operation acceptLogoutRequestAsync + * Operation acceptOAuth2LogoutRequestAsync * - * Accept a Logout Request + * Accept OAuth 2.0 Session Logout Request * - * @param string $logoutChallenge (required) + * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptLogoutRequestAsync($logoutChallenge) + public function acceptOAuth2LogoutRequestAsync($logoutChallenge) { - return $this->acceptLogoutRequestAsyncWithHttpInfo($logoutChallenge) + return $this->acceptOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) ->then( function ($response) { return $response[0]; @@ -968,19 +877,19 @@ function ($response) { } /** - * Operation acceptLogoutRequestAsyncWithHttpInfo + * Operation acceptOAuth2LogoutRequestAsyncWithHttpInfo * - * Accept a Logout Request + * Accept OAuth 2.0 Session Logout Request * - * @param string $logoutChallenge (required) + * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function acceptLogoutRequestAsyncWithHttpInfo($logoutChallenge) + public function acceptOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) { - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; - $request = $this->acceptLogoutRequestRequest($logoutChallenge); + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; + $request = $this->acceptOAuth2LogoutRequestRequest($logoutChallenge); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1016,23 +925,23 @@ function ($exception) { } /** - * Create request for operation 'acceptLogoutRequest' + * Create request for operation 'acceptOAuth2LogoutRequest' * - * @param string $logoutChallenge (required) + * @param string $logoutChallenge OAuth 2.0 Logout Request Challenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function acceptLogoutRequestRequest($logoutChallenge) + public function acceptOAuth2LogoutRequestRequest($logoutChallenge) { // verify the required parameter 'logoutChallenge' is set if ($logoutChallenge === null || (is_array($logoutChallenge) && count($logoutChallenge) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $logoutChallenge when calling acceptLogoutRequest' + 'Missing the required parameter $logoutChallenge when calling acceptOAuth2LogoutRequest' ); } - $resourcePath = '/oauth2/auth/requests/logout/accept'; + $resourcePath = '/admin/oauth2/auth/requests/logout/accept'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1040,11 +949,15 @@ public function acceptLogoutRequestRequest($logoutChallenge) $multipart = false; // query params - if (is_array($logoutChallenge)) { - $logoutChallenge = ObjectSerializer::serializeCollection($logoutChallenge, '', true); - } if ($logoutChallenge !== null) { - $queryParams['logout_challenge'] = $logoutChallenge; + if('form' === 'form' && is_array($logoutChallenge)) { + foreach($logoutChallenge as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['logout_challenge'] = $logoutChallenge; + } } @@ -1108,38 +1021,36 @@ public function acceptLogoutRequestRequest($logoutChallenge) } /** - * Operation createJsonWebKeySet + * Operation createOAuth2Client * - * Generate a New JSON Web Key + * Create OAuth 2.0 Client * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JsonWebKeySetGeneratorRequest $body body (optional) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function createJsonWebKeySet($set, $body = null) + public function createOAuth2Client($oAuth2Client) { - list($response) = $this->createJsonWebKeySetWithHttpInfo($set, $body); + list($response) = $this->createOAuth2ClientWithHttpInfo($oAuth2Client); return $response; } /** - * Operation createJsonWebKeySetWithHttpInfo + * Operation createOAuth2ClientWithHttpInfo * - * Generate a New JSON Web Key + * Create OAuth 2.0 Client * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JsonWebKeySetGeneratorRequest $body (optional) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @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 createJsonWebKeySetWithHttpInfo($set, $body = null) + public function createOAuth2ClientWithHttpInfo($oAuth2Client) { - $request = $this->createJsonWebKeySetRequest($set, $body); + $request = $this->createOAuth2ClientRequest($oAuth2Client); try { $options = $this->createHttpClientOption(); @@ -1178,56 +1089,44 @@ public function createJsonWebKeySetWithHttpInfo($set, $body = null) switch($statusCode) { case 201: - if ('\Ory\Hydra\Client\Model\JSONWebKeySet' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JSONWebKeySet', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), $response->getStatusCode(), $response->getHeaders() ]; - case 403: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + case 400: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -1245,31 +1144,23 @@ public function createJsonWebKeySetWithHttpInfo($set, $body = null) case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2Client', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 403: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1280,19 +1171,18 @@ public function createJsonWebKeySetWithHttpInfo($set, $body = null) } /** - * Operation createJsonWebKeySetAsync + * Operation createOAuth2ClientAsync * - * Generate a New JSON Web Key + * Create OAuth 2.0 Client * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JsonWebKeySetGeneratorRequest $body (optional) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createJsonWebKeySetAsync($set, $body = null) + public function createOAuth2ClientAsync($oAuth2Client) { - return $this->createJsonWebKeySetAsyncWithHttpInfo($set, $body) + return $this->createOAuth2ClientAsyncWithHttpInfo($oAuth2Client) ->then( function ($response) { return $response[0]; @@ -1301,20 +1191,19 @@ function ($response) { } /** - * Operation createJsonWebKeySetAsyncWithHttpInfo + * Operation createOAuth2ClientAsyncWithHttpInfo * - * Generate a New JSON Web Key + * Create OAuth 2.0 Client * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JsonWebKeySetGeneratorRequest $body (optional) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createJsonWebKeySetAsyncWithHttpInfo($set, $body = null) + public function createOAuth2ClientAsyncWithHttpInfo($oAuth2Client) { - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; - $request = $this->createJsonWebKeySetRequest($set, $body); + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + $request = $this->createOAuth2ClientRequest($oAuth2Client); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1350,24 +1239,23 @@ function ($exception) { } /** - * Create request for operation 'createJsonWebKeySet' + * Create request for operation 'createOAuth2Client' * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JsonWebKeySetGeneratorRequest $body (optional) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createJsonWebKeySetRequest($set, $body = null) + public function createOAuth2ClientRequest($oAuth2Client) { - // verify the required parameter 'set' is set - if ($set === null || (is_array($set) && count($set) === 0)) { + // verify the required parameter 'oAuth2Client' is set + if ($oAuth2Client === null || (is_array($oAuth2Client) && count($oAuth2Client) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $set when calling createJsonWebKeySet' + 'Missing the required parameter $oAuth2Client when calling createOAuth2Client' ); } - $resourcePath = '/keys/{set}'; + $resourcePath = '/admin/clients'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1376,14 +1264,6 @@ public function createJsonWebKeySetRequest($set, $body = null) - // path params - if ($set !== null) { - $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), - $resourcePath - ); - } if ($multipart) { @@ -1398,11 +1278,11 @@ public function createJsonWebKeySetRequest($set, $body = null) } // for model (json/xml) - if (isset($body)) { + if (isset($oAuth2Client)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); } else { - $httpBody = $body; + $httpBody = $oAuth2Client; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -1450,36 +1330,35 @@ public function createJsonWebKeySetRequest($set, $body = null) } /** - * Operation createOAuth2Client + * Operation deleteOAuth2Client * - * Create an OAuth 2.0 Client + * Delete OAuth 2.0 Client * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body body (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError + * @return void */ - public function createOAuth2Client($body) + public function deleteOAuth2Client($id) { - list($response) = $this->createOAuth2ClientWithHttpInfo($body); - return $response; + $this->deleteOAuth2ClientWithHttpInfo($id); } /** - * Operation createOAuth2ClientWithHttpInfo + * Operation deleteOAuth2ClientWithHttpInfo * - * Create an OAuth 2.0 Client + * Delete OAuth 2.0 Client * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function createOAuth2ClientWithHttpInfo($body) + public function deleteOAuth2ClientWithHttpInfo($id) { - $request = $this->createOAuth2ClientRequest($body); + $request = $this->deleteOAuth2ClientRequest($id); try { $options = $this->createHttpClientOption(); @@ -1516,60 +1395,14 @@ public function createOAuth2ClientWithHttpInfo($body) ); } - switch($statusCode) { - case 201: - if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - default: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\OAuth2Client', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\GenericError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1580,18 +1413,18 @@ public function createOAuth2ClientWithHttpInfo($body) } /** - * Operation createOAuth2ClientAsync + * Operation deleteOAuth2ClientAsync * - * Create an OAuth 2.0 Client + * Delete OAuth 2.0 Client * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOAuth2ClientAsync($body) + public function deleteOAuth2ClientAsync($id) { - return $this->createOAuth2ClientAsyncWithHttpInfo($body) + return $this->deleteOAuth2ClientAsyncWithHttpInfo($id) ->then( function ($response) { return $response[0]; @@ -1600,35 +1433,25 @@ function ($response) { } /** - * Operation createOAuth2ClientAsyncWithHttpInfo + * Operation deleteOAuth2ClientAsyncWithHttpInfo * - * Create an OAuth 2.0 Client + * Delete OAuth 2.0 Client * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOAuth2ClientAsyncWithHttpInfo($body) + public function deleteOAuth2ClientAsyncWithHttpInfo($id) { - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->createOAuth2ClientRequest($body); + $returnType = ''; + $request = $this->deleteOAuth2ClientRequest($id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -1648,23 +1471,23 @@ function ($exception) { } /** - * Create request for operation 'createOAuth2Client' + * Create request for operation 'deleteOAuth2Client' * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createOAuth2ClientRequest($body) + public function deleteOAuth2ClientRequest($id) { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling createOAuth2Client' + 'Missing the required parameter $id when calling deleteOAuth2Client' ); } - $resourcePath = '/clients'; + $resourcePath = '/admin/clients/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1673,6 +1496,14 @@ public function createOAuth2ClientRequest($body) + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } if ($multipart) { @@ -1682,18 +1513,12 @@ public function createOAuth2ClientRequest($body) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } // for model (json/xml) - if (isset($body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); - } else { - $httpBody = $body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1731,7 +1556,7 @@ public function createOAuth2ClientRequest($body) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'POST', + 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1739,37 +1564,35 @@ public function createOAuth2ClientRequest($body) } /** - * Operation deleteJsonWebKey + * Operation deleteOAuth2Token * - * Delete a JSON Web Key + * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) + * @param string $clientId OAuth 2.0 Client ID (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteJsonWebKey($kid, $set) + public function deleteOAuth2Token($clientId) { - $this->deleteJsonWebKeyWithHttpInfo($kid, $set); + $this->deleteOAuth2TokenWithHttpInfo($clientId); } /** - * Operation deleteJsonWebKeyWithHttpInfo + * Operation deleteOAuth2TokenWithHttpInfo * - * Delete a JSON Web Key + * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) + * @param string $clientId OAuth 2.0 Client ID (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteJsonWebKeyWithHttpInfo($kid, $set) + public function deleteOAuth2TokenWithHttpInfo($clientId) { - $request = $this->deleteJsonWebKeyRequest($kid, $set); + $request = $this->deleteOAuth2TokenRequest($clientId); try { $options = $this->createHttpClientOption(); @@ -1810,26 +1633,10 @@ public function deleteJsonWebKeyWithHttpInfo($kid, $set) } catch (ApiException $e) { switch ($e->getCode()) { - case 401: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1840,19 +1647,18 @@ public function deleteJsonWebKeyWithHttpInfo($kid, $set) } /** - * Operation deleteJsonWebKeyAsync + * Operation deleteOAuth2TokenAsync * - * Delete a JSON Web Key + * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) + * @param string $clientId OAuth 2.0 Client ID (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteJsonWebKeyAsync($kid, $set) + public function deleteOAuth2TokenAsync($clientId) { - return $this->deleteJsonWebKeyAsyncWithHttpInfo($kid, $set) + return $this->deleteOAuth2TokenAsyncWithHttpInfo($clientId) ->then( function ($response) { return $response[0]; @@ -1861,20 +1667,19 @@ function ($response) { } /** - * Operation deleteJsonWebKeyAsyncWithHttpInfo + * Operation deleteOAuth2TokenAsyncWithHttpInfo * - * Delete a JSON Web Key + * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) + * @param string $clientId OAuth 2.0 Client ID (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteJsonWebKeyAsyncWithHttpInfo($kid, $set) + public function deleteOAuth2TokenAsyncWithHttpInfo($clientId) { $returnType = ''; - $request = $this->deleteJsonWebKeyRequest($kid, $set); + $request = $this->deleteOAuth2TokenRequest($clientId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1900,54 +1705,42 @@ function ($exception) { } /** - * Create request for operation 'deleteJsonWebKey' + * Create request for operation 'deleteOAuth2Token' * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) + * @param string $clientId OAuth 2.0 Client ID (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function deleteJsonWebKeyRequest($kid, $set) + public function deleteOAuth2TokenRequest($clientId) { - // verify the required parameter 'kid' is set - if ($kid === null || (is_array($kid) && count($kid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $kid when calling deleteJsonWebKey' - ); - } - // verify the required parameter 'set' is set - if ($set === null || (is_array($set) && count($set) === 0)) { + // verify the required parameter 'clientId' is set + if ($clientId === null || (is_array($clientId) && count($clientId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $set when calling deleteJsonWebKey' + 'Missing the required parameter $clientId when calling deleteOAuth2Token' ); } - $resourcePath = '/keys/{set}/{kid}'; + $resourcePath = '/admin/oauth2/tokens'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $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; + } + } - // path params - if ($kid !== null) { - $resourcePath = str_replace( - '{' . 'kid' . '}', - ObjectSerializer::toPathValue($kid), - $resourcePath - ); - } - // path params - if ($set !== null) { - $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), - $resourcePath - ); - } if ($multipart) { @@ -2008,35 +1801,35 @@ public function deleteJsonWebKeyRequest($kid, $set) } /** - * Operation deleteJsonWebKeySet + * Operation deleteTrustedOAuth2JwtGrantIssuer * - * Delete a JSON Web Key Set + * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * - * @param string $set The set (required) + * @param string $id The id of the desired grant (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteJsonWebKeySet($set) + public function deleteTrustedOAuth2JwtGrantIssuer($id) { - $this->deleteJsonWebKeySetWithHttpInfo($set); + $this->deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo($id); } /** - * Operation deleteJsonWebKeySetWithHttpInfo + * Operation deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo * - * Delete a JSON Web Key Set + * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * - * @param string $set The set (required) + * @param string $id The id of the desired grant (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteJsonWebKeySetWithHttpInfo($set) + public function deleteTrustedOAuth2JwtGrantIssuerWithHttpInfo($id) { - $request = $this->deleteJsonWebKeySetRequest($set); + $request = $this->deleteTrustedOAuth2JwtGrantIssuerRequest($id); try { $options = $this->createHttpClientOption(); @@ -2050,1637 +1843,37 @@ public function deleteJsonWebKeySetWithHttpInfo($set) $e->getResponse() ? (string) $e->getResponse()->getBody() : null ); } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation deleteJsonWebKeySetAsync - * - * Delete a JSON Web Key Set - * - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteJsonWebKeySetAsync($set) - { - return $this->deleteJsonWebKeySetAsyncWithHttpInfo($set) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deleteJsonWebKeySetAsyncWithHttpInfo - * - * Delete a JSON Web Key Set - * - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteJsonWebKeySetAsyncWithHttpInfo($set) - { - $returnType = ''; - $request = $this->deleteJsonWebKeySetRequest($set); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteJsonWebKeySet' - * - * @param string $set The set (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function deleteJsonWebKeySetRequest($set) - { - // 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 deleteJsonWebKeySet' - ); - } - - $resourcePath = '/keys/{set}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($set !== null) { - $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteOAuth2Client - * - * Deletes an OAuth 2.0 Client - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function deleteOAuth2Client($id) - { - $this->deleteOAuth2ClientWithHttpInfo($id); - } - - /** - * Operation deleteOAuth2ClientWithHttpInfo - * - * Deletes an OAuth 2.0 Client - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteOAuth2ClientWithHttpInfo($id) - { - $request = $this->deleteOAuth2ClientRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - default: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation deleteOAuth2ClientAsync - * - * Deletes an OAuth 2.0 Client - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteOAuth2ClientAsync($id) - { - return $this->deleteOAuth2ClientAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deleteOAuth2ClientAsyncWithHttpInfo - * - * Deletes an OAuth 2.0 Client - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteOAuth2ClientAsyncWithHttpInfo($id) - { - $returnType = ''; - $request = $this->deleteOAuth2ClientRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteOAuth2Client' - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function deleteOAuth2ClientRequest($id) - { - // 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 deleteOAuth2Client' - ); - } - - $resourcePath = '/clients/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteOAuth2Token - * - * Delete OAuth2 Access Tokens from a Client - * - * @param string $clientId clientId (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function deleteOAuth2Token($clientId) - { - $this->deleteOAuth2TokenWithHttpInfo($clientId); - } - - /** - * Operation deleteOAuth2TokenWithHttpInfo - * - * Delete OAuth2 Access Tokens from a Client - * - * @param string $clientId (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteOAuth2TokenWithHttpInfo($clientId) - { - $request = $this->deleteOAuth2TokenRequest($clientId); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation deleteOAuth2TokenAsync - * - * Delete OAuth2 Access Tokens from a Client - * - * @param string $clientId (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteOAuth2TokenAsync($clientId) - { - return $this->deleteOAuth2TokenAsyncWithHttpInfo($clientId) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deleteOAuth2TokenAsyncWithHttpInfo - * - * Delete OAuth2 Access Tokens from a Client - * - * @param string $clientId (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteOAuth2TokenAsyncWithHttpInfo($clientId) - { - $returnType = ''; - $request = $this->deleteOAuth2TokenRequest($clientId); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteOAuth2Token' - * - * @param string $clientId (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function deleteOAuth2TokenRequest($clientId) - { - // verify the required parameter 'clientId' is set - if ($clientId === null || (is_array($clientId) && count($clientId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $clientId when calling deleteOAuth2Token' - ); - } - - $resourcePath = '/oauth2/tokens'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if (is_array($clientId)) { - $clientId = ObjectSerializer::serializeCollection($clientId, '', true); - } - if ($clientId !== null) { - $queryParams['client_id'] = $clientId; - } - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation deleteTrustedJwtGrantIssuer - * - * Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - * - * @param string $id The id of the desired grant (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function deleteTrustedJwtGrantIssuer($id) - { - $this->deleteTrustedJwtGrantIssuerWithHttpInfo($id); - } - - /** - * Operation deleteTrustedJwtGrantIssuerWithHttpInfo - * - * Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - * - * @param string $id The id of the desired grant (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteTrustedJwtGrantIssuerWithHttpInfo($id) - { - $request = $this->deleteTrustedJwtGrantIssuerRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation deleteTrustedJwtGrantIssuerAsync - * - * Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - * - * @param string $id The id of the desired grant (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteTrustedJwtGrantIssuerAsync($id) - { - return $this->deleteTrustedJwtGrantIssuerAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation deleteTrustedJwtGrantIssuerAsyncWithHttpInfo - * - * Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - * - * @param string $id The id of the desired grant (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function deleteTrustedJwtGrantIssuerAsyncWithHttpInfo($id) - { - $returnType = ''; - $request = $this->deleteTrustedJwtGrantIssuerRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'deleteTrustedJwtGrantIssuer' - * - * @param string $id The id of the desired grant (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function deleteTrustedJwtGrantIssuerRequest($id) - { - // 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 deleteTrustedJwtGrantIssuer' - ); - } - - $resourcePath = '/trust/grants/jwt-bearer/issuers/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation flushInactiveOAuth2Tokens - * - * Flush Expired OAuth2 Access Tokens - * - * @param \Ory\Hydra\Client\Model\FlushInactiveOAuth2TokensRequest $body body (optional) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function flushInactiveOAuth2Tokens($body = null) - { - $this->flushInactiveOAuth2TokensWithHttpInfo($body); - } - - /** - * Operation flushInactiveOAuth2TokensWithHttpInfo - * - * Flush Expired OAuth2 Access Tokens - * - * @param \Ory\Hydra\Client\Model\FlushInactiveOAuth2TokensRequest $body (optional) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function flushInactiveOAuth2TokensWithHttpInfo($body = null) - { - $request = $this->flushInactiveOAuth2TokensRequest($body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation flushInactiveOAuth2TokensAsync - * - * Flush Expired OAuth2 Access Tokens - * - * @param \Ory\Hydra\Client\Model\FlushInactiveOAuth2TokensRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function flushInactiveOAuth2TokensAsync($body = null) - { - return $this->flushInactiveOAuth2TokensAsyncWithHttpInfo($body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation flushInactiveOAuth2TokensAsyncWithHttpInfo - * - * Flush Expired OAuth2 Access Tokens - * - * @param \Ory\Hydra\Client\Model\FlushInactiveOAuth2TokensRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function flushInactiveOAuth2TokensAsyncWithHttpInfo($body = null) - { - $returnType = ''; - $request = $this->flushInactiveOAuth2TokensRequest($body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'flushInactiveOAuth2Tokens' - * - * @param \Ory\Hydra\Client\Model\FlushInactiveOAuth2TokensRequest $body (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function flushInactiveOAuth2TokensRequest($body = null) - { - - $resourcePath = '/oauth2/flush'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); - } else { - $httpBody = $body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getConsentRequest - * - * Get Consent Request Information - * - * @param string $consentChallenge consentChallenge (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\ConsentRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\RequestWasHandledResponse|\Ory\Hydra\Client\Model\JsonError - */ - public function getConsentRequest($consentChallenge) - { - list($response) = $this->getConsentRequestWithHttpInfo($consentChallenge); - return $response; - } - - /** - * Operation getConsentRequestWithHttpInfo - * - * Get Consent Request Information - * - * @param string $consentChallenge (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\ConsentRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\RequestWasHandledResponse|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) - */ - public function getConsentRequestWithHttpInfo($consentChallenge) - { - $request = $this->getConsentRequestRequest($consentChallenge); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\ConsentRequest' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ConsentRequest', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 410: - if ('\Ory\Hydra\Client\Model\RequestWasHandledResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\RequestWasHandledResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\ConsentRequest'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\ConsentRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 410: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\RequestWasHandledResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation getConsentRequestAsync - * - * Get Consent Request Information - * - * @param string $consentChallenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getConsentRequestAsync($consentChallenge) - { - return $this->getConsentRequestAsyncWithHttpInfo($consentChallenge) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation getConsentRequestAsyncWithHttpInfo - * - * Get Consent Request Information - * - * @param string $consentChallenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function getConsentRequestAsyncWithHttpInfo($consentChallenge) - { - $returnType = '\Ory\Hydra\Client\Model\ConsentRequest'; - $request = $this->getConsentRequestRequest($consentChallenge); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'getConsentRequest' - * - * @param string $consentChallenge (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function getConsentRequestRequest($consentChallenge) - { - // verify the required parameter 'consentChallenge' is set - if ($consentChallenge === null || (is_array($consentChallenge) && count($consentChallenge) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $consentChallenge when calling getConsentRequest' - ); - } - - $resourcePath = '/oauth2/auth/requests/consent'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - if (is_array($consentChallenge)) { - $consentChallenge = ObjectSerializer::serializeCollection($consentChallenge, '', true); - } - if ($consentChallenge !== null) { - $queryParams['consent_challenge'] = $consentChallenge; - } - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation getJsonWebKey - * - * Fetch a JSON Web Key - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError - */ - public function getJsonWebKey($kid, $set) - { - list($response) = $this->getJsonWebKeyWithHttpInfo($kid, $set); - return $response; - } - - /** - * Operation getJsonWebKeyWithHttpInfo - * - * Fetch a JSON Web Key - * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) - */ - public function getJsonWebKeyWithHttpInfo($kid, $set) - { - $request = $this->getJsonWebKeyRequest($kid, $set); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\JSONWebKeySet' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JSONWebKeySet', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); } - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); } - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\GenericError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3691,19 +1884,18 @@ public function getJsonWebKeyWithHttpInfo($kid, $set) } /** - * Operation getJsonWebKeyAsync + * Operation deleteTrustedOAuth2JwtGrantIssuerAsync * - * Fetch a JSON Web Key + * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) + * @param string $id The id of the desired grant (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJsonWebKeyAsync($kid, $set) + public function deleteTrustedOAuth2JwtGrantIssuerAsync($id) { - return $this->getJsonWebKeyAsyncWithHttpInfo($kid, $set) + return $this->deleteTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id) ->then( function ($response) { return $response[0]; @@ -3712,36 +1904,25 @@ function ($response) { } /** - * Operation getJsonWebKeyAsyncWithHttpInfo + * Operation deleteTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo * - * Fetch a JSON Web Key + * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) + * @param string $id The id of the desired grant (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJsonWebKeyAsyncWithHttpInfo($kid, $set) + public function deleteTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id) { - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; - $request = $this->getJsonWebKeyRequest($kid, $set); + $returnType = ''; + $request = $this->deleteTrustedOAuth2JwtGrantIssuerRequest($id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -3761,30 +1942,23 @@ function ($exception) { } /** - * Create request for operation 'getJsonWebKey' + * Create request for operation 'deleteTrustedOAuth2JwtGrantIssuer' * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) + * @param string $id The id of the desired grant (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getJsonWebKeyRequest($kid, $set) + public function deleteTrustedOAuth2JwtGrantIssuerRequest($id) { - // verify the required parameter 'kid' is set - if ($kid === null || (is_array($kid) && count($kid) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $kid when calling getJsonWebKey' - ); - } - // verify the required parameter 'set' is set - if ($set === null || (is_array($set) && count($set) === 0)) { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $set when calling getJsonWebKey' + 'Missing the required parameter $id when calling deleteTrustedOAuth2JwtGrantIssuer' ); } - $resourcePath = '/keys/{set}/{kid}'; + $resourcePath = '/admin/trust/grants/jwt-bearer/issuers/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3794,18 +1968,10 @@ public function getJsonWebKeyRequest($kid, $set) // path params - if ($kid !== null) { - $resourcePath = str_replace( - '{' . 'kid' . '}', - ObjectSerializer::toPathValue($kid), - $resourcePath - ); - } - // path params - if ($set !== null) { + if ($id !== null) { $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), $resourcePath ); } @@ -3861,7 +2027,7 @@ public function getJsonWebKeyRequest($kid, $set) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3869,36 +2035,36 @@ public function getJsonWebKeyRequest($kid, $set) } /** - * Operation getJsonWebKeySet + * Operation getOAuth2Client * - * Retrieve a JSON Web Key Set + * Get an OAuth 2.0 Client * - * @param string $set The set (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getJsonWebKeySet($set) + public function getOAuth2Client($id) { - list($response) = $this->getJsonWebKeySetWithHttpInfo($set); + list($response) = $this->getOAuth2ClientWithHttpInfo($id); return $response; } /** - * Operation getJsonWebKeySetWithHttpInfo + * Operation getOAuth2ClientWithHttpInfo * - * Retrieve a JSON Web Key Set + * Get an OAuth 2.0 Client * - * @param string $set The set (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getJsonWebKeySetWithHttpInfo($set) + public function getOAuth2ClientWithHttpInfo($id) { - $request = $this->getJsonWebKeySetRequest($set); + $request = $this->getOAuth2ClientRequest($id); try { $options = $this->createHttpClientOption(); @@ -3937,56 +2103,32 @@ public function getJsonWebKeySetWithHttpInfo($set) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\JSONWebKeySet' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JSONWebKeySet', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -4004,31 +2146,15 @@ public function getJsonWebKeySetWithHttpInfo($set) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2Client', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4039,18 +2165,18 @@ public function getJsonWebKeySetWithHttpInfo($set) } /** - * Operation getJsonWebKeySetAsync + * Operation getOAuth2ClientAsync * - * Retrieve a JSON Web Key Set + * Get an OAuth 2.0 Client * - * @param string $set The set (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJsonWebKeySetAsync($set) + public function getOAuth2ClientAsync($id) { - return $this->getJsonWebKeySetAsyncWithHttpInfo($set) + return $this->getOAuth2ClientAsyncWithHttpInfo($id) ->then( function ($response) { return $response[0]; @@ -4059,19 +2185,19 @@ function ($response) { } /** - * Operation getJsonWebKeySetAsyncWithHttpInfo + * Operation getOAuth2ClientAsyncWithHttpInfo * - * Retrieve a JSON Web Key Set + * Get an OAuth 2.0 Client * - * @param string $set The set (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getJsonWebKeySetAsyncWithHttpInfo($set) + public function getOAuth2ClientAsyncWithHttpInfo($id) { - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; - $request = $this->getJsonWebKeySetRequest($set); + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + $request = $this->getOAuth2ClientRequest($id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4107,23 +2233,23 @@ function ($exception) { } /** - * Create request for operation 'getJsonWebKeySet' + * Create request for operation 'getOAuth2Client' * - * @param string $set The set (required) + * @param string $id The id of the OAuth 2.0 Client. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getJsonWebKeySetRequest($set) + public function getOAuth2ClientRequest($id) { - // verify the required parameter 'set' is set - if ($set === null || (is_array($set) && count($set) === 0)) { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $set when calling getJsonWebKeySet' + 'Missing the required parameter $id when calling getOAuth2Client' ); } - $resourcePath = '/keys/{set}'; + $resourcePath = '/admin/clients/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4133,10 +2259,10 @@ public function getJsonWebKeySetRequest($set) // path params - if ($set !== null) { + if ($id !== null) { $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), $resourcePath ); } @@ -4200,36 +2326,36 @@ public function getJsonWebKeySetRequest($set) } /** - * Operation getLoginRequest + * Operation getOAuth2ConsentRequest * - * Get a Login Request + * Get OAuth 2.0 Consent Request * - * @param string $loginChallenge loginChallenge (required) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\LoginRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\RequestWasHandledResponse|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2ConsentRequest|\Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getLoginRequest($loginChallenge) + public function getOAuth2ConsentRequest($consentChallenge) { - list($response) = $this->getLoginRequestWithHttpInfo($loginChallenge); + list($response) = $this->getOAuth2ConsentRequestWithHttpInfo($consentChallenge); return $response; } /** - * Operation getLoginRequestWithHttpInfo + * Operation getOAuth2ConsentRequestWithHttpInfo * - * Get a Login Request + * Get OAuth 2.0 Consent Request * - * @param string $loginChallenge (required) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\LoginRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\RequestWasHandledResponse|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @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 getLoginRequestWithHttpInfo($loginChallenge) + public function getOAuth2ConsentRequestWithHttpInfo($consentChallenge) { - $request = $this->getLoginRequestRequest($loginChallenge); + $request = $this->getOAuth2ConsentRequestRequest($consentChallenge); try { $options = $this->createHttpClientOption(); @@ -4268,68 +2394,44 @@ public function getLoginRequestWithHttpInfo($loginChallenge) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\LoginRequest' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\LoginRequest', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2ConsentRequest' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2ConsentRequest', []), $response->getStatusCode(), $response->getHeaders() ]; case 410: - if ('\Ory\Hydra\Client\Model\RequestWasHandledResponse' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\RequestWasHandledResponse', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2RedirectTo', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\LoginRequest'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2ConsentRequest'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -4347,23 +2449,7 @@ public function getLoginRequestWithHttpInfo($loginChallenge) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\LoginRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2ConsentRequest', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4371,15 +2457,15 @@ public function getLoginRequestWithHttpInfo($loginChallenge) case 410: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\RequestWasHandledResponse', + '\Ory\Hydra\Client\Model\OAuth2RedirectTo', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4390,18 +2476,18 @@ public function getLoginRequestWithHttpInfo($loginChallenge) } /** - * Operation getLoginRequestAsync + * Operation getOAuth2ConsentRequestAsync * - * Get a Login Request + * Get OAuth 2.0 Consent Request * - * @param string $loginChallenge (required) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoginRequestAsync($loginChallenge) + public function getOAuth2ConsentRequestAsync($consentChallenge) { - return $this->getLoginRequestAsyncWithHttpInfo($loginChallenge) + return $this->getOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge) ->then( function ($response) { return $response[0]; @@ -4410,19 +2496,19 @@ function ($response) { } /** - * Operation getLoginRequestAsyncWithHttpInfo + * Operation getOAuth2ConsentRequestAsyncWithHttpInfo * - * Get a Login Request + * Get OAuth 2.0 Consent Request * - * @param string $loginChallenge (required) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoginRequestAsyncWithHttpInfo($loginChallenge) + public function getOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge) { - $returnType = '\Ory\Hydra\Client\Model\LoginRequest'; - $request = $this->getLoginRequestRequest($loginChallenge); + $returnType = '\Ory\Hydra\Client\Model\OAuth2ConsentRequest'; + $request = $this->getOAuth2ConsentRequestRequest($consentChallenge); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4458,23 +2544,23 @@ function ($exception) { } /** - * Create request for operation 'getLoginRequest' + * Create request for operation 'getOAuth2ConsentRequest' * - * @param string $loginChallenge (required) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getLoginRequestRequest($loginChallenge) + public function getOAuth2ConsentRequestRequest($consentChallenge) { - // verify the required parameter 'loginChallenge' is set - if ($loginChallenge === null || (is_array($loginChallenge) && count($loginChallenge) === 0)) { + // verify the required parameter 'consentChallenge' is set + if ($consentChallenge === null || (is_array($consentChallenge) && count($consentChallenge) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loginChallenge when calling getLoginRequest' + 'Missing the required parameter $consentChallenge when calling getOAuth2ConsentRequest' ); } - $resourcePath = '/oauth2/auth/requests/login'; + $resourcePath = '/admin/oauth2/auth/requests/consent'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4482,11 +2568,15 @@ public function getLoginRequestRequest($loginChallenge) $multipart = false; // query params - if (is_array($loginChallenge)) { - $loginChallenge = ObjectSerializer::serializeCollection($loginChallenge, '', true); - } - if ($loginChallenge !== null) { - $queryParams['login_challenge'] = $loginChallenge; + if ($consentChallenge !== null) { + if('form' === 'form' && is_array($consentChallenge)) { + foreach($consentChallenge as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['consent_challenge'] = $consentChallenge; + } } @@ -4550,36 +2640,36 @@ public function getLoginRequestRequest($loginChallenge) } /** - * Operation getLogoutRequest + * Operation getOAuth2LoginRequest * - * Get a Logout Request + * Get OAuth 2.0 Login Request * - * @param string $logoutChallenge logoutChallenge (required) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\LogoutRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\RequestWasHandledResponse|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2LoginRequest|\Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getLogoutRequest($logoutChallenge) + public function getOAuth2LoginRequest($loginChallenge) { - list($response) = $this->getLogoutRequestWithHttpInfo($logoutChallenge); + list($response) = $this->getOAuth2LoginRequestWithHttpInfo($loginChallenge); return $response; } /** - * Operation getLogoutRequestWithHttpInfo + * Operation getOAuth2LoginRequestWithHttpInfo * - * Get a Logout Request + * Get OAuth 2.0 Login Request * - * @param string $logoutChallenge (required) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\LogoutRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\RequestWasHandledResponse|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @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 getLogoutRequestWithHttpInfo($logoutChallenge) + public function getOAuth2LoginRequestWithHttpInfo($loginChallenge) { - $request = $this->getLogoutRequestRequest($logoutChallenge); + $request = $this->getOAuth2LoginRequestRequest($loginChallenge); try { $options = $this->createHttpClientOption(); @@ -4618,56 +2708,44 @@ public function getLogoutRequestWithHttpInfo($logoutChallenge) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\LogoutRequest' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\LogoutRequest', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2LoginRequest' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2LoginRequest', []), $response->getStatusCode(), $response->getHeaders() ]; case 410: - if ('\Ory\Hydra\Client\Model\RequestWasHandledResponse' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\RequestWasHandledResponse', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2RedirectTo', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\LogoutRequest'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2LoginRequest'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -4685,15 +2763,7 @@ public function getLogoutRequestWithHttpInfo($logoutChallenge) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\LogoutRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2LoginRequest', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4701,15 +2771,15 @@ public function getLogoutRequestWithHttpInfo($logoutChallenge) case 410: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\RequestWasHandledResponse', + '\Ory\Hydra\Client\Model\OAuth2RedirectTo', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4720,18 +2790,18 @@ public function getLogoutRequestWithHttpInfo($logoutChallenge) } /** - * Operation getLogoutRequestAsync + * Operation getOAuth2LoginRequestAsync * - * Get a Logout Request + * Get OAuth 2.0 Login Request * - * @param string $logoutChallenge (required) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLogoutRequestAsync($logoutChallenge) + public function getOAuth2LoginRequestAsync($loginChallenge) { - return $this->getLogoutRequestAsyncWithHttpInfo($logoutChallenge) + return $this->getOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge) ->then( function ($response) { return $response[0]; @@ -4740,19 +2810,19 @@ function ($response) { } /** - * Operation getLogoutRequestAsyncWithHttpInfo + * Operation getOAuth2LoginRequestAsyncWithHttpInfo * - * Get a Logout Request + * Get OAuth 2.0 Login Request * - * @param string $logoutChallenge (required) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLogoutRequestAsyncWithHttpInfo($logoutChallenge) + public function getOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge) { - $returnType = '\Ory\Hydra\Client\Model\LogoutRequest'; - $request = $this->getLogoutRequestRequest($logoutChallenge); + $returnType = '\Ory\Hydra\Client\Model\OAuth2LoginRequest'; + $request = $this->getOAuth2LoginRequestRequest($loginChallenge); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4788,23 +2858,23 @@ function ($exception) { } /** - * Create request for operation 'getLogoutRequest' + * Create request for operation 'getOAuth2LoginRequest' * - * @param string $logoutChallenge (required) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getLogoutRequestRequest($logoutChallenge) + public function getOAuth2LoginRequestRequest($loginChallenge) { - // verify the required parameter 'logoutChallenge' is set - if ($logoutChallenge === null || (is_array($logoutChallenge) && count($logoutChallenge) === 0)) { + // verify the required parameter 'loginChallenge' is set + if ($loginChallenge === null || (is_array($loginChallenge) && count($loginChallenge) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $logoutChallenge when calling getLogoutRequest' + 'Missing the required parameter $loginChallenge when calling getOAuth2LoginRequest' ); } - $resourcePath = '/oauth2/auth/requests/logout'; + $resourcePath = '/admin/oauth2/auth/requests/login'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4812,11 +2882,15 @@ public function getLogoutRequestRequest($logoutChallenge) $multipart = false; // query params - if (is_array($logoutChallenge)) { - $logoutChallenge = ObjectSerializer::serializeCollection($logoutChallenge, '', true); - } - if ($logoutChallenge !== null) { - $queryParams['logout_challenge'] = $logoutChallenge; + if ($loginChallenge !== null) { + if('form' === 'form' && is_array($loginChallenge)) { + foreach($loginChallenge as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['login_challenge'] = $loginChallenge; + } } @@ -4880,36 +2954,36 @@ public function getLogoutRequestRequest($logoutChallenge) } /** - * Operation getOAuth2Client + * Operation getOAuth2LogoutRequest * - * Get an OAuth 2.0 Client + * Get OAuth 2.0 Session Logout Request * - * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $logoutChallenge logoutChallenge (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2LogoutRequest|\Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getOAuth2Client($id) + public function getOAuth2LogoutRequest($logoutChallenge) { - list($response) = $this->getOAuth2ClientWithHttpInfo($id); + list($response) = $this->getOAuth2LogoutRequestWithHttpInfo($logoutChallenge); return $response; } /** - * Operation getOAuth2ClientWithHttpInfo + * Operation getOAuth2LogoutRequestWithHttpInfo * - * Get an OAuth 2.0 Client + * Get OAuth 2.0 Session Logout Request * - * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $logoutChallenge (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @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 getOAuth2ClientWithHttpInfo($id) + public function getOAuth2LogoutRequestWithHttpInfo($logoutChallenge) { - $request = $this->getOAuth2ClientRequest($id); + $request = $this->getOAuth2LogoutRequestRequest($logoutChallenge); try { $options = $this->createHttpClientOption(); @@ -4948,32 +3022,44 @@ public function getOAuth2ClientWithHttpInfo($id) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2LogoutRequest' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2LogoutRequest', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 410: + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2RedirectTo', []), $response->getStatusCode(), $response->getHeaders() ]; default: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2LogoutRequest'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -4991,7 +3077,15 @@ public function getOAuth2ClientWithHttpInfo($id) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\OAuth2Client', + '\Ory\Hydra\Client\Model\OAuth2LogoutRequest', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 410: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\OAuth2RedirectTo', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4999,7 +3093,7 @@ public function getOAuth2ClientWithHttpInfo($id) default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -5010,18 +3104,18 @@ public function getOAuth2ClientWithHttpInfo($id) } /** - * Operation getOAuth2ClientAsync + * Operation getOAuth2LogoutRequestAsync * - * Get an OAuth 2.0 Client + * Get OAuth 2.0 Session Logout Request * - * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $logoutChallenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2ClientAsync($id) + public function getOAuth2LogoutRequestAsync($logoutChallenge) { - return $this->getOAuth2ClientAsyncWithHttpInfo($id) + return $this->getOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) ->then( function ($response) { return $response[0]; @@ -5030,19 +3124,19 @@ function ($response) { } /** - * Operation getOAuth2ClientAsyncWithHttpInfo + * Operation getOAuth2LogoutRequestAsyncWithHttpInfo * - * Get an OAuth 2.0 Client + * Get OAuth 2.0 Session Logout Request * - * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $logoutChallenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getOAuth2ClientAsyncWithHttpInfo($id) + public function getOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) { - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->getOAuth2ClientRequest($id); + $returnType = '\Ory\Hydra\Client\Model\OAuth2LogoutRequest'; + $request = $this->getOAuth2LogoutRequestRequest($logoutChallenge); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5078,39 +3172,42 @@ function ($exception) { } /** - * Create request for operation 'getOAuth2Client' + * Create request for operation 'getOAuth2LogoutRequest' * - * @param string $id The id of the OAuth 2.0 Client. (required) + * @param string $logoutChallenge (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getOAuth2ClientRequest($id) + public function getOAuth2LogoutRequestRequest($logoutChallenge) { - // verify the required parameter 'id' is set - if ($id === null || (is_array($id) && count($id) === 0)) { + // verify the required parameter 'logoutChallenge' is set + if ($logoutChallenge === null || (is_array($logoutChallenge) && count($logoutChallenge) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $id when calling getOAuth2Client' + 'Missing the required parameter $logoutChallenge when calling getOAuth2LogoutRequest' ); } - $resourcePath = '/clients/{id}'; + $resourcePath = '/admin/oauth2/auth/requests/logout'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $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; + } + } - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } if ($multipart) { @@ -5171,36 +3268,36 @@ public function getOAuth2ClientRequest($id) } /** - * Operation getTrustedJwtGrantIssuer + * Operation getTrustedOAuth2JwtGrantIssuer * - * Get a Trusted OAuth2 JWT Bearer Grant Type Issuer + * Get Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\TrustedJwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError|\Ory\Hydra\Client\Model\GenericError + * @return \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError */ - public function getTrustedJwtGrantIssuer($id) + public function getTrustedOAuth2JwtGrantIssuer($id) { - list($response) = $this->getTrustedJwtGrantIssuerWithHttpInfo($id); + list($response) = $this->getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id); return $response; } /** - * Operation getTrustedJwtGrantIssuerWithHttpInfo + * Operation getTrustedOAuth2JwtGrantIssuerWithHttpInfo * - * Get a Trusted OAuth2 JWT Bearer Grant Type Issuer + * Get Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\TrustedJwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) */ - public function getTrustedJwtGrantIssuerWithHttpInfo($id) + public function getTrustedOAuth2JwtGrantIssuerWithHttpInfo($id) { - $request = $this->getTrustedJwtGrantIssuerRequest($id); + $request = $this->getTrustedOAuth2JwtGrantIssuerRequest($id); try { $options = $this->createHttpClientOption(); @@ -5239,30 +3336,18 @@ public function getTrustedJwtGrantIssuerWithHttpInfo($id) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GenericError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: + default: if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -5276,7 +3361,7 @@ public function getTrustedJwtGrantIssuerWithHttpInfo($id) ]; } - $returnType = '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer'; + $returnType = '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -5294,20 +3379,12 @@ public function getTrustedJwtGrantIssuerWithHttpInfo($id) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer', + '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\Ory\Hydra\Client\Model\GenericError', @@ -5321,18 +3398,18 @@ public function getTrustedJwtGrantIssuerWithHttpInfo($id) } /** - * Operation getTrustedJwtGrantIssuerAsync + * Operation getTrustedOAuth2JwtGrantIssuerAsync * - * Get a Trusted OAuth2 JWT Bearer Grant Type Issuer + * Get Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTrustedJwtGrantIssuerAsync($id) + public function getTrustedOAuth2JwtGrantIssuerAsync($id) { - return $this->getTrustedJwtGrantIssuerAsyncWithHttpInfo($id) + return $this->getTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id) ->then( function ($response) { return $response[0]; @@ -5341,19 +3418,19 @@ function ($response) { } /** - * Operation getTrustedJwtGrantIssuerAsyncWithHttpInfo + * Operation getTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo * - * Get a Trusted OAuth2 JWT Bearer Grant Type Issuer + * Get Trusted OAuth2 JWT Bearer Grant Type Issuer * * @param string $id The id of the desired grant (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTrustedJwtGrantIssuerAsyncWithHttpInfo($id) + public function getTrustedOAuth2JwtGrantIssuerAsyncWithHttpInfo($id) { - $returnType = '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer'; - $request = $this->getTrustedJwtGrantIssuerRequest($id); + $returnType = '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer'; + $request = $this->getTrustedOAuth2JwtGrantIssuerRequest($id); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5389,23 +3466,23 @@ function ($exception) { } /** - * Create request for operation 'getTrustedJwtGrantIssuer' + * Create request for operation 'getTrustedOAuth2JwtGrantIssuer' * * @param string $id The id of the desired grant (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTrustedJwtGrantIssuerRequest($id) + public function getTrustedOAuth2JwtGrantIssuerRequest($id) { // 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 getTrustedJwtGrantIssuer' + 'Missing the required parameter $id when calling getTrustedOAuth2JwtGrantIssuer' ); } - $resourcePath = '/trust/grants/jwt-bearer/issuers/{id}'; + $resourcePath = '/admin/trust/grants/jwt-bearer/issuers/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -5482,34 +3559,38 @@ public function getTrustedJwtGrantIssuerRequest($id) } /** - * Operation getVersion + * Operation introspectOAuth2Token * - * Get Service Version + * Introspect OAuth2 Access and Refresh Tokens * + * @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) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\Version + * @return \Ory\Hydra\Client\Model\IntrospectedOAuth2Token|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function getVersion() + public function introspectOAuth2Token($token, $scope = null) { - list($response) = $this->getVersionWithHttpInfo(); + list($response) = $this->introspectOAuth2TokenWithHttpInfo($token, $scope); return $response; } /** - * Operation getVersionWithHttpInfo + * Operation introspectOAuth2TokenWithHttpInfo * - * Get Service Version + * Introspect OAuth2 Access and Refresh Tokens * + * @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) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\Version, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\IntrospectedOAuth2Token|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function getVersionWithHttpInfo() + public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) { - $request = $this->getVersionRequest(); + $request = $this->introspectOAuth2TokenRequest($token, $scope); try { $options = $this->createHttpClientOption(); @@ -5548,20 +3629,32 @@ public function getVersionWithHttpInfo() switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\Version' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\IntrospectedOAuth2Token' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\IntrospectedOAuth2Token', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\Version', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\Version'; + $returnType = '\Ory\Hydra\Client\Model\IntrospectedOAuth2Token'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -5579,7 +3672,15 @@ public function getVersionWithHttpInfo() case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\Version', + '\Ory\Hydra\Client\Model\IntrospectedOAuth2Token', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -5590,17 +3691,19 @@ public function getVersionWithHttpInfo() } /** - * Operation getVersionAsync + * Operation introspectOAuth2TokenAsync * - * Get Service Version + * Introspect OAuth2 Access and Refresh Tokens * + * @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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getVersionAsync() + public function introspectOAuth2TokenAsync($token, $scope = null) { - return $this->getVersionAsyncWithHttpInfo() + return $this->introspectOAuth2TokenAsyncWithHttpInfo($token, $scope) ->then( function ($response) { return $response[0]; @@ -5609,18 +3712,20 @@ function ($response) { } /** - * Operation getVersionAsyncWithHttpInfo + * Operation introspectOAuth2TokenAsyncWithHttpInfo * - * Get Service Version + * Introspect OAuth2 Access and Refresh Tokens * + * @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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getVersionAsyncWithHttpInfo() + public function introspectOAuth2TokenAsyncWithHttpInfo($token, $scope = null) { - $returnType = '\Ory\Hydra\Client\Model\Version'; - $request = $this->getVersionRequest(); + $returnType = '\Ory\Hydra\Client\Model\IntrospectedOAuth2Token'; + $request = $this->introspectOAuth2TokenRequest($token, $scope); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5656,16 +3761,24 @@ function ($exception) { } /** - * Create request for operation 'getVersion' + * Create request for operation 'introspectOAuth2Token' * + * @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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getVersionRequest() + public function introspectOAuth2TokenRequest($token, $scope = null) { + // verify the required parameter 'token' is set + if ($token === null || (is_array($token) && count($token) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $token when calling introspectOAuth2Token' + ); + } - $resourcePath = '/version'; + $resourcePath = '/admin/oauth2/introspect'; $formParams = []; $queryParams = []; $headerParams = []; @@ -5675,6 +3788,14 @@ public function getVersionRequest() + // form params + if ($scope !== null) { + $formParams['scope'] = ObjectSerializer::toFormValue($scope); + } + // form params + if ($token !== null) { + $formParams['token'] = ObjectSerializer::toFormValue($token); + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -5683,7 +3804,7 @@ public function getVersionRequest() } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/x-www-form-urlencoded'] ); } @@ -5726,7 +3847,7 @@ public function getVersionRequest() $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5734,38 +3855,42 @@ public function getVersionRequest() } /** - * Operation introspectOAuth2Token + * Operation listOAuth2Clients * - * Introspect OAuth2 Tokens + * List OAuth 2.0 Clients * - * @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 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 $clientName The name of the clients to filter by. (optional) + * @param string $owner The owner of the clients to filter by. (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\OAuth2TokenIntrospection|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2Client[]|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function introspectOAuth2Token($token, $scope = null) + public function listOAuth2Clients($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) { - list($response) = $this->introspectOAuth2TokenWithHttpInfo($token, $scope); + list($response) = $this->listOAuth2ClientsWithHttpInfo($pageSize, $pageToken, $clientName, $owner); return $response; } /** - * Operation introspectOAuth2TokenWithHttpInfo + * Operation listOAuth2ClientsWithHttpInfo * - * Introspect OAuth2 Tokens + * List OAuth 2.0 Clients * - * @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 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 $clientName The name of the clients to filter by. (optional) + * @param string $owner The owner of the clients to filter by. (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\OAuth2TokenIntrospection|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2Client[]|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) + public function listOAuth2ClientsWithHttpInfo($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) { - $request = $this->introspectOAuth2TokenRequest($token, $scope); + $request = $this->listOAuth2ClientsRequest($pageSize, $pageToken, $clientName, $owner); try { $options = $this->createHttpClientOption(); @@ -5804,44 +3929,32 @@ public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\OAuth2TokenIntrospection' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2TokenIntrospection', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2Client[]' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client[]', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\OAuth2TokenIntrospection'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client[]'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -5859,23 +3972,15 @@ public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\OAuth2TokenIntrospection', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2Client[]', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -5886,19 +3991,21 @@ public function introspectOAuth2TokenWithHttpInfo($token, $scope = null) } /** - * Operation introspectOAuth2TokenAsync + * Operation listOAuth2ClientsAsync * - * Introspect OAuth2 Tokens + * List OAuth 2.0 Clients * - * @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 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 $clientName The name of the clients to filter by. (optional) + * @param string $owner The owner of the clients to filter by. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function introspectOAuth2TokenAsync($token, $scope = null) + public function listOAuth2ClientsAsync($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) { - return $this->introspectOAuth2TokenAsyncWithHttpInfo($token, $scope) + return $this->listOAuth2ClientsAsyncWithHttpInfo($pageSize, $pageToken, $clientName, $owner) ->then( function ($response) { return $response[0]; @@ -5907,20 +4014,22 @@ function ($response) { } /** - * Operation introspectOAuth2TokenAsyncWithHttpInfo + * Operation listOAuth2ClientsAsyncWithHttpInfo * - * Introspect OAuth2 Tokens + * List OAuth 2.0 Clients * - * @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 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 $clientName The name of the clients to filter by. (optional) + * @param string $owner The owner of the clients to filter by. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function introspectOAuth2TokenAsyncWithHttpInfo($token, $scope = null) + public function listOAuth2ClientsAsyncWithHttpInfo($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) { - $returnType = '\Ory\Hydra\Client\Model\OAuth2TokenIntrospection'; - $request = $this->introspectOAuth2TokenRequest($token, $scope); + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client[]'; + $request = $this->listOAuth2ClientsRequest($pageSize, $pageToken, $clientName, $owner); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5956,41 +4065,81 @@ function ($exception) { } /** - * Create request for operation 'introspectOAuth2Token' + * Create request for operation 'listOAuth2Clients' * - * @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 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 $clientName The name of the clients to filter by. (optional) + * @param string $owner The owner of the clients to filter by. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function introspectOAuth2TokenRequest($token, $scope = null) + public function listOAuth2ClientsRequest($pageSize = 250, $pageToken = '1', $clientName = null, $owner = null) { - // verify the required parameter 'token' is set - if ($token === null || (is_array($token) && count($token) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $token when calling introspectOAuth2Token' - ); + 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.'); + } + - $resourcePath = '/oauth2/introspect'; + + $resourcePath = '/admin/clients'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $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; + } + } + // query params + if ($pageToken !== null) { + if('form' === 'form' && is_array($pageToken)) { + foreach($pageToken as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['page_token'] = $pageToken; + } + } + // query params + if ($clientName !== null) { + if('form' === 'form' && is_array($clientName)) { + foreach($clientName as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['client_name'] = $clientName; + } + } + // query params + if ($owner !== null) { + if('form' === 'form' && is_array($owner)) { + foreach($owner as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['owner'] = $owner; + } + } - // form params - if ($token !== null) { - $formParams['token'] = ObjectSerializer::toFormValue($token); - } - // form params - if ($scope !== null) { - $formParams['scope'] = ObjectSerializer::toFormValue($scope); - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -5999,7 +4148,7 @@ public function introspectOAuth2TokenRequest($token, $scope = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/x-www-form-urlencoded'] + [] ); } @@ -6042,7 +4191,7 @@ public function introspectOAuth2TokenRequest($token, $scope = null) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6050,34 +4199,40 @@ public function introspectOAuth2TokenRequest($token, $scope = null) } /** - * Operation isInstanceAlive + * Operation listOAuth2ConsentSessions * - * Check Alive Status + * List OAuth 2.0 Consent Sessions of a Subject * + * @param string $subject The subject to list the consent sessions for. (required) + * @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') * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\HealthStatus|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2ConsentSession[]|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function isInstanceAlive() + public function listOAuth2ConsentSessions($subject, $pageSize = 250, $pageToken = '1') { - list($response) = $this->isInstanceAliveWithHttpInfo(); + list($response) = $this->listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize, $pageToken); return $response; } /** - * Operation isInstanceAliveWithHttpInfo + * Operation listOAuth2ConsentSessionsWithHttpInfo * - * Check Alive Status + * List OAuth 2.0 Consent Sessions of a Subject * + * @param string $subject The subject to list the consent sessions for. (required) + * @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') * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\HealthStatus|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2ConsentSession[]|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function isInstanceAliveWithHttpInfo() + public function listOAuth2ConsentSessionsWithHttpInfo($subject, $pageSize = 250, $pageToken = '1') { - $request = $this->isInstanceAliveRequest(); + $request = $this->listOAuth2ConsentSessionsRequest($subject, $pageSize, $pageToken); try { $options = $this->createHttpClientOption(); @@ -6116,32 +4271,32 @@ public function isInstanceAliveWithHttpInfo() switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\HealthStatus' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2ConsentSession[]' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\HealthStatus', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2ConsentSession[]', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\HealthStatus'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2ConsentSession[]'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -6159,15 +4314,15 @@ public function isInstanceAliveWithHttpInfo() case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\HealthStatus', + '\Ory\Hydra\Client\Model\OAuth2ConsentSession[]', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6178,17 +4333,20 @@ public function isInstanceAliveWithHttpInfo() } /** - * Operation isInstanceAliveAsync + * Operation listOAuth2ConsentSessionsAsync * - * Check Alive Status + * List OAuth 2.0 Consent Sessions of a Subject * + * @param string $subject The subject to list the consent sessions for. (required) + * @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') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function isInstanceAliveAsync() + public function listOAuth2ConsentSessionsAsync($subject, $pageSize = 250, $pageToken = '1') { - return $this->isInstanceAliveAsyncWithHttpInfo() + return $this->listOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $pageSize, $pageToken) ->then( function ($response) { return $response[0]; @@ -6197,18 +4355,21 @@ function ($response) { } /** - * Operation isInstanceAliveAsyncWithHttpInfo + * Operation listOAuth2ConsentSessionsAsyncWithHttpInfo * - * Check Alive Status + * List OAuth 2.0 Consent Sessions of a Subject * + * @param string $subject The subject to list the consent sessions for. (required) + * @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') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function isInstanceAliveAsyncWithHttpInfo() + public function listOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $pageSize = 250, $pageToken = '1') { - $returnType = '\Ory\Hydra\Client\Model\HealthStatus'; - $request = $this->isInstanceAliveRequest(); + $returnType = '\Ory\Hydra\Client\Model\OAuth2ConsentSession[]'; + $request = $this->listOAuth2ConsentSessionsRequest($subject, $pageSize, $pageToken); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6244,22 +4405,72 @@ function ($exception) { } /** - * Create request for operation 'isInstanceAlive' + * Create request for operation 'listOAuth2ConsentSessions' * + * @param string $subject The subject to list the consent sessions for. (required) + * @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') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function isInstanceAliveRequest() + public function listOAuth2ConsentSessionsRequest($subject, $pageSize = 250, $pageToken = '1') { + // 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 = '/health/alive'; + + + $resourcePath = '/admin/oauth2/auth/sessions/consent'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $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; + } + } + // query params + if ($pageToken !== null) { + if('form' === 'form' && is_array($pageToken)) { + foreach($pageToken as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['page_token'] = $pageToken; + } + } + // query params + if ($subject !== null) { + if('form' === 'form' && is_array($subject)) { + foreach($subject as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['subject'] = $subject; + } + } @@ -6322,42 +4533,40 @@ public function isInstanceAliveRequest() } /** - * Operation listOAuth2Clients - * - * List OAuth 2.0 Clients + * Operation listTrustedOAuth2JwtGrantIssuers * - * @param int $limit The maximum amount of clients to returned, upper bound is 500 clients. (optional) - * @param int $offset The offset from where to start looking. (optional) - * @param string $clientName The name of the clients to filter by. (optional) - * @param string $owner The owner of the clients to filter by. (optional) + * List Trusted OAuth2 JWT Bearer Grant Type Issuers + * + * @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) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\OAuth2Client[]|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]|\Ory\Hydra\Client\Model\GenericError */ - public function listOAuth2Clients($limit = null, $offset = null, $clientName = null, $owner = null) + public function listTrustedOAuth2JwtGrantIssuers($maxItems = null, $defaultItems = null, $issuer = null) { - list($response) = $this->listOAuth2ClientsWithHttpInfo($limit, $offset, $clientName, $owner); + list($response) = $this->listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems, $defaultItems, $issuer); return $response; } /** - * Operation listOAuth2ClientsWithHttpInfo + * Operation listTrustedOAuth2JwtGrantIssuersWithHttpInfo * - * List OAuth 2.0 Clients + * List Trusted OAuth2 JWT Bearer Grant Type Issuers * - * @param int $limit The maximum amount of clients to returned, upper bound is 500 clients. (optional) - * @param int $offset The offset from where to start looking. (optional) - * @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 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) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\OAuth2Client[]|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) */ - public function listOAuth2ClientsWithHttpInfo($limit = null, $offset = null, $clientName = null, $owner = null) + public function listTrustedOAuth2JwtGrantIssuersWithHttpInfo($maxItems = null, $defaultItems = null, $issuer = null) { - $request = $this->listOAuth2ClientsRequest($limit, $offset, $clientName, $owner); + $request = $this->listTrustedOAuth2JwtGrantIssuersRequest($maxItems, $defaultItems, $issuer); try { $options = $this->createHttpClientOption(); @@ -6396,32 +4605,32 @@ public function listOAuth2ClientsWithHttpInfo($limit = null, $offset = null, $cl switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\OAuth2Client[]' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client[]', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]', []), $response->getStatusCode(), $response->getHeaders() ]; default: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GenericError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client[]'; + $returnType = '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -6439,7 +4648,7 @@ public function listOAuth2ClientsWithHttpInfo($limit = null, $offset = null, $cl case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\OAuth2Client[]', + '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6447,7 +4656,7 @@ public function listOAuth2ClientsWithHttpInfo($limit = null, $offset = null, $cl default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\GenericError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6458,21 +4667,20 @@ public function listOAuth2ClientsWithHttpInfo($limit = null, $offset = null, $cl } /** - * Operation listOAuth2ClientsAsync + * Operation listTrustedOAuth2JwtGrantIssuersAsync * - * List OAuth 2.0 Clients + * List Trusted OAuth2 JWT Bearer Grant Type Issuers * - * @param int $limit The maximum amount of clients to returned, upper bound is 500 clients. (optional) - * @param int $offset The offset from where to start looking. (optional) - * @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 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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listOAuth2ClientsAsync($limit = null, $offset = null, $clientName = null, $owner = null) + public function listTrustedOAuth2JwtGrantIssuersAsync($maxItems = null, $defaultItems = null, $issuer = null) { - return $this->listOAuth2ClientsAsyncWithHttpInfo($limit, $offset, $clientName, $owner) + return $this->listTrustedOAuth2JwtGrantIssuersAsyncWithHttpInfo($maxItems, $defaultItems, $issuer) ->then( function ($response) { return $response[0]; @@ -6481,22 +4689,21 @@ function ($response) { } /** - * Operation listOAuth2ClientsAsyncWithHttpInfo + * Operation listTrustedOAuth2JwtGrantIssuersAsyncWithHttpInfo * - * List OAuth 2.0 Clients + * List Trusted OAuth2 JWT Bearer Grant Type Issuers * - * @param int $limit The maximum amount of clients to returned, upper bound is 500 clients. (optional) - * @param int $offset The offset from where to start looking. (optional) - * @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 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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listOAuth2ClientsAsyncWithHttpInfo($limit = null, $offset = null, $clientName = null, $owner = null) + public function listTrustedOAuth2JwtGrantIssuersAsyncWithHttpInfo($maxItems = null, $defaultItems = null, $issuer = null) { - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client[]'; - $request = $this->listOAuth2ClientsRequest($limit, $offset, $clientName, $owner); + $returnType = '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer[]'; + $request = $this->listTrustedOAuth2JwtGrantIssuersRequest($maxItems, $defaultItems, $issuer); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6532,20 +4739,19 @@ function ($exception) { } /** - * Create request for operation 'listOAuth2Clients' + * Create request for operation 'listTrustedOAuth2JwtGrantIssuers' * - * @param int $limit The maximum amount of clients to returned, upper bound is 500 clients. (optional) - * @param int $offset The offset from where to start looking. (optional) - * @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 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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listOAuth2ClientsRequest($limit = null, $offset = null, $clientName = null, $owner = null) + public function listTrustedOAuth2JwtGrantIssuersRequest($maxItems = null, $defaultItems = null, $issuer = null) { - $resourcePath = '/clients'; + $resourcePath = '/admin/trust/grants/jwt-bearer/issuers'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6553,32 +4759,37 @@ public function listOAuth2ClientsRequest($limit = null, $offset = null, $clientN $multipart = false; // query params - if (is_array($limit)) { - $limit = ObjectSerializer::serializeCollection($limit, '', true); - } - if ($limit !== null) { - $queryParams['limit'] = $limit; - } - // query params - if (is_array($offset)) { - $offset = ObjectSerializer::serializeCollection($offset, '', true); - } - if ($offset !== null) { - $queryParams['offset'] = $offset; + if ($maxItems !== null) { + if('form' === 'form' && is_array($maxItems)) { + foreach($maxItems as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['MaxItems'] = $maxItems; + } } // query params - if (is_array($clientName)) { - $clientName = ObjectSerializer::serializeCollection($clientName, '', true); - } - if ($clientName !== null) { - $queryParams['client_name'] = $clientName; + if ($defaultItems !== null) { + if('form' === 'form' && is_array($defaultItems)) { + foreach($defaultItems as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['DefaultItems'] = $defaultItems; + } } // query params - if (is_array($owner)) { - $owner = ObjectSerializer::serializeCollection($owner, '', true); - } - if ($owner !== null) { - $queryParams['owner'] = $owner; + if ($issuer !== null) { + if('form' === 'form' && is_array($issuer)) { + foreach($issuer as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['issuer'] = $issuer; + } } @@ -6642,36 +4853,34 @@ public function listOAuth2ClientsRequest($limit = null, $offset = null, $clientN } /** - * Operation listSubjectConsentSessions + * Operation oAuth2Authorize * - * Lists All Consent Sessions of a Subject + * OAuth 2.0 Authorize Endpoint * - * @param string $subject subject (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\PreviousConsentSession[]|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return |\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function listSubjectConsentSessions($subject) + public function oAuth2Authorize() { - list($response) = $this->listSubjectConsentSessionsWithHttpInfo($subject); + list($response) = $this->oAuth2AuthorizeWithHttpInfo(); return $response; } /** - * Operation listSubjectConsentSessionsWithHttpInfo + * Operation oAuth2AuthorizeWithHttpInfo * - * Lists All Consent Sessions of a Subject + * OAuth 2.0 Authorize Endpoint * - * @param string $subject (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\PreviousConsentSession[]|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of |\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function listSubjectConsentSessionsWithHttpInfo($subject) + public function oAuth2AuthorizeWithHttpInfo() { - $request = $this->listSubjectConsentSessionsRequest($subject); + $request = $this->oAuth2AuthorizeRequest(); try { $options = $this->createHttpClientOption(); @@ -6709,45 +4918,21 @@ public function listSubjectConsentSessionsWithHttpInfo($subject) } switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\PreviousConsentSession[]' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\PreviousConsentSession[]', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\PreviousConsentSession[]'; + $returnType = '\Ory\Hydra\Client\Model\ErrorOAuth2'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -6762,26 +4947,10 @@ public function listSubjectConsentSessionsWithHttpInfo($subject) } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\PreviousConsentSession[]', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6792,18 +4961,17 @@ public function listSubjectConsentSessionsWithHttpInfo($subject) } /** - * Operation listSubjectConsentSessionsAsync + * Operation oAuth2AuthorizeAsync * - * Lists All Consent Sessions of a Subject + * OAuth 2.0 Authorize Endpoint * - * @param string $subject (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listSubjectConsentSessionsAsync($subject) + public function oAuth2AuthorizeAsync() { - return $this->listSubjectConsentSessionsAsyncWithHttpInfo($subject) + return $this->oAuth2AuthorizeAsyncWithHttpInfo() ->then( function ($response) { return $response[0]; @@ -6812,19 +4980,18 @@ function ($response) { } /** - * Operation listSubjectConsentSessionsAsyncWithHttpInfo + * Operation oAuth2AuthorizeAsyncWithHttpInfo * - * Lists All Consent Sessions of a Subject + * OAuth 2.0 Authorize Endpoint * - * @param string $subject (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listSubjectConsentSessionsAsyncWithHttpInfo($subject) + public function oAuth2AuthorizeAsyncWithHttpInfo() { - $returnType = '\Ory\Hydra\Client\Model\PreviousConsentSession[]'; - $request = $this->listSubjectConsentSessionsRequest($subject); + $returnType = '\Ory\Hydra\Client\Model\ErrorOAuth2'; + $request = $this->oAuth2AuthorizeRequest(); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6860,36 +5027,22 @@ function ($exception) { } /** - * Create request for operation 'listSubjectConsentSessions' + * Create request for operation 'oAuth2Authorize' * - * @param string $subject (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listSubjectConsentSessionsRequest($subject) + public function oAuth2AuthorizeRequest() { - // 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 listSubjectConsentSessions' - ); - } - $resourcePath = '/oauth2/auth/sessions/consent'; + $resourcePath = '/oauth2/auth'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($subject)) { - $subject = ObjectSerializer::serializeCollection($subject, '', true); - } - if ($subject !== null) { - $queryParams['subject'] = $subject; - } @@ -6952,40 +5105,44 @@ public function listSubjectConsentSessionsRequest($subject) } /** - * Operation listTrustedJwtGrantIssuers + * Operation oauth2TokenExchange * - * List Trusted OAuth2 JWT Bearer Grant Type Issuers + * The OAuth 2.0 Token Endpoint * - * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - * @param int $limit The maximum amount of policies returned, upper bound is 500 policies (optional) - * @param int $offset The offset from where to start looking. (optional) + * @param string $grantType grantType (required) + * @param string $clientId clientId (optional) + * @param string $code code (optional) + * @param string $redirectUri redirectUri (optional) + * @param string $refreshToken refreshToken (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\TrustedJwtGrantIssuer[]|\Ory\Hydra\Client\Model\GenericError + * @return \Ory\Hydra\Client\Model\OAuth2TokenExchange|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function listTrustedJwtGrantIssuers($issuer = null, $limit = null, $offset = null) + public function oauth2TokenExchange($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) { - list($response) = $this->listTrustedJwtGrantIssuersWithHttpInfo($issuer, $limit, $offset); + list($response) = $this->oauth2TokenExchangeWithHttpInfo($grantType, $clientId, $code, $redirectUri, $refreshToken); return $response; } /** - * Operation listTrustedJwtGrantIssuersWithHttpInfo + * Operation oauth2TokenExchangeWithHttpInfo * - * List Trusted OAuth2 JWT Bearer Grant Type Issuers + * The OAuth 2.0 Token Endpoint * - * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - * @param int $limit The maximum amount of policies returned, upper bound is 500 policies (optional) - * @param int $offset The offset from where to start looking. (optional) + * @param string $grantType (required) + * @param string $clientId (optional) + * @param string $code (optional) + * @param string $redirectUri (optional) + * @param string $refreshToken (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\TrustedJwtGrantIssuer[]|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2TokenExchange|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function listTrustedJwtGrantIssuersWithHttpInfo($issuer = null, $limit = null, $offset = null) + public function oauth2TokenExchangeWithHttpInfo($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) { - $request = $this->listTrustedJwtGrantIssuersRequest($issuer, $limit, $offset); + $request = $this->oauth2TokenExchangeRequest($grantType, $clientId, $code, $redirectUri, $refreshToken); try { $options = $this->createHttpClientOption(); @@ -7024,32 +5181,32 @@ public function listTrustedJwtGrantIssuersWithHttpInfo($issuer = null, $limit = switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer[]' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2TokenExchange' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer[]', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2TokenExchange', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GenericError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer[]'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2TokenExchange'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -7067,15 +5224,15 @@ public function listTrustedJwtGrantIssuersWithHttpInfo($issuer = null, $limit = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer[]', + '\Ory\Hydra\Client\Model\OAuth2TokenExchange', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\GenericError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -7086,20 +5243,22 @@ public function listTrustedJwtGrantIssuersWithHttpInfo($issuer = null, $limit = } /** - * Operation listTrustedJwtGrantIssuersAsync + * Operation oauth2TokenExchangeAsync * - * List Trusted OAuth2 JWT Bearer Grant Type Issuers + * The OAuth 2.0 Token Endpoint * - * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - * @param int $limit The maximum amount of policies returned, upper bound is 500 policies (optional) - * @param int $offset The offset from where to start looking. (optional) + * @param string $grantType (required) + * @param string $clientId (optional) + * @param string $code (optional) + * @param string $redirectUri (optional) + * @param string $refreshToken (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTrustedJwtGrantIssuersAsync($issuer = null, $limit = null, $offset = null) + public function oauth2TokenExchangeAsync($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) { - return $this->listTrustedJwtGrantIssuersAsyncWithHttpInfo($issuer, $limit, $offset) + return $this->oauth2TokenExchangeAsyncWithHttpInfo($grantType, $clientId, $code, $redirectUri, $refreshToken) ->then( function ($response) { return $response[0]; @@ -7108,21 +5267,23 @@ function ($response) { } /** - * Operation listTrustedJwtGrantIssuersAsyncWithHttpInfo + * Operation oauth2TokenExchangeAsyncWithHttpInfo * - * List Trusted OAuth2 JWT Bearer Grant Type Issuers + * The OAuth 2.0 Token Endpoint * - * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - * @param int $limit The maximum amount of policies returned, upper bound is 500 policies (optional) - * @param int $offset The offset from where to start looking. (optional) + * @param string $grantType (required) + * @param string $clientId (optional) + * @param string $code (optional) + * @param string $redirectUri (optional) + * @param string $refreshToken (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listTrustedJwtGrantIssuersAsyncWithHttpInfo($issuer = null, $limit = null, $offset = null) + public function oauth2TokenExchangeAsyncWithHttpInfo($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) { - $returnType = '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer[]'; - $request = $this->listTrustedJwtGrantIssuersRequest($issuer, $limit, $offset); + $returnType = '\Ory\Hydra\Client\Model\OAuth2TokenExchange'; + $request = $this->oauth2TokenExchangeRequest($grantType, $clientId, $code, $redirectUri, $refreshToken); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7158,50 +5319,57 @@ function ($exception) { } /** - * Create request for operation 'listTrustedJwtGrantIssuers' + * Create request for operation 'oauth2TokenExchange' * - * @param string $issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - * @param int $limit The maximum amount of policies returned, upper bound is 500 policies (optional) - * @param int $offset The offset from where to start looking. (optional) + * @param string $grantType (required) + * @param string $clientId (optional) + * @param string $code (optional) + * @param string $redirectUri (optional) + * @param string $refreshToken (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function listTrustedJwtGrantIssuersRequest($issuer = null, $limit = null, $offset = null) + public function oauth2TokenExchangeRequest($grantType, $clientId = null, $code = null, $redirectUri = null, $refreshToken = null) { + // verify the required parameter 'grantType' is set + if ($grantType === null || (is_array($grantType) && count($grantType) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $grantType when calling oauth2TokenExchange' + ); + } - $resourcePath = '/trust/grants/jwt-bearer/issuers'; + $resourcePath = '/oauth2/token'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($issuer)) { - $issuer = ObjectSerializer::serializeCollection($issuer, '', true); - } - if ($issuer !== null) { - $queryParams['issuer'] = $issuer; + + + + // form params + if ($clientId !== null) { + $formParams['client_id'] = ObjectSerializer::toFormValue($clientId); } - // query params - if (is_array($limit)) { - $limit = ObjectSerializer::serializeCollection($limit, '', true); + // form params + if ($code !== null) { + $formParams['code'] = ObjectSerializer::toFormValue($code); } - if ($limit !== null) { - $queryParams['limit'] = $limit; + // form params + if ($grantType !== null) { + $formParams['grant_type'] = ObjectSerializer::toFormValue($grantType); } - // query params - if (is_array($offset)) { - $offset = ObjectSerializer::serializeCollection($offset, '', true); + // form params + if ($redirectUri !== null) { + $formParams['redirect_uri'] = ObjectSerializer::toFormValue($redirectUri); } - if ($offset !== null) { - $queryParams['offset'] = $offset; + // form params + if ($refreshToken !== null) { + $formParams['refresh_token'] = ObjectSerializer::toFormValue($refreshToken); } - - - if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( ['application/json'] @@ -7209,7 +5377,7 @@ public function listTrustedJwtGrantIssuersRequest($issuer = null, $limit = null, } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/x-www-form-urlencoded'] ); } @@ -7238,6 +5406,14 @@ public function listTrustedJwtGrantIssuersRequest($issuer = null, $limit = null, } } + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + // this endpoint requires OAuth (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -7252,7 +5428,7 @@ public function listTrustedJwtGrantIssuersRequest($issuer = null, $limit = null, $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -7262,36 +5438,36 @@ public function listTrustedJwtGrantIssuersRequest($issuer = null, $limit = null, /** * Operation patchOAuth2Client * - * Patch an OAuth 2.0 Client + * Patch OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\PatchDocument[] $body body (required) + * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function patchOAuth2Client($id, $body) + public function patchOAuth2Client($id, $jsonPatch) { - list($response) = $this->patchOAuth2ClientWithHttpInfo($id, $body); + list($response) = $this->patchOAuth2ClientWithHttpInfo($id, $jsonPatch); return $response; } /** * Operation patchOAuth2ClientWithHttpInfo * - * Patch an OAuth 2.0 Client + * Patch OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\PatchDocument[] $body (required) + * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @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, $body) + public function patchOAuth2ClientWithHttpInfo($id, $jsonPatch) { - $request = $this->patchOAuth2ClientRequest($id, $body); + $request = $this->patchOAuth2ClientRequest($id, $jsonPatch); try { $options = $this->createHttpClientOption(); @@ -7341,15 +5517,27 @@ public function patchOAuth2ClientWithHttpInfo($id, $body) $response->getStatusCode(), $response->getHeaders() ]; + case 404: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; default: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -7378,10 +5566,18 @@ public function patchOAuth2ClientWithHttpInfo($id, $body) ); $e->setResponseObject($data); break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -7394,17 +5590,17 @@ public function patchOAuth2ClientWithHttpInfo($id, $body) /** * Operation patchOAuth2ClientAsync * - * Patch an OAuth 2.0 Client + * Patch OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\PatchDocument[] $body (required) + * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchOAuth2ClientAsync($id, $body) + public function patchOAuth2ClientAsync($id, $jsonPatch) { - return $this->patchOAuth2ClientAsyncWithHttpInfo($id, $body) + return $this->patchOAuth2ClientAsyncWithHttpInfo($id, $jsonPatch) ->then( function ($response) { return $response[0]; @@ -7415,18 +5611,18 @@ function ($response) { /** * Operation patchOAuth2ClientAsyncWithHttpInfo * - * Patch an OAuth 2.0 Client + * Patch OAuth 2.0 Client * * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\PatchDocument[] $body (required) + * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function patchOAuth2ClientAsyncWithHttpInfo($id, $body) + public function patchOAuth2ClientAsyncWithHttpInfo($id, $jsonPatch) { $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->patchOAuth2ClientRequest($id, $body); + $request = $this->patchOAuth2ClientRequest($id, $jsonPatch); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7465,12 +5661,12 @@ function ($exception) { * Create request for operation 'patchOAuth2Client' * * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\PatchDocument[] $body (required) + * @param \Ory\Hydra\Client\Model\JsonPatch[] $jsonPatch OAuth 2.0 Client JSON Patch Body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function patchOAuth2ClientRequest($id, $body) + public function patchOAuth2ClientRequest($id, $jsonPatch) { // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { @@ -7478,14 +5674,14 @@ public function patchOAuth2ClientRequest($id, $body) 'Missing the required parameter $id when calling patchOAuth2Client' ); } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { + // verify the required parameter 'jsonPatch' is set + if ($jsonPatch === null || (is_array($jsonPatch) && count($jsonPatch) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling patchOAuth2Client' + 'Missing the required parameter $jsonPatch when calling patchOAuth2Client' ); } - $resourcePath = '/clients/{id}'; + $resourcePath = '/admin/clients/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7516,11 +5712,11 @@ public function patchOAuth2ClientRequest($id, $body) } // for model (json/xml) - if (isset($body)) { + if (isset($jsonPatch)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($jsonPatch)); } else { - $httpBody = $body; + $httpBody = $jsonPatch; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -7568,38 +5764,38 @@ public function patchOAuth2ClientRequest($id, $body) } /** - * Operation rejectConsentRequest + * Operation rejectOAuth2ConsentRequest * - * Reject a Consent Request + * Reject OAuth 2.0 Consent Request * - * @param string $consentChallenge consentChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body body (optional) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request rejectOAuth2Request (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\CompletedRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function rejectConsentRequest($consentChallenge, $body = null) + public function rejectOAuth2ConsentRequest($consentChallenge, $rejectOAuth2Request = null) { - list($response) = $this->rejectConsentRequestWithHttpInfo($consentChallenge, $body); + list($response) = $this->rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejectOAuth2Request); return $response; } /** - * Operation rejectConsentRequestWithHttpInfo + * Operation rejectOAuth2ConsentRequestWithHttpInfo * - * Reject a Consent Request + * Reject OAuth 2.0 Consent Request * - * @param string $consentChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\CompletedRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function rejectConsentRequestWithHttpInfo($consentChallenge, $body = null) + public function rejectOAuth2ConsentRequestWithHttpInfo($consentChallenge, $rejectOAuth2Request = null) { - $request = $this->rejectConsentRequestRequest($consentChallenge, $body); + $request = $this->rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAuth2Request); try { $options = $this->createHttpClientOption(); @@ -7638,44 +5834,32 @@ public function rejectConsentRequestWithHttpInfo($consentChallenge, $body = null switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\CompletedRequest' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\CompletedRequest', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2RedirectTo', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -7693,23 +5877,15 @@ public function rejectConsentRequestWithHttpInfo($consentChallenge, $body = null case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\CompletedRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2RedirectTo', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -7720,19 +5896,19 @@ public function rejectConsentRequestWithHttpInfo($consentChallenge, $body = null } /** - * Operation rejectConsentRequestAsync + * Operation rejectOAuth2ConsentRequestAsync * - * Reject a Consent Request + * Reject OAuth 2.0 Consent Request * - * @param string $consentChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectConsentRequestAsync($consentChallenge, $body = null) + public function rejectOAuth2ConsentRequestAsync($consentChallenge, $rejectOAuth2Request = null) { - return $this->rejectConsentRequestAsyncWithHttpInfo($consentChallenge, $body) + return $this->rejectOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $rejectOAuth2Request) ->then( function ($response) { return $response[0]; @@ -7741,20 +5917,20 @@ function ($response) { } /** - * Operation rejectConsentRequestAsyncWithHttpInfo + * Operation rejectOAuth2ConsentRequestAsyncWithHttpInfo * - * Reject a Consent Request + * Reject OAuth 2.0 Consent Request * - * @param string $consentChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectConsentRequestAsyncWithHttpInfo($consentChallenge, $body = null) + public function rejectOAuth2ConsentRequestAsyncWithHttpInfo($consentChallenge, $rejectOAuth2Request = null) { - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; - $request = $this->rejectConsentRequestRequest($consentChallenge, $body); + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; + $request = $this->rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAuth2Request); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7790,24 +5966,24 @@ function ($exception) { } /** - * Create request for operation 'rejectConsentRequest' + * Create request for operation 'rejectOAuth2ConsentRequest' * - * @param string $consentChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) + * @param string $consentChallenge OAuth 2.0 Consent Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function rejectConsentRequestRequest($consentChallenge, $body = null) + public function rejectOAuth2ConsentRequestRequest($consentChallenge, $rejectOAuth2Request = null) { // verify the required parameter 'consentChallenge' is set if ($consentChallenge === null || (is_array($consentChallenge) && count($consentChallenge) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $consentChallenge when calling rejectConsentRequest' + 'Missing the required parameter $consentChallenge when calling rejectOAuth2ConsentRequest' ); } - $resourcePath = '/oauth2/auth/requests/consent/reject'; + $resourcePath = '/admin/oauth2/auth/requests/consent/reject'; $formParams = []; $queryParams = []; $headerParams = []; @@ -7815,11 +5991,15 @@ public function rejectConsentRequestRequest($consentChallenge, $body = null) $multipart = false; // query params - if (is_array($consentChallenge)) { - $consentChallenge = ObjectSerializer::serializeCollection($consentChallenge, '', true); - } if ($consentChallenge !== null) { - $queryParams['consent_challenge'] = $consentChallenge; + if('form' === 'form' && is_array($consentChallenge)) { + foreach($consentChallenge as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['consent_challenge'] = $consentChallenge; + } } @@ -7837,11 +6017,11 @@ public function rejectConsentRequestRequest($consentChallenge, $body = null) } // for model (json/xml) - if (isset($body)) { + if (isset($rejectOAuth2Request)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($rejectOAuth2Request)); } else { - $httpBody = $body; + $httpBody = $rejectOAuth2Request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -7889,38 +6069,38 @@ public function rejectConsentRequestRequest($consentChallenge, $body = null) } /** - * Operation rejectLoginRequest + * Operation rejectOAuth2LoginRequest * - * Reject a Login Request + * Reject OAuth 2.0 Login Request * - * @param string $loginChallenge loginChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request rejectOAuth2Request (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\CompletedRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function rejectLoginRequest($loginChallenge, $body = null) + public function rejectOAuth2LoginRequest($loginChallenge, $rejectOAuth2Request = null) { - list($response) = $this->rejectLoginRequestWithHttpInfo($loginChallenge, $body); + list($response) = $this->rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAuth2Request); return $response; } /** - * Operation rejectLoginRequestWithHttpInfo + * Operation rejectOAuth2LoginRequestWithHttpInfo * - * Reject a Login Request + * Reject OAuth 2.0 Login Request * - * @param string $loginChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\CompletedRequest|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2RedirectTo|\Ory\Hydra\Client\Model\ErrorOAuth2, HTTP status code, HTTP response headers (array of strings) */ - public function rejectLoginRequestWithHttpInfo($loginChallenge, $body = null) + public function rejectOAuth2LoginRequestWithHttpInfo($loginChallenge, $rejectOAuth2Request = null) { - $request = $this->rejectLoginRequestRequest($loginChallenge, $body); + $request = $this->rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Request); try { $options = $this->createHttpClientOption(); @@ -7959,68 +6139,32 @@ public function rejectLoginRequestWithHttpInfo($loginChallenge, $body = null) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\CompletedRequest' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\CompletedRequest', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2RedirectTo' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2RedirectTo', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -8038,39 +6182,15 @@ public function rejectLoginRequestWithHttpInfo($loginChallenge, $body = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\CompletedRequest', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2RedirectTo', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -8081,19 +6201,19 @@ public function rejectLoginRequestWithHttpInfo($loginChallenge, $body = null) } /** - * Operation rejectLoginRequestAsync + * Operation rejectOAuth2LoginRequestAsync * - * Reject a Login Request + * Reject OAuth 2.0 Login Request * - * @param string $loginChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectLoginRequestAsync($loginChallenge, $body = null) + public function rejectOAuth2LoginRequestAsync($loginChallenge, $rejectOAuth2Request = null) { - return $this->rejectLoginRequestAsyncWithHttpInfo($loginChallenge, $body) + return $this->rejectOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $rejectOAuth2Request) ->then( function ($response) { return $response[0]; @@ -8102,20 +6222,20 @@ function ($response) { } /** - * Operation rejectLoginRequestAsyncWithHttpInfo + * Operation rejectOAuth2LoginRequestAsyncWithHttpInfo * - * Reject a Login Request + * Reject OAuth 2.0 Login Request * - * @param string $loginChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectLoginRequestAsyncWithHttpInfo($loginChallenge, $body = null) + public function rejectOAuth2LoginRequestAsyncWithHttpInfo($loginChallenge, $rejectOAuth2Request = null) { - $returnType = '\Ory\Hydra\Client\Model\CompletedRequest'; - $request = $this->rejectLoginRequestRequest($loginChallenge, $body); + $returnType = '\Ory\Hydra\Client\Model\OAuth2RedirectTo'; + $request = $this->rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Request); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8151,24 +6271,24 @@ function ($exception) { } /** - * Create request for operation 'rejectLoginRequest' + * Create request for operation 'rejectOAuth2LoginRequest' * - * @param string $loginChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) + * @param string $loginChallenge OAuth 2.0 Login Request Challenge (required) + * @param \Ory\Hydra\Client\Model\RejectOAuth2Request $rejectOAuth2Request (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function rejectLoginRequestRequest($loginChallenge, $body = null) + public function rejectOAuth2LoginRequestRequest($loginChallenge, $rejectOAuth2Request = null) { // verify the required parameter 'loginChallenge' is set if ($loginChallenge === null || (is_array($loginChallenge) && count($loginChallenge) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loginChallenge when calling rejectLoginRequest' + 'Missing the required parameter $loginChallenge when calling rejectOAuth2LoginRequest' ); } - $resourcePath = '/oauth2/auth/requests/login/reject'; + $resourcePath = '/admin/oauth2/auth/requests/login/reject'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8176,11 +6296,15 @@ public function rejectLoginRequestRequest($loginChallenge, $body = null) $multipart = false; // query params - if (is_array($loginChallenge)) { - $loginChallenge = ObjectSerializer::serializeCollection($loginChallenge, '', true); - } if ($loginChallenge !== null) { - $queryParams['login_challenge'] = $loginChallenge; + if('form' === 'form' && is_array($loginChallenge)) { + foreach($loginChallenge as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['login_challenge'] = $loginChallenge; + } } @@ -8198,11 +6322,11 @@ public function rejectLoginRequestRequest($loginChallenge, $body = null) } // for model (json/xml) - if (isset($body)) { + if (isset($rejectOAuth2Request)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($rejectOAuth2Request)); } else { - $httpBody = $body; + $httpBody = $rejectOAuth2Request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -8250,37 +6374,35 @@ public function rejectLoginRequestRequest($loginChallenge, $body = null) } /** - * Operation rejectLogoutRequest + * Operation rejectOAuth2LogoutRequest * - * Reject a Logout Request + * Reject OAuth 2.0 Session Logout Request * * @param string $logoutChallenge logoutChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body body (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function rejectLogoutRequest($logoutChallenge, $body = null) + public function rejectOAuth2LogoutRequest($logoutChallenge) { - $this->rejectLogoutRequestWithHttpInfo($logoutChallenge, $body); + $this->rejectOAuth2LogoutRequestWithHttpInfo($logoutChallenge); } /** - * Operation rejectLogoutRequestWithHttpInfo + * Operation rejectOAuth2LogoutRequestWithHttpInfo * - * Reject a Logout Request + * Reject OAuth 2.0 Session Logout Request * * @param string $logoutChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function rejectLogoutRequestWithHttpInfo($logoutChallenge, $body = null) + public function rejectOAuth2LogoutRequestWithHttpInfo($logoutChallenge) { - $request = $this->rejectLogoutRequestRequest($logoutChallenge, $body); + $request = $this->rejectOAuth2LogoutRequestRequest($logoutChallenge); try { $options = $this->createHttpClientOption(); @@ -8321,18 +6443,10 @@ public function rejectLogoutRequestWithHttpInfo($logoutChallenge, $body = null) } catch (ApiException $e) { switch ($e->getCode()) { - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -8343,19 +6457,18 @@ public function rejectLogoutRequestWithHttpInfo($logoutChallenge, $body = null) } /** - * Operation rejectLogoutRequestAsync + * Operation rejectOAuth2LogoutRequestAsync * - * Reject a Logout Request + * Reject OAuth 2.0 Session Logout Request * * @param string $logoutChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectLogoutRequestAsync($logoutChallenge, $body = null) + public function rejectOAuth2LogoutRequestAsync($logoutChallenge) { - return $this->rejectLogoutRequestAsyncWithHttpInfo($logoutChallenge, $body) + return $this->rejectOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) ->then( function ($response) { return $response[0]; @@ -8364,20 +6477,19 @@ function ($response) { } /** - * Operation rejectLogoutRequestAsyncWithHttpInfo + * Operation rejectOAuth2LogoutRequestAsyncWithHttpInfo * - * Reject a Logout Request + * Reject OAuth 2.0 Session Logout Request * * @param string $logoutChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function rejectLogoutRequestAsyncWithHttpInfo($logoutChallenge, $body = null) + public function rejectOAuth2LogoutRequestAsyncWithHttpInfo($logoutChallenge) { $returnType = ''; - $request = $this->rejectLogoutRequestRequest($logoutChallenge, $body); + $request = $this->rejectOAuth2LogoutRequestRequest($logoutChallenge); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8403,24 +6515,23 @@ function ($exception) { } /** - * Create request for operation 'rejectLogoutRequest' + * Create request for operation 'rejectOAuth2LogoutRequest' * * @param string $logoutChallenge (required) - * @param \Ory\Hydra\Client\Model\RejectRequest $body (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function rejectLogoutRequestRequest($logoutChallenge, $body = null) + public function rejectOAuth2LogoutRequestRequest($logoutChallenge) { // verify the required parameter 'logoutChallenge' is set if ($logoutChallenge === null || (is_array($logoutChallenge) && count($logoutChallenge) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $logoutChallenge when calling rejectLogoutRequest' + 'Missing the required parameter $logoutChallenge when calling rejectOAuth2LogoutRequest' ); } - $resourcePath = '/oauth2/auth/requests/logout/reject'; + $resourcePath = '/admin/oauth2/auth/requests/logout/reject'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8428,11 +6539,15 @@ public function rejectLogoutRequestRequest($logoutChallenge, $body = null) $multipart = false; // query params - if (is_array($logoutChallenge)) { - $logoutChallenge = ObjectSerializer::serializeCollection($logoutChallenge, '', true); - } if ($logoutChallenge !== null) { - $queryParams['logout_challenge'] = $logoutChallenge; + if('form' === 'form' && is_array($logoutChallenge)) { + foreach($logoutChallenge as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['logout_challenge'] = $logoutChallenge; + } } @@ -8445,18 +6560,12 @@ public function rejectLogoutRequestRequest($logoutChallenge, $body = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json', 'application/x-www-form-urlencoded'] + [] ); } // for model (json/xml) - if (isset($body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); - } else { - $httpBody = $body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -8502,35 +6611,39 @@ public function rejectLogoutRequestRequest($logoutChallenge, $body = null) } /** - * Operation revokeAuthenticationSession + * Operation revokeOAuth2ConsentSessions * - * Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session + * Revoke OAuth 2.0 Consent Sessions of a Subject * - * @param string $subject subject (required) + * @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) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function revokeAuthenticationSession($subject) + public function revokeOAuth2ConsentSessions($subject, $client = null, $all = null) { - $this->revokeAuthenticationSessionWithHttpInfo($subject); + $this->revokeOAuth2ConsentSessionsWithHttpInfo($subject, $client, $all); } /** - * Operation revokeAuthenticationSessionWithHttpInfo + * Operation revokeOAuth2ConsentSessionsWithHttpInfo * - * Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session + * Revoke OAuth 2.0 Consent Sessions of a Subject * - * @param string $subject (required) + * @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) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function revokeAuthenticationSessionWithHttpInfo($subject) + public function revokeOAuth2ConsentSessionsWithHttpInfo($subject, $client = null, $all = null) { - $request = $this->revokeAuthenticationSessionRequest($subject); + $request = $this->revokeOAuth2ConsentSessionsRequest($subject, $client, $all); try { $options = $this->createHttpClientOption(); @@ -8570,19 +6683,11 @@ public function revokeAuthenticationSessionWithHttpInfo($subject) return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: + switch ($e->getCode()) { + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -8593,18 +6698,20 @@ public function revokeAuthenticationSessionWithHttpInfo($subject) } /** - * Operation revokeAuthenticationSessionAsync + * Operation revokeOAuth2ConsentSessionsAsync * - * Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session + * Revoke OAuth 2.0 Consent Sessions of a Subject * - * @param string $subject (required) + * @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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeAuthenticationSessionAsync($subject) + public function revokeOAuth2ConsentSessionsAsync($subject, $client = null, $all = null) { - return $this->revokeAuthenticationSessionAsyncWithHttpInfo($subject) + return $this->revokeOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $client, $all) ->then( function ($response) { return $response[0]; @@ -8613,19 +6720,21 @@ function ($response) { } /** - * Operation revokeAuthenticationSessionAsyncWithHttpInfo + * Operation revokeOAuth2ConsentSessionsAsyncWithHttpInfo * - * Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session + * Revoke OAuth 2.0 Consent Sessions of a Subject * - * @param string $subject (required) + * @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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeAuthenticationSessionAsyncWithHttpInfo($subject) + public function revokeOAuth2ConsentSessionsAsyncWithHttpInfo($subject, $client = null, $all = null) { $returnType = ''; - $request = $this->revokeAuthenticationSessionRequest($subject); + $request = $this->revokeOAuth2ConsentSessionsRequest($subject, $client, $all); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8651,23 +6760,25 @@ function ($exception) { } /** - * Create request for operation 'revokeAuthenticationSession' + * Create request for operation 'revokeOAuth2ConsentSessions' * - * @param string $subject (required) + * @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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function revokeAuthenticationSessionRequest($subject) + public function revokeOAuth2ConsentSessionsRequest($subject, $client = null, $all = null) { // 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 revokeAuthenticationSession' + 'Missing the required parameter $subject when calling revokeOAuth2ConsentSessions' ); } - $resourcePath = '/oauth2/auth/sessions/login'; + $resourcePath = '/admin/oauth2/auth/sessions/consent'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8675,11 +6786,37 @@ public function revokeAuthenticationSessionRequest($subject) $multipart = false; // query params - if (is_array($subject)) { - $subject = ObjectSerializer::serializeCollection($subject, '', true); - } if ($subject !== null) { - $queryParams['subject'] = $subject; + if('form' === 'form' && is_array($subject)) { + foreach($subject as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['subject'] = $subject; + } + } + // query params + if ($client !== null) { + if('form' === 'form' && is_array($client)) { + foreach($client as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['client'] = $client; + } + } + // query params + if ($all !== null) { + if('form' === 'form' && is_array($all)) { + foreach($all as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['all'] = $all; + } } @@ -8743,39 +6880,35 @@ public function revokeAuthenticationSessionRequest($subject) } /** - * Operation revokeConsentSessions + * Operation revokeOAuth2LoginSessions * - * Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client + * Revokes All OAuth 2.0 Login Sessions of a Subject * - * @param string $subject The subject (Subject) who's consent sessions should be deleted. (required) - * @param string $client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - * @param bool $all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function revokeConsentSessions($subject, $client = null, $all = null) + public function revokeOAuth2LoginSessions($subject) { - $this->revokeConsentSessionsWithHttpInfo($subject, $client, $all); + $this->revokeOAuth2LoginSessionsWithHttpInfo($subject); } /** - * Operation revokeConsentSessionsWithHttpInfo + * Operation revokeOAuth2LoginSessionsWithHttpInfo * - * Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client + * Revokes All OAuth 2.0 Login Sessions of a Subject * - * @param string $subject The subject (Subject) who's consent sessions should be deleted. (required) - * @param string $client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - * @param bool $all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function revokeConsentSessionsWithHttpInfo($subject, $client = null, $all = null) + public function revokeOAuth2LoginSessionsWithHttpInfo($subject) { - $request = $this->revokeConsentSessionsRequest($subject, $client, $all); + $request = $this->revokeOAuth2LoginSessionsRequest($subject); try { $options = $this->createHttpClientOption(); @@ -8816,18 +6949,10 @@ public function revokeConsentSessionsWithHttpInfo($subject, $client = null, $all } catch (ApiException $e) { switch ($e->getCode()) { - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -8838,20 +6963,18 @@ public function revokeConsentSessionsWithHttpInfo($subject, $client = null, $all } /** - * Operation revokeConsentSessionsAsync + * Operation revokeOAuth2LoginSessionsAsync * - * Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client + * Revokes All OAuth 2.0 Login Sessions of a Subject * - * @param string $subject The subject (Subject) who's consent sessions should be deleted. (required) - * @param string $client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - * @param bool $all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeConsentSessionsAsync($subject, $client = null, $all = null) + public function revokeOAuth2LoginSessionsAsync($subject) { - return $this->revokeConsentSessionsAsyncWithHttpInfo($subject, $client, $all) + return $this->revokeOAuth2LoginSessionsAsyncWithHttpInfo($subject) ->then( function ($response) { return $response[0]; @@ -8860,21 +6983,19 @@ function ($response) { } /** - * Operation revokeConsentSessionsAsyncWithHttpInfo + * Operation revokeOAuth2LoginSessionsAsyncWithHttpInfo * - * Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client + * Revokes All OAuth 2.0 Login Sessions of a Subject * - * @param string $subject The subject (Subject) who's consent sessions should be deleted. (required) - * @param string $client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - * @param bool $all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function revokeConsentSessionsAsyncWithHttpInfo($subject, $client = null, $all = null) + public function revokeOAuth2LoginSessionsAsyncWithHttpInfo($subject) { $returnType = ''; - $request = $this->revokeConsentSessionsRequest($subject, $client, $all); + $request = $this->revokeOAuth2LoginSessionsRequest($subject); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8900,25 +7021,23 @@ function ($exception) { } /** - * Create request for operation 'revokeConsentSessions' + * Create request for operation 'revokeOAuth2LoginSessions' * - * @param string $subject The subject (Subject) who's consent sessions should be deleted. (required) - * @param string $client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - * @param bool $all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. (optional) + * @param string $subject OAuth 2.0 Subject The subject to revoke authentication sessions for. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function revokeConsentSessionsRequest($subject, $client = null, $all = null) + public function revokeOAuth2LoginSessionsRequest($subject) { // 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 revokeConsentSessions' + 'Missing the required parameter $subject when calling revokeOAuth2LoginSessions' ); } - $resourcePath = '/oauth2/auth/sessions/consent'; + $resourcePath = '/admin/oauth2/auth/sessions/login'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8926,25 +7045,15 @@ public function revokeConsentSessionsRequest($subject, $client = null, $all = nu $multipart = false; // query params - if (is_array($subject)) { - $subject = ObjectSerializer::serializeCollection($subject, '', true); - } if ($subject !== null) { - $queryParams['subject'] = $subject; - } - // query params - if (is_array($client)) { - $client = ObjectSerializer::serializeCollection($client, '', true); - } - if ($client !== null) { - $queryParams['client'] = $client; - } - // query params - if (is_array($all)) { - $all = ObjectSerializer::serializeCollection($all, '', true); - } - if ($all !== null) { - $queryParams['all'] = $all; + if('form' === 'form' && is_array($subject)) { + foreach($subject as $key => $value) { + $queryParams[$key] = $value; + } + } + else { + $queryParams['subject'] = $subject; + } } @@ -9008,36 +7117,35 @@ public function revokeConsentSessionsRequest($subject, $client = null, $all = nu } /** - * Operation trustJwtGrantIssuer + * Operation revokeOAuth2Token * - * Trust an OAuth2 JWT Bearer Grant Type Issuer + * Revoke OAuth 2.0 Access or Refresh Token * - * @param \Ory\Hydra\Client\Model\TrustJwtGrantIssuerBody $body body (optional) + * @param string $token token (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\TrustedJwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError|\Ory\Hydra\Client\Model\GenericError|\Ory\Hydra\Client\Model\GenericError + * @return void */ - public function trustJwtGrantIssuer($body = null) + public function revokeOAuth2Token($token) { - list($response) = $this->trustJwtGrantIssuerWithHttpInfo($body); - return $response; + $this->revokeOAuth2TokenWithHttpInfo($token); } /** - * Operation trustJwtGrantIssuerWithHttpInfo + * Operation revokeOAuth2TokenWithHttpInfo * - * Trust an OAuth2 JWT Bearer Grant Type Issuer + * Revoke OAuth 2.0 Access or Refresh Token * - * @param \Ory\Hydra\Client\Model\TrustJwtGrantIssuerBody $body (optional) + * @param string $token (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\TrustedJwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError|\Ory\Hydra\Client\Model\GenericError|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function trustJwtGrantIssuerWithHttpInfo($body = null) + public function revokeOAuth2TokenWithHttpInfo($token) { - $request = $this->trustJwtGrantIssuerRequest($body); + $request = $this->revokeOAuth2TokenRequest($token); try { $options = $this->createHttpClientOption(); @@ -9074,100 +7182,14 @@ public function trustJwtGrantIssuerWithHttpInfo($body = null) ); } - switch($statusCode) { - case 201: - if ('\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GenericError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 409: - if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GenericError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GenericError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 409: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\GenericError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\GenericError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -9178,18 +7200,18 @@ public function trustJwtGrantIssuerWithHttpInfo($body = null) } /** - * Operation trustJwtGrantIssuerAsync + * Operation revokeOAuth2TokenAsync * - * Trust an OAuth2 JWT Bearer Grant Type Issuer + * Revoke OAuth 2.0 Access or Refresh Token * - * @param \Ory\Hydra\Client\Model\TrustJwtGrantIssuerBody $body (optional) + * @param string $token (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function trustJwtGrantIssuerAsync($body = null) + public function revokeOAuth2TokenAsync($token) { - return $this->trustJwtGrantIssuerAsyncWithHttpInfo($body) + return $this->revokeOAuth2TokenAsyncWithHttpInfo($token) ->then( function ($response) { return $response[0]; @@ -9198,35 +7220,25 @@ function ($response) { } /** - * Operation trustJwtGrantIssuerAsyncWithHttpInfo + * Operation revokeOAuth2TokenAsyncWithHttpInfo * - * Trust an OAuth2 JWT Bearer Grant Type Issuer + * Revoke OAuth 2.0 Access or Refresh Token * - * @param \Ory\Hydra\Client\Model\TrustJwtGrantIssuerBody $body (optional) + * @param string $token (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function trustJwtGrantIssuerAsyncWithHttpInfo($body = null) + public function revokeOAuth2TokenAsyncWithHttpInfo($token) { - $returnType = '\Ory\Hydra\Client\Model\TrustedJwtGrantIssuer'; - $request = $this->trustJwtGrantIssuerRequest($body); + $returnType = ''; + $request = $this->revokeOAuth2TokenRequest($token); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -9246,17 +7258,23 @@ function ($exception) { } /** - * Create request for operation 'trustJwtGrantIssuer' + * Create request for operation 'revokeOAuth2Token' * - * @param \Ory\Hydra\Client\Model\TrustJwtGrantIssuerBody $body (optional) + * @param string $token (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function trustJwtGrantIssuerRequest($body = null) + public function revokeOAuth2TokenRequest($token) { + // verify the required parameter 'token' is set + if ($token === null || (is_array($token) && count($token) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $token when calling revokeOAuth2Token' + ); + } - $resourcePath = '/trust/grants/jwt-bearer/issuers'; + $resourcePath = '/oauth2/revoke'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9266,6 +7284,10 @@ public function trustJwtGrantIssuerRequest($body = null) + // form params + if ($token !== null) { + $formParams['token'] = ObjectSerializer::toFormValue($token); + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -9274,18 +7296,12 @@ public function trustJwtGrantIssuerRequest($body = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + ['application/x-www-form-urlencoded'] ); } // for model (json/xml) - if (isset($body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); - } else { - $httpBody = $body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -9309,6 +7325,14 @@ public function trustJwtGrantIssuerRequest($body = null) } } + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + // this endpoint requires OAuth (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -9331,40 +7355,38 @@ public function trustJwtGrantIssuerRequest($body = null) } /** - * Operation updateJsonWebKey + * Operation setOAuth2Client * - * Update a JSON Web Key + * Set OAuth 2.0 Client * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKey $body body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\JSONWebKey|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 */ - public function updateJsonWebKey($kid, $set, $body = null) + public function setOAuth2Client($id, $oAuth2Client) { - list($response) = $this->updateJsonWebKeyWithHttpInfo($kid, $set, $body); + list($response) = $this->setOAuth2ClientWithHttpInfo($id, $oAuth2Client); return $response; } /** - * Operation updateJsonWebKeyWithHttpInfo + * Operation setOAuth2ClientWithHttpInfo * - * Update a JSON Web Key + * Set OAuth 2.0 Client * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKey $body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\JSONWebKey|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @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 updateJsonWebKeyWithHttpInfo($kid, $set, $body = null) + public function setOAuth2ClientWithHttpInfo($id, $oAuth2Client) { - $request = $this->updateJsonWebKeyRequest($kid, $set, $body); + $request = $this->setOAuth2ClientRequest($id, $oAuth2Client); try { $options = $this->createHttpClientOption(); @@ -9403,56 +7425,56 @@ public function updateJsonWebKeyWithHttpInfo($kid, $set, $body = null) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\JSONWebKey' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JSONWebKey', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), $response->getStatusCode(), $response->getHeaders() ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + case 400: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; - case 403: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + case 404: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\JSONWebKey'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -9470,31 +7492,31 @@ public function updateJsonWebKeyWithHttpInfo($kid, $set, $body = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JSONWebKey', + '\Ory\Hydra\Client\Model\OAuth2Client', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 401: + case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 403: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\ErrorOAuth2', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -9505,20 +7527,19 @@ public function updateJsonWebKeyWithHttpInfo($kid, $set, $body = null) } /** - * Operation updateJsonWebKeyAsync + * Operation setOAuth2ClientAsync * - * Update a JSON Web Key + * Set OAuth 2.0 Client * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKey $body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateJsonWebKeyAsync($kid, $set, $body = null) + public function setOAuth2ClientAsync($id, $oAuth2Client) { - return $this->updateJsonWebKeyAsyncWithHttpInfo($kid, $set, $body) + return $this->setOAuth2ClientAsyncWithHttpInfo($id, $oAuth2Client) ->then( function ($response) { return $response[0]; @@ -9527,21 +7548,20 @@ function ($response) { } /** - * Operation updateJsonWebKeyAsyncWithHttpInfo + * Operation setOAuth2ClientAsyncWithHttpInfo * - * Update a JSON Web Key + * Set OAuth 2.0 Client * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKey $body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateJsonWebKeyAsyncWithHttpInfo($kid, $set, $body = null) + public function setOAuth2ClientAsyncWithHttpInfo($id, $oAuth2Client) { - $returnType = '\Ory\Hydra\Client\Model\JSONWebKey'; - $request = $this->updateJsonWebKeyRequest($kid, $set, $body); + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + $request = $this->setOAuth2ClientRequest($id, $oAuth2Client); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9577,31 +7597,30 @@ function ($exception) { } /** - * Create request for operation 'updateJsonWebKey' + * Create request for operation 'setOAuth2Client' * - * @param string $kid The kid of the desired key (required) - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKey $body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateJsonWebKeyRequest($kid, $set, $body = null) + public function setOAuth2ClientRequest($id, $oAuth2Client) { - // verify the required parameter 'kid' is set - if ($kid === null || (is_array($kid) && count($kid) === 0)) { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $kid when calling updateJsonWebKey' + 'Missing the required parameter $id when calling setOAuth2Client' ); } - // verify the required parameter 'set' is set - if ($set === null || (is_array($set) && count($set) === 0)) { + // verify the required parameter 'oAuth2Client' is set + if ($oAuth2Client === null || (is_array($oAuth2Client) && count($oAuth2Client) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $set when calling updateJsonWebKey' + 'Missing the required parameter $oAuth2Client when calling setOAuth2Client' ); } - $resourcePath = '/keys/{set}/{kid}'; + $resourcePath = '/admin/clients/{id}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9611,18 +7630,10 @@ public function updateJsonWebKeyRequest($kid, $set, $body = null) // path params - if ($kid !== null) { - $resourcePath = str_replace( - '{' . 'kid' . '}', - ObjectSerializer::toPathValue($kid), - $resourcePath - ); - } - // path params - if ($set !== null) { + if ($id !== null) { $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), $resourcePath ); } @@ -9640,11 +7651,11 @@ public function updateJsonWebKeyRequest($kid, $set, $body = null) } // for model (json/xml) - if (isset($body)) { + if (isset($oAuth2Client)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); } else { - $httpBody = $body; + $httpBody = $oAuth2Client; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -9692,38 +7703,38 @@ public function updateJsonWebKeyRequest($kid, $set, $body = null) } /** - * Operation updateJsonWebKeySet + * Operation setOAuth2ClientLifespans * - * Update a JSON Web Key Set + * Set OAuth2 Client Token Lifespans * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKeySet $body body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans oAuth2ClientTokenLifespans (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\GenericError */ - public function updateJsonWebKeySet($set, $body = null) + public function setOAuth2ClientLifespans($id, $oAuth2ClientTokenLifespans = null) { - list($response) = $this->updateJsonWebKeySetWithHttpInfo($set, $body); + list($response) = $this->setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLifespans); return $response; } /** - * Operation updateJsonWebKeySetWithHttpInfo + * Operation setOAuth2ClientLifespansWithHttpInfo * - * Update a JSON Web Key Set + * Set OAuth2 Client Token Lifespans * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKeySet $body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) */ - public function updateJsonWebKeySetWithHttpInfo($set, $body = null) + public function setOAuth2ClientLifespansWithHttpInfo($id, $oAuth2ClientTokenLifespans = null) { - $request = $this->updateJsonWebKeySetRequest($set, $body); + $request = $this->setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans); try { $options = $this->createHttpClientOption(); @@ -9762,56 +7773,32 @@ public function updateJsonWebKeySetWithHttpInfo($set, $body = null) switch($statusCode) { case 200: - if ('\Ory\Hydra\Client\Model\JSONWebKeySet' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JSONWebKeySet', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 403: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), $response->getStatusCode(), $response->getHeaders() ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + default: + if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GenericError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -9829,31 +7816,15 @@ public function updateJsonWebKeySetWithHttpInfo($set, $body = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 403: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\OAuth2Client', $e->getResponseHeaders() ); $e->setResponseObject($data); break; - case 500: + default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\GenericError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -9864,19 +7835,19 @@ public function updateJsonWebKeySetWithHttpInfo($set, $body = null) } /** - * Operation updateJsonWebKeySetAsync + * Operation setOAuth2ClientLifespansAsync * - * Update a JSON Web Key Set + * Set OAuth2 Client Token Lifespans * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKeySet $body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateJsonWebKeySetAsync($set, $body = null) + public function setOAuth2ClientLifespansAsync($id, $oAuth2ClientTokenLifespans = null) { - return $this->updateJsonWebKeySetAsyncWithHttpInfo($set, $body) + return $this->setOAuth2ClientLifespansAsyncWithHttpInfo($id, $oAuth2ClientTokenLifespans) ->then( function ($response) { return $response[0]; @@ -9885,20 +7856,20 @@ function ($response) { } /** - * Operation updateJsonWebKeySetAsyncWithHttpInfo + * Operation setOAuth2ClientLifespansAsyncWithHttpInfo * - * Update a JSON Web Key Set + * Set OAuth2 Client Token Lifespans * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKeySet $body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateJsonWebKeySetAsyncWithHttpInfo($set, $body = null) + public function setOAuth2ClientLifespansAsyncWithHttpInfo($id, $oAuth2ClientTokenLifespans = null) { - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; - $request = $this->updateJsonWebKeySetRequest($set, $body); + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + $request = $this->setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9934,24 +7905,24 @@ function ($exception) { } /** - * Create request for operation 'updateJsonWebKeySet' + * Create request for operation 'setOAuth2ClientLifespans' * - * @param string $set The set (required) - * @param \Ory\Hydra\Client\Model\JSONWebKeySet $body (optional) + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2ClientTokenLifespans $oAuth2ClientTokenLifespans (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateJsonWebKeySetRequest($set, $body = null) + public function setOAuth2ClientLifespansRequest($id, $oAuth2ClientTokenLifespans = null) { - // verify the required parameter 'set' is set - if ($set === null || (is_array($set) && count($set) === 0)) { + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $set when calling updateJsonWebKeySet' + 'Missing the required parameter $id when calling setOAuth2ClientLifespans' ); } - $resourcePath = '/keys/{set}'; + $resourcePath = '/admin/clients/{id}/lifespans'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9961,10 +7932,10 @@ public function updateJsonWebKeySetRequest($set, $body = null) // path params - if ($set !== null) { + if ($id !== null) { $resourcePath = str_replace( - '{' . 'set' . '}', - ObjectSerializer::toPathValue($set), + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), $resourcePath ); } @@ -9982,11 +7953,11 @@ public function updateJsonWebKeySetRequest($set, $body = null) } // for model (json/xml) - if (isset($body)) { + if (isset($oAuth2ClientTokenLifespans)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2ClientTokenLifespans)); } else { - $httpBody = $body; + $httpBody = $oAuth2ClientTokenLifespans; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -10034,38 +8005,36 @@ public function updateJsonWebKeySetRequest($set, $body = null) } /** - * Operation updateOAuth2Client + * Operation trustOAuth2JwtGrantIssuer * - * Update an OAuth 2.0 Client + * Trust OAuth2 JWT Bearer Grant Type Issuer * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body body (required) + * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer trustOAuth2JwtGrantIssuer (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError + * @return \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError */ - public function updateOAuth2Client($id, $body) + public function trustOAuth2JwtGrantIssuer($trustOAuth2JwtGrantIssuer = null) { - list($response) = $this->updateOAuth2ClientWithHttpInfo($id, $body); + list($response) = $this->trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer); return $response; } /** - * Operation updateOAuth2ClientWithHttpInfo + * Operation trustOAuth2JwtGrantIssuerWithHttpInfo * - * Update an OAuth 2.0 Client + * Trust OAuth2 JWT Bearer Grant Type Issuer * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) + * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer (optional) * * @throws \Ory\Hydra\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer|\Ory\Hydra\Client\Model\GenericError, HTTP status code, HTTP response headers (array of strings) */ - public function updateOAuth2ClientWithHttpInfo($id, $body) + public function trustOAuth2JwtGrantIssuerWithHttpInfo($trustOAuth2JwtGrantIssuer = null) { - $request = $this->updateOAuth2ClientRequest($id, $body); + $request = $this->trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer); try { $options = $this->createHttpClientOption(); @@ -10103,33 +8072,33 @@ public function updateOAuth2ClientWithHttpInfo($id, $body) } switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { + case 201: + if ('\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer', []), $response->getStatusCode(), $response->getHeaders() ]; default: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { + if ('\Ory\Hydra\Client\Model\GenericError' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); } return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\GenericError', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + $returnType = '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer'; if ($returnType === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer } else { @@ -10144,10 +8113,10 @@ public function updateOAuth2ClientWithHttpInfo($id, $body) } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\OAuth2Client', + '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -10155,7 +8124,7 @@ public function updateOAuth2ClientWithHttpInfo($id, $body) default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', + '\Ory\Hydra\Client\Model\GenericError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -10166,19 +8135,18 @@ public function updateOAuth2ClientWithHttpInfo($id, $body) } /** - * Operation updateOAuth2ClientAsync + * Operation trustOAuth2JwtGrantIssuerAsync * - * Update an OAuth 2.0 Client + * Trust OAuth2 JWT Bearer Grant Type Issuer * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) + * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateOAuth2ClientAsync($id, $body) + public function trustOAuth2JwtGrantIssuerAsync($trustOAuth2JwtGrantIssuer = null) { - return $this->updateOAuth2ClientAsyncWithHttpInfo($id, $body) + return $this->trustOAuth2JwtGrantIssuerAsyncWithHttpInfo($trustOAuth2JwtGrantIssuer) ->then( function ($response) { return $response[0]; @@ -10187,20 +8155,19 @@ function ($response) { } /** - * Operation updateOAuth2ClientAsyncWithHttpInfo + * Operation trustOAuth2JwtGrantIssuerAsyncWithHttpInfo * - * Update an OAuth 2.0 Client + * Trust OAuth2 JWT Bearer Grant Type Issuer * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) + * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateOAuth2ClientAsyncWithHttpInfo($id, $body) + public function trustOAuth2JwtGrantIssuerAsyncWithHttpInfo($trustOAuth2JwtGrantIssuer = null) { - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->updateOAuth2ClientRequest($id, $body); + $returnType = '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantIssuer'; + $request = $this->trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10236,30 +8203,17 @@ function ($exception) { } /** - * Create request for operation 'updateOAuth2Client' + * Create request for operation 'trustOAuth2JwtGrantIssuer' * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) + * @param \Ory\Hydra\Client\Model\TrustOAuth2JwtGrantIssuer $trustOAuth2JwtGrantIssuer (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateOAuth2ClientRequest($id, $body) + public function trustOAuth2JwtGrantIssuerRequest($trustOAuth2JwtGrantIssuer = null) { - // 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 updateOAuth2Client' - ); - } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling updateOAuth2Client' - ); - } - $resourcePath = '/clients/{id}'; + $resourcePath = '/admin/trust/grants/jwt-bearer/issuers'; $formParams = []; $queryParams = []; $headerParams = []; @@ -10268,14 +8222,6 @@ public function updateOAuth2ClientRequest($id, $body) - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } if ($multipart) { @@ -10290,11 +8236,11 @@ public function updateOAuth2ClientRequest($id, $body) } // for model (json/xml) - if (isset($body)) { + if (isset($trustOAuth2JwtGrantIssuer)) { if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($trustOAuth2JwtGrantIssuer)); } else { - $httpBody = $body; + $httpBody = $trustOAuth2JwtGrantIssuer; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -10334,7 +8280,7 @@ public function updateOAuth2ClientRequest($id, $body) $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( - 'PUT', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/clients/hydra/php/lib/Api/OidcApi.php b/clients/hydra/php/lib/Api/OidcApi.php new file mode 100644 index 00000000000..44068380489 --- /dev/null +++ b/clients/hydra/php/lib/Api/OidcApi.php @@ -0,0 +1,2066 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation createOidcDynamicClient + * + * Register OAuth2 Client using OpenID Dynamic Client Registration + * + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function createOidcDynamicClient($oAuth2Client) + { + list($response) = $this->createOidcDynamicClientWithHttpInfo($oAuth2Client); + return $response; + } + + /** + * Operation createOidcDynamicClientWithHttpInfo + * + * Register OAuth2 Client using OpenID Dynamic Client Registration + * + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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) + { + $request = $this->createOidcDynamicClientRequest($oAuth2Client); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 201: + if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\OAuth2Client', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation createOidcDynamicClientAsync + * + * Register OAuth2 Client using OpenID Dynamic Client Registration + * + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOidcDynamicClientAsync($oAuth2Client) + { + return $this->createOidcDynamicClientAsyncWithHttpInfo($oAuth2Client) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createOidcDynamicClientAsyncWithHttpInfo + * + * Register OAuth2 Client using OpenID Dynamic Client Registration + * + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function createOidcDynamicClientAsyncWithHttpInfo($oAuth2Client) + { + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + $request = $this->createOidcDynamicClientRequest($oAuth2Client); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createOidcDynamicClient' + * + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client Dynamic Client Registration Request Body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createOidcDynamicClientRequest($oAuth2Client) + { + // verify the required parameter 'oAuth2Client' is set + if ($oAuth2Client === null || (is_array($oAuth2Client) && count($oAuth2Client) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $oAuth2Client when calling createOidcDynamicClient' + ); + } + + $resourcePath = '/oauth2/register'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($oAuth2Client)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); + } else { + $httpBody = $oAuth2Client; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteOidcDynamicClient + * + * 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) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function deleteOidcDynamicClient($id) + { + $this->deleteOidcDynamicClientWithHttpInfo($id); + } + + /** + * Operation deleteOidcDynamicClientWithHttpInfo + * + * 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) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteOidcDynamicClientWithHttpInfo($id) + { + $request = $this->deleteOidcDynamicClientRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\GenericError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation deleteOidcDynamicClientAsync + * + * 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) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteOidcDynamicClientAsync($id) + { + return $this->deleteOidcDynamicClientAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteOidcDynamicClientAsyncWithHttpInfo + * + * 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) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteOidcDynamicClientAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->deleteOidcDynamicClientRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteOidcDynamicClient' + * + * @param string $id The id of the OAuth 2.0 Client. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteOidcDynamicClientRequest($id) + { + // 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 deleteOidcDynamicClient' + ); + } + + $resourcePath = '/oauth2/register/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'DELETE', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation discoverOidcConfiguration + * + * OpenID Connect Discovery + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\OidcConfiguration|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function discoverOidcConfiguration() + { + list($response) = $this->discoverOidcConfigurationWithHttpInfo(); + return $response; + } + + /** + * Operation discoverOidcConfigurationWithHttpInfo + * + * OpenID Connect Discovery + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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() + { + $request = $this->discoverOidcConfigurationRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\OidcConfiguration' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OidcConfiguration', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\OidcConfiguration'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\OidcConfiguration', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation discoverOidcConfigurationAsync + * + * OpenID Connect Discovery + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function discoverOidcConfigurationAsync() + { + return $this->discoverOidcConfigurationAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation discoverOidcConfigurationAsyncWithHttpInfo + * + * OpenID Connect Discovery + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function discoverOidcConfigurationAsyncWithHttpInfo() + { + $returnType = '\Ory\Hydra\Client\Model\OidcConfiguration'; + $request = $this->discoverOidcConfigurationRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'discoverOidcConfiguration' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function discoverOidcConfigurationRequest() + { + + $resourcePath = '/.well-known/openid-configuration'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getOidcDynamicClient + * + * Get OAuth2 Client using OpenID Dynamic Client Registration + * + * @param string $id The id of the OAuth 2.0 Client. (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function getOidcDynamicClient($id) + { + list($response) = $this->getOidcDynamicClientWithHttpInfo($id); + return $response; + } + + /** + * Operation getOidcDynamicClientWithHttpInfo + * + * Get OAuth2 Client using OpenID Dynamic Client Registration + * + * @param string $id The id of the OAuth 2.0 Client. (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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) + { + $request = $this->getOidcDynamicClientRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\OAuth2Client', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getOidcDynamicClientAsync + * + * Get OAuth2 Client using OpenID Dynamic Client Registration + * + * @param string $id The id of the OAuth 2.0 Client. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOidcDynamicClientAsync($id) + { + return $this->getOidcDynamicClientAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getOidcDynamicClientAsyncWithHttpInfo + * + * Get OAuth2 Client using OpenID Dynamic Client Registration + * + * @param string $id The id of the OAuth 2.0 Client. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOidcDynamicClientAsyncWithHttpInfo($id) + { + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + $request = $this->getOidcDynamicClientRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getOidcDynamicClient' + * + * @param string $id The id of the OAuth 2.0 Client. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getOidcDynamicClientRequest($id) + { + // 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 getOidcDynamicClient' + ); + } + + $resourcePath = '/oauth2/register/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getOidcUserInfo + * + * OpenID Connect Userinfo + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\OidcUserInfo|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function getOidcUserInfo() + { + list($response) = $this->getOidcUserInfoWithHttpInfo(); + return $response; + } + + /** + * Operation getOidcUserInfoWithHttpInfo + * + * OpenID Connect Userinfo + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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() + { + $request = $this->getOidcUserInfoRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\OidcUserInfo' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OidcUserInfo', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\OidcUserInfo'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\OidcUserInfo', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getOidcUserInfoAsync + * + * OpenID Connect Userinfo + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOidcUserInfoAsync() + { + return $this->getOidcUserInfoAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getOidcUserInfoAsyncWithHttpInfo + * + * OpenID Connect Userinfo + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getOidcUserInfoAsyncWithHttpInfo() + { + $returnType = '\Ory\Hydra\Client\Model\OidcUserInfo'; + $request = $this->getOidcUserInfoRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getOidcUserInfo' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getOidcUserInfoRequest() + { + + $resourcePath = '/userinfo'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires OAuth (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation revokeOidcSession + * + * OpenID Connect Front- and Back-channel Enabled Logout + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function revokeOidcSession() + { + $this->revokeOidcSessionWithHttpInfo(); + } + + /** + * Operation revokeOidcSessionWithHttpInfo + * + * OpenID Connect Front- and Back-channel Enabled Logout + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function revokeOidcSessionWithHttpInfo() + { + $request = $this->revokeOidcSessionRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation revokeOidcSessionAsync + * + * OpenID Connect Front- and Back-channel Enabled Logout + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function revokeOidcSessionAsync() + { + return $this->revokeOidcSessionAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation revokeOidcSessionAsyncWithHttpInfo + * + * OpenID Connect Front- and Back-channel Enabled Logout + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function revokeOidcSessionAsyncWithHttpInfo() + { + $returnType = ''; + $request = $this->revokeOidcSessionRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'revokeOidcSession' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function revokeOidcSessionRequest() + { + + $resourcePath = '/oauth2/sessions/logout'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation setOidcDynamicClient + * + * Set OAuth2 Client using OpenID Dynamic Client Registration + * + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\ErrorOAuth2|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function setOidcDynamicClient($id, $oAuth2Client) + { + list($response) = $this->setOidcDynamicClientWithHttpInfo($id, $oAuth2Client); + return $response; + } + + /** + * Operation setOidcDynamicClientWithHttpInfo + * + * Set OAuth2 Client using OpenID Dynamic Client Registration + * + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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) + { + $request = $this->setOidcDynamicClientRequest($id, $oAuth2Client); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\OAuth2Client', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation setOidcDynamicClientAsync + * + * Set OAuth2 Client using OpenID Dynamic Client Registration + * + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setOidcDynamicClientAsync($id, $oAuth2Client) + { + return $this->setOidcDynamicClientAsyncWithHttpInfo($id, $oAuth2Client) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation setOidcDynamicClientAsyncWithHttpInfo + * + * Set OAuth2 Client using OpenID Dynamic Client Registration + * + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function setOidcDynamicClientAsyncWithHttpInfo($id, $oAuth2Client) + { + $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; + $request = $this->setOidcDynamicClientRequest($id, $oAuth2Client); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'setOidcDynamicClient' + * + * @param string $id OAuth 2.0 Client ID (required) + * @param \Ory\Hydra\Client\Model\OAuth2Client $oAuth2Client OAuth 2.0 Client Request Body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function setOidcDynamicClientRequest($id, $oAuth2Client) + { + // 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( + 'Missing the required parameter $oAuth2Client when calling setOidcDynamicClient' + ); + } + + $resourcePath = '/oauth2/register/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{' . 'id' . '}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($oAuth2Client)) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($oAuth2Client)); + } else { + $httpBody = $oAuth2Client; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + // this endpoint requires Bearer authentication (access token) + if ($this->config->getAccessToken() !== null) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/clients/hydra/php/lib/Api/PublicApi.php b/clients/hydra/php/lib/Api/PublicApi.php deleted file mode 100644 index ca3cec66a0b..00000000000 --- a/clients/hydra/php/lib/Api/PublicApi.php +++ /dev/null @@ -1,3437 +0,0 @@ -client = $client ?: new Client(); - $this->config = $config ?: new Configuration(); - $this->headerSelector = $selector ?: new HeaderSelector(); - $this->hostIndex = $hostIndex; - } - - /** - * Set the host index - * - * @param int $hostIndex Host index (required) - */ - public function setHostIndex($hostIndex): void - { - $this->hostIndex = $hostIndex; - } - - /** - * Get the host index - * - * @return int Host index - */ - public function getHostIndex() - { - return $this->hostIndex; - } - - /** - * @return Configuration - */ - public function getConfig() - { - return $this->config; - } - - /** - * Operation disconnectUser - * - * OpenID Connect Front-Backchannel Enabled Logout - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function disconnectUser() - { - $this->disconnectUserWithHttpInfo(); - } - - /** - * Operation disconnectUserWithHttpInfo - * - * OpenID Connect Front-Backchannel Enabled Logout - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function disconnectUserWithHttpInfo() - { - $request = $this->disconnectUserRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation disconnectUserAsync - * - * OpenID Connect Front-Backchannel Enabled Logout - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function disconnectUserAsync() - { - return $this->disconnectUserAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation disconnectUserAsyncWithHttpInfo - * - * OpenID Connect Front-Backchannel Enabled Logout - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function disconnectUserAsyncWithHttpInfo() - { - $returnType = ''; - $request = $this->disconnectUserRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'disconnectUser' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function disconnectUserRequest() - { - - $resourcePath = '/oauth2/sessions/logout'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation discoverOpenIDConfiguration - * - * OpenID Connect Discovery - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\WellKnown|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError - */ - public function discoverOpenIDConfiguration() - { - list($response) = $this->discoverOpenIDConfigurationWithHttpInfo(); - return $response; - } - - /** - * Operation discoverOpenIDConfigurationWithHttpInfo - * - * OpenID Connect Discovery - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\WellKnown|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) - */ - public function discoverOpenIDConfigurationWithHttpInfo() - { - $request = $this->discoverOpenIDConfigurationRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\WellKnown' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\WellKnown', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\WellKnown'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\WellKnown', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation discoverOpenIDConfigurationAsync - * - * OpenID Connect Discovery - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function discoverOpenIDConfigurationAsync() - { - return $this->discoverOpenIDConfigurationAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation discoverOpenIDConfigurationAsyncWithHttpInfo - * - * OpenID Connect Discovery - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function discoverOpenIDConfigurationAsyncWithHttpInfo() - { - $returnType = '\Ory\Hydra\Client\Model\WellKnown'; - $request = $this->discoverOpenIDConfigurationRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'discoverOpenIDConfiguration' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function discoverOpenIDConfigurationRequest() - { - - $resourcePath = '/.well-known/openid-configuration'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation dynamicClientRegistrationCreateOAuth2Client - * - * Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body body (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError - */ - public function dynamicClientRegistrationCreateOAuth2Client($body) - { - list($response) = $this->dynamicClientRegistrationCreateOAuth2ClientWithHttpInfo($body); - return $response; - } - - /** - * Operation dynamicClientRegistrationCreateOAuth2ClientWithHttpInfo - * - * Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) - */ - public function dynamicClientRegistrationCreateOAuth2ClientWithHttpInfo($body) - { - $request = $this->dynamicClientRegistrationCreateOAuth2ClientRequest($body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 201: - if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - default: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 201: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\OAuth2Client', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - default: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation dynamicClientRegistrationCreateOAuth2ClientAsync - * - * Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function dynamicClientRegistrationCreateOAuth2ClientAsync($body) - { - return $this->dynamicClientRegistrationCreateOAuth2ClientAsyncWithHttpInfo($body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation dynamicClientRegistrationCreateOAuth2ClientAsyncWithHttpInfo - * - * Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function dynamicClientRegistrationCreateOAuth2ClientAsyncWithHttpInfo($body) - { - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->dynamicClientRegistrationCreateOAuth2ClientRequest($body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'dynamicClientRegistrationCreateOAuth2Client' - * - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function dynamicClientRegistrationCreateOAuth2ClientRequest($body) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling dynamicClientRegistrationCreateOAuth2Client' - ); - } - - $resourcePath = '/connect/register'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); - } else { - $httpBody = $body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation dynamicClientRegistrationDeleteOAuth2Client - * - * Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function dynamicClientRegistrationDeleteOAuth2Client($id) - { - $this->dynamicClientRegistrationDeleteOAuth2ClientWithHttpInfo($id); - } - - /** - * Operation dynamicClientRegistrationDeleteOAuth2ClientWithHttpInfo - * - * Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function dynamicClientRegistrationDeleteOAuth2ClientWithHttpInfo($id) - { - $request = $this->dynamicClientRegistrationDeleteOAuth2ClientRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - default: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation dynamicClientRegistrationDeleteOAuth2ClientAsync - * - * Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function dynamicClientRegistrationDeleteOAuth2ClientAsync($id) - { - return $this->dynamicClientRegistrationDeleteOAuth2ClientAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation dynamicClientRegistrationDeleteOAuth2ClientAsyncWithHttpInfo - * - * Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function dynamicClientRegistrationDeleteOAuth2ClientAsyncWithHttpInfo($id) - { - $returnType = ''; - $request = $this->dynamicClientRegistrationDeleteOAuth2ClientRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'dynamicClientRegistrationDeleteOAuth2Client' - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function dynamicClientRegistrationDeleteOAuth2ClientRequest($id) - { - // 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 dynamicClientRegistrationDeleteOAuth2Client' - ); - } - - $resourcePath = '/connect/register/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'DELETE', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation dynamicClientRegistrationGetOAuth2Client - * - * Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError - */ - public function dynamicClientRegistrationGetOAuth2Client($id) - { - list($response) = $this->dynamicClientRegistrationGetOAuth2ClientWithHttpInfo($id); - return $response; - } - - /** - * Operation dynamicClientRegistrationGetOAuth2ClientWithHttpInfo - * - * Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) - */ - public function dynamicClientRegistrationGetOAuth2ClientWithHttpInfo($id) - { - $request = $this->dynamicClientRegistrationGetOAuth2ClientRequest($id); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - default: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\OAuth2Client', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - default: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation dynamicClientRegistrationGetOAuth2ClientAsync - * - * Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function dynamicClientRegistrationGetOAuth2ClientAsync($id) - { - return $this->dynamicClientRegistrationGetOAuth2ClientAsyncWithHttpInfo($id) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation dynamicClientRegistrationGetOAuth2ClientAsyncWithHttpInfo - * - * Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function dynamicClientRegistrationGetOAuth2ClientAsyncWithHttpInfo($id) - { - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->dynamicClientRegistrationGetOAuth2ClientRequest($id); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'dynamicClientRegistrationGetOAuth2Client' - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function dynamicClientRegistrationGetOAuth2ClientRequest($id) - { - // 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 dynamicClientRegistrationGetOAuth2Client' - ); - } - - $resourcePath = '/connect/register/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation dynamicClientRegistrationUpdateOAuth2Client - * - * Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body body (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError - */ - public function dynamicClientRegistrationUpdateOAuth2Client($id, $body) - { - list($response) = $this->dynamicClientRegistrationUpdateOAuth2ClientWithHttpInfo($id, $body); - return $response; - } - - /** - * Operation dynamicClientRegistrationUpdateOAuth2ClientWithHttpInfo - * - * Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\OAuth2Client|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) - */ - public function dynamicClientRegistrationUpdateOAuth2ClientWithHttpInfo($id, $body) - { - $request = $this->dynamicClientRegistrationUpdateOAuth2ClientRequest($id, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\OAuth2Client' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\OAuth2Client', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - default: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\OAuth2Client', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - default: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation dynamicClientRegistrationUpdateOAuth2ClientAsync - * - * Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function dynamicClientRegistrationUpdateOAuth2ClientAsync($id, $body) - { - return $this->dynamicClientRegistrationUpdateOAuth2ClientAsyncWithHttpInfo($id, $body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation dynamicClientRegistrationUpdateOAuth2ClientAsyncWithHttpInfo - * - * Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function dynamicClientRegistrationUpdateOAuth2ClientAsyncWithHttpInfo($id, $body) - { - $returnType = '\Ory\Hydra\Client\Model\OAuth2Client'; - $request = $this->dynamicClientRegistrationUpdateOAuth2ClientRequest($id, $body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'dynamicClientRegistrationUpdateOAuth2Client' - * - * @param string $id The id of the OAuth 2.0 Client. (required) - * @param \Ory\Hydra\Client\Model\OAuth2Client $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function dynamicClientRegistrationUpdateOAuth2ClientRequest($id, $body) - { - // 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 dynamicClientRegistrationUpdateOAuth2Client' - ); - } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling dynamicClientRegistrationUpdateOAuth2Client' - ); - } - - $resourcePath = '/connect/register/{id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($id !== null) { - $resourcePath = str_replace( - '{' . 'id' . '}', - ObjectSerializer::toPathValue($id), - $resourcePath - ); - } - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($body)) { - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($body)); - } else { - $httpBody = $body; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation isInstanceReady - * - * Check Readiness Status - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\HealthStatus|\Ory\Hydra\Client\Model\HealthNotReadyStatus - */ - public function isInstanceReady() - { - list($response) = $this->isInstanceReadyWithHttpInfo(); - return $response; - } - - /** - * Operation isInstanceReadyWithHttpInfo - * - * Check Readiness Status - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\HealthStatus|\Ory\Hydra\Client\Model\HealthNotReadyStatus, HTTP status code, HTTP response headers (array of strings) - */ - public function isInstanceReadyWithHttpInfo() - { - $request = $this->isInstanceReadyRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\HealthStatus' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\HealthStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 503: - if ('\Ory\Hydra\Client\Model\HealthNotReadyStatus' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\HealthNotReadyStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\HealthStatus'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\HealthStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 503: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\HealthNotReadyStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation isInstanceReadyAsync - * - * Check Readiness Status - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function isInstanceReadyAsync() - { - return $this->isInstanceReadyAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation isInstanceReadyAsyncWithHttpInfo - * - * Check Readiness Status - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function isInstanceReadyAsyncWithHttpInfo() - { - $returnType = '\Ory\Hydra\Client\Model\HealthStatus'; - $request = $this->isInstanceReadyRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'isInstanceReady' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function isInstanceReadyRequest() - { - - $resourcePath = '/health/ready'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation oauth2Token - * - * The OAuth 2.0 Token Endpoint - * - * @param string $grantType grantType (required) - * @param string $code code (optional) - * @param string $refreshToken refreshToken (optional) - * @param string $redirectUri redirectUri (optional) - * @param string $clientId clientId (optional) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\Oauth2TokenResponse|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError - */ - public function oauth2Token($grantType, $code = null, $refreshToken = null, $redirectUri = null, $clientId = null) - { - list($response) = $this->oauth2TokenWithHttpInfo($grantType, $code, $refreshToken, $redirectUri, $clientId); - return $response; - } - - /** - * Operation oauth2TokenWithHttpInfo - * - * The OAuth 2.0 Token Endpoint - * - * @param string $grantType (required) - * @param string $code (optional) - * @param string $refreshToken (optional) - * @param string $redirectUri (optional) - * @param string $clientId (optional) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\Oauth2TokenResponse|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) - */ - public function oauth2TokenWithHttpInfo($grantType, $code = null, $refreshToken = null, $redirectUri = null, $clientId = null) - { - $request = $this->oauth2TokenRequest($grantType, $code, $refreshToken, $redirectUri, $clientId); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\Oauth2TokenResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\Oauth2TokenResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\Oauth2TokenResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\Oauth2TokenResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation oauth2TokenAsync - * - * The OAuth 2.0 Token Endpoint - * - * @param string $grantType (required) - * @param string $code (optional) - * @param string $refreshToken (optional) - * @param string $redirectUri (optional) - * @param string $clientId (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function oauth2TokenAsync($grantType, $code = null, $refreshToken = null, $redirectUri = null, $clientId = null) - { - return $this->oauth2TokenAsyncWithHttpInfo($grantType, $code, $refreshToken, $redirectUri, $clientId) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation oauth2TokenAsyncWithHttpInfo - * - * The OAuth 2.0 Token Endpoint - * - * @param string $grantType (required) - * @param string $code (optional) - * @param string $refreshToken (optional) - * @param string $redirectUri (optional) - * @param string $clientId (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function oauth2TokenAsyncWithHttpInfo($grantType, $code = null, $refreshToken = null, $redirectUri = null, $clientId = null) - { - $returnType = '\Ory\Hydra\Client\Model\Oauth2TokenResponse'; - $request = $this->oauth2TokenRequest($grantType, $code, $refreshToken, $redirectUri, $clientId); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'oauth2Token' - * - * @param string $grantType (required) - * @param string $code (optional) - * @param string $refreshToken (optional) - * @param string $redirectUri (optional) - * @param string $clientId (optional) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function oauth2TokenRequest($grantType, $code = null, $refreshToken = null, $redirectUri = null, $clientId = null) - { - // verify the required parameter 'grantType' is set - if ($grantType === null || (is_array($grantType) && count($grantType) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $grantType when calling oauth2Token' - ); - } - - $resourcePath = '/oauth2/token'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - // form params - if ($grantType !== null) { - $formParams['grant_type'] = ObjectSerializer::toFormValue($grantType); - } - // form params - if ($code !== null) { - $formParams['code'] = ObjectSerializer::toFormValue($code); - } - // form params - if ($refreshToken !== null) { - $formParams['refresh_token'] = ObjectSerializer::toFormValue($refreshToken); - } - // form params - if ($redirectUri !== null) { - $formParams['redirect_uri'] = ObjectSerializer::toFormValue($redirectUri); - } - // form params - if ($clientId !== null) { - $formParams['client_id'] = ObjectSerializer::toFormValue($clientId); - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/x-www-form-urlencoded'] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires HTTP basic authentication - if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation oauthAuth - * - * The OAuth 2.0 Authorize Endpoint - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function oauthAuth() - { - $this->oauthAuthWithHttpInfo(); - } - - /** - * Operation oauthAuthWithHttpInfo - * - * The OAuth 2.0 Authorize Endpoint - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function oauthAuthWithHttpInfo() - { - $request = $this->oauthAuthRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation oauthAuthAsync - * - * The OAuth 2.0 Authorize Endpoint - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function oauthAuthAsync() - { - return $this->oauthAuthAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation oauthAuthAsyncWithHttpInfo - * - * The OAuth 2.0 Authorize Endpoint - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function oauthAuthAsyncWithHttpInfo() - { - $returnType = ''; - $request = $this->oauthAuthRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'oauthAuth' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function oauthAuthRequest() - { - - $resourcePath = '/oauth2/auth'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation revokeOAuth2Token - * - * Revoke OAuth2 Tokens - * - * @param string $token token (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function revokeOAuth2Token($token) - { - $this->revokeOAuth2TokenWithHttpInfo($token); - } - - /** - * Operation revokeOAuth2TokenWithHttpInfo - * - * Revoke OAuth2 Tokens - * - * @param string $token (required) - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function revokeOAuth2TokenWithHttpInfo($token) - { - $request = $this->revokeOAuth2TokenRequest($token); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation revokeOAuth2TokenAsync - * - * Revoke OAuth2 Tokens - * - * @param string $token (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function revokeOAuth2TokenAsync($token) - { - return $this->revokeOAuth2TokenAsyncWithHttpInfo($token) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation revokeOAuth2TokenAsyncWithHttpInfo - * - * Revoke OAuth2 Tokens - * - * @param string $token (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function revokeOAuth2TokenAsyncWithHttpInfo($token) - { - $returnType = ''; - $request = $this->revokeOAuth2TokenRequest($token); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'revokeOAuth2Token' - * - * @param string $token (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function revokeOAuth2TokenRequest($token) - { - // verify the required parameter 'token' is set - if ($token === null || (is_array($token) && count($token) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $token when calling revokeOAuth2Token' - ); - } - - $resourcePath = '/oauth2/revoke'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - // form params - if ($token !== 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'] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires HTTP basic authentication - if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation userinfo - * - * OpenID Connect Userinfo - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\UserinfoResponse|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError - */ - public function userinfo() - { - list($response) = $this->userinfoWithHttpInfo(); - return $response; - } - - /** - * Operation userinfoWithHttpInfo - * - * OpenID Connect Userinfo - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\UserinfoResponse|\Ory\Hydra\Client\Model\JsonError|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) - */ - public function userinfoWithHttpInfo() - { - $request = $this->userinfoRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\UserinfoResponse' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\UserinfoResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\UserinfoResponse'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\UserinfoResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation userinfoAsync - * - * OpenID Connect Userinfo - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function userinfoAsync() - { - return $this->userinfoAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation userinfoAsyncWithHttpInfo - * - * OpenID Connect Userinfo - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function userinfoAsyncWithHttpInfo() - { - $returnType = '\Ory\Hydra\Client\Model\UserinfoResponse'; - $request = $this->userinfoRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'userinfo' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function userinfoRequest() - { - - $resourcePath = '/userinfo'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation wellKnown - * - * JSON Web Keys Discovery - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError - */ - public function wellKnown() - { - list($response) = $this->wellKnownWithHttpInfo(); - return $response; - } - - /** - * Operation wellKnownWithHttpInfo - * - * JSON Web Keys Discovery - * - * - * @throws \Ory\Hydra\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \Ory\Hydra\Client\Model\JSONWebKeySet|\Ory\Hydra\Client\Model\JsonError, HTTP status code, HTTP response headers (array of strings) - */ - public function wellKnownWithHttpInfo() - { - $request = $this->wellKnownRequest(); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } catch (ConnectException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - (int) $e->getCode(), - null, - null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - switch($statusCode) { - case 200: - if ('\Ory\Hydra\Client\Model\JSONWebKeySet' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JSONWebKeySet', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 500: - if ('\Ory\Hydra\Client\Model\JsonError' === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonError', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JSONWebKeySet', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 500: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\Ory\Hydra\Client\Model\JsonError', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation wellKnownAsync - * - * JSON Web Keys Discovery - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function wellKnownAsync() - { - return $this->wellKnownAsyncWithHttpInfo() - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation wellKnownAsyncWithHttpInfo - * - * JSON Web Keys Discovery - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function wellKnownAsyncWithHttpInfo() - { - $returnType = '\Ory\Hydra\Client\Model\JSONWebKeySet'; - $request = $this->wellKnownRequest(); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'wellKnown' - * - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function wellKnownRequest() - { - - $resourcePath = '/.well-known/jwks.json'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); - } - - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); - } - } - - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\Query::build($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Create http client option - * - * @throws \RuntimeException on file opening failure - * @return array of http client options - */ - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/clients/hydra/php/lib/Api/WellknownApi.php b/clients/hydra/php/lib/Api/WellknownApi.php new file mode 100644 index 00000000000..7b78996f40b --- /dev/null +++ b/clients/hydra/php/lib/Api/WellknownApi.php @@ -0,0 +1,409 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation discoverJsonWebKeys + * + * Discover Well-Known JSON Web Keys + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Ory\Hydra\Client\Model\JsonWebKeySet|\Ory\Hydra\Client\Model\ErrorOAuth2 + */ + public function discoverJsonWebKeys() + { + list($response) = $this->discoverJsonWebKeysWithHttpInfo(); + return $response; + } + + /** + * Operation discoverJsonWebKeysWithHttpInfo + * + * Discover Well-Known JSON Web Keys + * + * + * @throws \Ory\Hydra\Client\ApiException on non-2xx response + * @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() + { + $request = $this->discoverJsonWebKeysRequest(); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\Ory\Hydra\Client\Model\JsonWebKeySet' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\JsonWebKeySet', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + default: + if ('\Ory\Hydra\Client\Model\ErrorOAuth2' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\Ory\Hydra\Client\Model\ErrorOAuth2', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\JsonWebKeySet', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Ory\Hydra\Client\Model\ErrorOAuth2', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation discoverJsonWebKeysAsync + * + * Discover Well-Known JSON Web Keys + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function discoverJsonWebKeysAsync() + { + return $this->discoverJsonWebKeysAsyncWithHttpInfo() + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation discoverJsonWebKeysAsyncWithHttpInfo + * + * Discover Well-Known JSON Web Keys + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function discoverJsonWebKeysAsyncWithHttpInfo() + { + $returnType = '\Ory\Hydra\Client\Model\JsonWebKeySet'; + $request = $this->discoverJsonWebKeysRequest(); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'discoverJsonWebKeys' + * + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function discoverJsonWebKeysRequest() + { + + $resourcePath = '/.well-known/jwks.json'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\Query::build($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/clients/hydra/php/lib/ApiException.php b/clients/hydra/php/lib/ApiException.php index e5def1702d9..cf365288e0d 100644 --- a/clients/hydra/php/lib/ApiException.php +++ b/clients/hydra/php/lib/ApiException.php @@ -10,11 +10,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/lib/Configuration.php b/clients/hydra/php/lib/Configuration.php index 83449190760..092a845cfdc 100644 --- a/clients/hydra/php/lib/Configuration.php +++ b/clients/hydra/php/lib/Configuration.php @@ -10,11 +10,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ @@ -398,7 +399,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: v1.11.0' . PHP_EOL; + $report .= ' The version of the OpenAPI document: v2.0.1' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/clients/hydra/php/lib/HeaderSelector.php b/clients/hydra/php/lib/HeaderSelector.php index 5e92a6fb545..0d5936c91ab 100644 --- a/clients/hydra/php/lib/HeaderSelector.php +++ b/clients/hydra/php/lib/HeaderSelector.php @@ -10,11 +10,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/lib/Model/AcceptConsentRequest.php b/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequest.php similarity index 94% rename from clients/hydra/php/lib/Model/AcceptConsentRequest.php rename to clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequest.php index f164c0b63a4..a976d60174e 100644 --- a/clients/hydra/php/lib/Model/AcceptConsentRequest.php +++ b/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequest.php @@ -1,6 +1,6 @@ '\DateTime', 'remember' => 'bool', 'rememberFor' => 'int', - 'session' => '\Ory\Hydra\Client\Model\ConsentRequestSession' + 'session' => '\Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequestSession' ]; /** @@ -358,7 +359,7 @@ public function setRememberFor($rememberFor) /** * Gets session * - * @return \Ory\Hydra\Client\Model\ConsentRequestSession|null + * @return \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequestSession|null */ public function getSession() { @@ -368,7 +369,7 @@ public function getSession() /** * Sets session * - * @param \Ory\Hydra\Client\Model\ConsentRequestSession|null $session session + * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequestSession|null $session session * * @return self */ diff --git a/clients/hydra/php/lib/Model/ConsentRequestSession.php b/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequestSession.php similarity index 85% rename from clients/hydra/php/lib/Model/ConsentRequestSession.php rename to clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequestSession.php index 2cf00e77338..0240ae08053 100644 --- a/clients/hydra/php/lib/Model/ConsentRequestSession.php +++ b/clients/hydra/php/lib/Model/AcceptOAuth2ConsentRequestSession.php @@ -1,6 +1,6 @@ 'object', - 'idToken' => 'object' + 'accessToken' => 'mixed', + 'idToken' => 'mixed' ]; /** @@ -214,7 +215,7 @@ public function valid() /** * Gets accessToken * - * @return object|null + * @return mixed|null */ public function getAccessToken() { @@ -224,7 +225,7 @@ public function getAccessToken() /** * Sets accessToken * - * @param object|null $accessToken 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! + * @param mixed|null $accessToken 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 self */ @@ -238,7 +239,7 @@ public function setAccessToken($accessToken) /** * Gets idToken * - * @return object|null + * @return mixed|null */ public function getIdToken() { @@ -248,7 +249,7 @@ public function getIdToken() /** * Sets idToken * - * @param object|null $idToken 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! + * @param mixed|null $idToken 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 self */ diff --git a/clients/hydra/php/lib/Model/AcceptLoginRequest.php b/clients/hydra/php/lib/Model/AcceptOAuth2LoginRequest.php similarity index 96% rename from clients/hydra/php/lib/Model/AcceptLoginRequest.php rename to clients/hydra/php/lib/Model/AcceptOAuth2LoginRequest.php index 24f6307652f..f47ab0769ad 100644 --- a/clients/hydra/php/lib/Model/AcceptLoginRequest.php +++ b/clients/hydra/php/lib/Model/AcceptOAuth2LoginRequest.php @@ -1,6 +1,6 @@ 'string', 'amr' => 'string[]', - 'context' => 'object', + 'context' => 'mixed', 'forceSubjectIdentifier' => 'string', 'remember' => 'bool', 'rememberFor' => 'int', @@ -295,7 +296,7 @@ public function setAmr($amr) /** * Gets context * - * @return object|null + * @return mixed|null */ public function getContext() { @@ -305,7 +306,7 @@ public function getContext() /** * Sets context * - * @param object|null $context context + * @param mixed|null $context context * * @return self */ diff --git a/clients/hydra/php/lib/Model/JsonWebKeySetGeneratorRequest.php b/clients/hydra/php/lib/Model/CreateJsonWebKeySet.php similarity index 89% rename from clients/hydra/php/lib/Model/JsonWebKeySetGeneratorRequest.php rename to clients/hydra/php/lib/Model/CreateJsonWebKeySet.php index 61cc0ca7ec1..13fe4a3a24f 100644 --- a/clients/hydra/php/lib/Model/JsonWebKeySetGeneratorRequest.php +++ b/clients/hydra/php/lib/Model/CreateJsonWebKeySet.php @@ -1,6 +1,6 @@ 'string', 'errorDebug' => 'string', 'errorDescription' => 'string', + 'errorHint' => 'string', 'statusCode' => 'int' ]; @@ -77,6 +79,7 @@ class JsonError implements ModelInterface, ArrayAccess, \JsonSerializable 'error' => null, 'errorDebug' => null, 'errorDescription' => null, + 'errorHint' => null, 'statusCode' => 'int64' ]; @@ -110,6 +113,7 @@ public static function openAPIFormats() 'error' => 'error', 'errorDebug' => 'error_debug', 'errorDescription' => 'error_description', + 'errorHint' => 'error_hint', 'statusCode' => 'status_code' ]; @@ -122,6 +126,7 @@ public static function openAPIFormats() 'error' => 'setError', 'errorDebug' => 'setErrorDebug', 'errorDescription' => 'setErrorDescription', + 'errorHint' => 'setErrorHint', 'statusCode' => 'setStatusCode' ]; @@ -134,6 +139,7 @@ public static function openAPIFormats() 'error' => 'getError', 'errorDebug' => 'getErrorDebug', 'errorDescription' => 'getErrorDescription', + 'errorHint' => 'getErrorHint', 'statusCode' => 'getStatusCode' ]; @@ -197,6 +203,7 @@ 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; } @@ -237,7 +244,7 @@ public function getError() /** * Sets error * - * @param string|null $error Name is the error name. + * @param string|null $error Error * * @return self */ @@ -261,7 +268,7 @@ public function getErrorDebug() /** * Sets errorDebug * - * @param string|null $errorDebug Debug contains debug information. This is usually not available and has to be enabled. + * @param string|null $errorDebug Error Debug Information Only available in dev mode. * * @return self */ @@ -285,7 +292,7 @@ public function getErrorDescription() /** * Sets errorDescription * - * @param string|null $errorDescription Description contains further information on the nature of the error. + * @param string|null $errorDescription Error Description * * @return self */ @@ -296,6 +303,30 @@ public function setErrorDescription($errorDescription) return $this; } + /** + * Gets errorHint + * + * @return string|null + */ + public function getErrorHint() + { + return $this->container['errorHint']; + } + + /** + * Sets errorHint + * + * @param string|null $errorHint Error Hint Helps the user identify the error cause. + * + * @return self + */ + public function setErrorHint($errorHint) + { + $this->container['errorHint'] = $errorHint; + + return $this; + } + /** * Gets statusCode * @@ -309,7 +340,7 @@ public function getStatusCode() /** * Sets statusCode * - * @param int|null $statusCode Code represents the error status code (404, 403, 401, ...). + * @param int|null $statusCode HTTP Status Code * * @return self */ diff --git a/clients/hydra/php/lib/Model/GenericError.php b/clients/hydra/php/lib/Model/GenericError.php index e70eb69f0a5..5c4ce32a88b 100644 --- a/clients/hydra/php/lib/Model/GenericError.php +++ b/clients/hydra/php/lib/Model/GenericError.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ @@ -61,7 +62,7 @@ class GenericError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'code' => 'int', 'debug' => 'string', - 'details' => 'object', + 'details' => 'mixed', 'id' => 'string', 'message' => 'string', 'reason' => 'string', @@ -301,7 +302,7 @@ public function setDebug($debug) /** * Gets details * - * @return object|null + * @return mixed|null */ public function getDetails() { @@ -311,7 +312,7 @@ public function getDetails() /** * Sets details * - * @param object|null $details Further error details + * @param mixed|null $details Further error details * * @return self */ diff --git a/clients/hydra/php/lib/Model/HealthNotReadyStatus.php b/clients/hydra/php/lib/Model/HealthNotReadyStatus.php index f1d854452ed..2d2f176f70f 100644 --- a/clients/hydra/php/lib/Model/HealthNotReadyStatus.php +++ b/clients/hydra/php/lib/Model/HealthNotReadyStatus.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/lib/Model/HealthStatus.php b/clients/hydra/php/lib/Model/HealthStatus.php index 5eac77eac0a..1a0a7351eef 100644 --- a/clients/hydra/php/lib/Model/HealthStatus.php +++ b/clients/hydra/php/lib/Model/HealthStatus.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/lib/Model/ContainerWaitOKBodyError.php b/clients/hydra/php/lib/Model/InlineResponse200.php similarity index 86% rename from clients/hydra/php/lib/Model/ContainerWaitOKBodyError.php rename to clients/hydra/php/lib/Model/InlineResponse200.php index 75f7164f280..1159270682f 100644 --- a/clients/hydra/php/lib/Model/ContainerWaitOKBodyError.php +++ b/clients/hydra/php/lib/Model/InlineResponse200.php @@ -1,6 +1,6 @@ 'string' + 'status' => 'string' ]; /** @@ -71,7 +71,7 @@ class ContainerWaitOKBodyError implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null + 'status' => null ]; /** @@ -101,7 +101,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'Message' + 'status' => 'status' ]; /** @@ -110,7 +110,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage' + 'status' => 'setStatus' ]; /** @@ -119,7 +119,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage' + 'status' => 'getStatus' ]; /** @@ -179,7 +179,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -207,25 +207,25 @@ public function valid() /** - * Gets message + * Gets status * * @return string|null */ - public function getMessage() + public function getStatus() { - return $this->container['message']; + return $this->container['status']; } /** - * Sets message + * Sets status * - * @param string|null $message Details of an error + * @param string|null $status Always \"ok\". * * @return self */ - public function setMessage($message) + public function setStatus($status) { - $this->container['message'] = $message; + $this->container['status'] = $status; return $this; } diff --git a/clients/hydra/php/lib/Model/PluginConfigNetwork.php b/clients/hydra/php/lib/Model/InlineResponse2001.php similarity index 86% rename from clients/hydra/php/lib/Model/PluginConfigNetwork.php rename to clients/hydra/php/lib/Model/InlineResponse2001.php index 09741b2ef5d..4536c89d95b 100644 --- a/clients/hydra/php/lib/Model/PluginConfigNetwork.php +++ b/clients/hydra/php/lib/Model/InlineResponse2001.php @@ -1,6 +1,6 @@ 'string' + 'version' => 'string' ]; /** @@ -71,7 +71,7 @@ class PluginConfigNetwork implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ - 'type' => null + 'version' => null ]; /** @@ -101,7 +101,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'type' => 'Type' + 'version' => 'version' ]; /** @@ -110,7 +110,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'type' => 'setType' + 'version' => 'setVersion' ]; /** @@ -119,7 +119,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'type' => 'getType' + 'version' => 'getVersion' ]; /** @@ -179,7 +179,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['type'] = $data['type'] ?? null; + $this->container['version'] = $data['version'] ?? null; } /** @@ -191,9 +191,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } return $invalidProperties; } @@ -210,25 +207,25 @@ public function valid() /** - * Gets type + * Gets version * - * @return string + * @return string|null */ - public function getType() + public function getVersion() { - return $this->container['type']; + return $this->container['version']; } /** - * Sets type + * Sets version * - * @param string $type type + * @param string|null $version The version of Ory Hydra. * * @return self */ - public function setType($type) + public function setVersion($version) { - $this->container['type'] = $type; + $this->container['version'] = $version; return $this; } diff --git a/clients/hydra/php/lib/Model/FlushInactiveOAuth2TokensRequest.php b/clients/hydra/php/lib/Model/InlineResponse503.php similarity index 84% rename from clients/hydra/php/lib/Model/FlushInactiveOAuth2TokensRequest.php rename to clients/hydra/php/lib/Model/InlineResponse503.php index 5f00daaeeff..000723b4ffb 100644 --- a/clients/hydra/php/lib/Model/FlushInactiveOAuth2TokensRequest.php +++ b/clients/hydra/php/lib/Model/InlineResponse503.php @@ -1,6 +1,6 @@ '\DateTime' + 'errors' => 'array' ]; /** @@ -70,7 +71,7 @@ class FlushInactiveOAuth2TokensRequest implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $openAPIFormats = [ - 'notAfter' => 'date-time' + 'errors' => null ]; /** @@ -100,7 +101,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'notAfter' => 'notAfter' + 'errors' => 'errors' ]; /** @@ -109,7 +110,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'notAfter' => 'setNotAfter' + 'errors' => 'setErrors' ]; /** @@ -118,7 +119,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'notAfter' => 'getNotAfter' + 'errors' => 'getErrors' ]; /** @@ -178,7 +179,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['notAfter'] = $data['notAfter'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -206,25 +207,25 @@ public function valid() /** - * Gets notAfter + * Gets errors * - * @return \DateTime|null + * @return array|null */ - public function getNotAfter() + public function getErrors() { - return $this->container['notAfter']; + return $this->container['errors']; } /** - * Sets notAfter + * Sets errors * - * @param \DateTime|null $notAfter NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. + * @param array|null $errors Errors contains a list of errors that caused the not ready status. * * @return self */ - public function setNotAfter($notAfter) + public function setErrors($errors) { - $this->container['notAfter'] = $notAfter; + $this->container['errors'] = $errors; return $this; } diff --git a/clients/hydra/php/lib/Model/OAuth2TokenIntrospection.php b/clients/hydra/php/lib/Model/IntrospectedOAuth2Token.php similarity index 95% rename from clients/hydra/php/lib/Model/OAuth2TokenIntrospection.php rename to clients/hydra/php/lib/Model/IntrospectedOAuth2Token.php index 3e32557fc2f..44ac85c4436 100644 --- a/clients/hydra/php/lib/Model/OAuth2TokenIntrospection.php +++ b/clients/hydra/php/lib/Model/IntrospectedOAuth2Token.php @@ -1,6 +1,6 @@ 'string[]', 'clientId' => 'string', 'exp' => 'int', - 'ext' => 'object', + 'ext' => 'array', 'iat' => 'int', 'iss' => 'string', 'nbf' => 'int', @@ -386,7 +387,7 @@ public function setExp($exp) /** * Gets ext * - * @return object|null + * @return array|null */ public function getExt() { @@ -396,7 +397,7 @@ public function getExt() /** * Sets ext * - * @param object|null $ext Extra is arbitrary data set by the session. + * @param array|null $ext Extra is arbitrary data set by the session. * * @return self */ diff --git a/clients/hydra/php/lib/Model/PatchDocument.php b/clients/hydra/php/lib/Model/JsonPatch.php similarity index 88% rename from clients/hydra/php/lib/Model/PatchDocument.php rename to clients/hydra/php/lib/Model/JsonPatch.php index 89a0fca029f..4ef99705569 100644 --- a/clients/hydra/php/lib/Model/PatchDocument.php +++ b/clients/hydra/php/lib/Model/JsonPatch.php @@ -1,6 +1,6 @@ 'string', 'op' => 'string', 'path' => 'string', - 'value' => 'object' + 'value' => 'mixed' ]; /** @@ -243,7 +244,7 @@ public function getFrom() /** * Sets from * - * @param string|null $from A JSON-pointer + * @param string|null $from 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 self */ @@ -267,7 +268,7 @@ public function getOp() /** * Sets op * - * @param string $op The operation to be performed + * @param string $op The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". * * @return self */ @@ -291,7 +292,7 @@ public function getPath() /** * Sets path * - * @param string $path A JSON-pointer + * @param string $path 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 self */ @@ -305,7 +306,7 @@ public function setPath($path) /** * Gets value * - * @return object|null + * @return mixed|null */ public function getValue() { @@ -315,7 +316,7 @@ public function getValue() /** * Sets value * - * @param object|null $value The value to be used within the operations + * @param mixed|null $value The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). * * @return self */ diff --git a/clients/hydra/php/lib/Model/JSONWebKey.php b/clients/hydra/php/lib/Model/JsonWebKey.php similarity index 97% rename from clients/hydra/php/lib/Model/JSONWebKey.php rename to clients/hydra/php/lib/Model/JsonWebKey.php index ced753c49c0..b5ede70ad4f 100644 --- a/clients/hydra/php/lib/Model/JSONWebKey.php +++ b/clients/hydra/php/lib/Model/JsonWebKey.php @@ -1,6 +1,6 @@ '\Ory\Hydra\Client\Model\JSONWebKey[]' + 'keys' => '\Ory\Hydra\Client\Model\JsonWebKey[]' ]; /** @@ -209,7 +210,7 @@ public function valid() /** * Gets keys * - * @return \Ory\Hydra\Client\Model\JSONWebKey[]|null + * @return \Ory\Hydra\Client\Model\JsonWebKey[]|null */ public function getKeys() { @@ -219,7 +220,7 @@ public function getKeys() /** * Sets keys * - * @param \Ory\Hydra\Client\Model\JSONWebKey[]|null $keys The value of the \"keys\" parameter is an array of 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. + * @param \Ory\Hydra\Client\Model\JsonWebKey[]|null $keys 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 self */ diff --git a/clients/hydra/php/lib/Model/ModelInterface.php b/clients/hydra/php/lib/Model/ModelInterface.php index 0617f8a5283..17205578c1c 100644 --- a/clients/hydra/php/lib/Model/ModelInterface.php +++ b/clients/hydra/php/lib/Model/ModelInterface.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/lib/Model/OAuth2Client.php b/clients/hydra/php/lib/Model/OAuth2Client.php index 1d1e4fd2a4d..86f5f1e7fbe 100644 --- a/clients/hydra/php/lib/Model/OAuth2Client.php +++ b/clients/hydra/php/lib/Model/OAuth2Client.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ @@ -35,6 +36,7 @@ * OAuth2Client Class Doc Comment * * @category Class + * @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. * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -61,8 +63,12 @@ class OAuth2Client implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'allowedCorsOrigins' => 'string[]', 'audience' => 'string[]', + 'authorizationCodeGrantAccessTokenLifespan' => 'string', + 'authorizationCodeGrantIdTokenLifespan' => 'string', + 'authorizationCodeGrantRefreshTokenLifespan' => 'string', 'backchannelLogoutSessionRequired' => 'bool', 'backchannelLogoutUri' => 'string', + 'clientCredentialsGrantAccessTokenLifespan' => 'string', 'clientId' => 'string', 'clientName' => 'string', 'clientSecret' => 'string', @@ -73,14 +79,20 @@ class OAuth2Client implements ModelInterface, ArrayAccess, \JsonSerializable 'frontchannelLogoutSessionRequired' => 'bool', 'frontchannelLogoutUri' => 'string', 'grantTypes' => 'string[]', - 'jwks' => 'object', + 'implicitGrantAccessTokenLifespan' => 'string', + 'implicitGrantIdTokenLifespan' => 'string', + 'jwks' => 'mixed', 'jwksUri' => 'string', + 'jwtBearerGrantAccessTokenLifespan' => 'string', 'logoUri' => 'string', - 'metadata' => 'object', + 'metadata' => 'mixed', 'owner' => 'string', 'policyUri' => 'string', 'postLogoutRedirectUris' => 'string[]', 'redirectUris' => 'string[]', + 'refreshTokenGrantAccessTokenLifespan' => 'string', + 'refreshTokenGrantIdTokenLifespan' => 'string', + 'refreshTokenGrantRefreshTokenLifespan' => 'string', 'registrationAccessToken' => 'string', 'registrationClientUri' => 'string', 'requestObjectSigningAlg' => 'string', @@ -106,8 +118,12 @@ class OAuth2Client implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPIFormats = [ 'allowedCorsOrigins' => null, 'audience' => null, + 'authorizationCodeGrantAccessTokenLifespan' => null, + 'authorizationCodeGrantIdTokenLifespan' => null, + 'authorizationCodeGrantRefreshTokenLifespan' => null, 'backchannelLogoutSessionRequired' => null, 'backchannelLogoutUri' => null, + 'clientCredentialsGrantAccessTokenLifespan' => null, 'clientId' => null, 'clientName' => null, 'clientSecret' => null, @@ -118,14 +134,20 @@ class OAuth2Client implements ModelInterface, ArrayAccess, \JsonSerializable 'frontchannelLogoutSessionRequired' => null, 'frontchannelLogoutUri' => null, 'grantTypes' => null, + 'implicitGrantAccessTokenLifespan' => null, + 'implicitGrantIdTokenLifespan' => null, 'jwks' => null, 'jwksUri' => null, + 'jwtBearerGrantAccessTokenLifespan' => null, 'logoUri' => null, 'metadata' => null, 'owner' => null, 'policyUri' => null, 'postLogoutRedirectUris' => null, 'redirectUris' => null, + 'refreshTokenGrantAccessTokenLifespan' => null, + 'refreshTokenGrantIdTokenLifespan' => null, + 'refreshTokenGrantRefreshTokenLifespan' => null, 'registrationAccessToken' => null, 'registrationClientUri' => null, 'requestObjectSigningAlg' => null, @@ -170,8 +192,12 @@ public static function openAPIFormats() protected static $attributeMap = [ 'allowedCorsOrigins' => 'allowed_cors_origins', 'audience' => 'audience', + 'authorizationCodeGrantAccessTokenLifespan' => 'authorization_code_grant_access_token_lifespan', + 'authorizationCodeGrantIdTokenLifespan' => 'authorization_code_grant_id_token_lifespan', + 'authorizationCodeGrantRefreshTokenLifespan' => 'authorization_code_grant_refresh_token_lifespan', 'backchannelLogoutSessionRequired' => 'backchannel_logout_session_required', 'backchannelLogoutUri' => 'backchannel_logout_uri', + 'clientCredentialsGrantAccessTokenLifespan' => 'client_credentials_grant_access_token_lifespan', 'clientId' => 'client_id', 'clientName' => 'client_name', 'clientSecret' => 'client_secret', @@ -182,14 +208,20 @@ public static function openAPIFormats() 'frontchannelLogoutSessionRequired' => 'frontchannel_logout_session_required', 'frontchannelLogoutUri' => 'frontchannel_logout_uri', 'grantTypes' => 'grant_types', + 'implicitGrantAccessTokenLifespan' => 'implicit_grant_access_token_lifespan', + 'implicitGrantIdTokenLifespan' => 'implicit_grant_id_token_lifespan', 'jwks' => 'jwks', 'jwksUri' => 'jwks_uri', + 'jwtBearerGrantAccessTokenLifespan' => 'jwt_bearer_grant_access_token_lifespan', 'logoUri' => 'logo_uri', 'metadata' => 'metadata', 'owner' => 'owner', 'policyUri' => 'policy_uri', 'postLogoutRedirectUris' => 'post_logout_redirect_uris', 'redirectUris' => 'redirect_uris', + 'refreshTokenGrantAccessTokenLifespan' => 'refresh_token_grant_access_token_lifespan', + 'refreshTokenGrantIdTokenLifespan' => 'refresh_token_grant_id_token_lifespan', + 'refreshTokenGrantRefreshTokenLifespan' => 'refresh_token_grant_refresh_token_lifespan', 'registrationAccessToken' => 'registration_access_token', 'registrationClientUri' => 'registration_client_uri', 'requestObjectSigningAlg' => 'request_object_signing_alg', @@ -213,8 +245,12 @@ public static function openAPIFormats() protected static $setters = [ 'allowedCorsOrigins' => 'setAllowedCorsOrigins', 'audience' => 'setAudience', + 'authorizationCodeGrantAccessTokenLifespan' => 'setAuthorizationCodeGrantAccessTokenLifespan', + 'authorizationCodeGrantIdTokenLifespan' => 'setAuthorizationCodeGrantIdTokenLifespan', + 'authorizationCodeGrantRefreshTokenLifespan' => 'setAuthorizationCodeGrantRefreshTokenLifespan', 'backchannelLogoutSessionRequired' => 'setBackchannelLogoutSessionRequired', 'backchannelLogoutUri' => 'setBackchannelLogoutUri', + 'clientCredentialsGrantAccessTokenLifespan' => 'setClientCredentialsGrantAccessTokenLifespan', 'clientId' => 'setClientId', 'clientName' => 'setClientName', 'clientSecret' => 'setClientSecret', @@ -225,14 +261,20 @@ public static function openAPIFormats() 'frontchannelLogoutSessionRequired' => 'setFrontchannelLogoutSessionRequired', 'frontchannelLogoutUri' => 'setFrontchannelLogoutUri', 'grantTypes' => 'setGrantTypes', + 'implicitGrantAccessTokenLifespan' => 'setImplicitGrantAccessTokenLifespan', + 'implicitGrantIdTokenLifespan' => 'setImplicitGrantIdTokenLifespan', 'jwks' => 'setJwks', 'jwksUri' => 'setJwksUri', + 'jwtBearerGrantAccessTokenLifespan' => 'setJwtBearerGrantAccessTokenLifespan', 'logoUri' => 'setLogoUri', 'metadata' => 'setMetadata', 'owner' => 'setOwner', 'policyUri' => 'setPolicyUri', 'postLogoutRedirectUris' => 'setPostLogoutRedirectUris', 'redirectUris' => 'setRedirectUris', + 'refreshTokenGrantAccessTokenLifespan' => 'setRefreshTokenGrantAccessTokenLifespan', + 'refreshTokenGrantIdTokenLifespan' => 'setRefreshTokenGrantIdTokenLifespan', + 'refreshTokenGrantRefreshTokenLifespan' => 'setRefreshTokenGrantRefreshTokenLifespan', 'registrationAccessToken' => 'setRegistrationAccessToken', 'registrationClientUri' => 'setRegistrationClientUri', 'requestObjectSigningAlg' => 'setRequestObjectSigningAlg', @@ -256,8 +298,12 @@ public static function openAPIFormats() protected static $getters = [ 'allowedCorsOrigins' => 'getAllowedCorsOrigins', 'audience' => 'getAudience', + 'authorizationCodeGrantAccessTokenLifespan' => 'getAuthorizationCodeGrantAccessTokenLifespan', + 'authorizationCodeGrantIdTokenLifespan' => 'getAuthorizationCodeGrantIdTokenLifespan', + 'authorizationCodeGrantRefreshTokenLifespan' => 'getAuthorizationCodeGrantRefreshTokenLifespan', 'backchannelLogoutSessionRequired' => 'getBackchannelLogoutSessionRequired', 'backchannelLogoutUri' => 'getBackchannelLogoutUri', + 'clientCredentialsGrantAccessTokenLifespan' => 'getClientCredentialsGrantAccessTokenLifespan', 'clientId' => 'getClientId', 'clientName' => 'getClientName', 'clientSecret' => 'getClientSecret', @@ -268,14 +314,20 @@ public static function openAPIFormats() 'frontchannelLogoutSessionRequired' => 'getFrontchannelLogoutSessionRequired', 'frontchannelLogoutUri' => 'getFrontchannelLogoutUri', 'grantTypes' => 'getGrantTypes', + 'implicitGrantAccessTokenLifespan' => 'getImplicitGrantAccessTokenLifespan', + 'implicitGrantIdTokenLifespan' => 'getImplicitGrantIdTokenLifespan', 'jwks' => 'getJwks', 'jwksUri' => 'getJwksUri', + 'jwtBearerGrantAccessTokenLifespan' => 'getJwtBearerGrantAccessTokenLifespan', 'logoUri' => 'getLogoUri', 'metadata' => 'getMetadata', 'owner' => 'getOwner', 'policyUri' => 'getPolicyUri', 'postLogoutRedirectUris' => 'getPostLogoutRedirectUris', 'redirectUris' => 'getRedirectUris', + 'refreshTokenGrantAccessTokenLifespan' => 'getRefreshTokenGrantAccessTokenLifespan', + 'refreshTokenGrantIdTokenLifespan' => 'getRefreshTokenGrantIdTokenLifespan', + 'refreshTokenGrantRefreshTokenLifespan' => 'getRefreshTokenGrantRefreshTokenLifespan', 'registrationAccessToken' => 'getRegistrationAccessToken', 'registrationClientUri' => 'getRegistrationClientUri', 'requestObjectSigningAlg' => 'getRequestObjectSigningAlg', @@ -350,8 +402,12 @@ public function __construct(array $data = 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; @@ -362,14 +418,20 @@ public function __construct(array $data = 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; @@ -394,8 +456,44 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!is_null($this->container['scope']) && !preg_match("/([a-zA-Z0-9\\.\\*]+\\s?)+/", $this->container['scope'])) { - $invalidProperties[] = "invalid value for 'scope', must be conform to the pattern /([a-zA-Z0-9\\.\\*]+\\s?)+/."; + if (!is_null($this->container['authorizationCodeGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['authorizationCodeGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'authorizationCodeGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['authorizationCodeGrantIdTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['authorizationCodeGrantIdTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'authorizationCodeGrantIdTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['authorizationCodeGrantRefreshTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['authorizationCodeGrantRefreshTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'authorizationCodeGrantRefreshTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['clientCredentialsGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['clientCredentialsGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'clientCredentialsGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['implicitGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['implicitGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'implicitGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['implicitGrantIdTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['implicitGrantIdTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'implicitGrantIdTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['jwtBearerGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['jwtBearerGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'jwtBearerGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['refreshTokenGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['refreshTokenGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'refreshTokenGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['refreshTokenGrantIdTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['refreshTokenGrantIdTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'refreshTokenGrantIdTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['refreshTokenGrantRefreshTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['refreshTokenGrantRefreshTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'refreshTokenGrantRefreshTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; } return $invalidProperties; @@ -461,6 +559,93 @@ public function setAudience($audience) return $this; } + /** + * Gets authorizationCodeGrantAccessTokenLifespan + * + * @return string|null + */ + public function getAuthorizationCodeGrantAccessTokenLifespan() + { + return $this->container['authorizationCodeGrantAccessTokenLifespan']; + } + + /** + * Sets authorizationCodeGrantAccessTokenLifespan + * + * @param string|null $authorizationCodeGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setAuthorizationCodeGrantAccessTokenLifespan($authorizationCodeGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['authorizationCodeGrantAccessTokenLifespan'] = $authorizationCodeGrantAccessTokenLifespan; + + return $this; + } + + /** + * Gets authorizationCodeGrantIdTokenLifespan + * + * @return string|null + */ + public function getAuthorizationCodeGrantIdTokenLifespan() + { + return $this->container['authorizationCodeGrantIdTokenLifespan']; + } + + /** + * Sets authorizationCodeGrantIdTokenLifespan + * + * @param string|null $authorizationCodeGrantIdTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setAuthorizationCodeGrantIdTokenLifespan($authorizationCodeGrantIdTokenLifespan) + { + + 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))*$/."); + } + + $this->container['authorizationCodeGrantIdTokenLifespan'] = $authorizationCodeGrantIdTokenLifespan; + + return $this; + } + + /** + * Gets authorizationCodeGrantRefreshTokenLifespan + * + * @return string|null + */ + public function getAuthorizationCodeGrantRefreshTokenLifespan() + { + return $this->container['authorizationCodeGrantRefreshTokenLifespan']; + } + + /** + * Sets authorizationCodeGrantRefreshTokenLifespan + * + * @param string|null $authorizationCodeGrantRefreshTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setAuthorizationCodeGrantRefreshTokenLifespan($authorizationCodeGrantRefreshTokenLifespan) + { + + 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))*$/."); + } + + $this->container['authorizationCodeGrantRefreshTokenLifespan'] = $authorizationCodeGrantRefreshTokenLifespan; + + return $this; + } + /** * Gets backchannelLogoutSessionRequired * @@ -474,7 +659,7 @@ public function getBackchannelLogoutSessionRequired() /** * Sets backchannelLogoutSessionRequired * - * @param bool|null $backchannelLogoutSessionRequired 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. + * @param bool|null $backchannelLogoutSessionRequired 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 self */ @@ -498,7 +683,7 @@ public function getBackchannelLogoutUri() /** * Sets backchannelLogoutUri * - * @param string|null $backchannelLogoutUri RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + * @param string|null $backchannelLogoutUri 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 self */ @@ -509,6 +694,35 @@ public function setBackchannelLogoutUri($backchannelLogoutUri) return $this; } + /** + * Gets clientCredentialsGrantAccessTokenLifespan + * + * @return string|null + */ + public function getClientCredentialsGrantAccessTokenLifespan() + { + return $this->container['clientCredentialsGrantAccessTokenLifespan']; + } + + /** + * Sets clientCredentialsGrantAccessTokenLifespan + * + * @param string|null $clientCredentialsGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setClientCredentialsGrantAccessTokenLifespan($clientCredentialsGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['clientCredentialsGrantAccessTokenLifespan'] = $clientCredentialsGrantAccessTokenLifespan; + + return $this; + } + /** * Gets clientId * @@ -522,7 +736,7 @@ public function getClientId() /** * Sets clientId * - * @param string|null $clientId ID is the id for this client. + * @param string|null $clientId OAuth 2.0 Client ID The ID is autogenerated and immutable. * * @return self */ @@ -546,7 +760,7 @@ public function getClientName() /** * Sets clientName * - * @param string|null $clientName Name is the human-readable string name of the client to be presented to the end-user during authorization. + * @param string|null $clientName OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. * * @return self */ @@ -570,7 +784,7 @@ public function getClientSecret() /** * Sets clientSecret * - * @param string|null $clientSecret Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. + * @param string|null $clientSecret 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 self */ @@ -594,7 +808,7 @@ public function getClientSecretExpiresAt() /** * Sets clientSecretExpiresAt * - * @param int|null $clientSecretExpiresAt SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. + * @param int|null $clientSecretExpiresAt OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. * * @return self */ @@ -618,7 +832,7 @@ public function getClientUri() /** * Sets clientUri * - * @param string|null $clientUri ClientURI is an 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. + * @param string|null $clientUri 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 self */ @@ -666,7 +880,7 @@ public function getCreatedAt() /** * Sets createdAt * - * @param \DateTime|null $createdAt CreatedAt returns the timestamp of the client's creation. + * @param \DateTime|null $createdAt OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. * * @return self */ @@ -690,7 +904,7 @@ public function getFrontchannelLogoutSessionRequired() /** * Sets frontchannelLogoutSessionRequired * - * @param bool|null $frontchannelLogoutSessionRequired 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. + * @param bool|null $frontchannelLogoutSessionRequired 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 self */ @@ -714,7 +928,7 @@ public function getFrontchannelLogoutUri() /** * Sets frontchannelLogoutUri * - * @param string|null $frontchannelLogoutUri 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. + * @param string|null $frontchannelLogoutUri 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 self */ @@ -749,10 +963,68 @@ public function setGrantTypes($grantTypes) return $this; } + /** + * Gets implicitGrantAccessTokenLifespan + * + * @return string|null + */ + public function getImplicitGrantAccessTokenLifespan() + { + return $this->container['implicitGrantAccessTokenLifespan']; + } + + /** + * Sets implicitGrantAccessTokenLifespan + * + * @param string|null $implicitGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setImplicitGrantAccessTokenLifespan($implicitGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['implicitGrantAccessTokenLifespan'] = $implicitGrantAccessTokenLifespan; + + return $this; + } + + /** + * Gets implicitGrantIdTokenLifespan + * + * @return string|null + */ + public function getImplicitGrantIdTokenLifespan() + { + return $this->container['implicitGrantIdTokenLifespan']; + } + + /** + * Sets implicitGrantIdTokenLifespan + * + * @param string|null $implicitGrantIdTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setImplicitGrantIdTokenLifespan($implicitGrantIdTokenLifespan) + { + + 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))*$/."); + } + + $this->container['implicitGrantIdTokenLifespan'] = $implicitGrantIdTokenLifespan; + + return $this; + } + /** * Gets jwks * - * @return object|null + * @return mixed|null */ public function getJwks() { @@ -762,7 +1034,7 @@ public function getJwks() /** * Sets jwks * - * @param object|null $jwks jwks + * @param mixed|null $jwks 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 self */ @@ -786,7 +1058,7 @@ public function getJwksUri() /** * Sets jwksUri * - * @param string|null $jwksUri 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. + * @param string|null $jwksUri 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 self */ @@ -797,6 +1069,35 @@ public function setJwksUri($jwksUri) return $this; } + /** + * Gets jwtBearerGrantAccessTokenLifespan + * + * @return string|null + */ + public function getJwtBearerGrantAccessTokenLifespan() + { + return $this->container['jwtBearerGrantAccessTokenLifespan']; + } + + /** + * Sets jwtBearerGrantAccessTokenLifespan + * + * @param string|null $jwtBearerGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setJwtBearerGrantAccessTokenLifespan($jwtBearerGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['jwtBearerGrantAccessTokenLifespan'] = $jwtBearerGrantAccessTokenLifespan; + + return $this; + } + /** * Gets logoUri * @@ -810,7 +1111,7 @@ public function getLogoUri() /** * Sets logoUri * - * @param string|null $logoUri LogoURI is an URL string that references a logo for the client. + * @param string|null $logoUri OAuth 2.0 Client Logo URI A URL string referencing the client's logo. * * @return self */ @@ -824,7 +1125,7 @@ public function setLogoUri($logoUri) /** * Gets metadata * - * @return object|null + * @return mixed|null */ public function getMetadata() { @@ -834,7 +1135,7 @@ public function getMetadata() /** * Sets metadata * - * @param object|null $metadata metadata + * @param mixed|null $metadata metadata * * @return self */ @@ -858,7 +1159,7 @@ public function getOwner() /** * Sets owner * - * @param string|null $owner Owner is a string identifying the owner of the OAuth 2.0 Client. + * @param string|null $owner OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. * * @return self */ @@ -882,7 +1183,7 @@ public function getPolicyUri() /** * Sets policyUri * - * @param string|null $policyUri 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. + * @param string|null $policyUri 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 self */ @@ -941,6 +1242,93 @@ public function setRedirectUris($redirectUris) return $this; } + /** + * Gets refreshTokenGrantAccessTokenLifespan + * + * @return string|null + */ + public function getRefreshTokenGrantAccessTokenLifespan() + { + return $this->container['refreshTokenGrantAccessTokenLifespan']; + } + + /** + * Sets refreshTokenGrantAccessTokenLifespan + * + * @param string|null $refreshTokenGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setRefreshTokenGrantAccessTokenLifespan($refreshTokenGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['refreshTokenGrantAccessTokenLifespan'] = $refreshTokenGrantAccessTokenLifespan; + + return $this; + } + + /** + * Gets refreshTokenGrantIdTokenLifespan + * + * @return string|null + */ + public function getRefreshTokenGrantIdTokenLifespan() + { + return $this->container['refreshTokenGrantIdTokenLifespan']; + } + + /** + * Sets refreshTokenGrantIdTokenLifespan + * + * @param string|null $refreshTokenGrantIdTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setRefreshTokenGrantIdTokenLifespan($refreshTokenGrantIdTokenLifespan) + { + + 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))*$/."); + } + + $this->container['refreshTokenGrantIdTokenLifespan'] = $refreshTokenGrantIdTokenLifespan; + + return $this; + } + + /** + * Gets refreshTokenGrantRefreshTokenLifespan + * + * @return string|null + */ + public function getRefreshTokenGrantRefreshTokenLifespan() + { + return $this->container['refreshTokenGrantRefreshTokenLifespan']; + } + + /** + * Sets refreshTokenGrantRefreshTokenLifespan + * + * @param string|null $refreshTokenGrantRefreshTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setRefreshTokenGrantRefreshTokenLifespan($refreshTokenGrantRefreshTokenLifespan) + { + + 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))*$/."); + } + + $this->container['refreshTokenGrantRefreshTokenLifespan'] = $refreshTokenGrantRefreshTokenLifespan; + + return $this; + } + /** * Gets registrationAccessToken * @@ -954,7 +1342,7 @@ public function getRegistrationAccessToken() /** * Sets registrationAccessToken * - * @param string|null $registrationAccessToken RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. + * @param string|null $registrationAccessToken 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 self */ @@ -978,7 +1366,7 @@ public function getRegistrationClientUri() /** * Sets registrationClientUri * - * @param string|null $registrationClientUri RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + * @param string|null $registrationClientUri OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. * * @return self */ @@ -1002,7 +1390,7 @@ public function getRequestObjectSigningAlg() /** * Sets requestObjectSigningAlg * - * @param string|null $requestObjectSigningAlg 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. + * @param string|null $requestObjectSigningAlg 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 self */ @@ -1074,17 +1462,12 @@ public function getScope() /** * Sets scope * - * @param string|null $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. + * @param string|null $scope 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 self */ public function setScope($scope) { - - if (!is_null($scope) && (!preg_match("/([a-zA-Z0-9\\.\\*]+\\s?)+/", $scope))) { - throw new \InvalidArgumentException("invalid value for $scope when calling OAuth2Client., must conform to the pattern /([a-zA-Z0-9\\.\\*]+\\s?)+/."); - } - $this->container['scope'] = $scope; return $this; @@ -1103,7 +1486,7 @@ public function getSectorIdentifierUri() /** * Sets sectorIdentifierUri * - * @param string|null $sectorIdentifierUri 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. + * @param string|null $sectorIdentifierUri 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 self */ @@ -1127,7 +1510,7 @@ public function getSubjectType() /** * Sets subjectType * - * @param string|null $subjectType SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + * @param string|null $subjectType 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 self */ @@ -1151,7 +1534,7 @@ public function getTokenEndpointAuthMethod() /** * Sets tokenEndpointAuthMethod * - * @param string|null $tokenEndpointAuthMethod Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. + * @param string|null $tokenEndpointAuthMethod OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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 self */ @@ -1175,7 +1558,7 @@ public function getTokenEndpointAuthSigningAlg() /** * Sets tokenEndpointAuthSigningAlg * - * @param string|null $tokenEndpointAuthSigningAlg Requested Client Authentication signing algorithm for the Token Endpoint. + * @param string|null $tokenEndpointAuthSigningAlg OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. * * @return self */ @@ -1199,7 +1582,7 @@ public function getTosUri() /** * Sets tosUri * - * @param string|null $tosUri TermsOfServiceURI is a URL string that points 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. + * @param string|null $tosUri 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 self */ @@ -1223,7 +1606,7 @@ public function getUpdatedAt() /** * Sets updatedAt * - * @param \DateTime|null $updatedAt UpdatedAt returns the timestamp of the last update. + * @param \DateTime|null $updatedAt OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. * * @return self */ @@ -1247,7 +1630,7 @@ public function getUserinfoSignedResponseAlg() /** * Sets userinfoSignedResponseAlg * - * @param string|null $userinfoSignedResponseAlg 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. + * @param string|null $userinfoSignedResponseAlg 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 self */ diff --git a/clients/hydra/php/lib/Model/OAuth2ClientTokenLifespans.php b/clients/hydra/php/lib/Model/OAuth2ClientTokenLifespans.php new file mode 100644 index 00000000000..30de98e52a5 --- /dev/null +++ b/clients/hydra/php/lib/Model/OAuth2ClientTokenLifespans.php @@ -0,0 +1,682 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class OAuth2ClientTokenLifespans implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'oAuth2ClientTokenLifespans'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'authorizationCodeGrantAccessTokenLifespan' => 'string', + 'authorizationCodeGrantIdTokenLifespan' => 'string', + 'authorizationCodeGrantRefreshTokenLifespan' => 'string', + 'clientCredentialsGrantAccessTokenLifespan' => 'string', + 'implicitGrantAccessTokenLifespan' => 'string', + 'implicitGrantIdTokenLifespan' => 'string', + 'jwtBearerGrantAccessTokenLifespan' => 'string', + 'refreshTokenGrantAccessTokenLifespan' => 'string', + 'refreshTokenGrantIdTokenLifespan' => 'string', + 'refreshTokenGrantRefreshTokenLifespan' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'authorizationCodeGrantAccessTokenLifespan' => null, + 'authorizationCodeGrantIdTokenLifespan' => null, + 'authorizationCodeGrantRefreshTokenLifespan' => null, + 'clientCredentialsGrantAccessTokenLifespan' => null, + 'implicitGrantAccessTokenLifespan' => null, + 'implicitGrantIdTokenLifespan' => null, + 'jwtBearerGrantAccessTokenLifespan' => null, + 'refreshTokenGrantAccessTokenLifespan' => null, + 'refreshTokenGrantIdTokenLifespan' => null, + 'refreshTokenGrantRefreshTokenLifespan' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'authorizationCodeGrantAccessTokenLifespan' => 'authorization_code_grant_access_token_lifespan', + 'authorizationCodeGrantIdTokenLifespan' => 'authorization_code_grant_id_token_lifespan', + 'authorizationCodeGrantRefreshTokenLifespan' => 'authorization_code_grant_refresh_token_lifespan', + 'clientCredentialsGrantAccessTokenLifespan' => 'client_credentials_grant_access_token_lifespan', + 'implicitGrantAccessTokenLifespan' => 'implicit_grant_access_token_lifespan', + 'implicitGrantIdTokenLifespan' => 'implicit_grant_id_token_lifespan', + 'jwtBearerGrantAccessTokenLifespan' => 'jwt_bearer_grant_access_token_lifespan', + 'refreshTokenGrantAccessTokenLifespan' => 'refresh_token_grant_access_token_lifespan', + 'refreshTokenGrantIdTokenLifespan' => 'refresh_token_grant_id_token_lifespan', + 'refreshTokenGrantRefreshTokenLifespan' => 'refresh_token_grant_refresh_token_lifespan' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'authorizationCodeGrantAccessTokenLifespan' => 'setAuthorizationCodeGrantAccessTokenLifespan', + 'authorizationCodeGrantIdTokenLifespan' => 'setAuthorizationCodeGrantIdTokenLifespan', + 'authorizationCodeGrantRefreshTokenLifespan' => 'setAuthorizationCodeGrantRefreshTokenLifespan', + 'clientCredentialsGrantAccessTokenLifespan' => 'setClientCredentialsGrantAccessTokenLifespan', + 'implicitGrantAccessTokenLifespan' => 'setImplicitGrantAccessTokenLifespan', + 'implicitGrantIdTokenLifespan' => 'setImplicitGrantIdTokenLifespan', + 'jwtBearerGrantAccessTokenLifespan' => 'setJwtBearerGrantAccessTokenLifespan', + 'refreshTokenGrantAccessTokenLifespan' => 'setRefreshTokenGrantAccessTokenLifespan', + 'refreshTokenGrantIdTokenLifespan' => 'setRefreshTokenGrantIdTokenLifespan', + 'refreshTokenGrantRefreshTokenLifespan' => 'setRefreshTokenGrantRefreshTokenLifespan' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'authorizationCodeGrantAccessTokenLifespan' => 'getAuthorizationCodeGrantAccessTokenLifespan', + 'authorizationCodeGrantIdTokenLifespan' => 'getAuthorizationCodeGrantIdTokenLifespan', + 'authorizationCodeGrantRefreshTokenLifespan' => 'getAuthorizationCodeGrantRefreshTokenLifespan', + 'clientCredentialsGrantAccessTokenLifespan' => 'getClientCredentialsGrantAccessTokenLifespan', + 'implicitGrantAccessTokenLifespan' => 'getImplicitGrantAccessTokenLifespan', + 'implicitGrantIdTokenLifespan' => 'getImplicitGrantIdTokenLifespan', + 'jwtBearerGrantAccessTokenLifespan' => 'getJwtBearerGrantAccessTokenLifespan', + 'refreshTokenGrantAccessTokenLifespan' => 'getRefreshTokenGrantAccessTokenLifespan', + 'refreshTokenGrantIdTokenLifespan' => 'getRefreshTokenGrantIdTokenLifespan', + 'refreshTokenGrantRefreshTokenLifespan' => 'getRefreshTokenGrantRefreshTokenLifespan' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + 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; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (!is_null($this->container['authorizationCodeGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['authorizationCodeGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'authorizationCodeGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['authorizationCodeGrantIdTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['authorizationCodeGrantIdTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'authorizationCodeGrantIdTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['authorizationCodeGrantRefreshTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['authorizationCodeGrantRefreshTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'authorizationCodeGrantRefreshTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['clientCredentialsGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['clientCredentialsGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'clientCredentialsGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['implicitGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['implicitGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'implicitGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['implicitGrantIdTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['implicitGrantIdTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'implicitGrantIdTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['jwtBearerGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['jwtBearerGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'jwtBearerGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['refreshTokenGrantAccessTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['refreshTokenGrantAccessTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'refreshTokenGrantAccessTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['refreshTokenGrantIdTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['refreshTokenGrantIdTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'refreshTokenGrantIdTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + if (!is_null($this->container['refreshTokenGrantRefreshTokenLifespan']) && !preg_match("/^([0-9]+(ns|us|ms|s|m|h))*$/", $this->container['refreshTokenGrantRefreshTokenLifespan'])) { + $invalidProperties[] = "invalid value for 'refreshTokenGrantRefreshTokenLifespan', must be conform to the pattern /^([0-9]+(ns|us|ms|s|m|h))*$/."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets authorizationCodeGrantAccessTokenLifespan + * + * @return string|null + */ + public function getAuthorizationCodeGrantAccessTokenLifespan() + { + return $this->container['authorizationCodeGrantAccessTokenLifespan']; + } + + /** + * Sets authorizationCodeGrantAccessTokenLifespan + * + * @param string|null $authorizationCodeGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setAuthorizationCodeGrantAccessTokenLifespan($authorizationCodeGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['authorizationCodeGrantAccessTokenLifespan'] = $authorizationCodeGrantAccessTokenLifespan; + + return $this; + } + + /** + * Gets authorizationCodeGrantIdTokenLifespan + * + * @return string|null + */ + public function getAuthorizationCodeGrantIdTokenLifespan() + { + return $this->container['authorizationCodeGrantIdTokenLifespan']; + } + + /** + * Sets authorizationCodeGrantIdTokenLifespan + * + * @param string|null $authorizationCodeGrantIdTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setAuthorizationCodeGrantIdTokenLifespan($authorizationCodeGrantIdTokenLifespan) + { + + 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))*$/."); + } + + $this->container['authorizationCodeGrantIdTokenLifespan'] = $authorizationCodeGrantIdTokenLifespan; + + return $this; + } + + /** + * Gets authorizationCodeGrantRefreshTokenLifespan + * + * @return string|null + */ + public function getAuthorizationCodeGrantRefreshTokenLifespan() + { + return $this->container['authorizationCodeGrantRefreshTokenLifespan']; + } + + /** + * Sets authorizationCodeGrantRefreshTokenLifespan + * + * @param string|null $authorizationCodeGrantRefreshTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setAuthorizationCodeGrantRefreshTokenLifespan($authorizationCodeGrantRefreshTokenLifespan) + { + + 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))*$/."); + } + + $this->container['authorizationCodeGrantRefreshTokenLifespan'] = $authorizationCodeGrantRefreshTokenLifespan; + + return $this; + } + + /** + * Gets clientCredentialsGrantAccessTokenLifespan + * + * @return string|null + */ + public function getClientCredentialsGrantAccessTokenLifespan() + { + return $this->container['clientCredentialsGrantAccessTokenLifespan']; + } + + /** + * Sets clientCredentialsGrantAccessTokenLifespan + * + * @param string|null $clientCredentialsGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setClientCredentialsGrantAccessTokenLifespan($clientCredentialsGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['clientCredentialsGrantAccessTokenLifespan'] = $clientCredentialsGrantAccessTokenLifespan; + + return $this; + } + + /** + * Gets implicitGrantAccessTokenLifespan + * + * @return string|null + */ + public function getImplicitGrantAccessTokenLifespan() + { + return $this->container['implicitGrantAccessTokenLifespan']; + } + + /** + * Sets implicitGrantAccessTokenLifespan + * + * @param string|null $implicitGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setImplicitGrantAccessTokenLifespan($implicitGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['implicitGrantAccessTokenLifespan'] = $implicitGrantAccessTokenLifespan; + + return $this; + } + + /** + * Gets implicitGrantIdTokenLifespan + * + * @return string|null + */ + public function getImplicitGrantIdTokenLifespan() + { + return $this->container['implicitGrantIdTokenLifespan']; + } + + /** + * Sets implicitGrantIdTokenLifespan + * + * @param string|null $implicitGrantIdTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setImplicitGrantIdTokenLifespan($implicitGrantIdTokenLifespan) + { + + 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))*$/."); + } + + $this->container['implicitGrantIdTokenLifespan'] = $implicitGrantIdTokenLifespan; + + return $this; + } + + /** + * Gets jwtBearerGrantAccessTokenLifespan + * + * @return string|null + */ + public function getJwtBearerGrantAccessTokenLifespan() + { + return $this->container['jwtBearerGrantAccessTokenLifespan']; + } + + /** + * Sets jwtBearerGrantAccessTokenLifespan + * + * @param string|null $jwtBearerGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setJwtBearerGrantAccessTokenLifespan($jwtBearerGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['jwtBearerGrantAccessTokenLifespan'] = $jwtBearerGrantAccessTokenLifespan; + + return $this; + } + + /** + * Gets refreshTokenGrantAccessTokenLifespan + * + * @return string|null + */ + public function getRefreshTokenGrantAccessTokenLifespan() + { + return $this->container['refreshTokenGrantAccessTokenLifespan']; + } + + /** + * Sets refreshTokenGrantAccessTokenLifespan + * + * @param string|null $refreshTokenGrantAccessTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setRefreshTokenGrantAccessTokenLifespan($refreshTokenGrantAccessTokenLifespan) + { + + 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))*$/."); + } + + $this->container['refreshTokenGrantAccessTokenLifespan'] = $refreshTokenGrantAccessTokenLifespan; + + return $this; + } + + /** + * Gets refreshTokenGrantIdTokenLifespan + * + * @return string|null + */ + public function getRefreshTokenGrantIdTokenLifespan() + { + return $this->container['refreshTokenGrantIdTokenLifespan']; + } + + /** + * Sets refreshTokenGrantIdTokenLifespan + * + * @param string|null $refreshTokenGrantIdTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setRefreshTokenGrantIdTokenLifespan($refreshTokenGrantIdTokenLifespan) + { + + 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))*$/."); + } + + $this->container['refreshTokenGrantIdTokenLifespan'] = $refreshTokenGrantIdTokenLifespan; + + return $this; + } + + /** + * Gets refreshTokenGrantRefreshTokenLifespan + * + * @return string|null + */ + public function getRefreshTokenGrantRefreshTokenLifespan() + { + return $this->container['refreshTokenGrantRefreshTokenLifespan']; + } + + /** + * Sets refreshTokenGrantRefreshTokenLifespan + * + * @param string|null $refreshTokenGrantRefreshTokenLifespan Specify a time duration in milliseconds, seconds, minutes, hours. + * + * @return self + */ + public function setRefreshTokenGrantRefreshTokenLifespan($refreshTokenGrantRefreshTokenLifespan) + { + + 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))*$/."); + } + + $this->container['refreshTokenGrantRefreshTokenLifespan'] = $refreshTokenGrantRefreshTokenLifespan; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/clients/hydra/php/lib/Model/ConsentRequest.php b/clients/hydra/php/lib/Model/OAuth2ConsentRequest.php similarity index 95% rename from clients/hydra/php/lib/Model/ConsentRequest.php rename to clients/hydra/php/lib/Model/OAuth2ConsentRequest.php index aaaac29ef59..b636cb9602d 100644 --- a/clients/hydra/php/lib/Model/ConsentRequest.php +++ b/clients/hydra/php/lib/Model/OAuth2ConsentRequest.php @@ -1,6 +1,6 @@ 'string[]', 'challenge' => 'string', 'client' => '\Ory\Hydra\Client\Model\OAuth2Client', - 'context' => 'object', + 'context' => 'mixed', 'loginChallenge' => 'string', 'loginSessionId' => 'string', - 'oidcContext' => '\Ory\Hydra\Client\Model\OpenIDConnectContext', + 'oidcContext' => '\Ory\Hydra\Client\Model\OAuth2ConsentRequestOpenIDConnectContext', 'requestUrl' => 'string', 'requestedAccessTokenAudience' => 'string[]', 'requestedScope' => 'string[]', @@ -379,7 +380,7 @@ public function setClient($client) /** * Gets context * - * @return object|null + * @return mixed|null */ public function getContext() { @@ -389,7 +390,7 @@ public function getContext() /** * Sets context * - * @param object|null $context context + * @param mixed|null $context context * * @return self */ @@ -451,7 +452,7 @@ public function setLoginSessionId($loginSessionId) /** * Gets oidcContext * - * @return \Ory\Hydra\Client\Model\OpenIDConnectContext|null + * @return \Ory\Hydra\Client\Model\OAuth2ConsentRequestOpenIDConnectContext|null */ public function getOidcContext() { @@ -461,7 +462,7 @@ public function getOidcContext() /** * Sets oidcContext * - * @param \Ory\Hydra\Client\Model\OpenIDConnectContext|null $oidcContext oidcContext + * @param \Ory\Hydra\Client\Model\OAuth2ConsentRequestOpenIDConnectContext|null $oidcContext oidcContext * * @return self */ diff --git a/clients/hydra/php/lib/Model/OpenIDConnectContext.php b/clients/hydra/php/lib/Model/OAuth2ConsentRequestOpenIDConnectContext.php similarity index 93% rename from clients/hydra/php/lib/Model/OpenIDConnectContext.php rename to clients/hydra/php/lib/Model/OAuth2ConsentRequestOpenIDConnectContext.php index dd8db0db2d5..7fddeb2a2b4 100644 --- a/clients/hydra/php/lib/Model/OpenIDConnectContext.php +++ b/clients/hydra/php/lib/Model/OAuth2ConsentRequestOpenIDConnectContext.php @@ -1,6 +1,6 @@ 'string[]', 'display' => 'string', - 'idTokenHintClaims' => 'object', + 'idTokenHintClaims' => 'array', 'loginHint' => 'string', 'uiLocales' => 'string[]' ]; @@ -280,7 +281,7 @@ public function setDisplay($display) /** * Gets idTokenHintClaims * - * @return object|null + * @return array|null */ public function getIdTokenHintClaims() { @@ -290,7 +291,7 @@ public function getIdTokenHintClaims() /** * Sets idTokenHintClaims * - * @param object|null $idTokenHintClaims 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. + * @param array|null $idTokenHintClaims 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 self */ diff --git a/clients/hydra/php/lib/Model/PreviousConsentSession.php b/clients/hydra/php/lib/Model/OAuth2ConsentSession.php similarity index 83% rename from clients/hydra/php/lib/Model/PreviousConsentSession.php rename to clients/hydra/php/lib/Model/OAuth2ConsentSession.php index b80fb078ad6..d791ab0d27d 100644 --- a/clients/hydra/php/lib/Model/PreviousConsentSession.php +++ b/clients/hydra/php/lib/Model/OAuth2ConsentSession.php @@ -1,6 +1,6 @@ '\Ory\Hydra\Client\Model\ConsentRequest', + 'consentRequest' => '\Ory\Hydra\Client\Model\OAuth2ConsentRequest', + 'expiresAt' => '\Ory\Hydra\Client\Model\OAuth2ConsentSessionExpiresAt', 'grantAccessTokenAudience' => 'string[]', 'grantScope' => 'string[]', 'handledAt' => '\DateTime', 'remember' => 'bool', 'rememberFor' => 'int', - 'session' => '\Ory\Hydra\Client\Model\ConsentRequestSession' + 'session' => '\Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequestSession' ]; /** @@ -78,6 +80,7 @@ class PreviousConsentSession implements ModelInterface, ArrayAccess, \JsonSerial */ protected static $openAPIFormats = [ 'consentRequest' => null, + 'expiresAt' => null, 'grantAccessTokenAudience' => null, 'grantScope' => null, 'handledAt' => 'date-time', @@ -114,6 +117,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'consentRequest' => 'consent_request', + 'expiresAt' => 'expires_at', 'grantAccessTokenAudience' => 'grant_access_token_audience', 'grantScope' => 'grant_scope', 'handledAt' => 'handled_at', @@ -129,6 +133,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'consentRequest' => 'setConsentRequest', + 'expiresAt' => 'setExpiresAt', 'grantAccessTokenAudience' => 'setGrantAccessTokenAudience', 'grantScope' => 'setGrantScope', 'handledAt' => 'setHandledAt', @@ -144,6 +149,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'consentRequest' => 'getConsentRequest', + 'expiresAt' => 'getExpiresAt', 'grantAccessTokenAudience' => 'getGrantAccessTokenAudience', 'grantScope' => 'getGrantScope', 'handledAt' => 'getHandledAt', @@ -210,6 +216,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['consentRequest'] = $data['consentRequest'] ?? 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; @@ -245,7 +252,7 @@ public function valid() /** * Gets consentRequest * - * @return \Ory\Hydra\Client\Model\ConsentRequest|null + * @return \Ory\Hydra\Client\Model\OAuth2ConsentRequest|null */ public function getConsentRequest() { @@ -255,7 +262,7 @@ public function getConsentRequest() /** * Sets consentRequest * - * @param \Ory\Hydra\Client\Model\ConsentRequest|null $consentRequest consentRequest + * @param \Ory\Hydra\Client\Model\OAuth2ConsentRequest|null $consentRequest consentRequest * * @return self */ @@ -266,6 +273,30 @@ public function setConsentRequest($consentRequest) return $this; } + /** + * Gets expiresAt + * + * @return \Ory\Hydra\Client\Model\OAuth2ConsentSessionExpiresAt|null + */ + public function getExpiresAt() + { + return $this->container['expiresAt']; + } + + /** + * Sets expiresAt + * + * @param \Ory\Hydra\Client\Model\OAuth2ConsentSessionExpiresAt|null $expiresAt expiresAt + * + * @return self + */ + public function setExpiresAt($expiresAt) + { + $this->container['expiresAt'] = $expiresAt; + + return $this; + } + /** * Gets grantAccessTokenAudience * @@ -351,7 +382,7 @@ public function getRemember() /** * Sets remember * - * @param bool|null $remember 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. + * @param bool|null $remember 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 self */ @@ -375,7 +406,7 @@ public function getRememberFor() /** * Sets rememberFor * - * @param int|null $rememberFor RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + * @param int|null $rememberFor 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 self */ @@ -389,7 +420,7 @@ public function setRememberFor($rememberFor) /** * Gets session * - * @return \Ory\Hydra\Client\Model\ConsentRequestSession|null + * @return \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequestSession|null */ public function getSession() { @@ -399,7 +430,7 @@ public function getSession() /** * Sets session * - * @param \Ory\Hydra\Client\Model\ConsentRequestSession|null $session session + * @param \Ory\Hydra\Client\Model\AcceptOAuth2ConsentRequestSession|null $session session * * @return self */ diff --git a/clients/hydra/php/lib/Model/PluginDevice.php b/clients/hydra/php/lib/Model/OAuth2ConsentSessionExpiresAt.php similarity index 65% rename from clients/hydra/php/lib/Model/PluginDevice.php rename to clients/hydra/php/lib/Model/OAuth2ConsentSessionExpiresAt.php index 77c5a0e1338..8cc74fbe75b 100644 --- a/clients/hydra/php/lib/Model/PluginDevice.php +++ b/clients/hydra/php/lib/Model/OAuth2ConsentSessionExpiresAt.php @@ -1,6 +1,6 @@ 'string', - 'name' => 'string', - 'path' => 'string', - 'settable' => 'string[]' + 'accessToken' => '\DateTime', + 'authorizeCode' => '\DateTime', + 'idToken' => '\DateTime', + 'parContext' => '\DateTime', + 'refreshToken' => '\DateTime' ]; /** @@ -74,10 +75,11 @@ class PluginDevice implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'description' => null, - 'name' => null, - 'path' => null, - 'settable' => null + 'accessToken' => 'date-time', + 'authorizeCode' => 'date-time', + 'idToken' => 'date-time', + 'parContext' => 'date-time', + 'refreshToken' => 'date-time' ]; /** @@ -107,10 +109,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'description' => 'Description', - 'name' => 'Name', - 'path' => 'Path', - 'settable' => 'Settable' + 'accessToken' => 'access_token', + 'authorizeCode' => 'authorize_code', + 'idToken' => 'id_token', + 'parContext' => 'par_context', + 'refreshToken' => 'refresh_token' ]; /** @@ -119,10 +122,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'description' => 'setDescription', - 'name' => 'setName', - 'path' => 'setPath', - 'settable' => 'setSettable' + 'accessToken' => 'setAccessToken', + 'authorizeCode' => 'setAuthorizeCode', + 'idToken' => 'setIdToken', + 'parContext' => 'setParContext', + 'refreshToken' => 'setRefreshToken' ]; /** @@ -131,10 +135,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'description' => 'getDescription', - 'name' => 'getName', - 'path' => 'getPath', - 'settable' => 'getSettable' + 'accessToken' => 'getAccessToken', + 'authorizeCode' => 'getAuthorizeCode', + 'idToken' => 'getIdToken', + 'parContext' => 'getParContext', + 'refreshToken' => 'getRefreshToken' ]; /** @@ -194,10 +199,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['description'] = $data['description'] ?? null; - $this->container['name'] = $data['name'] ?? null; - $this->container['path'] = $data['path'] ?? null; - $this->container['settable'] = $data['settable'] ?? 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; } /** @@ -209,18 +215,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['description'] === null) { - $invalidProperties[] = "'description' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['path'] === null) { - $invalidProperties[] = "'path' can't be null"; - } - if ($this->container['settable'] === null) { - $invalidProperties[] = "'settable' can't be null"; - } return $invalidProperties; } @@ -237,97 +231,121 @@ public function valid() /** - * Gets description + * Gets accessToken * - * @return string + * @return \DateTime|null */ - public function getDescription() + public function getAccessToken() { - return $this->container['description']; + return $this->container['accessToken']; } /** - * Sets description + * Sets accessToken * - * @param string $description description + * @param \DateTime|null $accessToken accessToken * * @return self */ - public function setDescription($description) + public function setAccessToken($accessToken) { - $this->container['description'] = $description; + $this->container['accessToken'] = $accessToken; return $this; } /** - * Gets name + * Gets authorizeCode * - * @return string + * @return \DateTime|null */ - public function getName() + public function getAuthorizeCode() { - return $this->container['name']; + return $this->container['authorizeCode']; } /** - * Sets name + * Sets authorizeCode * - * @param string $name name + * @param \DateTime|null $authorizeCode authorizeCode * * @return self */ - public function setName($name) + public function setAuthorizeCode($authorizeCode) { - $this->container['name'] = $name; + $this->container['authorizeCode'] = $authorizeCode; return $this; } /** - * Gets path + * Gets idToken * - * @return string + * @return \DateTime|null + */ + public function getIdToken() + { + return $this->container['idToken']; + } + + /** + * Sets idToken + * + * @param \DateTime|null $idToken idToken + * + * @return self + */ + public function setIdToken($idToken) + { + $this->container['idToken'] = $idToken; + + return $this; + } + + /** + * Gets parContext + * + * @return \DateTime|null */ - public function getPath() + public function getParContext() { - return $this->container['path']; + return $this->container['parContext']; } /** - * Sets path + * Sets parContext * - * @param string $path path + * @param \DateTime|null $parContext parContext * * @return self */ - public function setPath($path) + public function setParContext($parContext) { - $this->container['path'] = $path; + $this->container['parContext'] = $parContext; return $this; } /** - * Gets settable + * Gets refreshToken * - * @return string[] + * @return \DateTime|null */ - public function getSettable() + public function getRefreshToken() { - return $this->container['settable']; + return $this->container['refreshToken']; } /** - * Sets settable + * Sets refreshToken * - * @param string[] $settable settable + * @param \DateTime|null $refreshToken refreshToken * * @return self */ - public function setSettable($settable) + public function setRefreshToken($refreshToken) { - $this->container['settable'] = $settable; + $this->container['refreshToken'] = $refreshToken; return $this; } diff --git a/clients/hydra/php/lib/Model/LoginRequest.php b/clients/hydra/php/lib/Model/OAuth2LoginRequest.php similarity index 95% rename from clients/hydra/php/lib/Model/LoginRequest.php rename to clients/hydra/php/lib/Model/OAuth2LoginRequest.php index 15b3373ad0a..df928007120 100644 --- a/clients/hydra/php/lib/Model/LoginRequest.php +++ b/clients/hydra/php/lib/Model/OAuth2LoginRequest.php @@ -1,6 +1,6 @@ 'string', 'client' => '\Ory\Hydra\Client\Model\OAuth2Client', - 'oidcContext' => '\Ory\Hydra\Client\Model\OpenIDConnectContext', + 'oidcContext' => '\Ory\Hydra\Client\Model\OAuth2ConsentRequestOpenIDConnectContext', 'requestUrl' => 'string', 'requestedAccessTokenAudience' => 'string[]', 'requestedScope' => 'string[]', @@ -325,7 +326,7 @@ public function setClient($client) /** * Gets oidcContext * - * @return \Ory\Hydra\Client\Model\OpenIDConnectContext|null + * @return \Ory\Hydra\Client\Model\OAuth2ConsentRequestOpenIDConnectContext|null */ public function getOidcContext() { @@ -335,7 +336,7 @@ public function getOidcContext() /** * Sets oidcContext * - * @param \Ory\Hydra\Client\Model\OpenIDConnectContext|null $oidcContext oidcContext + * @param \Ory\Hydra\Client\Model\OAuth2ConsentRequestOpenIDConnectContext|null $oidcContext oidcContext * * @return self */ diff --git a/clients/hydra/php/lib/Model/LogoutRequest.php b/clients/hydra/php/lib/Model/OAuth2LogoutRequest.php similarity index 96% rename from clients/hydra/php/lib/Model/LogoutRequest.php rename to clients/hydra/php/lib/Model/OAuth2LogoutRequest.php index 4c80becbd1f..8cce8116812 100644 --- a/clients/hydra/php/lib/Model/LogoutRequest.php +++ b/clients/hydra/php/lib/Model/OAuth2LogoutRequest.php @@ -1,6 +1,6 @@ 'string', 'expiresIn' => 'int', - 'idToken' => 'string', + 'idToken' => 'int', 'refreshToken' => 'string', - 'scope' => 'string', + 'scope' => 'int', 'tokenType' => 'string' ]; @@ -78,9 +79,9 @@ class Oauth2TokenResponse implements ModelInterface, ArrayAccess, \JsonSerializa protected static $openAPIFormats = [ 'accessToken' => null, 'expiresIn' => 'int64', - 'idToken' => null, + 'idToken' => 'int64', 'refreshToken' => null, - 'scope' => null, + 'scope' => 'int64', 'tokenType' => null ]; @@ -249,7 +250,7 @@ public function getAccessToken() /** * Sets accessToken * - * @param string|null $accessToken accessToken + * @param string|null $accessToken The access token issued by the authorization server. * * @return self */ @@ -273,7 +274,7 @@ public function getExpiresIn() /** * Sets expiresIn * - * @param int|null $expiresIn expiresIn + * @param int|null $expiresIn 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 self */ @@ -287,7 +288,7 @@ public function setExpiresIn($expiresIn) /** * Gets idToken * - * @return string|null + * @return int|null */ public function getIdToken() { @@ -297,7 +298,7 @@ public function getIdToken() /** * Sets idToken * - * @param string|null $idToken idToken + * @param int|null $idToken To retrieve a refresh token request the id_token scope. * * @return self */ @@ -321,7 +322,7 @@ public function getRefreshToken() /** * Sets refreshToken * - * @param string|null $refreshToken refreshToken + * @param string|null $refreshToken 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 self */ @@ -335,7 +336,7 @@ public function setRefreshToken($refreshToken) /** * Gets scope * - * @return string|null + * @return int|null */ public function getScope() { @@ -345,7 +346,7 @@ public function getScope() /** * Sets scope * - * @param string|null $scope scope + * @param int|null $scope The scope of the access token * * @return self */ @@ -369,7 +370,7 @@ public function getTokenType() /** * Sets tokenType * - * @param string|null $tokenType tokenType + * @param string|null $tokenType The type of the token issued * * @return self */ diff --git a/clients/hydra/php/lib/Model/WellKnown.php b/clients/hydra/php/lib/Model/OidcConfiguration.php similarity index 75% rename from clients/hydra/php/lib/Model/WellKnown.php rename to clients/hydra/php/lib/Model/OidcConfiguration.php index 73e4a9f67b4..2d2ee1b1a6f 100644 --- a/clients/hydra/php/lib/Model/WellKnown.php +++ b/clients/hydra/php/lib/Model/OidcConfiguration.php @@ -1,6 +1,6 @@ 'bool', 'frontchannelLogoutSupported' => 'bool', 'grantTypesSupported' => 'string[]', + 'idTokenSignedResponseAlg' => 'string[]', 'idTokenSigningAlgValuesSupported' => 'string[]', 'issuer' => 'string', 'jwksUri' => 'string', @@ -86,6 +88,7 @@ class WellKnown implements ModelInterface, ArrayAccess, \JsonSerializable 'tokenEndpoint' => 'string', 'tokenEndpointAuthMethodsSupported' => 'string[]', 'userinfoEndpoint' => 'string', + 'userinfoSignedResponseAlg' => 'string[]', 'userinfoSigningAlgValuesSupported' => 'string[]' ]; @@ -107,6 +110,7 @@ class WellKnown implements ModelInterface, ArrayAccess, \JsonSerializable 'frontchannelLogoutSessionSupported' => null, 'frontchannelLogoutSupported' => null, 'grantTypesSupported' => null, + 'idTokenSignedResponseAlg' => null, 'idTokenSigningAlgValuesSupported' => null, 'issuer' => null, 'jwksUri' => null, @@ -123,6 +127,7 @@ class WellKnown implements ModelInterface, ArrayAccess, \JsonSerializable 'tokenEndpoint' => null, 'tokenEndpointAuthMethodsSupported' => null, 'userinfoEndpoint' => null, + 'userinfoSignedResponseAlg' => null, 'userinfoSigningAlgValuesSupported' => null ]; @@ -163,6 +168,7 @@ public static function openAPIFormats() 'frontchannelLogoutSessionSupported' => 'frontchannel_logout_session_supported', 'frontchannelLogoutSupported' => 'frontchannel_logout_supported', 'grantTypesSupported' => 'grant_types_supported', + 'idTokenSignedResponseAlg' => 'id_token_signed_response_alg', 'idTokenSigningAlgValuesSupported' => 'id_token_signing_alg_values_supported', 'issuer' => 'issuer', 'jwksUri' => 'jwks_uri', @@ -179,6 +185,7 @@ public static function openAPIFormats() 'tokenEndpoint' => 'token_endpoint', 'tokenEndpointAuthMethodsSupported' => 'token_endpoint_auth_methods_supported', 'userinfoEndpoint' => 'userinfo_endpoint', + 'userinfoSignedResponseAlg' => 'userinfo_signed_response_alg', 'userinfoSigningAlgValuesSupported' => 'userinfo_signing_alg_values_supported' ]; @@ -198,6 +205,7 @@ public static function openAPIFormats() 'frontchannelLogoutSessionSupported' => 'setFrontchannelLogoutSessionSupported', 'frontchannelLogoutSupported' => 'setFrontchannelLogoutSupported', 'grantTypesSupported' => 'setGrantTypesSupported', + 'idTokenSignedResponseAlg' => 'setIdTokenSignedResponseAlg', 'idTokenSigningAlgValuesSupported' => 'setIdTokenSigningAlgValuesSupported', 'issuer' => 'setIssuer', 'jwksUri' => 'setJwksUri', @@ -214,6 +222,7 @@ public static function openAPIFormats() 'tokenEndpoint' => 'setTokenEndpoint', 'tokenEndpointAuthMethodsSupported' => 'setTokenEndpointAuthMethodsSupported', 'userinfoEndpoint' => 'setUserinfoEndpoint', + 'userinfoSignedResponseAlg' => 'setUserinfoSignedResponseAlg', 'userinfoSigningAlgValuesSupported' => 'setUserinfoSigningAlgValuesSupported' ]; @@ -233,6 +242,7 @@ public static function openAPIFormats() 'frontchannelLogoutSessionSupported' => 'getFrontchannelLogoutSessionSupported', 'frontchannelLogoutSupported' => 'getFrontchannelLogoutSupported', 'grantTypesSupported' => 'getGrantTypesSupported', + 'idTokenSignedResponseAlg' => 'getIdTokenSignedResponseAlg', 'idTokenSigningAlgValuesSupported' => 'getIdTokenSigningAlgValuesSupported', 'issuer' => 'getIssuer', 'jwksUri' => 'getJwksUri', @@ -249,6 +259,7 @@ public static function openAPIFormats() 'tokenEndpoint' => 'getTokenEndpoint', 'tokenEndpointAuthMethodsSupported' => 'getTokenEndpointAuthMethodsSupported', 'userinfoEndpoint' => 'getUserinfoEndpoint', + 'userinfoSignedResponseAlg' => 'getUserinfoSignedResponseAlg', 'userinfoSigningAlgValuesSupported' => 'getUserinfoSigningAlgValuesSupported' ]; @@ -319,6 +330,7 @@ public function __construct(array $data = 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; @@ -335,6 +347,7 @@ public function __construct(array $data = 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; } @@ -350,6 +363,9 @@ public function listInvalidProperties() if ($this->container['authorizationEndpoint'] === null) { $invalidProperties[] = "'authorizationEndpoint' can't be null"; } + if ($this->container['idTokenSignedResponseAlg'] === null) { + $invalidProperties[] = "'idTokenSignedResponseAlg' can't be null"; + } if ($this->container['idTokenSigningAlgValuesSupported'] === null) { $invalidProperties[] = "'idTokenSigningAlgValuesSupported' can't be null"; } @@ -368,6 +384,9 @@ public function listInvalidProperties() if ($this->container['tokenEndpoint'] === null) { $invalidProperties[] = "'tokenEndpoint' can't be null"; } + if ($this->container['userinfoSignedResponseAlg'] === null) { + $invalidProperties[] = "'userinfoSignedResponseAlg' can't be null"; + } return $invalidProperties; } @@ -396,7 +415,7 @@ public function getAuthorizationEndpoint() /** * Sets authorizationEndpoint * - * @param string $authorizationEndpoint URL of the OP's OAuth 2.0 Authorization Endpoint. + * @param string $authorizationEndpoint OAuth 2.0 Authorization Endpoint URL * * @return self */ @@ -420,7 +439,7 @@ public function getBackchannelLogoutSessionSupported() /** * Sets backchannelLogoutSessionSupported * - * @param bool|null $backchannelLogoutSessionSupported 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 + * @param bool|null $backchannelLogoutSessionSupported 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 self */ @@ -444,7 +463,7 @@ public function getBackchannelLogoutSupported() /** * Sets backchannelLogoutSupported * - * @param bool|null $backchannelLogoutSupported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + * @param bool|null $backchannelLogoutSupported OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. * * @return self */ @@ -468,7 +487,7 @@ public function getClaimsParameterSupported() /** * Sets claimsParameterSupported * - * @param bool|null $claimsParameterSupported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + * @param bool|null $claimsParameterSupported OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. * * @return self */ @@ -492,7 +511,7 @@ public function getClaimsSupported() /** * Sets claimsSupported * - * @param string[]|null $claimsSupported 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. + * @param string[]|null $claimsSupported 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 self */ @@ -516,7 +535,7 @@ public function getCodeChallengeMethodsSupported() /** * Sets codeChallengeMethodsSupported * - * @param string[]|null $codeChallengeMethodsSupported JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. + * @param string[]|null $codeChallengeMethodsSupported 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 self */ @@ -540,7 +559,7 @@ public function getEndSessionEndpoint() /** * Sets endSessionEndpoint * - * @param string|null $endSessionEndpoint URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + * @param string|null $endSessionEndpoint 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 self */ @@ -564,7 +583,7 @@ public function getFrontchannelLogoutSessionSupported() /** * Sets frontchannelLogoutSessionSupported * - * @param bool|null $frontchannelLogoutSessionSupported 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. + * @param bool|null $frontchannelLogoutSessionSupported 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 self */ @@ -588,7 +607,7 @@ public function getFrontchannelLogoutSupported() /** * Sets frontchannelLogoutSupported * - * @param bool|null $frontchannelLogoutSupported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + * @param bool|null $frontchannelLogoutSupported OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. * * @return self */ @@ -612,7 +631,7 @@ public function getGrantTypesSupported() /** * Sets grantTypesSupported * - * @param string[]|null $grantTypesSupported JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + * @param string[]|null $grantTypesSupported OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. * * @return self */ @@ -623,6 +642,30 @@ public function setGrantTypesSupported($grantTypesSupported) return $this; } + /** + * Gets idTokenSignedResponseAlg + * + * @return string[] + */ + public function getIdTokenSignedResponseAlg() + { + return $this->container['idTokenSignedResponseAlg']; + } + + /** + * Sets idTokenSignedResponseAlg + * + * @param string[] $idTokenSignedResponseAlg OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. + * + * @return self + */ + public function setIdTokenSignedResponseAlg($idTokenSignedResponseAlg) + { + $this->container['idTokenSignedResponseAlg'] = $idTokenSignedResponseAlg; + + return $this; + } + /** * Gets idTokenSigningAlgValuesSupported * @@ -636,7 +679,7 @@ public function getIdTokenSigningAlgValuesSupported() /** * Sets idTokenSigningAlgValuesSupported * - * @param string[] $idTokenSigningAlgValuesSupported 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. + * @param string[] $idTokenSigningAlgValuesSupported 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 self */ @@ -660,7 +703,7 @@ public function getIssuer() /** * Sets issuer * - * @param string $issuer 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. + * @param string $issuer 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 self */ @@ -684,7 +727,7 @@ public function getJwksUri() /** * Sets jwksUri * - * @param string $jwksUri 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. + * @param string $jwksUri 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 self */ @@ -708,7 +751,7 @@ public function getRegistrationEndpoint() /** * Sets registrationEndpoint * - * @param string|null $registrationEndpoint URL of the OP's Dynamic Client Registration Endpoint. + * @param string|null $registrationEndpoint OpenID Connect Dynamic Client Registration Endpoint URL * * @return self */ @@ -732,7 +775,7 @@ public function getRequestObjectSigningAlgValuesSupported() /** * Sets requestObjectSigningAlgValuesSupported * - * @param string[]|null $requestObjectSigningAlgValuesSupported 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). + * @param string[]|null $requestObjectSigningAlgValuesSupported 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 self */ @@ -756,7 +799,7 @@ public function getRequestParameterSupported() /** * Sets requestParameterSupported * - * @param bool|null $requestParameterSupported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + * @param bool|null $requestParameterSupported OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. * * @return self */ @@ -780,7 +823,7 @@ public function getRequestUriParameterSupported() /** * Sets requestUriParameterSupported * - * @param bool|null $requestUriParameterSupported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + * @param bool|null $requestUriParameterSupported OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. * * @return self */ @@ -804,7 +847,7 @@ public function getRequireRequestUriRegistration() /** * Sets requireRequestUriRegistration * - * @param bool|null $requireRequestUriRegistration Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. + * @param bool|null $requireRequestUriRegistration 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 self */ @@ -828,7 +871,7 @@ public function getResponseModesSupported() /** * Sets responseModesSupported * - * @param string[]|null $responseModesSupported JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + * @param string[]|null $responseModesSupported OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. * * @return self */ @@ -852,7 +895,7 @@ public function getResponseTypesSupported() /** * Sets responseTypesSupported * - * @param string[] $responseTypesSupported 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. + * @param string[] $responseTypesSupported 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 self */ @@ -876,7 +919,7 @@ public function getRevocationEndpoint() /** * Sets revocationEndpoint * - * @param string|null $revocationEndpoint URL of the authorization server's OAuth 2.0 revocation endpoint. + * @param string|null $revocationEndpoint OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. * * @return self */ @@ -900,7 +943,7 @@ public function getScopesSupported() /** * Sets scopesSupported * - * @param string[]|null $scopesSupported SON 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 + * @param string[]|null $scopesSupported 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 self */ @@ -924,7 +967,7 @@ public function getSubjectTypesSupported() /** * Sets subjectTypesSupported * - * @param string[] $subjectTypesSupported JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. + * @param string[] $subjectTypesSupported 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 self */ @@ -948,7 +991,7 @@ public function getTokenEndpoint() /** * Sets tokenEndpoint * - * @param string $tokenEndpoint URL of the OP's OAuth 2.0 Token Endpoint + * @param string $tokenEndpoint OAuth 2.0 Token Endpoint URL * * @return self */ @@ -972,7 +1015,7 @@ public function getTokenEndpointAuthMethodsSupported() /** * Sets tokenEndpointAuthMethodsSupported * - * @param string[]|null $tokenEndpointAuthMethodsSupported 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 + * @param string[]|null $tokenEndpointAuthMethodsSupported 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 self */ @@ -996,7 +1039,7 @@ public function getUserinfoEndpoint() /** * Sets userinfoEndpoint * - * @param string|null $userinfoEndpoint URL of the OP's UserInfo Endpoint. + * @param string|null $userinfoEndpoint OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. * * @return self */ @@ -1007,6 +1050,30 @@ public function setUserinfoEndpoint($userinfoEndpoint) return $this; } + /** + * Gets userinfoSignedResponseAlg + * + * @return string[] + */ + public function getUserinfoSignedResponseAlg() + { + return $this->container['userinfoSignedResponseAlg']; + } + + /** + * Sets userinfoSignedResponseAlg + * + * @param string[] $userinfoSignedResponseAlg OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. + * + * @return self + */ + public function setUserinfoSignedResponseAlg($userinfoSignedResponseAlg) + { + $this->container['userinfoSignedResponseAlg'] = $userinfoSignedResponseAlg; + + return $this; + } + /** * Gets userinfoSigningAlgValuesSupported * @@ -1020,7 +1087,7 @@ public function getUserinfoSigningAlgValuesSupported() /** * Sets userinfoSigningAlgValuesSupported * - * @param string[]|null $userinfoSigningAlgValuesSupported 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]. + * @param string[]|null $userinfoSigningAlgValuesSupported 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 self */ diff --git a/clients/hydra/php/lib/Model/UserinfoResponse.php b/clients/hydra/php/lib/Model/OidcUserInfo.php similarity index 98% rename from clients/hydra/php/lib/Model/UserinfoResponse.php rename to clients/hydra/php/lib/Model/OidcUserInfo.php index 61c3002248d..0a612d8c73e 100644 --- a/clients/hydra/php/lib/Model/UserinfoResponse.php +++ b/clients/hydra/php/lib/Model/OidcUserInfo.php @@ -1,6 +1,6 @@ 'string', - 'socket' => 'string', - 'types' => '\Ory\Hydra\Client\Model\PluginInterfaceType[]' + 'pageSize' => 'int', + 'pageToken' => 'string' ]; /** @@ -73,9 +72,8 @@ class PluginConfigInterface implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'protocolScheme' => null, - 'socket' => null, - 'types' => null + 'pageSize' => 'int64', + 'pageToken' => null ]; /** @@ -105,9 +103,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'protocolScheme' => 'ProtocolScheme', - 'socket' => 'Socket', - 'types' => 'Types' + 'pageSize' => 'page_size', + 'pageToken' => 'page_token' ]; /** @@ -116,9 +113,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'protocolScheme' => 'setProtocolScheme', - 'socket' => 'setSocket', - 'types' => 'setTypes' + 'pageSize' => 'setPageSize', + 'pageToken' => 'setPageToken' ]; /** @@ -127,9 +123,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'protocolScheme' => 'getProtocolScheme', - 'socket' => 'getSocket', - 'types' => 'getTypes' + 'pageSize' => 'getPageSize', + 'pageToken' => 'getPageToken' ]; /** @@ -189,9 +184,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['protocolScheme'] = $data['protocolScheme'] ?? null; - $this->container['socket'] = $data['socket'] ?? null; - $this->container['types'] = $data['types'] ?? null; + $this->container['pageSize'] = $data['pageSize'] ?? 250; + $this->container['pageToken'] = $data['pageToken'] ?? '1'; } /** @@ -203,12 +197,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['socket'] === null) { - $invalidProperties[] = "'socket' can't be null"; + if (!is_null($this->container['pageSize']) && ($this->container['pageSize'] > 1000)) { + $invalidProperties[] = "invalid value for 'pageSize', must be smaller than or equal to 1000."; } - if ($this->container['types'] === null) { - $invalidProperties[] = "'types' can't be null"; + + if (!is_null($this->container['pageSize']) && ($this->container['pageSize'] < 1)) { + $invalidProperties[] = "invalid value for 'pageSize', must be bigger than or equal to 1."; } + return $invalidProperties; } @@ -225,73 +221,59 @@ public function valid() /** - * Gets protocolScheme + * Gets pageSize * - * @return string|null + * @return int|null */ - public function getProtocolScheme() + public function getPageSize() { - return $this->container['protocolScheme']; + return $this->container['pageSize']; } /** - * Sets protocolScheme + * Sets pageSize * - * @param string|null $protocolScheme Protocol to use for clients connecting to the plugin. + * @param int|null $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). * * @return self */ - public function setProtocolScheme($protocolScheme) + public function setPageSize($pageSize) { - $this->container['protocolScheme'] = $protocolScheme; - - return $this; - } - /** - * Gets socket - * - * @return string - */ - public function getSocket() - { - return $this->container['socket']; - } + if (!is_null($pageSize) && ($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)) { + throw new \InvalidArgumentException('invalid value for $pageSize when calling Pagination., must be bigger than or equal to 1.'); + } - /** - * Sets socket - * - * @param string $socket socket - * - * @return self - */ - public function setSocket($socket) - { - $this->container['socket'] = $socket; + $this->container['pageSize'] = $pageSize; return $this; } /** - * Gets types + * Gets pageToken * - * @return \Ory\Hydra\Client\Model\PluginInterfaceType[] + * @return string|null */ - public function getTypes() + public function getPageToken() { - return $this->container['types']; + return $this->container['pageToken']; } /** - * Sets types + * Sets pageToken * - * @param \Ory\Hydra\Client\Model\PluginInterfaceType[] $types types + * @param string|null $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). * * @return self */ - public function setTypes($types) + public function setPageToken($pageToken) { - $this->container['types'] = $types; + + + $this->container['pageToken'] = $pageToken; return $this; } diff --git a/clients/hydra/php/lib/Model/PluginConfigRootfs.php b/clients/hydra/php/lib/Model/PaginationHeaders.php similarity index 80% rename from clients/hydra/php/lib/Model/PluginConfigRootfs.php rename to clients/hydra/php/lib/Model/PaginationHeaders.php index 4911497384c..df84c592555 100644 --- a/clients/hydra/php/lib/Model/PluginConfigRootfs.php +++ b/clients/hydra/php/lib/Model/PaginationHeaders.php @@ -1,6 +1,6 @@ 'string[]', - 'type' => 'string' + 'link' => 'string', + 'xTotalCount' => 'string' ]; /** @@ -72,8 +72,8 @@ class PluginConfigRootfs implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'diffIds' => null, - 'type' => null + 'link' => null, + 'xTotalCount' => null ]; /** @@ -103,8 +103,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'diffIds' => 'diff_ids', - 'type' => 'type' + 'link' => 'link', + 'xTotalCount' => 'x-total-count' ]; /** @@ -113,8 +113,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'diffIds' => 'setDiffIds', - 'type' => 'setType' + 'link' => 'setLink', + 'xTotalCount' => 'setXTotalCount' ]; /** @@ -123,8 +123,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'diffIds' => 'getDiffIds', - 'type' => 'getType' + 'link' => 'getLink', + 'xTotalCount' => 'getXTotalCount' ]; /** @@ -184,8 +184,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['diffIds'] = $data['diffIds'] ?? null; - $this->container['type'] = $data['type'] ?? null; + $this->container['link'] = $data['link'] ?? null; + $this->container['xTotalCount'] = $data['xTotalCount'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets diffIds + * Gets link * - * @return string[]|null + * @return string|null */ - public function getDiffIds() + public function getLink() { - return $this->container['diffIds']; + return $this->container['link']; } /** - * Sets diffIds + * Sets link * - * @param string[]|null $diffIds diff ids + * @param string|null $link 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 self */ - public function setDiffIds($diffIds) + public function setLink($link) { - $this->container['diffIds'] = $diffIds; + $this->container['link'] = $link; return $this; } /** - * Gets type + * Gets xTotalCount * * @return string|null */ - public function getType() + public function getXTotalCount() { - return $this->container['type']; + return $this->container['xTotalCount']; } /** - * Sets type + * Sets xTotalCount * - * @param string|null $type type + * @param string|null $xTotalCount The total number of clients. in: header * * @return self */ - public function setType($type) + public function setXTotalCount($xTotalCount) { - $this->container['type'] = $type; + $this->container['xTotalCount'] = $xTotalCount; return $this; } diff --git a/clients/hydra/php/lib/Model/PluginConfig.php b/clients/hydra/php/lib/Model/PluginConfig.php deleted file mode 100644 index 83c595f7773..00000000000 --- a/clients/hydra/php/lib/Model/PluginConfig.php +++ /dev/null @@ -1,809 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class PluginConfig implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PluginConfig'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'args' => '\Ory\Hydra\Client\Model\PluginConfigArgs', - 'description' => 'string', - 'dockerVersion' => 'string', - 'documentation' => 'string', - 'entrypoint' => 'string[]', - 'env' => '\Ory\Hydra\Client\Model\PluginEnv[]', - 'interface' => '\Ory\Hydra\Client\Model\PluginConfigInterface', - 'ipcHost' => 'bool', - 'linux' => '\Ory\Hydra\Client\Model\PluginConfigLinux', - 'mounts' => '\Ory\Hydra\Client\Model\PluginMount[]', - 'network' => '\Ory\Hydra\Client\Model\PluginConfigNetwork', - 'pidHost' => 'bool', - 'propagatedMount' => 'string', - 'user' => '\Ory\Hydra\Client\Model\PluginConfigUser', - 'workDir' => 'string', - 'rootfs' => '\Ory\Hydra\Client\Model\PluginConfigRootfs' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'args' => null, - 'description' => null, - 'dockerVersion' => null, - 'documentation' => null, - 'entrypoint' => null, - 'env' => null, - 'interface' => null, - 'ipcHost' => null, - 'linux' => null, - 'mounts' => null, - 'network' => null, - 'pidHost' => null, - 'propagatedMount' => null, - 'user' => null, - 'workDir' => null, - 'rootfs' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'args' => 'Args', - 'description' => 'Description', - 'dockerVersion' => 'DockerVersion', - 'documentation' => 'Documentation', - 'entrypoint' => 'Entrypoint', - 'env' => 'Env', - 'interface' => 'Interface', - 'ipcHost' => 'IpcHost', - 'linux' => 'Linux', - 'mounts' => 'Mounts', - 'network' => 'Network', - 'pidHost' => 'PidHost', - 'propagatedMount' => 'PropagatedMount', - 'user' => 'User', - 'workDir' => 'WorkDir', - 'rootfs' => 'rootfs' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'args' => 'setArgs', - 'description' => 'setDescription', - 'dockerVersion' => 'setDockerVersion', - 'documentation' => 'setDocumentation', - 'entrypoint' => 'setEntrypoint', - 'env' => 'setEnv', - 'interface' => 'setInterface', - 'ipcHost' => 'setIpcHost', - 'linux' => 'setLinux', - 'mounts' => 'setMounts', - 'network' => 'setNetwork', - 'pidHost' => 'setPidHost', - 'propagatedMount' => 'setPropagatedMount', - 'user' => 'setUser', - 'workDir' => 'setWorkDir', - 'rootfs' => 'setRootfs' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'args' => 'getArgs', - 'description' => 'getDescription', - 'dockerVersion' => 'getDockerVersion', - 'documentation' => 'getDocumentation', - 'entrypoint' => 'getEntrypoint', - 'env' => 'getEnv', - 'interface' => 'getInterface', - 'ipcHost' => 'getIpcHost', - 'linux' => 'getLinux', - 'mounts' => 'getMounts', - 'network' => 'getNetwork', - 'pidHost' => 'getPidHost', - 'propagatedMount' => 'getPropagatedMount', - 'user' => 'getUser', - 'workDir' => 'getWorkDir', - 'rootfs' => 'getRootfs' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['args'] = $data['args'] ?? null; - $this->container['description'] = $data['description'] ?? null; - $this->container['dockerVersion'] = $data['dockerVersion'] ?? null; - $this->container['documentation'] = $data['documentation'] ?? null; - $this->container['entrypoint'] = $data['entrypoint'] ?? null; - $this->container['env'] = $data['env'] ?? null; - $this->container['interface'] = $data['interface'] ?? null; - $this->container['ipcHost'] = $data['ipcHost'] ?? null; - $this->container['linux'] = $data['linux'] ?? null; - $this->container['mounts'] = $data['mounts'] ?? null; - $this->container['network'] = $data['network'] ?? null; - $this->container['pidHost'] = $data['pidHost'] ?? null; - $this->container['propagatedMount'] = $data['propagatedMount'] ?? null; - $this->container['user'] = $data['user'] ?? null; - $this->container['workDir'] = $data['workDir'] ?? null; - $this->container['rootfs'] = $data['rootfs'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['args'] === null) { - $invalidProperties[] = "'args' can't be null"; - } - if ($this->container['description'] === null) { - $invalidProperties[] = "'description' can't be null"; - } - if ($this->container['documentation'] === null) { - $invalidProperties[] = "'documentation' can't be null"; - } - if ($this->container['entrypoint'] === null) { - $invalidProperties[] = "'entrypoint' can't be null"; - } - if ($this->container['env'] === null) { - $invalidProperties[] = "'env' can't be null"; - } - if ($this->container['interface'] === null) { - $invalidProperties[] = "'interface' can't be null"; - } - if ($this->container['ipcHost'] === null) { - $invalidProperties[] = "'ipcHost' can't be null"; - } - if ($this->container['linux'] === null) { - $invalidProperties[] = "'linux' can't be null"; - } - if ($this->container['mounts'] === null) { - $invalidProperties[] = "'mounts' can't be null"; - } - if ($this->container['network'] === null) { - $invalidProperties[] = "'network' can't be null"; - } - if ($this->container['pidHost'] === null) { - $invalidProperties[] = "'pidHost' can't be null"; - } - if ($this->container['propagatedMount'] === null) { - $invalidProperties[] = "'propagatedMount' can't be null"; - } - if ($this->container['workDir'] === null) { - $invalidProperties[] = "'workDir' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets args - * - * @return \Ory\Hydra\Client\Model\PluginConfigArgs - */ - public function getArgs() - { - return $this->container['args']; - } - - /** - * Sets args - * - * @param \Ory\Hydra\Client\Model\PluginConfigArgs $args args - * - * @return self - */ - public function setArgs($args) - { - $this->container['args'] = $args; - - return $this; - } - - /** - * Gets description - * - * @return string - */ - public function getDescription() - { - return $this->container['description']; - } - - /** - * Sets description - * - * @param string $description description - * - * @return self - */ - public function setDescription($description) - { - $this->container['description'] = $description; - - return $this; - } - - /** - * Gets dockerVersion - * - * @return string|null - */ - public function getDockerVersion() - { - return $this->container['dockerVersion']; - } - - /** - * Sets dockerVersion - * - * @param string|null $dockerVersion Docker Version used to create the plugin - * - * @return self - */ - public function setDockerVersion($dockerVersion) - { - $this->container['dockerVersion'] = $dockerVersion; - - return $this; - } - - /** - * Gets documentation - * - * @return string - */ - public function getDocumentation() - { - return $this->container['documentation']; - } - - /** - * Sets documentation - * - * @param string $documentation documentation - * - * @return self - */ - public function setDocumentation($documentation) - { - $this->container['documentation'] = $documentation; - - return $this; - } - - /** - * Gets entrypoint - * - * @return string[] - */ - public function getEntrypoint() - { - return $this->container['entrypoint']; - } - - /** - * Sets entrypoint - * - * @param string[] $entrypoint entrypoint - * - * @return self - */ - public function setEntrypoint($entrypoint) - { - $this->container['entrypoint'] = $entrypoint; - - return $this; - } - - /** - * Gets env - * - * @return \Ory\Hydra\Client\Model\PluginEnv[] - */ - public function getEnv() - { - return $this->container['env']; - } - - /** - * Sets env - * - * @param \Ory\Hydra\Client\Model\PluginEnv[] $env env - * - * @return self - */ - public function setEnv($env) - { - $this->container['env'] = $env; - - return $this; - } - - /** - * Gets interface - * - * @return \Ory\Hydra\Client\Model\PluginConfigInterface - */ - public function getInterface() - { - return $this->container['interface']; - } - - /** - * Sets interface - * - * @param \Ory\Hydra\Client\Model\PluginConfigInterface $interface interface - * - * @return self - */ - public function setInterface($interface) - { - $this->container['interface'] = $interface; - - return $this; - } - - /** - * Gets ipcHost - * - * @return bool - */ - public function getIpcHost() - { - return $this->container['ipcHost']; - } - - /** - * Sets ipcHost - * - * @param bool $ipcHost ipc host - * - * @return self - */ - public function setIpcHost($ipcHost) - { - $this->container['ipcHost'] = $ipcHost; - - return $this; - } - - /** - * Gets linux - * - * @return \Ory\Hydra\Client\Model\PluginConfigLinux - */ - public function getLinux() - { - return $this->container['linux']; - } - - /** - * Sets linux - * - * @param \Ory\Hydra\Client\Model\PluginConfigLinux $linux linux - * - * @return self - */ - public function setLinux($linux) - { - $this->container['linux'] = $linux; - - return $this; - } - - /** - * Gets mounts - * - * @return \Ory\Hydra\Client\Model\PluginMount[] - */ - public function getMounts() - { - return $this->container['mounts']; - } - - /** - * Sets mounts - * - * @param \Ory\Hydra\Client\Model\PluginMount[] $mounts mounts - * - * @return self - */ - public function setMounts($mounts) - { - $this->container['mounts'] = $mounts; - - return $this; - } - - /** - * Gets network - * - * @return \Ory\Hydra\Client\Model\PluginConfigNetwork - */ - public function getNetwork() - { - return $this->container['network']; - } - - /** - * Sets network - * - * @param \Ory\Hydra\Client\Model\PluginConfigNetwork $network network - * - * @return self - */ - public function setNetwork($network) - { - $this->container['network'] = $network; - - return $this; - } - - /** - * Gets pidHost - * - * @return bool - */ - public function getPidHost() - { - return $this->container['pidHost']; - } - - /** - * Sets pidHost - * - * @param bool $pidHost pid host - * - * @return self - */ - public function setPidHost($pidHost) - { - $this->container['pidHost'] = $pidHost; - - return $this; - } - - /** - * Gets propagatedMount - * - * @return string - */ - public function getPropagatedMount() - { - return $this->container['propagatedMount']; - } - - /** - * Sets propagatedMount - * - * @param string $propagatedMount propagated mount - * - * @return self - */ - public function setPropagatedMount($propagatedMount) - { - $this->container['propagatedMount'] = $propagatedMount; - - return $this; - } - - /** - * Gets user - * - * @return \Ory\Hydra\Client\Model\PluginConfigUser|null - */ - public function getUser() - { - return $this->container['user']; - } - - /** - * Sets user - * - * @param \Ory\Hydra\Client\Model\PluginConfigUser|null $user user - * - * @return self - */ - public function setUser($user) - { - $this->container['user'] = $user; - - return $this; - } - - /** - * Gets workDir - * - * @return string - */ - public function getWorkDir() - { - return $this->container['workDir']; - } - - /** - * Sets workDir - * - * @param string $workDir work dir - * - * @return self - */ - public function setWorkDir($workDir) - { - $this->container['workDir'] = $workDir; - - return $this; - } - - /** - * Gets rootfs - * - * @return \Ory\Hydra\Client\Model\PluginConfigRootfs|null - */ - public function getRootfs() - { - return $this->container['rootfs']; - } - - /** - * Sets rootfs - * - * @param \Ory\Hydra\Client\Model\PluginConfigRootfs|null $rootfs rootfs - * - * @return self - */ - public function setRootfs($rootfs) - { - $this->container['rootfs'] = $rootfs; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/clients/hydra/php/lib/Model/PluginConfigLinux.php b/clients/hydra/php/lib/Model/PluginConfigLinux.php deleted file mode 100644 index d03d7abab7b..00000000000 --- a/clients/hydra/php/lib/Model/PluginConfigLinux.php +++ /dev/null @@ -1,390 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class PluginConfigLinux implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PluginConfigLinux'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'allowAllDevices' => 'bool', - 'capabilities' => 'string[]', - 'devices' => '\Ory\Hydra\Client\Model\PluginDevice[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'allowAllDevices' => null, - 'capabilities' => null, - 'devices' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'allowAllDevices' => 'AllowAllDevices', - 'capabilities' => 'Capabilities', - 'devices' => 'Devices' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'allowAllDevices' => 'setAllowAllDevices', - 'capabilities' => 'setCapabilities', - 'devices' => 'setDevices' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'allowAllDevices' => 'getAllowAllDevices', - 'capabilities' => 'getCapabilities', - 'devices' => 'getDevices' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['allowAllDevices'] = $data['allowAllDevices'] ?? null; - $this->container['capabilities'] = $data['capabilities'] ?? null; - $this->container['devices'] = $data['devices'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['allowAllDevices'] === null) { - $invalidProperties[] = "'allowAllDevices' can't be null"; - } - if ($this->container['capabilities'] === null) { - $invalidProperties[] = "'capabilities' can't be null"; - } - if ($this->container['devices'] === null) { - $invalidProperties[] = "'devices' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets allowAllDevices - * - * @return bool - */ - public function getAllowAllDevices() - { - return $this->container['allowAllDevices']; - } - - /** - * Sets allowAllDevices - * - * @param bool $allowAllDevices allow all devices - * - * @return self - */ - public function setAllowAllDevices($allowAllDevices) - { - $this->container['allowAllDevices'] = $allowAllDevices; - - return $this; - } - - /** - * Gets capabilities - * - * @return string[] - */ - public function getCapabilities() - { - return $this->container['capabilities']; - } - - /** - * Sets capabilities - * - * @param string[] $capabilities capabilities - * - * @return self - */ - public function setCapabilities($capabilities) - { - $this->container['capabilities'] = $capabilities; - - return $this; - } - - /** - * Gets devices - * - * @return \Ory\Hydra\Client\Model\PluginDevice[] - */ - public function getDevices() - { - return $this->container['devices']; - } - - /** - * Sets devices - * - * @param \Ory\Hydra\Client\Model\PluginDevice[] $devices devices - * - * @return self - */ - public function setDevices($devices) - { - $this->container['devices'] = $devices; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/clients/hydra/php/lib/Model/PluginEnv.php b/clients/hydra/php/lib/Model/PluginEnv.php deleted file mode 100644 index 14921c333f2..00000000000 --- a/clients/hydra/php/lib/Model/PluginEnv.php +++ /dev/null @@ -1,423 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class PluginEnv implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PluginEnv'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'description' => 'string', - 'name' => 'string', - 'settable' => 'string[]', - 'value' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'description' => null, - 'name' => null, - 'settable' => null, - 'value' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'description' => 'Description', - 'name' => 'Name', - 'settable' => 'Settable', - 'value' => 'Value' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'description' => 'setDescription', - 'name' => 'setName', - 'settable' => 'setSettable', - 'value' => 'setValue' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'description' => 'getDescription', - 'name' => 'getName', - 'settable' => 'getSettable', - 'value' => 'getValue' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['description'] = $data['description'] ?? null; - $this->container['name'] = $data['name'] ?? null; - $this->container['settable'] = $data['settable'] ?? null; - $this->container['value'] = $data['value'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['description'] === null) { - $invalidProperties[] = "'description' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['settable'] === null) { - $invalidProperties[] = "'settable' can't be null"; - } - if ($this->container['value'] === null) { - $invalidProperties[] = "'value' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets description - * - * @return string - */ - public function getDescription() - { - return $this->container['description']; - } - - /** - * Sets description - * - * @param string $description description - * - * @return self - */ - public function setDescription($description) - { - $this->container['description'] = $description; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets settable - * - * @return string[] - */ - public function getSettable() - { - return $this->container['settable']; - } - - /** - * Sets settable - * - * @param string[] $settable settable - * - * @return self - */ - public function setSettable($settable) - { - $this->container['settable'] = $settable; - - return $this; - } - - /** - * Gets value - * - * @return string - */ - public function getValue() - { - return $this->container['value']; - } - - /** - * Sets value - * - * @param string $value value - * - * @return self - */ - public function setValue($value) - { - $this->container['value'] = $value; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/clients/hydra/php/lib/Model/PluginInterfaceType.php b/clients/hydra/php/lib/Model/PluginInterfaceType.php deleted file mode 100644 index 694ab4efb96..00000000000 --- a/clients/hydra/php/lib/Model/PluginInterfaceType.php +++ /dev/null @@ -1,390 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class PluginInterfaceType implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PluginInterfaceType'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'capability' => 'string', - 'prefix' => 'string', - 'version' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'capability' => null, - 'prefix' => null, - 'version' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'capability' => 'Capability', - 'prefix' => 'Prefix', - 'version' => 'Version' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'capability' => 'setCapability', - 'prefix' => 'setPrefix', - 'version' => 'setVersion' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'capability' => 'getCapability', - 'prefix' => 'getPrefix', - 'version' => 'getVersion' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['capability'] = $data['capability'] ?? null; - $this->container['prefix'] = $data['prefix'] ?? null; - $this->container['version'] = $data['version'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['capability'] === null) { - $invalidProperties[] = "'capability' can't be null"; - } - if ($this->container['prefix'] === null) { - $invalidProperties[] = "'prefix' can't be null"; - } - if ($this->container['version'] === null) { - $invalidProperties[] = "'version' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets capability - * - * @return string - */ - public function getCapability() - { - return $this->container['capability']; - } - - /** - * Sets capability - * - * @param string $capability capability - * - * @return self - */ - public function setCapability($capability) - { - $this->container['capability'] = $capability; - - return $this; - } - - /** - * Gets prefix - * - * @return string - */ - public function getPrefix() - { - return $this->container['prefix']; - } - - /** - * Sets prefix - * - * @param string $prefix prefix - * - * @return self - */ - public function setPrefix($prefix) - { - $this->container['prefix'] = $prefix; - - return $this; - } - - /** - * Gets version - * - * @return string - */ - public function getVersion() - { - return $this->container['version']; - } - - /** - * Sets version - * - * @param string $version version - * - * @return self - */ - public function setVersion($version) - { - $this->container['version'] = $version; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/clients/hydra/php/lib/Model/PluginMount.php b/clients/hydra/php/lib/Model/PluginMount.php deleted file mode 100644 index 6a548273905..00000000000 --- a/clients/hydra/php/lib/Model/PluginMount.php +++ /dev/null @@ -1,522 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class PluginMount implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PluginMount'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'description' => 'string', - 'destination' => 'string', - 'name' => 'string', - 'options' => 'string[]', - 'settable' => 'string[]', - 'source' => 'string', - 'type' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'description' => null, - 'destination' => null, - 'name' => null, - 'options' => null, - 'settable' => null, - 'source' => null, - 'type' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'description' => 'Description', - 'destination' => 'Destination', - 'name' => 'Name', - 'options' => 'Options', - 'settable' => 'Settable', - 'source' => 'Source', - 'type' => 'Type' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'description' => 'setDescription', - 'destination' => 'setDestination', - 'name' => 'setName', - 'options' => 'setOptions', - 'settable' => 'setSettable', - 'source' => 'setSource', - 'type' => 'setType' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'description' => 'getDescription', - 'destination' => 'getDestination', - 'name' => 'getName', - 'options' => 'getOptions', - 'settable' => 'getSettable', - 'source' => 'getSource', - 'type' => 'getType' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['description'] = $data['description'] ?? null; - $this->container['destination'] = $data['destination'] ?? null; - $this->container['name'] = $data['name'] ?? null; - $this->container['options'] = $data['options'] ?? null; - $this->container['settable'] = $data['settable'] ?? null; - $this->container['source'] = $data['source'] ?? null; - $this->container['type'] = $data['type'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['description'] === null) { - $invalidProperties[] = "'description' can't be null"; - } - if ($this->container['destination'] === null) { - $invalidProperties[] = "'destination' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['options'] === null) { - $invalidProperties[] = "'options' can't be null"; - } - if ($this->container['settable'] === null) { - $invalidProperties[] = "'settable' can't be null"; - } - if ($this->container['source'] === null) { - $invalidProperties[] = "'source' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets description - * - * @return string - */ - public function getDescription() - { - return $this->container['description']; - } - - /** - * Sets description - * - * @param string $description description - * - * @return self - */ - public function setDescription($description) - { - $this->container['description'] = $description; - - return $this; - } - - /** - * Gets destination - * - * @return string - */ - public function getDestination() - { - return $this->container['destination']; - } - - /** - * Sets destination - * - * @param string $destination destination - * - * @return self - */ - public function setDestination($destination) - { - $this->container['destination'] = $destination; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets options - * - * @return string[] - */ - public function getOptions() - { - return $this->container['options']; - } - - /** - * Sets options - * - * @param string[] $options options - * - * @return self - */ - public function setOptions($options) - { - $this->container['options'] = $options; - - return $this; - } - - /** - * Gets settable - * - * @return string[] - */ - public function getSettable() - { - return $this->container['settable']; - } - - /** - * Sets settable - * - * @param string[] $settable settable - * - * @return self - */ - public function setSettable($settable) - { - $this->container['settable'] = $settable; - - return $this; - } - - /** - * Gets source - * - * @return string - */ - public function getSource() - { - return $this->container['source']; - } - - /** - * Sets source - * - * @param string $source source - * - * @return self - */ - public function setSource($source) - { - $this->container['source'] = $source; - - return $this; - } - - /** - * Gets type - * - * @return string - */ - public function getType() - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param string $type type - * - * @return self - */ - public function setType($type) - { - $this->container['type'] = $type; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/clients/hydra/php/lib/Model/PluginSettings.php b/clients/hydra/php/lib/Model/PluginSettings.php deleted file mode 100644 index 6fdbee71763..00000000000 --- a/clients/hydra/php/lib/Model/PluginSettings.php +++ /dev/null @@ -1,422 +0,0 @@ - - * @template TKey int|null - * @template TValue mixed|null - */ -class PluginSettings implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'PluginSettings'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'args' => 'string[]', - 'devices' => '\Ory\Hydra\Client\Model\PluginDevice[]', - 'env' => 'string[]', - 'mounts' => '\Ory\Hydra\Client\Model\PluginMount[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'args' => null, - 'devices' => null, - 'env' => null, - 'mounts' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'args' => 'Args', - 'devices' => 'Devices', - 'env' => 'Env', - 'mounts' => 'Mounts' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'args' => 'setArgs', - 'devices' => 'setDevices', - 'env' => 'setEnv', - 'mounts' => 'setMounts' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'args' => 'getArgs', - 'devices' => 'getDevices', - 'env' => 'getEnv', - 'mounts' => 'getMounts' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['args'] = $data['args'] ?? null; - $this->container['devices'] = $data['devices'] ?? null; - $this->container['env'] = $data['env'] ?? null; - $this->container['mounts'] = $data['mounts'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['args'] === null) { - $invalidProperties[] = "'args' can't be null"; - } - if ($this->container['devices'] === null) { - $invalidProperties[] = "'devices' can't be null"; - } - if ($this->container['env'] === null) { - $invalidProperties[] = "'env' can't be null"; - } - if ($this->container['mounts'] === null) { - $invalidProperties[] = "'mounts' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets args - * - * @return string[] - */ - public function getArgs() - { - return $this->container['args']; - } - - /** - * Sets args - * - * @param string[] $args args - * - * @return self - */ - public function setArgs($args) - { - $this->container['args'] = $args; - - return $this; - } - - /** - * Gets devices - * - * @return \Ory\Hydra\Client\Model\PluginDevice[] - */ - public function getDevices() - { - return $this->container['devices']; - } - - /** - * Sets devices - * - * @param \Ory\Hydra\Client\Model\PluginDevice[] $devices devices - * - * @return self - */ - public function setDevices($devices) - { - $this->container['devices'] = $devices; - - return $this; - } - - /** - * Gets env - * - * @return string[] - */ - public function getEnv() - { - return $this->container['env']; - } - - /** - * Sets env - * - * @param string[] $env env - * - * @return self - */ - public function setEnv($env) - { - $this->container['env'] = $env; - - return $this; - } - - /** - * Gets mounts - * - * @return \Ory\Hydra\Client\Model\PluginMount[] - */ - public function getMounts() - { - return $this->container['mounts']; - } - - /** - * Sets mounts - * - * @param \Ory\Hydra\Client\Model\PluginMount[] $mounts mounts - * - * @return self - */ - public function setMounts($mounts) - { - $this->container['mounts'] = $mounts; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/clients/hydra/php/lib/Model/RejectRequest.php b/clients/hydra/php/lib/Model/RejectOAuth2Request.php similarity index 96% rename from clients/hydra/php/lib/Model/RejectRequest.php rename to clients/hydra/php/lib/Model/RejectOAuth2Request.php index 5c19e8f92f4..499b1b60f1b 100644 --- a/clients/hydra/php/lib/Model/RejectRequest.php +++ b/clients/hydra/php/lib/Model/RejectOAuth2Request.php @@ -1,6 +1,6 @@ - * @template TKey int|null - * @template TValue mixed|null - */ -class RequestWasHandledResponse implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'requestWasHandledResponse'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'redirectTo' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'redirectTo' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'redirectTo' => 'redirect_to' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'redirectTo' => 'setRedirectTo' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'redirectTo' => 'getRedirectTo' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['redirectTo'] = $data['redirectTo'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['redirectTo'] === null) { - $invalidProperties[] = "'redirectTo' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets redirectTo - * - * @return string - */ - public function getRedirectTo() - { - return $this->container['redirectTo']; - } - - /** - * Sets redirectTo - * - * @param string $redirectTo Original request URL to which you should redirect the user if request was already handled. - * - * @return self - */ - public function setRedirectTo($redirectTo) - { - $this->container['redirectTo'] = $redirectTo; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/clients/hydra/php/lib/Model/VolumeUsageData.php b/clients/hydra/php/lib/Model/TokenPagination.php similarity index 70% rename from clients/hydra/php/lib/Model/VolumeUsageData.php rename to clients/hydra/php/lib/Model/TokenPagination.php index 41b2a85c98c..fc828da83ed 100644 --- a/clients/hydra/php/lib/Model/VolumeUsageData.php +++ b/clients/hydra/php/lib/Model/TokenPagination.php @@ -1,6 +1,6 @@ 'int', - 'size' => 'int' + 'pageSize' => 'int', + 'pageToken' => 'string' ]; /** @@ -72,8 +72,8 @@ class VolumeUsageData implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'refCount' => 'int64', - 'size' => 'int64' + 'pageSize' => 'int64', + 'pageToken' => null ]; /** @@ -103,8 +103,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'refCount' => 'RefCount', - 'size' => 'Size' + 'pageSize' => 'page_size', + 'pageToken' => 'page_token' ]; /** @@ -113,8 +113,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'refCount' => 'setRefCount', - 'size' => 'setSize' + 'pageSize' => 'setPageSize', + 'pageToken' => 'setPageToken' ]; /** @@ -123,8 +123,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'refCount' => 'getRefCount', - 'size' => 'getSize' + 'pageSize' => 'getPageSize', + 'pageToken' => 'getPageToken' ]; /** @@ -184,8 +184,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['refCount'] = $data['refCount'] ?? null; - $this->container['size'] = $data['size'] ?? null; + $this->container['pageSize'] = $data['pageSize'] ?? 250; + $this->container['pageToken'] = $data['pageToken'] ?? '1'; } /** @@ -197,12 +197,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['refCount'] === null) { - $invalidProperties[] = "'refCount' can't be null"; + if (!is_null($this->container['pageSize']) && ($this->container['pageSize'] > 1000)) { + $invalidProperties[] = "invalid value for 'pageSize', must be smaller than or equal to 1000."; } - if ($this->container['size'] === null) { - $invalidProperties[] = "'size' can't be null"; + + if (!is_null($this->container['pageSize']) && ($this->container['pageSize'] < 1)) { + $invalidProperties[] = "invalid value for 'pageSize', must be bigger than or equal to 1."; } + return $invalidProperties; } @@ -219,49 +221,59 @@ public function valid() /** - * Gets refCount + * Gets pageSize * - * @return int + * @return int|null */ - public function getRefCount() + public function getPageSize() { - return $this->container['refCount']; + return $this->container['pageSize']; } /** - * Sets refCount + * Sets pageSize * - * @param int $refCount The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. + * @param int|null $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). * * @return self */ - public function setRefCount($refCount) + public function setPageSize($pageSize) { - $this->container['refCount'] = $refCount; + + if (!is_null($pageSize) && ($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)) { + throw new \InvalidArgumentException('invalid value for $pageSize when calling TokenPagination., must be bigger than or equal to 1.'); + } + + $this->container['pageSize'] = $pageSize; return $this; } /** - * Gets size + * Gets pageToken * - * @return int + * @return string|null */ - public function getSize() + public function getPageToken() { - return $this->container['size']; + return $this->container['pageToken']; } /** - * Sets size + * Sets pageToken * - * @param int $size Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") + * @param string|null $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). * * @return self */ - public function setSize($size) + public function setPageToken($pageToken) { - $this->container['size'] = $size; + + + $this->container['pageToken'] = $pageToken; return $this; } diff --git a/clients/hydra/php/lib/Model/PluginConfigUser.php b/clients/hydra/php/lib/Model/TokenPaginationHeaders.php similarity index 79% rename from clients/hydra/php/lib/Model/PluginConfigUser.php rename to clients/hydra/php/lib/Model/TokenPaginationHeaders.php index 9d1430b84b8..fc39e6ff7a2 100644 --- a/clients/hydra/php/lib/Model/PluginConfigUser.php +++ b/clients/hydra/php/lib/Model/TokenPaginationHeaders.php @@ -1,6 +1,6 @@ 'int', - 'uID' => 'int' + 'link' => 'string', + 'xTotalCount' => 'string' ]; /** @@ -72,8 +72,8 @@ class PluginConfigUser implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'gID' => 'uint32', - 'uID' => 'uint32' + 'link' => null, + 'xTotalCount' => null ]; /** @@ -103,8 +103,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'gID' => 'GID', - 'uID' => 'UID' + 'link' => 'link', + 'xTotalCount' => 'x-total-count' ]; /** @@ -113,8 +113,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'gID' => 'setGID', - 'uID' => 'setUID' + 'link' => 'setLink', + 'xTotalCount' => 'setXTotalCount' ]; /** @@ -123,8 +123,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'gID' => 'getGID', - 'uID' => 'getUID' + 'link' => 'getLink', + 'xTotalCount' => 'getXTotalCount' ]; /** @@ -184,8 +184,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['gID'] = $data['gID'] ?? null; - $this->container['uID'] = $data['uID'] ?? null; + $this->container['link'] = $data['link'] ?? null; + $this->container['xTotalCount'] = $data['xTotalCount'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets gID + * Gets link * - * @return int|null + * @return string|null */ - public function getGID() + public function getLink() { - return $this->container['gID']; + return $this->container['link']; } /** - * Sets gID + * Sets link * - * @param int|null $gID g ID + * @param string|null $link 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 self */ - public function setGID($gID) + public function setLink($link) { - $this->container['gID'] = $gID; + $this->container['link'] = $link; return $this; } /** - * Gets uID + * Gets xTotalCount * - * @return int|null + * @return string|null */ - public function getUID() + public function getXTotalCount() { - return $this->container['uID']; + return $this->container['xTotalCount']; } /** - * Sets uID + * Sets xTotalCount * - * @param int|null $uID UID + * @param string|null $xTotalCount The total number of clients. in: header * * @return self */ - public function setUID($uID) + public function setXTotalCount($xTotalCount) { - $this->container['uID'] = $uID; + $this->container['xTotalCount'] = $xTotalCount; return $this; } diff --git a/clients/hydra/php/lib/Model/PluginConfigArgs.php b/clients/hydra/php/lib/Model/TokenPaginationRequestParameters.php similarity index 66% rename from clients/hydra/php/lib/Model/PluginConfigArgs.php rename to clients/hydra/php/lib/Model/TokenPaginationRequestParameters.php index cbdaba66527..064bfaac07a 100644 --- a/clients/hydra/php/lib/Model/PluginConfigArgs.php +++ b/clients/hydra/php/lib/Model/TokenPaginationRequestParameters.php @@ -1,6 +1,6 @@ 'string', - 'name' => 'string', - 'settable' => 'string[]', - 'value' => 'string[]' + 'pageSize' => 'int', + 'pageToken' => 'string' ]; /** @@ -74,10 +73,8 @@ class PluginConfigArgs implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'description' => null, - 'name' => null, - 'settable' => null, - 'value' => null + 'pageSize' => 'int64', + 'pageToken' => null ]; /** @@ -107,10 +104,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'description' => 'Description', - 'name' => 'Name', - 'settable' => 'Settable', - 'value' => 'Value' + 'pageSize' => 'page_size', + 'pageToken' => 'page_token' ]; /** @@ -119,10 +114,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'description' => 'setDescription', - 'name' => 'setName', - 'settable' => 'setSettable', - 'value' => 'setValue' + 'pageSize' => 'setPageSize', + 'pageToken' => 'setPageToken' ]; /** @@ -131,10 +124,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'description' => 'getDescription', - 'name' => 'getName', - 'settable' => 'getSettable', - 'value' => 'getValue' + 'pageSize' => 'getPageSize', + 'pageToken' => 'getPageToken' ]; /** @@ -194,10 +185,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['description'] = $data['description'] ?? null; - $this->container['name'] = $data['name'] ?? null; - $this->container['settable'] = $data['settable'] ?? null; - $this->container['value'] = $data['value'] ?? null; + $this->container['pageSize'] = $data['pageSize'] ?? 250; + $this->container['pageToken'] = $data['pageToken'] ?? '1'; } /** @@ -209,18 +198,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['description'] === null) { - $invalidProperties[] = "'description' can't be null"; + if (!is_null($this->container['pageSize']) && ($this->container['pageSize'] > 500)) { + $invalidProperties[] = "invalid value for 'pageSize', must be smaller than or equal to 500."; } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['settable'] === null) { - $invalidProperties[] = "'settable' can't be null"; - } - if ($this->container['value'] === null) { - $invalidProperties[] = "'value' can't be null"; + + if (!is_null($this->container['pageSize']) && ($this->container['pageSize'] < 1)) { + $invalidProperties[] = "invalid value for 'pageSize', must be bigger than or equal to 1."; } + return $invalidProperties; } @@ -237,97 +222,59 @@ public function valid() /** - * Gets description + * Gets pageSize * - * @return string + * @return int|null */ - public function getDescription() + public function getPageSize() { - return $this->container['description']; + return $this->container['pageSize']; } /** - * Sets description + * Sets pageSize * - * @param string $description description + * @param int|null $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). * * @return self */ - public function setDescription($description) + public function setPageSize($pageSize) { - $this->container['description'] = $description; - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } + if (!is_null($pageSize) && ($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)) { + throw new \InvalidArgumentException('invalid value for $pageSize when calling TokenPaginationRequestParameters., must be bigger than or equal to 1.'); + } - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; + $this->container['pageSize'] = $pageSize; return $this; } /** - * Gets settable + * Gets pageToken * - * @return string[] + * @return string|null */ - public function getSettable() + public function getPageToken() { - return $this->container['settable']; + return $this->container['pageToken']; } /** - * Sets settable + * Sets pageToken * - * @param string[] $settable settable + * @param string|null $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). * * @return self */ - public function setSettable($settable) + public function setPageToken($pageToken) { - $this->container['settable'] = $settable; - return $this; - } - - /** - * Gets value - * - * @return string[] - */ - public function getValue() - { - return $this->container['value']; - } - /** - * Sets value - * - * @param string[] $value value - * - * @return self - */ - public function setValue($value) - { - $this->container['value'] = $value; + $this->container['pageToken'] = $pageToken; return $this; } diff --git a/clients/hydra/php/lib/Model/TokenPaginationResponseHeaders.php b/clients/hydra/php/lib/Model/TokenPaginationResponseHeaders.php new file mode 100644 index 00000000000..c3df5de8691 --- /dev/null +++ b/clients/hydra/php/lib/Model/TokenPaginationResponseHeaders.php @@ -0,0 +1,352 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class TokenPaginationResponseHeaders implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'tokenPaginationResponseHeaders'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'link' => 'string', + 'xTotalCount' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'link' => null, + 'xTotalCount' => 'int64' + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'link' => 'link', + 'xTotalCount' => 'x-total-count' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'link' => 'setLink', + 'xTotalCount' => 'setXTotalCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'link' => 'getLink', + 'xTotalCount' => 'getXTotalCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['link'] = $data['link'] ?? null; + $this->container['xTotalCount'] = $data['xTotalCount'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets link + * + * @return string|null + */ + public function getLink() + { + return $this->container['link']; + } + + /** + * Sets link + * + * @param string|null $link 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\" + * + * @return self + */ + public function setLink($link) + { + $this->container['link'] = $link; + + return $this; + } + + /** + * Gets xTotalCount + * + * @return int|null + */ + public function getXTotalCount() + { + return $this->container['xTotalCount']; + } + + /** + * Sets xTotalCount + * + * @param int|null $xTotalCount The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + * + * @return self + */ + public function setXTotalCount($xTotalCount) + { + $this->container['xTotalCount'] = $xTotalCount; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/clients/hydra/php/lib/Model/TrustJwtGrantIssuerBody.php b/clients/hydra/php/lib/Model/TrustOAuth2JwtGrantIssuer.php similarity index 85% rename from clients/hydra/php/lib/Model/TrustJwtGrantIssuerBody.php rename to clients/hydra/php/lib/Model/TrustOAuth2JwtGrantIssuer.php index 1c3c95536ad..20d7a1ce309 100644 --- a/clients/hydra/php/lib/Model/TrustJwtGrantIssuerBody.php +++ b/clients/hydra/php/lib/Model/TrustOAuth2JwtGrantIssuer.php @@ -1,6 +1,6 @@ 'bool', 'expiresAt' => '\DateTime', 'issuer' => 'string', - 'jwk' => '\Ory\Hydra\Client\Model\JSONWebKey', + 'jwk' => '\Ory\Hydra\Client\Model\JsonWebKey', 'scope' => 'string[]', 'subject' => 'string' ]; @@ -74,6 +77,7 @@ class TrustJwtGrantIssuerBody implements ModelInterface, ArrayAccess, \JsonSeria * @psalm-var array */ protected static $openAPIFormats = [ + 'allowAnySubject' => null, 'expiresAt' => 'date-time', 'issuer' => null, 'jwk' => null, @@ -108,6 +112,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'allowAnySubject' => 'allow_any_subject', 'expiresAt' => 'expires_at', 'issuer' => 'issuer', 'jwk' => 'jwk', @@ -121,6 +126,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'allowAnySubject' => 'setAllowAnySubject', 'expiresAt' => 'setExpiresAt', 'issuer' => 'setIssuer', 'jwk' => 'setJwk', @@ -134,6 +140,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'allowAnySubject' => 'getAllowAnySubject', 'expiresAt' => 'getExpiresAt', 'issuer' => 'getIssuer', 'jwk' => 'getJwk', @@ -198,6 +205,7 @@ 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; @@ -226,9 +234,6 @@ public function listInvalidProperties() if ($this->container['scope'] === null) { $invalidProperties[] = "'scope' can't be null"; } - if ($this->container['subject'] === null) { - $invalidProperties[] = "'subject' can't be null"; - } return $invalidProperties; } @@ -244,6 +249,30 @@ public function valid() } + /** + * Gets allowAnySubject + * + * @return bool|null + */ + public function getAllowAnySubject() + { + return $this->container['allowAnySubject']; + } + + /** + * Sets allowAnySubject + * + * @param bool|null $allowAnySubject The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + * + * @return self + */ + public function setAllowAnySubject($allowAnySubject) + { + $this->container['allowAnySubject'] = $allowAnySubject; + + return $this; + } + /** * Gets expiresAt * @@ -295,7 +324,7 @@ public function setIssuer($issuer) /** * Gets jwk * - * @return \Ory\Hydra\Client\Model\JSONWebKey + * @return \Ory\Hydra\Client\Model\JsonWebKey */ public function getJwk() { @@ -305,7 +334,7 @@ public function getJwk() /** * Sets jwk * - * @param \Ory\Hydra\Client\Model\JSONWebKey $jwk jwk + * @param \Ory\Hydra\Client\Model\JsonWebKey $jwk jwk * * @return self */ @@ -343,7 +372,7 @@ public function setScope($scope) /** * Gets subject * - * @return string + * @return string|null */ public function getSubject() { @@ -353,7 +382,7 @@ public function getSubject() /** * Sets subject * - * @param string $subject The \"subject\" identifies the principal that is the subject of the JWT. + * @param string|null $subject The \"subject\" identifies the principal that is the subject of the JWT. * * @return self */ diff --git a/clients/hydra/php/lib/Model/TrustedJwtGrantIssuer.php b/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantIssuer.php similarity index 87% rename from clients/hydra/php/lib/Model/TrustedJwtGrantIssuer.php rename to clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantIssuer.php index 6893e522e05..53cd2f5f8c0 100644 --- a/clients/hydra/php/lib/Model/TrustedJwtGrantIssuer.php +++ b/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantIssuer.php @@ -1,6 +1,6 @@ 'bool', 'createdAt' => '\DateTime', 'expiresAt' => '\DateTime', 'id' => 'string', 'issuer' => 'string', - 'publicKey' => '\Ory\Hydra\Client\Model\TrustedJsonWebKey', + 'publicKey' => '\Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantJsonWebKey', 'scope' => 'string[]', 'subject' => 'string' ]; @@ -76,6 +79,7 @@ class TrustedJwtGrantIssuer implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ + 'allowAnySubject' => null, 'createdAt' => 'date-time', 'expiresAt' => 'date-time', 'id' => null, @@ -112,6 +116,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'allowAnySubject' => 'allow_any_subject', 'createdAt' => 'created_at', 'expiresAt' => 'expires_at', 'id' => 'id', @@ -127,6 +132,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'allowAnySubject' => 'setAllowAnySubject', 'createdAt' => 'setCreatedAt', 'expiresAt' => 'setExpiresAt', 'id' => 'setId', @@ -142,6 +148,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'allowAnySubject' => 'getAllowAnySubject', 'createdAt' => 'getCreatedAt', 'expiresAt' => 'getExpiresAt', 'id' => 'getId', @@ -208,6 +215,7 @@ 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; @@ -241,6 +249,30 @@ public function valid() } + /** + * Gets allowAnySubject + * + * @return bool|null + */ + public function getAllowAnySubject() + { + return $this->container['allowAnySubject']; + } + + /** + * Sets allowAnySubject + * + * @param bool|null $allowAnySubject The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + * + * @return self + */ + public function setAllowAnySubject($allowAnySubject) + { + $this->container['allowAnySubject'] = $allowAnySubject; + + return $this; + } + /** * Gets createdAt * @@ -340,7 +372,7 @@ public function setIssuer($issuer) /** * Gets publicKey * - * @return \Ory\Hydra\Client\Model\TrustedJsonWebKey|null + * @return \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantJsonWebKey|null */ public function getPublicKey() { @@ -350,7 +382,7 @@ public function getPublicKey() /** * Sets publicKey * - * @param \Ory\Hydra\Client\Model\TrustedJsonWebKey|null $publicKey publicKey + * @param \Ory\Hydra\Client\Model\TrustedOAuth2JwtGrantJsonWebKey|null $publicKey publicKey * * @return self */ diff --git a/clients/hydra/php/lib/Model/TrustedJsonWebKey.php b/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantJsonWebKey.php similarity index 93% rename from clients/hydra/php/lib/Model/TrustedJsonWebKey.php rename to clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantJsonWebKey.php index e66ffe27052..3b820fb2c21 100644 --- a/clients/hydra/php/lib/Model/TrustedJsonWebKey.php +++ b/clients/hydra/php/lib/Model/TrustedOAuth2JwtGrantJsonWebKey.php @@ -1,6 +1,6 @@ - * @template TKey int|null - * @template TValue mixed|null - */ -class Volume implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'Volume'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'createdAt' => 'string', - 'driver' => 'string', - 'labels' => 'array', - 'mountpoint' => 'string', - 'name' => 'string', - 'options' => 'array', - 'scope' => 'string', - 'status' => 'object', - 'usageData' => '\Ory\Hydra\Client\Model\VolumeUsageData' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'createdAt' => null, - 'driver' => null, - 'labels' => null, - 'mountpoint' => null, - 'name' => null, - 'options' => null, - 'scope' => null, - 'status' => null, - 'usageData' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'createdAt' => 'CreatedAt', - 'driver' => 'Driver', - 'labels' => 'Labels', - 'mountpoint' => 'Mountpoint', - 'name' => 'Name', - 'options' => 'Options', - 'scope' => 'Scope', - 'status' => 'Status', - 'usageData' => 'UsageData' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'createdAt' => 'setCreatedAt', - 'driver' => 'setDriver', - 'labels' => 'setLabels', - 'mountpoint' => 'setMountpoint', - 'name' => 'setName', - 'options' => 'setOptions', - 'scope' => 'setScope', - 'status' => 'setStatus', - 'usageData' => 'setUsageData' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'createdAt' => 'getCreatedAt', - 'driver' => 'getDriver', - 'labels' => 'getLabels', - 'mountpoint' => 'getMountpoint', - 'name' => 'getName', - 'options' => 'getOptions', - 'scope' => 'getScope', - 'status' => 'getStatus', - 'usageData' => 'getUsageData' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['createdAt'] = $data['createdAt'] ?? null; - $this->container['driver'] = $data['driver'] ?? null; - $this->container['labels'] = $data['labels'] ?? null; - $this->container['mountpoint'] = $data['mountpoint'] ?? null; - $this->container['name'] = $data['name'] ?? null; - $this->container['options'] = $data['options'] ?? null; - $this->container['scope'] = $data['scope'] ?? null; - $this->container['status'] = $data['status'] ?? null; - $this->container['usageData'] = $data['usageData'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['driver'] === null) { - $invalidProperties[] = "'driver' can't be null"; - } - if ($this->container['labels'] === null) { - $invalidProperties[] = "'labels' can't be null"; - } - if ($this->container['mountpoint'] === null) { - $invalidProperties[] = "'mountpoint' can't be null"; - } - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['options'] === null) { - $invalidProperties[] = "'options' can't be null"; - } - if ($this->container['scope'] === null) { - $invalidProperties[] = "'scope' can't be null"; - } - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets createdAt - * - * @return string|null - */ - public function getCreatedAt() - { - return $this->container['createdAt']; - } - - /** - * Sets createdAt - * - * @param string|null $createdAt Date/Time the volume was created. - * - * @return self - */ - public function setCreatedAt($createdAt) - { - $this->container['createdAt'] = $createdAt; - - return $this; - } - - /** - * Gets driver - * - * @return string - */ - public function getDriver() - { - return $this->container['driver']; - } - - /** - * Sets driver - * - * @param string $driver Name of the volume driver used by the volume. - * - * @return self - */ - public function setDriver($driver) - { - $this->container['driver'] = $driver; - - return $this; - } - - /** - * Gets labels - * - * @return array - */ - public function getLabels() - { - return $this->container['labels']; - } - - /** - * Sets labels - * - * @param array $labels User-defined key/value metadata. - * - * @return self - */ - public function setLabels($labels) - { - $this->container['labels'] = $labels; - - return $this; - } - - /** - * Gets mountpoint - * - * @return string - */ - public function getMountpoint() - { - return $this->container['mountpoint']; - } - - /** - * Sets mountpoint - * - * @param string $mountpoint Mount path of the volume on the host. - * - * @return self - */ - public function setMountpoint($mountpoint) - { - $this->container['mountpoint'] = $mountpoint; - - return $this; - } - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name Name of the volume. - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets options - * - * @return array - */ - public function getOptions() - { - return $this->container['options']; - } - - /** - * Sets options - * - * @param array $options The driver specific options used when creating the volume. - * - * @return self - */ - public function setOptions($options) - { - $this->container['options'] = $options; - - return $this; - } - - /** - * Gets scope - * - * @return string - */ - public function getScope() - { - return $this->container['scope']; - } - - /** - * Sets scope - * - * @param string $scope The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - * - * @return self - */ - public function setScope($scope) - { - $this->container['scope'] = $scope; - - return $this; - } - - /** - * Gets status - * - * @return object|null - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param object|null $status Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - * - * @return self - */ - public function setStatus($status) - { - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets usageData - * - * @return \Ory\Hydra\Client\Model\VolumeUsageData|null - */ - public function getUsageData() - { - return $this->container['usageData']; - } - - /** - * Sets usageData - * - * @param \Ory\Hydra\Client\Model\VolumeUsageData|null $usageData usageData - * - * @return self - */ - public function setUsageData($usageData) - { - $this->container['usageData'] = $usageData; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/clients/hydra/php/lib/ObjectSerializer.php b/clients/hydra/php/lib/ObjectSerializer.php index a955fddddc8..fdb4b0a2f1d 100644 --- a/clients/hydra/php/lib/ObjectSerializer.php +++ b/clients/hydra/php/lib/ObjectSerializer.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/test/Api/JwkApiTest.php b/clients/hydra/php/test/Api/JwkApiTest.php new file mode 100644 index 00000000000..005d225d7d6 --- /dev/null +++ b/clients/hydra/php/test/Api/JwkApiTest.php @@ -0,0 +1,158 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test case for deleteJsonWebKey + * + * Delete JSON Web Key. + * + */ + public function testDeleteJsonWebKey() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for deleteJsonWebKeySet + * + * Delete JSON Web Key Set. + * + */ + public function testDeleteJsonWebKeySet() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for getJsonWebKey + * + * Get JSON Web Key. + * + */ + public function testGetJsonWebKey() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for getJsonWebKeySet + * + * Retrieve a JSON Web Key Set. + * + */ + public function testGetJsonWebKeySet() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for setJsonWebKey + * + * Set JSON Web Key. + * + */ + public function testSetJsonWebKey() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for setJsonWebKeySet + * + * Update a JSON Web Key Set. + * + */ + public function testSetJsonWebKeySet() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/clients/hydra/php/test/Api/MetadataApiTest.php b/clients/hydra/php/test/Api/MetadataApiTest.php index f845a02c83c..db476c0da72 100644 --- a/clients/hydra/php/test/Api/MetadataApiTest.php +++ b/clients/hydra/php/test/Api/MetadataApiTest.php @@ -10,11 +10,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ @@ -72,12 +73,36 @@ public static function tearDownAfterClass(): void } /** - * Test case for prometheus + * Test case for getVersion * - * Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so:. + * Return Running Software Version.. * */ - public function testPrometheus() + public function testGetVersion() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for isAlive + * + * Check HTTP Server Status. + * + */ + public function testIsAlive() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for isReady + * + * Check HTTP Server and Database Status. + * + */ + public function testIsReady() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Api/AdminApiTest.php b/clients/hydra/php/test/Api/OAuth2ApiTest.php similarity index 54% rename from clients/hydra/php/test/Api/AdminApiTest.php rename to clients/hydra/php/test/Api/OAuth2ApiTest.php index e9d93439775..c1dcab851ef 100644 --- a/clients/hydra/php/test/Api/AdminApiTest.php +++ b/clients/hydra/php/test/Api/OAuth2ApiTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test case for acceptLoginRequest + * Test case for acceptOAuth2LoginRequest * - * Accept a Login Request. + * Accept OAuth 2.0 Login Request. * */ - public function testAcceptLoginRequest() + public function testAcceptOAuth2LoginRequest() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for acceptLogoutRequest + * Test case for acceptOAuth2LogoutRequest * - * Accept a Logout Request. + * Accept OAuth 2.0 Session Logout Request. * */ - public function testAcceptLogoutRequest() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for createJsonWebKeySet - * - * Generate a New JSON Web Key. - * - */ - public function testCreateJsonWebKeySet() + public function testAcceptOAuth2LogoutRequest() { // TODO: implement $this->markTestIncomplete('Not implemented'); @@ -122,7 +111,7 @@ public function testCreateJsonWebKeySet() /** * Test case for createOAuth2Client * - * Create an OAuth 2.0 Client. + * Create OAuth 2.0 Client. * */ public function testCreateOAuth2Client() @@ -131,34 +120,10 @@ public function testCreateOAuth2Client() $this->markTestIncomplete('Not implemented'); } - /** - * Test case for deleteJsonWebKey - * - * Delete a JSON Web Key. - * - */ - public function testDeleteJsonWebKey() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for deleteJsonWebKeySet - * - * Delete a JSON Web Key Set. - * - */ - public function testDeleteJsonWebKeySet() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - /** * Test case for deleteOAuth2Client * - * Deletes an OAuth 2.0 Client. + * Delete OAuth 2.0 Client. * */ public function testDeleteOAuth2Client() @@ -170,7 +135,7 @@ public function testDeleteOAuth2Client() /** * Test case for deleteOAuth2Token * - * Delete OAuth2 Access Tokens from a Client. + * Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client. * */ public function testDeleteOAuth2Token() @@ -180,180 +145,144 @@ public function testDeleteOAuth2Token() } /** - * Test case for deleteTrustedJwtGrantIssuer - * - * Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer. - * - */ - public function testDeleteTrustedJwtGrantIssuer() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for flushInactiveOAuth2Tokens + * Test case for deleteTrustedOAuth2JwtGrantIssuer * - * Flush Expired OAuth2 Access Tokens. + * Delete Trusted OAuth2 JWT Bearer Grant Type Issuer. * */ - public function testFlushInactiveOAuth2Tokens() + public function testDeleteTrustedOAuth2JwtGrantIssuer() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for getConsentRequest - * - * Get Consent Request Information. - * - */ - public function testGetConsentRequest() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for getJsonWebKey - * - * Fetch a JSON Web Key. - * - */ - public function testGetJsonWebKey() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for getJsonWebKeySet + * Test case for getOAuth2Client * - * Retrieve a JSON Web Key Set. + * Get an OAuth 2.0 Client. * */ - public function testGetJsonWebKeySet() + public function testGetOAuth2Client() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for getLoginRequest + * Test case for getOAuth2ConsentRequest * - * Get a Login Request. + * Get OAuth 2.0 Consent Request. * */ - public function testGetLoginRequest() + public function testGetOAuth2ConsentRequest() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for getLogoutRequest + * Test case for getOAuth2LoginRequest * - * Get a Logout Request. + * Get OAuth 2.0 Login Request. * */ - public function testGetLogoutRequest() + public function testGetOAuth2LoginRequest() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for getOAuth2Client + * Test case for getOAuth2LogoutRequest * - * Get an OAuth 2.0 Client. + * Get OAuth 2.0 Session Logout Request. * */ - public function testGetOAuth2Client() + public function testGetOAuth2LogoutRequest() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for getTrustedJwtGrantIssuer + * Test case for getTrustedOAuth2JwtGrantIssuer * - * Get a Trusted OAuth2 JWT Bearer Grant Type Issuer. + * Get Trusted OAuth2 JWT Bearer Grant Type Issuer. * */ - public function testGetTrustedJwtGrantIssuer() + public function testGetTrustedOAuth2JwtGrantIssuer() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for getVersion + * Test case for introspectOAuth2Token * - * Get Service Version. + * Introspect OAuth2 Access and Refresh Tokens. * */ - public function testGetVersion() + public function testIntrospectOAuth2Token() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for introspectOAuth2Token + * Test case for listOAuth2Clients * - * Introspect OAuth2 Tokens. + * List OAuth 2.0 Clients. * */ - public function testIntrospectOAuth2Token() + public function testListOAuth2Clients() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for isInstanceAlive + * Test case for listOAuth2ConsentSessions * - * Check Alive Status. + * List OAuth 2.0 Consent Sessions of a Subject. * */ - public function testIsInstanceAlive() + public function testListOAuth2ConsentSessions() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for listOAuth2Clients + * Test case for listTrustedOAuth2JwtGrantIssuers * - * List OAuth 2.0 Clients. + * List Trusted OAuth2 JWT Bearer Grant Type Issuers. * */ - public function testListOAuth2Clients() + public function testListTrustedOAuth2JwtGrantIssuers() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for listSubjectConsentSessions + * Test case for oAuth2Authorize * - * Lists All Consent Sessions of a Subject. + * OAuth 2.0 Authorize Endpoint. * */ - public function testListSubjectConsentSessions() + public function testOAuth2Authorize() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for listTrustedJwtGrantIssuers + * Test case for oauth2TokenExchange * - * List Trusted OAuth2 JWT Bearer Grant Type Issuers. + * The OAuth 2.0 Token Endpoint. * */ - public function testListTrustedJwtGrantIssuers() + public function testOauth2TokenExchange() { // TODO: implement $this->markTestIncomplete('Not implemented'); @@ -362,7 +291,7 @@ public function testListTrustedJwtGrantIssuers() /** * Test case for patchOAuth2Client * - * Patch an OAuth 2.0 Client. + * Patch OAuth 2.0 Client. * */ public function testPatchOAuth2Client() @@ -372,108 +301,108 @@ public function testPatchOAuth2Client() } /** - * Test case for rejectConsentRequest + * Test case for rejectOAuth2ConsentRequest * - * Reject a Consent Request. + * Reject OAuth 2.0 Consent Request. * */ - public function testRejectConsentRequest() + public function testRejectOAuth2ConsentRequest() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for rejectLoginRequest + * Test case for rejectOAuth2LoginRequest * - * Reject a Login Request. + * Reject OAuth 2.0 Login Request. * */ - public function testRejectLoginRequest() + public function testRejectOAuth2LoginRequest() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for rejectLogoutRequest + * Test case for rejectOAuth2LogoutRequest * - * Reject a Logout Request. + * Reject OAuth 2.0 Session Logout Request. * */ - public function testRejectLogoutRequest() + public function testRejectOAuth2LogoutRequest() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for revokeAuthenticationSession + * Test case for revokeOAuth2ConsentSessions * - * Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session. + * Revoke OAuth 2.0 Consent Sessions of a Subject. * */ - public function testRevokeAuthenticationSession() + public function testRevokeOAuth2ConsentSessions() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for revokeConsentSessions + * Test case for revokeOAuth2LoginSessions * - * Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client. + * Revokes All OAuth 2.0 Login Sessions of a Subject. * */ - public function testRevokeConsentSessions() + public function testRevokeOAuth2LoginSessions() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for trustJwtGrantIssuer + * Test case for revokeOAuth2Token * - * Trust an OAuth2 JWT Bearer Grant Type Issuer. + * Revoke OAuth 2.0 Access or Refresh Token. * */ - public function testTrustJwtGrantIssuer() + public function testRevokeOAuth2Token() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for updateJsonWebKey + * Test case for setOAuth2Client * - * Update a JSON Web Key. + * Set OAuth 2.0 Client. * */ - public function testUpdateJsonWebKey() + public function testSetOAuth2Client() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for updateJsonWebKeySet + * Test case for setOAuth2ClientLifespans * - * Update a JSON Web Key Set. + * Set OAuth2 Client Token Lifespans. * */ - public function testUpdateJsonWebKeySet() + public function testSetOAuth2ClientLifespans() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test case for updateOAuth2Client + * Test case for trustOAuth2JwtGrantIssuer * - * Update an OAuth 2.0 Client. + * Trust OAuth2 JWT Bearer Grant Type Issuer. * */ - public function testUpdateOAuth2Client() + public function testTrustOAuth2JwtGrantIssuer() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Api/OidcApiTest.php b/clients/hydra/php/test/Api/OidcApiTest.php new file mode 100644 index 00000000000..24f71ace681 --- /dev/null +++ b/clients/hydra/php/test/Api/OidcApiTest.php @@ -0,0 +1,158 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test case for deleteOidcDynamicClient + * + * Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol. + * + */ + public function testDeleteOidcDynamicClient() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for discoverOidcConfiguration + * + * OpenID Connect Discovery. + * + */ + public function testDiscoverOidcConfiguration() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for getOidcDynamicClient + * + * Get OAuth2 Client using OpenID Dynamic Client Registration. + * + */ + public function testGetOidcDynamicClient() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for getOidcUserInfo + * + * OpenID Connect Userinfo. + * + */ + public function testGetOidcUserInfo() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for revokeOidcSession + * + * OpenID Connect Front- and Back-channel Enabled Logout. + * + */ + public function testRevokeOidcSession() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for setOidcDynamicClient + * + * Set OAuth2 Client using OpenID Dynamic Client Registration. + * + */ + public function testSetOidcDynamicClient() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/clients/hydra/php/test/Api/PublicApiTest.php b/clients/hydra/php/test/Api/PublicApiTest.php deleted file mode 100644 index 5a513e1bec8..00000000000 --- a/clients/hydra/php/test/Api/PublicApiTest.php +++ /dev/null @@ -1,217 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test case for discoverOpenIDConfiguration - * - * OpenID Connect Discovery. - * - */ - public function testDiscoverOpenIDConfiguration() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for dynamicClientRegistrationCreateOAuth2Client - * - * Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol. - * - */ - public function testDynamicClientRegistrationCreateOAuth2Client() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for dynamicClientRegistrationDeleteOAuth2Client - * - * Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol. - * - */ - public function testDynamicClientRegistrationDeleteOAuth2Client() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for dynamicClientRegistrationGetOAuth2Client - * - * Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol. - * - */ - public function testDynamicClientRegistrationGetOAuth2Client() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for dynamicClientRegistrationUpdateOAuth2Client - * - * Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol. - * - */ - public function testDynamicClientRegistrationUpdateOAuth2Client() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for isInstanceReady - * - * Check Readiness Status. - * - */ - public function testIsInstanceReady() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for oauth2Token - * - * The OAuth 2.0 Token Endpoint. - * - */ - public function testOauth2Token() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for oauthAuth - * - * The OAuth 2.0 Authorize Endpoint. - * - */ - public function testOauthAuth() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for revokeOAuth2Token - * - * Revoke OAuth2 Tokens. - * - */ - public function testRevokeOAuth2Token() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for userinfo - * - * OpenID Connect Userinfo. - * - */ - public function testUserinfo() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test case for wellKnown - * - * JSON Web Keys Discovery. - * - */ - public function testWellKnown() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Api/WellknownApiTest.php b/clients/hydra/php/test/Api/WellknownApiTest.php new file mode 100644 index 00000000000..81efa81f37d --- /dev/null +++ b/clients/hydra/php/test/Api/WellknownApiTest.php @@ -0,0 +1,86 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/clients/hydra/php/test/Model/ConsentRequestSessionTest.php b/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestSessionTest.php similarity index 79% rename from clients/hydra/php/test/Model/ConsentRequestSessionTest.php rename to clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestSessionTest.php index 7d25c6250bc..7693843164e 100644 --- a/clients/hydra/php/test/Model/ConsentRequestSessionTest.php +++ b/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestSessionTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/AcceptConsentRequestTest.php b/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestTest.php similarity index 85% rename from clients/hydra/php/test/Model/AcceptConsentRequestTest.php rename to clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestTest.php index 0c1a100bb6a..ce93966f890 100644 --- a/clients/hydra/php/test/Model/AcceptConsentRequestTest.php +++ b/clients/hydra/php/test/Model/AcceptOAuth2ConsentRequestTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/AcceptLoginRequestTest.php b/clients/hydra/php/test/Model/AcceptOAuth2LoginRequestTest.php similarity index 86% rename from clients/hydra/php/test/Model/AcceptLoginRequestTest.php rename to clients/hydra/php/test/Model/AcceptOAuth2LoginRequestTest.php index 7cfc2429d0e..993b6805868 100644 --- a/clients/hydra/php/test/Model/AcceptLoginRequestTest.php +++ b/clients/hydra/php/test/Model/AcceptOAuth2LoginRequestTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/JsonWebKeySetGeneratorRequestTest.php b/clients/hydra/php/test/Model/CreateJsonWebKeySetTest.php similarity index 79% rename from clients/hydra/php/test/Model/JsonWebKeySetGeneratorRequestTest.php rename to clients/hydra/php/test/Model/CreateJsonWebKeySetTest.php index e1ef902c930..329667e2f14 100644 --- a/clients/hydra/php/test/Model/JsonWebKeySetGeneratorRequestTest.php +++ b/clients/hydra/php/test/Model/CreateJsonWebKeySetTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/RejectRequestTest.php b/clients/hydra/php/test/Model/ErrorOAuth2Test.php similarity index 85% rename from clients/hydra/php/test/Model/RejectRequestTest.php rename to clients/hydra/php/test/Model/ErrorOAuth2Test.php index f77b619580a..9936b156982 100644 --- a/clients/hydra/php/test/Model/RejectRequestTest.php +++ b/clients/hydra/php/test/Model/ErrorOAuth2Test.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/FlushInactiveOAuth2TokensRequestTest.php b/clients/hydra/php/test/Model/FlushInactiveOAuth2TokensRequestTest.php deleted file mode 100644 index 387edb596c1..00000000000 --- a/clients/hydra/php/test/Model/FlushInactiveOAuth2TokensRequestTest.php +++ /dev/null @@ -1,90 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "notAfter" - */ - public function testPropertyNotAfter() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/GenericErrorTest.php b/clients/hydra/php/test/Model/GenericErrorTest.php index 403dfb3b79a..d853e168c17 100644 --- a/clients/hydra/php/test/Model/GenericErrorTest.php +++ b/clients/hydra/php/test/Model/GenericErrorTest.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/test/Model/HealthNotReadyStatusTest.php b/clients/hydra/php/test/Model/HealthNotReadyStatusTest.php index f301b5c7b9f..b8547d82cee 100644 --- a/clients/hydra/php/test/Model/HealthNotReadyStatusTest.php +++ b/clients/hydra/php/test/Model/HealthNotReadyStatusTest.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/test/Model/HealthStatusTest.php b/clients/hydra/php/test/Model/HealthStatusTest.php index ba2d429c936..9bdaaefa39b 100644 --- a/clients/hydra/php/test/Model/HealthStatusTest.php +++ b/clients/hydra/php/test/Model/HealthStatusTest.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/test/Model/PluginConfigNetworkTest.php b/clients/hydra/php/test/Model/InlineResponse2001Test.php similarity index 73% rename from clients/hydra/php/test/Model/PluginConfigNetworkTest.php rename to clients/hydra/php/test/Model/InlineResponse2001Test.php index 50ec204c071..33d33455597 100644 --- a/clients/hydra/php/test/Model/PluginConfigNetworkTest.php +++ b/clients/hydra/php/test/Model/InlineResponse2001Test.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test attribute "type" + * Test attribute "version" */ - public function testPropertyType() + public function testPropertyVersion() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/RequestWasHandledResponseTest.php b/clients/hydra/php/test/Model/InlineResponse200Test.php similarity index 72% rename from clients/hydra/php/test/Model/RequestWasHandledResponseTest.php rename to clients/hydra/php/test/Model/InlineResponse200Test.php index c78d91d3cac..e223cca795c 100644 --- a/clients/hydra/php/test/Model/RequestWasHandledResponseTest.php +++ b/clients/hydra/php/test/Model/InlineResponse200Test.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test attribute "redirectTo" + * Test attribute "status" */ - public function testPropertyRedirectTo() + public function testPropertyStatus() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/ContainerWaitOKBodyErrorTest.php b/clients/hydra/php/test/Model/InlineResponse503Test.php similarity index 71% rename from clients/hydra/php/test/Model/ContainerWaitOKBodyErrorTest.php rename to clients/hydra/php/test/Model/InlineResponse503Test.php index 4763b11fc02..321fa9ce745 100644 --- a/clients/hydra/php/test/Model/ContainerWaitOKBodyErrorTest.php +++ b/clients/hydra/php/test/Model/InlineResponse503Test.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test attribute "message" + * Test attribute "errors" */ - public function testPropertyMessage() + public function testPropertyErrors() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/OAuth2TokenIntrospectionTest.php b/clients/hydra/php/test/Model/IntrospectedOAuth2TokenTest.php similarity index 88% rename from clients/hydra/php/test/Model/OAuth2TokenIntrospectionTest.php rename to clients/hydra/php/test/Model/IntrospectedOAuth2TokenTest.php index 9d8966d1f76..e0d75b844ab 100644 --- a/clients/hydra/php/test/Model/OAuth2TokenIntrospectionTest.php +++ b/clients/hydra/php/test/Model/IntrospectedOAuth2TokenTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/JSONWebKeySetTest.php b/clients/hydra/php/test/Model/JSONWebKeySetTest.php deleted file mode 100644 index a831f1abc48..00000000000 --- a/clients/hydra/php/test/Model/JSONWebKeySetTest.php +++ /dev/null @@ -1,90 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "keys" - */ - public function testPropertyKeys() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/PatchDocumentTest.php b/clients/hydra/php/test/Model/JsonPatchTest.php similarity index 85% rename from clients/hydra/php/test/Model/PatchDocumentTest.php rename to clients/hydra/php/test/Model/JsonPatchTest.php index 6362d43b45a..4054523b7d0 100644 --- a/clients/hydra/php/test/Model/PatchDocumentTest.php +++ b/clients/hydra/php/test/Model/JsonPatchTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/JsonWebKeySetTest.php b/clients/hydra/php/test/Model/JsonWebKeySetTest.php new file mode 100644 index 00000000000..890864ffe3f --- /dev/null +++ b/clients/hydra/php/test/Model/JsonWebKeySetTest.php @@ -0,0 +1,91 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "keys" + */ + public function testPropertyKeys() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/clients/hydra/php/test/Model/JSONWebKeyTest.php b/clients/hydra/php/test/Model/JsonWebKeyTest.php similarity index 89% rename from clients/hydra/php/test/Model/JSONWebKeyTest.php rename to clients/hydra/php/test/Model/JsonWebKeyTest.php index ef99e0c4229..778ec117f4c 100644 --- a/clients/hydra/php/test/Model/JSONWebKeyTest.php +++ b/clients/hydra/php/test/Model/JsonWebKeyTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/OAuth2ClientTest.php b/clients/hydra/php/test/Model/OAuth2ClientTest.php index 22e25398c1e..48b4e7635c9 100644 --- a/clients/hydra/php/test/Model/OAuth2ClientTest.php +++ b/clients/hydra/php/test/Model/OAuth2ClientTest.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ @@ -34,7 +35,7 @@ * OAuth2ClientTest Class Doc Comment * * @category Class - * @description 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. * @package Ory\Hydra\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -97,6 +98,33 @@ public function testPropertyAudience() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "authorizationCodeGrantAccessTokenLifespan" + */ + public function testPropertyAuthorizationCodeGrantAccessTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "authorizationCodeGrantIdTokenLifespan" + */ + public function testPropertyAuthorizationCodeGrantIdTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "authorizationCodeGrantRefreshTokenLifespan" + */ + public function testPropertyAuthorizationCodeGrantRefreshTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "backchannelLogoutSessionRequired" */ @@ -115,6 +143,15 @@ public function testPropertyBackchannelLogoutUri() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "clientCredentialsGrantAccessTokenLifespan" + */ + public function testPropertyClientCredentialsGrantAccessTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "clientId" */ @@ -205,6 +242,24 @@ public function testPropertyGrantTypes() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "implicitGrantAccessTokenLifespan" + */ + public function testPropertyImplicitGrantAccessTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "implicitGrantIdTokenLifespan" + */ + public function testPropertyImplicitGrantIdTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "jwks" */ @@ -223,6 +278,15 @@ public function testPropertyJwksUri() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "jwtBearerGrantAccessTokenLifespan" + */ + public function testPropertyJwtBearerGrantAccessTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "logoUri" */ @@ -277,6 +341,33 @@ public function testPropertyRedirectUris() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "refreshTokenGrantAccessTokenLifespan" + */ + public function testPropertyRefreshTokenGrantAccessTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "refreshTokenGrantIdTokenLifespan" + */ + public function testPropertyRefreshTokenGrantIdTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "refreshTokenGrantRefreshTokenLifespan" + */ + public function testPropertyRefreshTokenGrantRefreshTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "registrationAccessToken" */ diff --git a/clients/hydra/php/test/Model/VolumeTest.php b/clients/hydra/php/test/Model/OAuth2ClientTokenLifespansTest.php similarity index 54% rename from clients/hydra/php/test/Model/VolumeTest.php rename to clients/hydra/php/test/Model/OAuth2ClientTokenLifespansTest.php index 932054f7897..76d9747586e 100644 --- a/clients/hydra/php/test/Model/VolumeTest.php +++ b/clients/hydra/php/test/Model/OAuth2ClientTokenLifespansTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test attribute "createdAt" + * Test attribute "authorizationCodeGrantAccessTokenLifespan" */ - public function testPropertyCreatedAt() + public function testPropertyAuthorizationCodeGrantAccessTokenLifespan() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "driver" + * Test attribute "authorizationCodeGrantIdTokenLifespan" */ - public function testPropertyDriver() + public function testPropertyAuthorizationCodeGrantIdTokenLifespan() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "labels" + * Test attribute "authorizationCodeGrantRefreshTokenLifespan" */ - public function testPropertyLabels() + public function testPropertyAuthorizationCodeGrantRefreshTokenLifespan() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "mountpoint" + * Test attribute "clientCredentialsGrantAccessTokenLifespan" */ - public function testPropertyMountpoint() + public function testPropertyClientCredentialsGrantAccessTokenLifespan() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "name" + * Test attribute "implicitGrantAccessTokenLifespan" */ - public function testPropertyName() + public function testPropertyImplicitGrantAccessTokenLifespan() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "options" + * Test attribute "implicitGrantIdTokenLifespan" */ - public function testPropertyOptions() + public function testPropertyImplicitGrantIdTokenLifespan() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "scope" + * Test attribute "jwtBearerGrantAccessTokenLifespan" */ - public function testPropertyScope() + public function testPropertyJwtBearerGrantAccessTokenLifespan() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "status" + * Test attribute "refreshTokenGrantAccessTokenLifespan" */ - public function testPropertyStatus() + public function testPropertyRefreshTokenGrantAccessTokenLifespan() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "usageData" + * Test attribute "refreshTokenGrantIdTokenLifespan" */ - public function testPropertyUsageData() + public function testPropertyRefreshTokenGrantIdTokenLifespan() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "refreshTokenGrantRefreshTokenLifespan" + */ + public function testPropertyRefreshTokenGrantRefreshTokenLifespan() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/OpenIDConnectContextTest.php b/clients/hydra/php/test/Model/OAuth2ConsentRequestOpenIDConnectContextTest.php similarity index 81% rename from clients/hydra/php/test/Model/OpenIDConnectContextTest.php rename to clients/hydra/php/test/Model/OAuth2ConsentRequestOpenIDConnectContextTest.php index 5e811ae25b4..848bccd2897 100644 --- a/clients/hydra/php/test/Model/OpenIDConnectContextTest.php +++ b/clients/hydra/php/test/Model/OAuth2ConsentRequestOpenIDConnectContextTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/ConsentRequestTest.php b/clients/hydra/php/test/Model/OAuth2ConsentRequestTest.php similarity index 90% rename from clients/hydra/php/test/Model/ConsentRequestTest.php rename to clients/hydra/php/test/Model/OAuth2ConsentRequestTest.php index ced8f0d5d4c..a479355c971 100644 --- a/clients/hydra/php/test/Model/ConsentRequestTest.php +++ b/clients/hydra/php/test/Model/OAuth2ConsentRequestTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/OAuth2ConsentSessionExpiresAtTest.php b/clients/hydra/php/test/Model/OAuth2ConsentSessionExpiresAtTest.php new file mode 100644 index 00000000000..cbd22615b04 --- /dev/null +++ b/clients/hydra/php/test/Model/OAuth2ConsentSessionExpiresAtTest.php @@ -0,0 +1,127 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "accessToken" + */ + public function testPropertyAccessToken() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "authorizeCode" + */ + public function testPropertyAuthorizeCode() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "idToken" + */ + public function testPropertyIdToken() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "parContext" + */ + public function testPropertyParContext() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "refreshToken" + */ + public function testPropertyRefreshToken() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/clients/hydra/php/test/Model/PreviousConsentSessionTest.php b/clients/hydra/php/test/Model/OAuth2ConsentSessionTest.php similarity index 81% rename from clients/hydra/php/test/Model/PreviousConsentSessionTest.php rename to clients/hydra/php/test/Model/OAuth2ConsentSessionTest.php index 8f86ecb0641..31f7c9e2465 100644 --- a/clients/hydra/php/test/Model/PreviousConsentSessionTest.php +++ b/clients/hydra/php/test/Model/OAuth2ConsentSessionTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); @@ -88,6 +89,15 @@ public function testPropertyConsentRequest() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "expiresAt" + */ + public function testPropertyExpiresAt() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "grantAccessTokenAudience" */ diff --git a/clients/hydra/php/test/Model/LoginRequestTest.php b/clients/hydra/php/test/Model/OAuth2LoginRequestTest.php similarity index 89% rename from clients/hydra/php/test/Model/LoginRequestTest.php rename to clients/hydra/php/test/Model/OAuth2LoginRequestTest.php index 7e466398529..b85d0334195 100644 --- a/clients/hydra/php/test/Model/LoginRequestTest.php +++ b/clients/hydra/php/test/Model/OAuth2LoginRequestTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/LogoutRequestTest.php b/clients/hydra/php/test/Model/OAuth2LogoutRequestTest.php similarity index 86% rename from clients/hydra/php/test/Model/LogoutRequestTest.php rename to clients/hydra/php/test/Model/OAuth2LogoutRequestTest.php index c60cb30e234..85c8ef7e11c 100644 --- a/clients/hydra/php/test/Model/LogoutRequestTest.php +++ b/clients/hydra/php/test/Model/OAuth2LogoutRequestTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/CompletedRequestTest.php b/clients/hydra/php/test/Model/OAuth2RedirectToTest.php similarity index 78% rename from clients/hydra/php/test/Model/CompletedRequestTest.php rename to clients/hydra/php/test/Model/OAuth2RedirectToTest.php index 56479ecf161..720d5651719 100644 --- a/clients/hydra/php/test/Model/CompletedRequestTest.php +++ b/clients/hydra/php/test/Model/OAuth2RedirectToTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/Oauth2TokenResponseTest.php b/clients/hydra/php/test/Model/OAuth2TokenExchangeTest.php similarity index 85% rename from clients/hydra/php/test/Model/Oauth2TokenResponseTest.php rename to clients/hydra/php/test/Model/OAuth2TokenExchangeTest.php index 7b03830c864..c4cb8543e33 100644 --- a/clients/hydra/php/test/Model/Oauth2TokenResponseTest.php +++ b/clients/hydra/php/test/Model/OAuth2TokenExchangeTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/WellKnownTest.php b/clients/hydra/php/test/Model/OidcConfigurationTest.php similarity index 88% rename from clients/hydra/php/test/Model/WellKnownTest.php rename to clients/hydra/php/test/Model/OidcConfigurationTest.php index 4321276f1e1..0519d93cf05 100644 --- a/clients/hydra/php/test/Model/WellKnownTest.php +++ b/clients/hydra/php/test/Model/OidcConfigurationTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); @@ -169,6 +170,15 @@ public function testPropertyGrantTypesSupported() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "idTokenSignedResponseAlg" + */ + public function testPropertyIdTokenSignedResponseAlg() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "idTokenSigningAlgValuesSupported" */ @@ -313,6 +323,15 @@ public function testPropertyUserinfoEndpoint() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "userinfoSignedResponseAlg" + */ + public function testPropertyUserinfoSignedResponseAlg() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "userinfoSigningAlgValuesSupported" */ diff --git a/clients/hydra/php/test/Model/UserinfoResponseTest.php b/clients/hydra/php/test/Model/OidcUserInfoTest.php similarity index 92% rename from clients/hydra/php/test/Model/UserinfoResponseTest.php rename to clients/hydra/php/test/Model/OidcUserInfoTest.php index ec874128cdd..9578449f8a7 100644 --- a/clients/hydra/php/test/Model/UserinfoResponseTest.php +++ b/clients/hydra/php/test/Model/OidcUserInfoTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/PluginConfigUserTest.php b/clients/hydra/php/test/Model/PaginationHeadersTest.php similarity index 73% rename from clients/hydra/php/test/Model/PluginConfigUserTest.php rename to clients/hydra/php/test/Model/PaginationHeadersTest.php index 33bc6f9bbe7..d86220227e8 100644 --- a/clients/hydra/php/test/Model/PluginConfigUserTest.php +++ b/clients/hydra/php/test/Model/PaginationHeadersTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test attribute "gID" + * Test attribute "link" */ - public function testPropertyGID() + public function testPropertyLink() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "uID" + * Test attribute "xTotalCount" */ - public function testPropertyUID() + public function testPropertyXTotalCount() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/PluginConfigRootfsTest.php b/clients/hydra/php/test/Model/PaginationTest.php similarity index 72% rename from clients/hydra/php/test/Model/PluginConfigRootfsTest.php rename to clients/hydra/php/test/Model/PaginationTest.php index 040b3886516..960136f8af4 100644 --- a/clients/hydra/php/test/Model/PluginConfigRootfsTest.php +++ b/clients/hydra/php/test/Model/PaginationTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test attribute "diffIds" + * Test attribute "pageSize" */ - public function testPropertyDiffIds() + public function testPropertyPageSize() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "type" + * Test attribute "pageToken" */ - public function testPropertyType() + public function testPropertyPageToken() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/PluginConfigArgsTest.php b/clients/hydra/php/test/Model/PluginConfigArgsTest.php deleted file mode 100644 index 3bf0f66cc50..00000000000 --- a/clients/hydra/php/test/Model/PluginConfigArgsTest.php +++ /dev/null @@ -1,117 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "description" - */ - public function testPropertyDescription() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "name" - */ - public function testPropertyName() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "settable" - */ - public function testPropertySettable() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "value" - */ - public function testPropertyValue() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/PluginConfigInterfaceTest.php b/clients/hydra/php/test/Model/PluginConfigInterfaceTest.php deleted file mode 100644 index 69ec96d22cc..00000000000 --- a/clients/hydra/php/test/Model/PluginConfigInterfaceTest.php +++ /dev/null @@ -1,108 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "protocolScheme" - */ - public function testPropertyProtocolScheme() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "socket" - */ - public function testPropertySocket() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "types" - */ - public function testPropertyTypes() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/PluginConfigLinuxTest.php b/clients/hydra/php/test/Model/PluginConfigLinuxTest.php deleted file mode 100644 index e64e31085b5..00000000000 --- a/clients/hydra/php/test/Model/PluginConfigLinuxTest.php +++ /dev/null @@ -1,108 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "allowAllDevices" - */ - public function testPropertyAllowAllDevices() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "capabilities" - */ - public function testPropertyCapabilities() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "devices" - */ - public function testPropertyDevices() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/PluginConfigTest.php b/clients/hydra/php/test/Model/PluginConfigTest.php deleted file mode 100644 index 5a00c5dd608..00000000000 --- a/clients/hydra/php/test/Model/PluginConfigTest.php +++ /dev/null @@ -1,225 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "args" - */ - public function testPropertyArgs() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "description" - */ - public function testPropertyDescription() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "dockerVersion" - */ - public function testPropertyDockerVersion() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "documentation" - */ - public function testPropertyDocumentation() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "entrypoint" - */ - public function testPropertyEntrypoint() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "env" - */ - public function testPropertyEnv() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "interface" - */ - public function testPropertyInterface() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "ipcHost" - */ - public function testPropertyIpcHost() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "linux" - */ - public function testPropertyLinux() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "mounts" - */ - public function testPropertyMounts() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "network" - */ - public function testPropertyNetwork() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "pidHost" - */ - public function testPropertyPidHost() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "propagatedMount" - */ - public function testPropertyPropagatedMount() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "user" - */ - public function testPropertyUser() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "workDir" - */ - public function testPropertyWorkDir() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "rootfs" - */ - public function testPropertyRootfs() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/PluginDeviceTest.php b/clients/hydra/php/test/Model/PluginDeviceTest.php deleted file mode 100644 index 92d7aaf7948..00000000000 --- a/clients/hydra/php/test/Model/PluginDeviceTest.php +++ /dev/null @@ -1,117 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "description" - */ - public function testPropertyDescription() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "name" - */ - public function testPropertyName() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "path" - */ - public function testPropertyPath() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "settable" - */ - public function testPropertySettable() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/PluginEnvTest.php b/clients/hydra/php/test/Model/PluginEnvTest.php deleted file mode 100644 index 6167c98bd6d..00000000000 --- a/clients/hydra/php/test/Model/PluginEnvTest.php +++ /dev/null @@ -1,117 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "description" - */ - public function testPropertyDescription() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "name" - */ - public function testPropertyName() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "settable" - */ - public function testPropertySettable() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "value" - */ - public function testPropertyValue() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/PluginInterfaceTypeTest.php b/clients/hydra/php/test/Model/PluginInterfaceTypeTest.php deleted file mode 100644 index 75fb15df2c7..00000000000 --- a/clients/hydra/php/test/Model/PluginInterfaceTypeTest.php +++ /dev/null @@ -1,108 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "capability" - */ - public function testPropertyCapability() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "prefix" - */ - public function testPropertyPrefix() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "version" - */ - public function testPropertyVersion() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/PluginMountTest.php b/clients/hydra/php/test/Model/PluginMountTest.php deleted file mode 100644 index 859a94b9ba5..00000000000 --- a/clients/hydra/php/test/Model/PluginMountTest.php +++ /dev/null @@ -1,144 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "description" - */ - public function testPropertyDescription() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "destination" - */ - public function testPropertyDestination() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "name" - */ - public function testPropertyName() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "options" - */ - public function testPropertyOptions() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "settable" - */ - public function testPropertySettable() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "source" - */ - public function testPropertySource() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "type" - */ - public function testPropertyType() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/PluginSettingsTest.php b/clients/hydra/php/test/Model/PluginSettingsTest.php deleted file mode 100644 index 378917c25b0..00000000000 --- a/clients/hydra/php/test/Model/PluginSettingsTest.php +++ /dev/null @@ -1,117 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "args" - */ - public function testPropertyArgs() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "devices" - */ - public function testPropertyDevices() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "env" - */ - public function testPropertyEnv() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "mounts" - */ - public function testPropertyMounts() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/php/test/Model/JsonErrorTest.php b/clients/hydra/php/test/Model/RejectOAuth2RequestTest.php similarity index 78% rename from clients/hydra/php/test/Model/JsonErrorTest.php rename to clients/hydra/php/test/Model/RejectOAuth2RequestTest.php index a24413e471d..b4fdb61e94a 100644 --- a/clients/hydra/php/test/Model/JsonErrorTest.php +++ b/clients/hydra/php/test/Model/RejectOAuth2RequestTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); @@ -106,6 +107,15 @@ public function testPropertyErrorDescription() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "errorHint" + */ + public function testPropertyErrorHint() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "statusCode" */ diff --git a/clients/hydra/php/test/Model/TokenPaginationHeadersTest.php b/clients/hydra/php/test/Model/TokenPaginationHeadersTest.php new file mode 100644 index 00000000000..87ac0ef8cf2 --- /dev/null +++ b/clients/hydra/php/test/Model/TokenPaginationHeadersTest.php @@ -0,0 +1,100 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "link" + */ + public function testPropertyLink() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "xTotalCount" + */ + public function testPropertyXTotalCount() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/clients/hydra/php/test/Model/TokenPaginationRequestParametersTest.php b/clients/hydra/php/test/Model/TokenPaginationRequestParametersTest.php new file mode 100644 index 00000000000..67d78cecf5e --- /dev/null +++ b/clients/hydra/php/test/Model/TokenPaginationRequestParametersTest.php @@ -0,0 +1,100 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "pageSize" + */ + public function testPropertyPageSize() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "pageToken" + */ + public function testPropertyPageToken() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/clients/hydra/php/test/Model/TokenPaginationResponseHeadersTest.php b/clients/hydra/php/test/Model/TokenPaginationResponseHeadersTest.php new file mode 100644 index 00000000000..c1bfd9a90d1 --- /dev/null +++ b/clients/hydra/php/test/Model/TokenPaginationResponseHeadersTest.php @@ -0,0 +1,100 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "link" + */ + public function testPropertyLink() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "xTotalCount" + */ + public function testPropertyXTotalCount() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/clients/hydra/php/test/Model/TokenPaginationTest.php b/clients/hydra/php/test/Model/TokenPaginationTest.php new file mode 100644 index 00000000000..09c350c59cf --- /dev/null +++ b/clients/hydra/php/test/Model/TokenPaginationTest.php @@ -0,0 +1,100 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "pageSize" + */ + public function testPropertyPageSize() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "pageToken" + */ + public function testPropertyPageToken() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/clients/hydra/php/test/Model/TrustJwtGrantIssuerBodyTest.php b/clients/hydra/php/test/Model/TrustOAuth2JwtGrantIssuerTest.php similarity index 77% rename from clients/hydra/php/test/Model/TrustJwtGrantIssuerBodyTest.php rename to clients/hydra/php/test/Model/TrustOAuth2JwtGrantIssuerTest.php index f9813de79f3..f559fd48503 100644 --- a/clients/hydra/php/test/Model/TrustJwtGrantIssuerBodyTest.php +++ b/clients/hydra/php/test/Model/TrustOAuth2JwtGrantIssuerTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "allowAnySubject" + */ + public function testPropertyAllowAnySubject() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/TrustedJwtGrantIssuerTest.php b/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantIssuerTest.php similarity index 79% rename from clients/hydra/php/test/Model/TrustedJwtGrantIssuerTest.php rename to clients/hydra/php/test/Model/TrustedOAuth2JwtGrantIssuerTest.php index 9046928ecf7..76a6c58ac04 100644 --- a/clients/hydra/php/test/Model/TrustedJwtGrantIssuerTest.php +++ b/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantIssuerTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "allowAnySubject" + */ + public function testPropertyAllowAnySubject() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/TrustedJsonWebKeyTest.php b/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantJsonWebKeyTest.php similarity index 77% rename from clients/hydra/php/test/Model/TrustedJsonWebKeyTest.php rename to clients/hydra/php/test/Model/TrustedOAuth2JwtGrantJsonWebKeyTest.php index 7dfdf06a02b..18f73b02751 100644 --- a/clients/hydra/php/test/Model/TrustedJsonWebKeyTest.php +++ b/clients/hydra/php/test/Model/TrustedOAuth2JwtGrantJsonWebKeyTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); diff --git a/clients/hydra/php/test/Model/VersionTest.php b/clients/hydra/php/test/Model/VersionTest.php index 47695255bae..bd2371d5fc9 100644 --- a/clients/hydra/php/test/Model/VersionTest.php +++ b/clients/hydra/php/test/Model/VersionTest.php @@ -11,11 +11,12 @@ */ /** - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 5.4.0 */ diff --git a/clients/hydra/php/test/Model/VolumeUsageDataTest.php b/clients/hydra/php/test/Model/VolumeUsageDataTest.php deleted file mode 100644 index 07b10f0f284..00000000000 --- a/clients/hydra/php/test/Model/VolumeUsageDataTest.php +++ /dev/null @@ -1,99 +0,0 @@ -markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "refCount" - */ - public function testPropertyRefCount() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "size" - */ - public function testPropertySize() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } -} diff --git a/clients/hydra/python/.openapi-generator/FILES b/clients/hydra/python/.openapi-generator/FILES index 4611579a654..ec8b03fe518 100644 --- a/clients/hydra/python/.openapi-generator/FILES +++ b/clients/hydra/python/.openapi-generator/FILES @@ -3,114 +3,110 @@ .openapi-generator-ignore .travis.yml README.md -docs/AcceptConsentRequest.md -docs/AcceptLoginRequest.md -docs/AdminApi.md -docs/CompletedRequest.md -docs/ConsentRequest.md -docs/ConsentRequestSession.md -docs/ContainerWaitOKBodyError.md -docs/FlushInactiveOAuth2TokensRequest.md +docs/AcceptOAuth2ConsentRequest.md +docs/AcceptOAuth2ConsentRequestSession.md +docs/AcceptOAuth2LoginRequest.md +docs/CreateJsonWebKeySet.md +docs/ErrorOAuth2.md docs/GenericError.md +docs/GetVersion200Response.md docs/HealthNotReadyStatus.md docs/HealthStatus.md -docs/JSONWebKey.md -docs/JSONWebKeySet.md -docs/JsonError.md -docs/JsonWebKeySetGeneratorRequest.md -docs/LoginRequest.md -docs/LogoutRequest.md +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/OAuth2TokenIntrospection.md -docs/Oauth2TokenResponse.md -docs/OpenIDConnectContext.md -docs/PatchDocument.md -docs/PatchRequest.md -docs/PluginConfig.md -docs/PluginConfigArgs.md -docs/PluginConfigInterface.md -docs/PluginConfigLinux.md -docs/PluginConfigNetwork.md -docs/PluginConfigRootfs.md -docs/PluginConfigUser.md -docs/PluginDevice.md -docs/PluginEnv.md -docs/PluginInterfaceType.md -docs/PluginMount.md -docs/PluginSettings.md -docs/PreviousConsentSession.md -docs/PublicApi.md -docs/RejectRequest.md -docs/RequestWasHandledResponse.md -docs/StringSlicePipeDelimiter.md -docs/TrustJwtGrantIssuerBody.md -docs/TrustedJsonWebKey.md -docs/TrustedJwtGrantIssuer.md -docs/TrustedJwtGrantIssuers.md -docs/UserinfoResponse.md +docs/OAuth2ClientTokenLifespans.md +docs/OAuth2ConsentRequest.md +docs/OAuth2ConsentRequestOpenIDConnectContext.md +docs/OAuth2ConsentSession.md +docs/OAuth2ConsentSessionExpiresAt.md +docs/OAuth2ConsentSessions.md +docs/OAuth2LoginRequest.md +docs/OAuth2LogoutRequest.md +docs/OAuth2RedirectTo.md +docs/OAuth2TokenExchange.md +docs/OidcApi.md +docs/OidcConfiguration.md +docs/OidcUserInfo.md +docs/Pagination.md +docs/PaginationHeaders.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/Version.md -docs/Volume.md -docs/VolumeUsageData.md -docs/WellKnown.md +docs/WellknownApi.md git_push.sh ory_hydra_client/__init__.py ory_hydra_client/api/__init__.py -ory_hydra_client/api/admin_api.py +ory_hydra_client/api/jwk_api.py ory_hydra_client/api/metadata_api.py -ory_hydra_client/api/public_api.py +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/configuration.py ory_hydra_client/exceptions.py ory_hydra_client/model/__init__.py -ory_hydra_client/model/accept_consent_request.py -ory_hydra_client/model/accept_login_request.py -ory_hydra_client/model/completed_request.py -ory_hydra_client/model/consent_request.py -ory_hydra_client/model/consent_request_session.py -ory_hydra_client/model/container_wait_ok_body_error.py -ory_hydra_client/model/flush_inactive_o_auth2_tokens_request.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/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/json_error.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/json_web_key_set_generator_request.py -ory_hydra_client/model/login_request.py -ory_hydra_client/model/logout_request.py +ory_hydra_client/model/null_duration.py ory_hydra_client/model/o_auth2_client.py -ory_hydra_client/model/o_auth2_token_introspection.py -ory_hydra_client/model/oauth2_token_response.py -ory_hydra_client/model/open_id_connect_context.py -ory_hydra_client/model/patch_document.py -ory_hydra_client/model/patch_request.py -ory_hydra_client/model/plugin_config.py -ory_hydra_client/model/plugin_config_args.py -ory_hydra_client/model/plugin_config_interface.py -ory_hydra_client/model/plugin_config_linux.py -ory_hydra_client/model/plugin_config_network.py -ory_hydra_client/model/plugin_config_rootfs.py -ory_hydra_client/model/plugin_config_user.py -ory_hydra_client/model/plugin_device.py -ory_hydra_client/model/plugin_env.py -ory_hydra_client/model/plugin_interface_type.py -ory_hydra_client/model/plugin_mount.py -ory_hydra_client/model/plugin_settings.py -ory_hydra_client/model/previous_consent_session.py -ory_hydra_client/model/reject_request.py -ory_hydra_client/model/request_was_handled_response.py -ory_hydra_client/model/string_slice_pipe_delimiter.py -ory_hydra_client/model/trust_jwt_grant_issuer_body.py -ory_hydra_client/model/trusted_json_web_key.py -ory_hydra_client/model/trusted_jwt_grant_issuer.py -ory_hydra_client/model/trusted_jwt_grant_issuers.py -ory_hydra_client/model/userinfo_response.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/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/version.py -ory_hydra_client/model/volume.py -ory_hydra_client/model/volume_usage_data.py -ory_hydra_client/model/well_known.py ory_hydra_client/model_utils.py ory_hydra_client/models/__init__.py ory_hydra_client/rest.py @@ -119,54 +115,52 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_accept_consent_request.py -test/test_accept_login_request.py -test/test_admin_api.py -test/test_completed_request.py -test/test_consent_request.py -test/test_consent_request_session.py -test/test_container_wait_ok_body_error.py -test/test_flush_inactive_o_auth2_tokens_request.py +test/test_accept_o_auth2_consent_request.py +test/test_accept_o_auth2_consent_request_session.py +test/test_accept_o_auth2_login_request.py +test/test_create_json_web_key_set.py +test/test_error_o_auth2.py test/test_generic_error.py +test/test_get_version200_response.py test/test_health_not_ready_status.py test/test_health_status.py -test/test_json_error.py +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_json_web_key_set_generator_request.py -test/test_login_request.py -test/test_logout_request.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_token_introspection.py -test/test_oauth2_token_response.py -test/test_open_id_connect_context.py -test/test_patch_document.py -test/test_patch_request.py -test/test_plugin_config.py -test/test_plugin_config_args.py -test/test_plugin_config_interface.py -test/test_plugin_config_linux.py -test/test_plugin_config_network.py -test/test_plugin_config_rootfs.py -test/test_plugin_config_user.py -test/test_plugin_device.py -test/test_plugin_env.py -test/test_plugin_interface_type.py -test/test_plugin_mount.py -test/test_plugin_settings.py -test/test_previous_consent_session.py -test/test_public_api.py -test/test_reject_request.py -test/test_request_was_handled_response.py -test/test_string_slice_pipe_delimiter.py -test/test_trust_jwt_grant_issuer_body.py -test/test_trusted_json_web_key.py -test/test_trusted_jwt_grant_issuer.py -test/test_trusted_jwt_grant_issuers.py -test/test_userinfo_response.py +test/test_o_auth2_client_token_lifespans.py +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 +test/test_o_auth2_token_exchange.py +test/test_oidc_api.py +test/test_oidc_configuration.py +test/test_oidc_user_info.py +test/test_pagination.py +test/test_pagination_headers.py +test/test_reject_o_auth2_request.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_version.py -test/test_volume.py -test/test_volume_usage_data.py -test/test_well_known.py +test/test_wellknown_api.py tox.ini diff --git a/clients/hydra/python/.openapi-generator/VERSION b/clients/hydra/python/.openapi-generator/VERSION index 1e20ec35c64..6d54bbd7751 100644 --- a/clients/hydra/python/.openapi-generator/VERSION +++ b/clients/hydra/python/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/clients/hydra/python/README.md b/clients/hydra/python/README.md index 59577ad80e5..982d9730fb3 100644 --- a/clients/hydra/python/README.md +++ b/clients/hydra/python/README.md @@ -1,10 +1,11 @@ # ory-hydra-client -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. +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: v1.11.0 -- Package version: v1.11.0 +- API version: v2.0.1 +- Package version: v2.0.1 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. @@ -49,30 +50,11 @@ Please follow the [installation procedure](#installation--usage) and then run th import time import ory_hydra_client from pprint import pprint -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.accept_consent_request import AcceptConsentRequest -from ory_hydra_client.model.accept_login_request import AcceptLoginRequest -from ory_hydra_client.model.completed_request import CompletedRequest -from ory_hydra_client.model.consent_request import ConsentRequest -from ory_hydra_client.model.flush_inactive_o_auth2_tokens_request import FlushInactiveOAuth2TokensRequest -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.health_status import HealthStatus -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.json_error import JsonError -from ory_hydra_client.model.json_web_key_set_generator_request import JsonWebKeySetGeneratorRequest -from ory_hydra_client.model.login_request import LoginRequest -from ory_hydra_client.model.logout_request import LogoutRequest -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.o_auth2_token_introspection import OAuth2TokenIntrospection -from ory_hydra_client.model.patch_request import PatchRequest -from ory_hydra_client.model.previous_consent_session import PreviousConsentSession -from ory_hydra_client.model.reject_request import RejectRequest -from ory_hydra_client.model.request_was_handled_response import RequestWasHandledResponse -from ory_hydra_client.model.trust_jwt_grant_issuer_body import TrustJwtGrantIssuerBody -from ory_hydra_client.model.trusted_jwt_grant_issuer import TrustedJwtGrantIssuer -from ory_hydra_client.model.trusted_jwt_grant_issuers import TrustedJwtGrantIssuers -from ory_hydra_client.model.version import Version +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( @@ -84,30 +66,20 @@ 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 = admin_api.AdminApi(api_client) - consent_challenge = "consent_challenge_example" # str | -body = AcceptConsentRequest( - grant_access_token_audience=StringSlicePipeDelimiter([ - "grant_access_token_audience_example", - ]), - grant_scope=StringSlicePipeDelimiter([ - "grant_scope_example", - ]), - handled_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - remember=True, - remember_for=1, - session=ConsentRequestSession( - access_token={}, - id_token={}, - ), - ) # AcceptConsentRequest | (optional) + 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 | try: - # Accept a Consent Request - api_response = api_instance.accept_consent_request(consent_challenge, body=body) + # Create JSON Web Key + api_response = api_instance.create_json_web_key_set(set, create_json_web_key_set) pprint(api_response) except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->accept_consent_request: %s\n" % e) + print("Exception when calling JwkApi->create_json_web_key_set: %s\n" % e) ``` ## Documentation for API Endpoints @@ -116,104 +88,99 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdminApi* | [**accept_consent_request**](docs/AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -*AdminApi* | [**accept_login_request**](docs/AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -*AdminApi* | [**accept_logout_request**](docs/AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -*AdminApi* | [**create_json_web_key_set**](docs/AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a New JSON Web Key -*AdminApi* | [**create_o_auth2_client**](docs/AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 Client -*AdminApi* | [**delete_json_web_key**](docs/AdminApi.md#delete_json_web_key) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -*AdminApi* | [**delete_json_web_key_set**](docs/AdminApi.md#delete_json_web_key_set) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -*AdminApi* | [**delete_o_auth2_client**](docs/AdminApi.md#delete_o_auth2_client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -*AdminApi* | [**delete_o_auth2_token**](docs/AdminApi.md#delete_o_auth2_token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -*AdminApi* | [**delete_trusted_jwt_grant_issuer**](docs/AdminApi.md#delete_trusted_jwt_grant_issuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**flush_inactive_o_auth2_tokens**](docs/AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -*AdminApi* | [**get_consent_request**](docs/AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -*AdminApi* | [**get_json_web_key**](docs/AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -*AdminApi* | [**get_json_web_key_set**](docs/AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -*AdminApi* | [**get_login_request**](docs/AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a Login Request -*AdminApi* | [**get_logout_request**](docs/AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -*AdminApi* | [**get_o_auth2_client**](docs/AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -*AdminApi* | [**get_trusted_jwt_grant_issuer**](docs/AdminApi.md#get_trusted_jwt_grant_issuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**get_version**](docs/AdminApi.md#get_version) | **GET** /version | Get Service Version -*AdminApi* | [**introspect_o_auth2_token**](docs/AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -*AdminApi* | [**is_instance_alive**](docs/AdminApi.md#is_instance_alive) | **GET** /health/alive | Check Alive Status -*AdminApi* | [**list_o_auth2_clients**](docs/AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients -*AdminApi* | [**list_subject_consent_sessions**](docs/AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -*AdminApi* | [**list_trusted_jwt_grant_issuers**](docs/AdminApi.md#list_trusted_jwt_grant_issuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -*AdminApi* | [**patch_o_auth2_client**](docs/AdminApi.md#patch_o_auth2_client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -*AdminApi* | [**reject_consent_request**](docs/AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -*AdminApi* | [**reject_login_request**](docs/AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -*AdminApi* | [**reject_logout_request**](docs/AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -*AdminApi* | [**revoke_authentication_session**](docs/AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -*AdminApi* | [**revoke_consent_sessions**](docs/AdminApi.md#revoke_consent_sessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -*AdminApi* | [**trust_jwt_grant_issuer**](docs/AdminApi.md#trust_jwt_grant_issuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**update_json_web_key**](docs/AdminApi.md#update_json_web_key) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -*AdminApi* | [**update_json_web_key_set**](docs/AdminApi.md#update_json_web_key_set) | **PUT** /keys/{set} | Update a JSON Web Key Set -*AdminApi* | [**update_o_auth2_client**](docs/AdminApi.md#update_o_auth2_client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client -*MetadataApi* | [**prometheus**](docs/MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: -*PublicApi* | [**disconnect_user**](docs/PublicApi.md#disconnect_user) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -*PublicApi* | [**discover_open_id_configuration**](docs/PublicApi.md#discover_open_id_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -*PublicApi* | [**dynamic_client_registration_create_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_create_o_auth2_client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamic_client_registration_delete_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_delete_o_auth2_client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamic_client_registration_get_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_get_o_auth2_client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamic_client_registration_update_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_update_o_auth2_client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**is_instance_ready**](docs/PublicApi.md#is_instance_ready) | **GET** /health/ready | Check Readiness Status -*PublicApi* | [**oauth2_token**](docs/PublicApi.md#oauth2_token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -*PublicApi* | [**oauth_auth**](docs/PublicApi.md#oauth_auth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -*PublicApi* | [**revoke_o_auth2_token**](docs/PublicApi.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -*PublicApi* | [**userinfo**](docs/PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -*PublicApi* | [**well_known**](docs/PublicApi.md#well_known) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery +*JwkApi* | [**create_json_web_key_set**](docs/JwkApi.md#create_json_web_key_set) | **POST** /admin/keys/{set} | Create JSON Web Key +*JwkApi* | [**delete_json_web_key**](docs/JwkApi.md#delete_json_web_key) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key +*JwkApi* | [**delete_json_web_key_set**](docs/JwkApi.md#delete_json_web_key_set) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set +*JwkApi* | [**get_json_web_key**](docs/JwkApi.md#get_json_web_key) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key +*JwkApi* | [**get_json_web_key_set**](docs/JwkApi.md#get_json_web_key_set) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set +*JwkApi* | [**set_json_web_key**](docs/JwkApi.md#set_json_web_key) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key +*JwkApi* | [**set_json_web_key_set**](docs/JwkApi.md#set_json_web_key_set) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set +*MetadataApi* | [**get_version**](docs/MetadataApi.md#get_version) | **GET** /version | Return Running Software Version. +*MetadataApi* | [**is_alive**](docs/MetadataApi.md#is_alive) | **GET** /health/alive | Check HTTP Server Status +*MetadataApi* | [**is_ready**](docs/MetadataApi.md#is_ready) | **GET** /health/ready | Check HTTP Server and Database Status +*OAuth2Api* | [**accept_o_auth2_consent_request**](docs/OAuth2Api.md#accept_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +*OAuth2Api* | [**accept_o_auth2_login_request**](docs/OAuth2Api.md#accept_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +*OAuth2Api* | [**accept_o_auth2_logout_request**](docs/OAuth2Api.md#accept_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +*OAuth2Api* | [**create_o_auth2_client**](docs/OAuth2Api.md#create_o_auth2_client) | **POST** /admin/clients | Create OAuth 2.0 Client +*OAuth2Api* | [**delete_o_auth2_client**](docs/OAuth2Api.md#delete_o_auth2_client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client +*OAuth2Api* | [**delete_o_auth2_token**](docs/OAuth2Api.md#delete_o_auth2_token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +*OAuth2Api* | [**delete_trusted_o_auth2_jwt_grant_issuer**](docs/OAuth2Api.md#delete_trusted_o_auth2_jwt_grant_issuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**get_o_auth2_client**](docs/OAuth2Api.md#get_o_auth2_client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client +*OAuth2Api* | [**get_o_auth2_consent_request**](docs/OAuth2Api.md#get_o_auth2_consent_request) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +*OAuth2Api* | [**get_o_auth2_login_request**](docs/OAuth2Api.md#get_o_auth2_login_request) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +*OAuth2Api* | [**get_o_auth2_logout_request**](docs/OAuth2Api.md#get_o_auth2_logout_request) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +*OAuth2Api* | [**get_trusted_o_auth2_jwt_grant_issuer**](docs/OAuth2Api.md#get_trusted_o_auth2_jwt_grant_issuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**introspect_o_auth2_token**](docs/OAuth2Api.md#introspect_o_auth2_token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +*OAuth2Api* | [**list_o_auth2_clients**](docs/OAuth2Api.md#list_o_auth2_clients) | **GET** /admin/clients | List OAuth 2.0 Clients +*OAuth2Api* | [**list_o_auth2_consent_sessions**](docs/OAuth2Api.md#list_o_auth2_consent_sessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**list_trusted_o_auth2_jwt_grant_issuers**](docs/OAuth2Api.md#list_trusted_o_auth2_jwt_grant_issuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +*OAuth2Api* | [**o_auth2_authorize**](docs/OAuth2Api.md#o_auth2_authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint +*OAuth2Api* | [**oauth2_token_exchange**](docs/OAuth2Api.md#oauth2_token_exchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint +*OAuth2Api* | [**patch_o_auth2_client**](docs/OAuth2Api.md#patch_o_auth2_client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client +*OAuth2Api* | [**reject_o_auth2_consent_request**](docs/OAuth2Api.md#reject_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +*OAuth2Api* | [**reject_o_auth2_login_request**](docs/OAuth2Api.md#reject_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +*OAuth2Api* | [**reject_o_auth2_logout_request**](docs/OAuth2Api.md#reject_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +*OAuth2Api* | [**revoke_o_auth2_consent_sessions**](docs/OAuth2Api.md#revoke_o_auth2_consent_sessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**revoke_o_auth2_login_sessions**](docs/OAuth2Api.md#revoke_o_auth2_login_sessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +*OAuth2Api* | [**revoke_o_auth2_token**](docs/OAuth2Api.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +*OAuth2Api* | [**set_o_auth2_client**](docs/OAuth2Api.md#set_o_auth2_client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client +*OAuth2Api* | [**set_o_auth2_client_lifespans**](docs/OAuth2Api.md#set_o_auth2_client_lifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +*OAuth2Api* | [**trust_o_auth2_jwt_grant_issuer**](docs/OAuth2Api.md#trust_o_auth2_jwt_grant_issuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer +*OidcApi* | [**create_oidc_dynamic_client**](docs/OidcApi.md#create_oidc_dynamic_client) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**delete_oidc_dynamic_client**](docs/OidcApi.md#delete_oidc_dynamic_client) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +*OidcApi* | [**discover_oidc_configuration**](docs/OidcApi.md#discover_oidc_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery +*OidcApi* | [**get_oidc_dynamic_client**](docs/OidcApi.md#get_oidc_dynamic_client) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**get_oidc_user_info**](docs/OidcApi.md#get_oidc_user_info) | **GET** /userinfo | OpenID Connect Userinfo +*OidcApi* | [**revoke_oidc_session**](docs/OidcApi.md#revoke_oidc_session) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +*OidcApi* | [**set_oidc_dynamic_client**](docs/OidcApi.md#set_oidc_dynamic_client) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration +*WellknownApi* | [**discover_json_web_keys**](docs/WellknownApi.md#discover_json_web_keys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys ## Documentation For Models - - [AcceptConsentRequest](docs/AcceptConsentRequest.md) - - [AcceptLoginRequest](docs/AcceptLoginRequest.md) - - [CompletedRequest](docs/CompletedRequest.md) - - [ConsentRequest](docs/ConsentRequest.md) - - [ConsentRequestSession](docs/ConsentRequestSession.md) - - [ContainerWaitOKBodyError](docs/ContainerWaitOKBodyError.md) - - [FlushInactiveOAuth2TokensRequest](docs/FlushInactiveOAuth2TokensRequest.md) + - [AcceptOAuth2ConsentRequest](docs/AcceptOAuth2ConsentRequest.md) + - [AcceptOAuth2ConsentRequestSession](docs/AcceptOAuth2ConsentRequestSession.md) + - [AcceptOAuth2LoginRequest](docs/AcceptOAuth2LoginRequest.md) + - [CreateJsonWebKeySet](docs/CreateJsonWebKeySet.md) + - [ErrorOAuth2](docs/ErrorOAuth2.md) - [GenericError](docs/GenericError.md) + - [GetVersion200Response](docs/GetVersion200Response.md) - [HealthNotReadyStatus](docs/HealthNotReadyStatus.md) - [HealthStatus](docs/HealthStatus.md) - - [JSONWebKey](docs/JSONWebKey.md) - - [JSONWebKeySet](docs/JSONWebKeySet.md) - - [JsonError](docs/JsonError.md) - - [JsonWebKeySetGeneratorRequest](docs/JsonWebKeySetGeneratorRequest.md) - - [LoginRequest](docs/LoginRequest.md) - - [LogoutRequest](docs/LogoutRequest.md) + - [IntrospectedOAuth2Token](docs/IntrospectedOAuth2Token.md) + - [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) - - [OAuth2TokenIntrospection](docs/OAuth2TokenIntrospection.md) - - [Oauth2TokenResponse](docs/Oauth2TokenResponse.md) - - [OpenIDConnectContext](docs/OpenIDConnectContext.md) - - [PatchDocument](docs/PatchDocument.md) - - [PatchRequest](docs/PatchRequest.md) - - [PluginConfig](docs/PluginConfig.md) - - [PluginConfigArgs](docs/PluginConfigArgs.md) - - [PluginConfigInterface](docs/PluginConfigInterface.md) - - [PluginConfigLinux](docs/PluginConfigLinux.md) - - [PluginConfigNetwork](docs/PluginConfigNetwork.md) - - [PluginConfigRootfs](docs/PluginConfigRootfs.md) - - [PluginConfigUser](docs/PluginConfigUser.md) - - [PluginDevice](docs/PluginDevice.md) - - [PluginEnv](docs/PluginEnv.md) - - [PluginInterfaceType](docs/PluginInterfaceType.md) - - [PluginMount](docs/PluginMount.md) - - [PluginSettings](docs/PluginSettings.md) - - [PreviousConsentSession](docs/PreviousConsentSession.md) - - [RejectRequest](docs/RejectRequest.md) - - [RequestWasHandledResponse](docs/RequestWasHandledResponse.md) - - [StringSlicePipeDelimiter](docs/StringSlicePipeDelimiter.md) - - [TrustJwtGrantIssuerBody](docs/TrustJwtGrantIssuerBody.md) - - [TrustedJsonWebKey](docs/TrustedJsonWebKey.md) - - [TrustedJwtGrantIssuer](docs/TrustedJwtGrantIssuer.md) - - [TrustedJwtGrantIssuers](docs/TrustedJwtGrantIssuers.md) - - [UserinfoResponse](docs/UserinfoResponse.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) + - [OAuth2TokenExchange](docs/OAuth2TokenExchange.md) + - [OidcConfiguration](docs/OidcConfiguration.md) + - [OidcUserInfo](docs/OidcUserInfo.md) + - [Pagination](docs/Pagination.md) + - [PaginationHeaders](docs/PaginationHeaders.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) - [Version](docs/Version.md) - - [Volume](docs/Volume.md) - - [VolumeUsageData](docs/VolumeUsageData.md) - - [WellKnown](docs/WellKnown.md) ## Documentation For Authorization @@ -224,6 +191,11 @@ Class | Method | HTTP request | Description - **Type**: HTTP basic authentication +## bearer + +- **Type**: Bearer authentication + + ## oauth2 - **Type**: OAuth @@ -237,7 +209,7 @@ Class | Method | HTTP request | Description ## Author - +hi@ory.sh ## Notes for Large OpenAPI documents diff --git a/clients/hydra/python/docs/AcceptConsentRequest.md b/clients/hydra/python/docs/AcceptOAuth2ConsentRequest.md similarity index 73% rename from clients/hydra/python/docs/AcceptConsentRequest.md rename to clients/hydra/python/docs/AcceptOAuth2ConsentRequest.md index d93d03a30a0..d871d7f7eef 100644 --- a/clients/hydra/python/docs/AcceptConsentRequest.md +++ b/clients/hydra/python/docs/AcceptOAuth2ConsentRequest.md @@ -1,15 +1,15 @@ -# AcceptConsentRequest +# AcceptOAuth2ConsentRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**grant_access_token_audience** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**grant_scope** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] +**grant_access_token_audience** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] +**grant_scope** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [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** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [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] [[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/ConsentRequestSession.md b/clients/hydra/python/docs/AcceptOAuth2ConsentRequestSession.md similarity index 97% rename from clients/hydra/python/docs/ConsentRequestSession.md rename to clients/hydra/python/docs/AcceptOAuth2ConsentRequestSession.md index 8fa0b5dab62..67e73148d34 100644 --- a/clients/hydra/python/docs/ConsentRequestSession.md +++ b/clients/hydra/python/docs/AcceptOAuth2ConsentRequestSession.md @@ -1,4 +1,4 @@ -# ConsentRequestSession +# AcceptOAuth2ConsentRequestSession ## Properties diff --git a/clients/hydra/python/docs/AcceptLoginRequest.md b/clients/hydra/python/docs/AcceptOAuth2LoginRequest.md similarity index 96% rename from clients/hydra/python/docs/AcceptLoginRequest.md rename to clients/hydra/python/docs/AcceptOAuth2LoginRequest.md index 6347aef1ded..62381d6e3f3 100644 --- a/clients/hydra/python/docs/AcceptLoginRequest.md +++ b/clients/hydra/python/docs/AcceptOAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# AcceptLoginRequest +# AcceptOAuth2LoginRequest ## Properties @@ -6,7 +6,7 @@ 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** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] +**amr** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] **context** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [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] **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] diff --git a/clients/hydra/python/docs/AdminApi.md b/clients/hydra/python/docs/AdminApi.md deleted file mode 100644 index 0cb2559d392..00000000000 --- a/clients/hydra/python/docs/AdminApi.md +++ /dev/null @@ -1,2775 +0,0 @@ -# ory_hydra_client.AdminApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**accept_consent_request**](AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -[**accept_login_request**](AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -[**accept_logout_request**](AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -[**create_json_web_key_set**](AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a New JSON Web Key -[**create_o_auth2_client**](AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 Client -[**delete_json_web_key**](AdminApi.md#delete_json_web_key) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -[**delete_json_web_key_set**](AdminApi.md#delete_json_web_key_set) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -[**delete_o_auth2_client**](AdminApi.md#delete_o_auth2_client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -[**delete_o_auth2_token**](AdminApi.md#delete_o_auth2_token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -[**delete_trusted_jwt_grant_issuer**](AdminApi.md#delete_trusted_jwt_grant_issuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**flush_inactive_o_auth2_tokens**](AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -[**get_consent_request**](AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -[**get_json_web_key**](AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -[**get_json_web_key_set**](AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -[**get_login_request**](AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a Login Request -[**get_logout_request**](AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -[**get_o_auth2_client**](AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -[**get_trusted_jwt_grant_issuer**](AdminApi.md#get_trusted_jwt_grant_issuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**get_version**](AdminApi.md#get_version) | **GET** /version | Get Service Version -[**introspect_o_auth2_token**](AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -[**is_instance_alive**](AdminApi.md#is_instance_alive) | **GET** /health/alive | Check Alive Status -[**list_o_auth2_clients**](AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients -[**list_subject_consent_sessions**](AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -[**list_trusted_jwt_grant_issuers**](AdminApi.md#list_trusted_jwt_grant_issuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -[**patch_o_auth2_client**](AdminApi.md#patch_o_auth2_client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -[**reject_consent_request**](AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -[**reject_login_request**](AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -[**reject_logout_request**](AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -[**revoke_authentication_session**](AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -[**revoke_consent_sessions**](AdminApi.md#revoke_consent_sessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -[**trust_jwt_grant_issuer**](AdminApi.md#trust_jwt_grant_issuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -[**update_json_web_key**](AdminApi.md#update_json_web_key) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -[**update_json_web_key_set**](AdminApi.md#update_json_web_key_set) | **PUT** /keys/{set} | Update a JSON Web Key Set -[**update_o_auth2_client**](AdminApi.md#update_o_auth2_client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client - - -# **accept_consent_request** -> CompletedRequest accept_consent_request(consent_challenge) - -Accept a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.accept_consent_request import AcceptConsentRequest -from ory_hydra_client.model.completed_request import CompletedRequest -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - consent_challenge = "consent_challenge_example" # str | - body = AcceptConsentRequest( - grant_access_token_audience=StringSlicePipeDelimiter([ - "grant_access_token_audience_example", - ]), - grant_scope=StringSlicePipeDelimiter([ - "grant_scope_example", - ]), - handled_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - remember=True, - remember_for=1, - session=ConsentRequestSession( - access_token={}, - id_token={}, - ), - ) # AcceptConsentRequest | (optional) - - # example passing only required values which don't have defaults set - try: - # Accept a Consent Request - api_response = api_instance.accept_consent_request(consent_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->accept_consent_request: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Accept a Consent Request - api_response = api_instance.accept_consent_request(consent_challenge, body=body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->accept_consent_request: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consent_challenge** | **str**| | - **body** | [**AcceptConsentRequest**](AcceptConsentRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**404** | jsonError | - | -**500** | jsonError | - | - -[[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_login_request** -> CompletedRequest accept_login_request(login_challenge) - -Accept a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.accept_login_request import AcceptLoginRequest -from ory_hydra_client.model.completed_request import CompletedRequest -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - login_challenge = "login_challenge_example" # str | - body = AcceptLoginRequest( - acr="acr_example", - amr=StringSlicePipeDelimiter([ - "amr_example", - ]), - context={}, - force_subject_identifier="force_subject_identifier_example", - remember=True, - remember_for=1, - subject="subject_example", - ) # AcceptLoginRequest | (optional) - - # example passing only required values which don't have defaults set - try: - # Accept a Login Request - api_response = api_instance.accept_login_request(login_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->accept_login_request: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Accept a Login Request - api_response = api_instance.accept_login_request(login_challenge, body=body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->accept_login_request: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **login_challenge** | **str**| | - **body** | [**AcceptLoginRequest**](AcceptLoginRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**400** | jsonError | - | -**401** | jsonError | - | -**404** | jsonError | - | -**500** | jsonError | - | - -[[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_logout_request** -> CompletedRequest accept_logout_request(logout_challenge) - -Accept a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.completed_request import CompletedRequest -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - logout_challenge = "logout_challenge_example" # str | - - # example passing only required values which don't have defaults set - try: - # Accept a Logout Request - api_response = api_instance.accept_logout_request(logout_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->accept_logout_request: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logout_challenge** | **str**| | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**404** | jsonError | - | -**500** | jsonError | - | - -[[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_json_web_key_set** -> JSONWebKeySet create_json_web_key_set(set) - -Generate a New 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_web_key_set_generator_request import JsonWebKeySetGeneratorRequest -from ory_hydra_client.model.json_web_key_set import JSONWebKeySet -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - set = "set_example" # str | The set - body = JsonWebKeySetGeneratorRequest( - alg="alg_example", - kid="kid_example", - use="use_example", - ) # JsonWebKeySetGeneratorRequest | (optional) - - # example passing only required values which don't have defaults set - try: - # Generate a New JSON Web Key - api_response = api_instance.create_json_web_key_set(set) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->create_json_web_key_set: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Generate a New JSON Web Key - api_response = api_instance.create_json_web_key_set(set, body=body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->create_json_web_key_set: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **str**| The set | - **body** | [**JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md)| | [optional] - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | JSONWebKeySet | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - -[[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_o_auth2_client** -> OAuth2Client create_o_auth2_client(body) - -Create an OAuth 2.0 Client - -Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - body = OAuth2Client( - allowed_cors_origins=StringSlicePipeDelimiter([ - "allowed_cors_origins_example", - ]), - audience=StringSlicePipeDelimiter([ - "audience_example", - ]), - backchannel_logout_session_required=True, - backchannel_logout_uri="backchannel_logout_uri_example", - 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=StringSlicePipeDelimiter([ - "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=StringSlicePipeDelimiter([ - "grant_types_example", - ]), - jwks={}, - jwks_uri="jwks_uri_example", - logo_uri="logo_uri_example", - metadata={}, - owner="owner_example", - policy_uri="policy_uri_example", - post_logout_redirect_uris=StringSlicePipeDelimiter([ - "post_logout_redirect_uris_example", - ]), - redirect_uris=StringSlicePipeDelimiter([ - "redirect_uris_example", - ]), - 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=StringSlicePipeDelimiter([ - "request_uris_example", - ]), - response_types=StringSlicePipeDelimiter([ - "response_types_example", - ]), - scope="z", - sector_identifier_uri="sector_identifier_uri_example", - subject_type="subject_type_example", - token_endpoint_auth_method="token_endpoint_auth_method_example", - 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 | - - # example passing only required values which don't have defaults set - try: - # Create an OAuth 2.0 Client - api_response = api_instance.create_o_auth2_client(body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->create_o_auth2_client: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | oAuth2Client | - | -**0** | jsonError | - | - -[[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) - -# **delete_json_web_key** -> delete_json_web_key(kid, set) - -Delete a 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - kid = "kid_example" # str | The kid of the desired key - set = "set_example" # str | The set - - # example passing only required values which don't have defaults set - try: - # Delete a JSON Web Key - api_instance.delete_json_web_key(kid, set) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->delete_json_web_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **str**| The kid of the desired key | - **set** | **str**| The set | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **delete_json_web_key_set** -> delete_json_web_key_set(set) - -Delete a 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - set = "set_example" # str | The set - - # example passing only required values which don't have defaults set - try: - # Delete a JSON Web Key Set - api_instance.delete_json_web_key_set(set) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->delete_json_web_key_set: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **str**| The set | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **delete_o_auth2_client** -> delete_o_auth2_client(id) - -Deletes an 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(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: - # Deletes an OAuth 2.0 Client - api_instance.delete_o_auth2_client(id) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->delete_o_auth2_client: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**0** | jsonError | - | - -[[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) - -# **delete_o_auth2_token** -> delete_o_auth2_token(client_id) - -Delete OAuth2 Access Tokens from a Client - -This endpoint deletes OAuth2 access tokens issued for a client from the database - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - client_id = "client_id_example" # str | - - # example passing only required values which don't have defaults set - try: - # Delete OAuth2 Access Tokens from a Client - api_instance.delete_o_auth2_token(client_id) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->delete_o_auth2_token: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **client_id** | **str**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **delete_trusted_jwt_grant_issuer** -> delete_trusted_jwt_grant_issuer(id) - -Delete a 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.generic_error import GenericError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(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 a Trusted OAuth2 JWT Bearer Grant Type Issuer - api_instance.delete_trusted_jwt_grant_issuer(id) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->delete_trusted_jwt_grant_issuer: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the desired grant | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**404** | genericError | - | -**500** | genericError | - | - -[[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) - -# **flush_inactive_o_auth2_tokens** -> flush_inactive_o_auth2_tokens() - -Flush Expired OAuth2 Access Tokens - -This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.flush_inactive_o_auth2_tokens_request import FlushInactiveOAuth2TokensRequest -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - body = FlushInactiveOAuth2TokensRequest( - not_after=dateutil_parser('1970-01-01T00:00:00.00Z'), - ) # FlushInactiveOAuth2TokensRequest | (optional) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Flush Expired OAuth2 Access Tokens - api_instance.flush_inactive_o_auth2_tokens(body=body) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->flush_inactive_o_auth2_tokens: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **get_consent_request** -> ConsentRequest get_consent_request(consent_challenge) - -Get Consent Request Information - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.request_was_handled_response import RequestWasHandledResponse -from ory_hydra_client.model.consent_request import ConsentRequest -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - consent_challenge = "consent_challenge_example" # str | - - # example passing only required values which don't have defaults set - try: - # Get Consent Request Information - api_response = api_instance.get_consent_request(consent_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->get_consent_request: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consent_challenge** | **str**| | - -### Return type - -[**ConsentRequest**](ConsentRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | consentRequest | - | -**404** | jsonError | - | -**410** | requestWasHandledResponse | - | -**500** | jsonError | - | - -[[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) - -# **get_json_web_key** -> JSONWebKeySet get_json_web_key(kid, set) - -Fetch a JSON Web Key - -This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_web_key_set import JSONWebKeySet -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - kid = "kid_example" # str | The kid of the desired key - set = "set_example" # str | The set - - # example passing only required values which don't have defaults set - try: - # Fetch a JSON Web Key - api_response = api_instance.get_json_web_key(kid, set) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->get_json_web_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **str**| The kid of the desired key | - **set** | **str**| The set | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKeySet | - | -**404** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **get_json_web_key_set** -> 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_web_key_set import JSONWebKeySet -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - set = "set_example" # str | The set - - # 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) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->get_json_web_key_set: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **str**| The set | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKeySet | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **get_login_request** -> LoginRequest get_login_request(login_challenge) - -Get a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.login_request import LoginRequest -from ory_hydra_client.model.request_was_handled_response import RequestWasHandledResponse -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - login_challenge = "login_challenge_example" # str | - - # example passing only required values which don't have defaults set - try: - # Get a Login Request - api_response = api_instance.get_login_request(login_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->get_login_request: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **login_challenge** | **str**| | - -### Return type - -[**LoginRequest**](LoginRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | loginRequest | - | -**400** | jsonError | - | -**404** | jsonError | - | -**410** | requestWasHandledResponse | - | -**500** | jsonError | - | - -[[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) - -# **get_logout_request** -> LogoutRequest get_logout_request(logout_challenge) - -Get a Logout Request - -Use this endpoint to fetch a logout request. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.logout_request import LogoutRequest -from ory_hydra_client.model.request_was_handled_response import RequestWasHandledResponse -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - logout_challenge = "logout_challenge_example" # str | - - # example passing only required values which don't have defaults set - try: - # Get a Logout Request - api_response = api_instance.get_logout_request(logout_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->get_logout_request: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logout_challenge** | **str**| | - -### Return type - -[**LogoutRequest**](LogoutRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | logoutRequest | - | -**404** | jsonError | - | -**410** | requestWasHandledResponse | - | -**500** | jsonError | - | - -[[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) - -# **get_o_auth2_client** -> 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(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) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->get_o_auth2_client: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - -[[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) - -# **get_trusted_jwt_grant_issuer** -> TrustedJwtGrantIssuer get_trusted_jwt_grant_issuer(id) - -Get a 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.trusted_jwt_grant_issuer import TrustedJwtGrantIssuer -from ory_hydra_client.model.generic_error import GenericError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(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 a Trusted OAuth2 JWT Bearer Grant Type Issuer - api_response = api_instance.get_trusted_jwt_grant_issuer(id) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->get_trusted_jwt_grant_issuer: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the desired grant | - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | trustedJwtGrantIssuer | - | -**404** | genericError | - | -**500** | genericError | - | - -[[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) - -# **get_version** -> Version get_version() - -Get Service Version - -This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.version import Version -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Get Service Version - api_response = api_instance.get_version() - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->get_version: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**Version**](Version.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | version | - | - -[[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** -> OAuth2TokenIntrospection introspect_o_auth2_token(token) - -Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.o_auth2_token_introspection import OAuth2TokenIntrospection -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(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 Tokens - api_response = api_instance.introspect_o_auth2_token(token) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->introspect_o_auth2_token: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Introspect OAuth2 Tokens - api_response = api_instance.introspect_o_auth2_token(token, scope=scope) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->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] - -### Return type - -[**OAuth2TokenIntrospection**](OAuth2TokenIntrospection.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2TokenIntrospection | - | -**401** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **is_instance_alive** -> HealthStatus is_instance_alive() - -Check Alive Status - -This endpoint returns a 200 status code when the HTTP server is up running. 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.health_status import HealthStatus -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Check Alive Status - api_response = api_instance.is_instance_alive() - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->is_instance_alive: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | healthStatus | - | -**500** | jsonError | - | - -[[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 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - limit = 1 # int | The maximum amount of clients to returned, upper bound is 500 clients. (optional) - offset = 1 # int | The offset from where to start looking. (optional) - 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 - try: - # List OAuth 2.0 Clients - api_response = api_instance.list_o_auth2_clients(limit=limit, offset=offset, client_name=client_name, owner=owner) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->list_o_auth2_clients: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **int**| The maximum amount of clients to returned, upper bound is 500 clients. | [optional] - **offset** | **int**| The offset from where to start looking. | [optional] - **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) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A list of clients. | - | -**0** | jsonError | - | - -[[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_subject_consent_sessions** -> [PreviousConsentSession] list_subject_consent_sessions(subject) - -Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.previous_consent_session import PreviousConsentSession -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - subject = "subject_example" # str | - - # example passing only required values which don't have defaults set - try: - # Lists All Consent Sessions of a Subject - api_response = api_instance.list_subject_consent_sessions(subject) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->list_subject_consent_sessions: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **str**| | - -### Return type - -[**[PreviousConsentSession]**](PreviousConsentSession.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A list of used consent requests. | - | -**400** | jsonError | - | -**500** | jsonError | - | - -[[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_jwt_grant_issuers** -> TrustedJwtGrantIssuers list_trusted_jwt_grant_issuers() - -List Trusted OAuth2 JWT Bearer Grant Type Issuers - -Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.trusted_jwt_grant_issuers import TrustedJwtGrantIssuers -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - issuer = "issuer_example" # str | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. (optional) - limit = 1 # int | The maximum amount of policies returned, upper bound is 500 policies (optional) - offset = 1 # int | The offset from where to start looking. (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_jwt_grant_issuers(issuer=issuer, limit=limit, offset=offset) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->list_trusted_jwt_grant_issuers: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **issuer** | **str**| If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] - **limit** | **int**| The maximum amount of policies returned, upper bound is 500 policies | [optional] - **offset** | **int**| The offset from where to start looking. | [optional] - -### Return type - -[**TrustedJwtGrantIssuers**](TrustedJwtGrantIssuers.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | trustedJwtGrantIssuers | - | -**500** | genericError | - | - -[[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, body) - -Patch an OAuth 2.0 Client - -Patch an existing OAuth 2.0 Client. 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.patch_request import PatchRequest -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - id = "id_example" # str | The id of the OAuth 2.0 Client. - body = PatchRequest([ - PatchDocument( - _from="_from_example", - op="replace", - path="/name", - value={}, - ), - ]) # PatchRequest | - - # example passing only required values which don't have defaults set - try: - # Patch an OAuth 2.0 Client - api_response = api_instance.patch_o_auth2_client(id, body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->patch_o_auth2_client: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | - **body** | [**PatchRequest**](PatchRequest.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - -[[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_consent_request** -> CompletedRequest reject_consent_request(consent_challenge) - -Reject a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.completed_request import CompletedRequest -from ory_hydra_client.model.reject_request import RejectRequest -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - consent_challenge = "consent_challenge_example" # str | - body = RejectRequest( - error="error_example", - error_debug="error_debug_example", - error_description="error_description_example", - error_hint="error_hint_example", - status_code=1, - ) # RejectRequest | (optional) - - # example passing only required values which don't have defaults set - try: - # Reject a Consent Request - api_response = api_instance.reject_consent_request(consent_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->reject_consent_request: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Reject a Consent Request - api_response = api_instance.reject_consent_request(consent_challenge, body=body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->reject_consent_request: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **consent_challenge** | **str**| | - **body** | [**RejectRequest**](RejectRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**404** | jsonError | - | -**500** | jsonError | - | - -[[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_login_request** -> CompletedRequest reject_login_request(login_challenge) - -Reject a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.completed_request import CompletedRequest -from ory_hydra_client.model.reject_request import RejectRequest -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - login_challenge = "login_challenge_example" # str | - body = RejectRequest( - error="error_example", - error_debug="error_debug_example", - error_description="error_description_example", - error_hint="error_hint_example", - status_code=1, - ) # RejectRequest | (optional) - - # example passing only required values which don't have defaults set - try: - # Reject a Login Request - api_response = api_instance.reject_login_request(login_challenge) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->reject_login_request: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Reject a Login Request - api_response = api_instance.reject_login_request(login_challenge, body=body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->reject_login_request: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **login_challenge** | **str**| | - **body** | [**RejectRequest**](RejectRequest.md)| | [optional] - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | completedRequest | - | -**400** | jsonError | - | -**401** | jsonError | - | -**404** | jsonError | - | -**500** | jsonError | - | - -[[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_logout_request** -> reject_logout_request(logout_challenge) - -Reject a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.reject_request import RejectRequest -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - logout_challenge = "logout_challenge_example" # str | - body = RejectRequest( - error="error_example", - error_debug="error_debug_example", - error_description="error_description_example", - error_hint="error_hint_example", - status_code=1, - ) # RejectRequest | (optional) - - # example passing only required values which don't have defaults set - try: - # Reject a Logout Request - api_instance.reject_logout_request(logout_challenge) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->reject_logout_request: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Reject a Logout Request - api_instance.reject_logout_request(logout_challenge, body=body) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->reject_logout_request: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **logout_challenge** | **str**| | - **body** | [**RejectRequest**](RejectRequest.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json, application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**404** | jsonError | - | -**500** | jsonError | - | - -[[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_authentication_session** -> revoke_authentication_session(subject) - -Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - -This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - subject = "subject_example" # str | - - # example passing only required values which don't have defaults set - try: - # Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - api_instance.revoke_authentication_session(subject) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->revoke_authentication_session: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **str**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**400** | jsonError | - | -**500** | jsonError | - | - -[[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_consent_sessions** -> revoke_consent_sessions(subject) - -Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - -This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - subject = "subject_example" # str | The subject (Subject) who's consent sessions should be deleted. - client = "client_example" # str | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID (optional) - all = True # bool | If set to `?all=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: - # Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - api_instance.revoke_consent_sessions(subject) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->revoke_consent_sessions: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - api_instance.revoke_consent_sessions(subject, client=client, all=all) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->revoke_consent_sessions: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **subject** | **str**| The subject (Subject) who's consent sessions should be deleted. | - **client** | **str**| If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | [optional] - **all** | **bool**| If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**400** | jsonError | - | -**500** | jsonError | - | - -[[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_jwt_grant_issuer** -> TrustedJwtGrantIssuer trust_jwt_grant_issuer() - -Trust an 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). - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.trusted_jwt_grant_issuer import TrustedJwtGrantIssuer -from ory_hydra_client.model.generic_error import GenericError -from ory_hydra_client.model.trust_jwt_grant_issuer_body import TrustJwtGrantIssuerBody -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - body = TrustJwtGrantIssuerBody( - 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", - ) # TrustJwtGrantIssuerBody | (optional) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Trust an OAuth2 JWT Bearer Grant Type Issuer - api_response = api_instance.trust_jwt_grant_issuer(body=body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->trust_jwt_grant_issuer: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**TrustJwtGrantIssuerBody**](TrustJwtGrantIssuerBody.md)| | [optional] - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | trustedJwtGrantIssuer | - | -**400** | genericError | - | -**409** | genericError | - | -**500** | genericError | - | - -[[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) - -# **update_json_web_key** -> JSONWebKey update_json_web_key(kid, set) - -Update a 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_web_key import JSONWebKey -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - kid = "kid_example" # str | The kid of the desired key - set = "set_example" # str | The set - body = 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: - # Update a JSON Web Key - api_response = api_instance.update_json_web_key(kid, set) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->update_json_web_key: %s\n" % e) - - # example passing only required values which don't have defaults set - # and optional values - try: - # Update a JSON Web Key - api_response = api_instance.update_json_web_key(kid, set, body=body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->update_json_web_key: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **kid** | **str**| The kid of the desired key | - **set** | **str**| The set | - **body** | [**JSONWebKey**](JSONWebKey.md)| | [optional] - -### Return type - -[**JSONWebKey**](JSONWebKey.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKey | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **update_json_web_key_set** -> JSONWebKeySet update_json_web_key_set(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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.json_web_key_set import JSONWebKeySet -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - set = "set_example" # str | The set - body = 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.update_json_web_key_set(set) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->update_json_web_key_set: %s\n" % e) - - # 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.update_json_web_key_set(set, body=body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->update_json_web_key_set: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **set** | **str**| The set | - **body** | [**JSONWebKeySet**](JSONWebKeySet.md)| | [optional] - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKeySet | - | -**401** | jsonError | - | -**403** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **update_o_auth2_client** -> OAuth2Client update_o_auth2_client(id, body) - -Update an OAuth 2.0 Client - -Update an existing OAuth 2.0 Client. 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import admin_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = admin_api.AdminApi(api_client) - id = "id_example" # str | The id of the OAuth 2.0 Client. - body = OAuth2Client( - allowed_cors_origins=StringSlicePipeDelimiter([ - "allowed_cors_origins_example", - ]), - audience=StringSlicePipeDelimiter([ - "audience_example", - ]), - backchannel_logout_session_required=True, - backchannel_logout_uri="backchannel_logout_uri_example", - 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=StringSlicePipeDelimiter([ - "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=StringSlicePipeDelimiter([ - "grant_types_example", - ]), - jwks={}, - jwks_uri="jwks_uri_example", - logo_uri="logo_uri_example", - metadata={}, - owner="owner_example", - policy_uri="policy_uri_example", - post_logout_redirect_uris=StringSlicePipeDelimiter([ - "post_logout_redirect_uris_example", - ]), - redirect_uris=StringSlicePipeDelimiter([ - "redirect_uris_example", - ]), - 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=StringSlicePipeDelimiter([ - "request_uris_example", - ]), - response_types=StringSlicePipeDelimiter([ - "response_types_example", - ]), - scope="z", - sector_identifier_uri="sector_identifier_uri_example", - subject_type="subject_type_example", - token_endpoint_auth_method="token_endpoint_auth_method_example", - 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 | - - # example passing only required values which don't have defaults set - try: - # Update an OAuth 2.0 Client - api_response = api_instance.update_o_auth2_client(id, body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling AdminApi->update_o_auth2_client: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - -[[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) - diff --git a/clients/hydra/python/docs/CreateJsonWebKeySet.md b/clients/hydra/python/docs/CreateJsonWebKeySet.md new file mode 100644 index 00000000000..ca6b5924ac7 --- /dev/null +++ b/clients/hydra/python/docs/CreateJsonWebKeySet.md @@ -0,0 +1,15 @@ +# CreateJsonWebKeySet + +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] + +[[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 new file mode 100644 index 00000000000..bb033ec96cf --- /dev/null +++ b/clients/hydra/python/docs/ErrorOAuth2.md @@ -0,0 +1,17 @@ +# ErrorOAuth2 + +Error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | Error | [optional] +**error_debug** | **str** | Error Debug Information Only available in dev mode. | [optional] +**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] + +[[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/PluginConfigNetwork.md b/clients/hydra/python/docs/GetVersion200Response.md similarity index 82% rename from clients/hydra/python/docs/PluginConfigNetwork.md rename to clients/hydra/python/docs/GetVersion200Response.md index 2caaeae4687..c9374458a6e 100644 --- a/clients/hydra/python/docs/PluginConfigNetwork.md +++ b/clients/hydra/python/docs/GetVersion200Response.md @@ -1,11 +1,10 @@ -# PluginConfigNetwork +# GetVersion200Response -PluginConfigNetwork plugin config network ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **str** | type | +**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] [[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/OAuth2TokenIntrospection.md b/clients/hydra/python/docs/IntrospectedOAuth2Token.md similarity index 90% rename from clients/hydra/python/docs/OAuth2TokenIntrospection.md rename to clients/hydra/python/docs/IntrospectedOAuth2Token.md index 3692ba74ed2..7ddf6dd81f2 100644 --- a/clients/hydra/python/docs/OAuth2TokenIntrospection.md +++ b/clients/hydra/python/docs/IntrospectedOAuth2Token.md @@ -1,6 +1,6 @@ -# OAuth2TokenIntrospection +# IntrospectedOAuth2Token -https://tools.ietf.org/html/rfc7662 +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 @@ -9,7 +9,7 @@ Name | Type | Description | Notes **aud** | **[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** | **bool, date, datetime, dict, float, int, list, str, none_type** | Extra is arbitrary data set by the session. | [optional] +**ext** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | 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] diff --git a/clients/hydra/python/docs/PluginConfigUser.md b/clients/hydra/python/docs/IsReady200Response.md similarity index 77% rename from clients/hydra/python/docs/PluginConfigUser.md rename to clients/hydra/python/docs/IsReady200Response.md index 8fb578a66d1..6779f16c8f0 100644 --- a/clients/hydra/python/docs/PluginConfigUser.md +++ b/clients/hydra/python/docs/IsReady200Response.md @@ -1,12 +1,10 @@ -# PluginConfigUser +# IsReady200Response -PluginConfigUser plugin config user ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**gid** | **int** | g ID | [optional] -**uid** | **int** | UID | [optional] +**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] [[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/ContainerWaitOKBodyError.md b/clients/hydra/python/docs/IsReady503Response.md similarity index 75% rename from clients/hydra/python/docs/ContainerWaitOKBodyError.md rename to clients/hydra/python/docs/IsReady503Response.md index 851cee9b294..14da832c2f2 100644 --- a/clients/hydra/python/docs/ContainerWaitOKBodyError.md +++ b/clients/hydra/python/docs/IsReady503Response.md @@ -1,11 +1,10 @@ -# ContainerWaitOKBodyError +# IsReady503Response -ContainerWaitOKBodyError container waiting error, if any ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **str** | Details of an error | [optional] +**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] [[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 deleted file mode 100644 index 7fa0e79244e..00000000000 --- a/clients/hydra/python/docs/JSONWebKeySet.md +++ /dev/null @@ -1,13 +0,0 @@ -# JSONWebKeySet - -It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**keys** | [**[JSONWebKey]**](JSONWebKey.md) | The value of the \"keys\" parameter is an array of 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] - -[[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/JsonError.md b/clients/hydra/python/docs/JsonError.md deleted file mode 100644 index c9bd3fa522f..00000000000 --- a/clients/hydra/python/docs/JsonError.md +++ /dev/null @@ -1,16 +0,0 @@ -# JsonError - -Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | Name is the error name. | [optional] -**error_debug** | **str** | Debug contains debug information. This is usually not available and has to be enabled. | [optional] -**error_description** | **str** | Description contains further information on the nature of the error. | [optional] -**status_code** | **int** | Code represents the error status code (404, 403, 401, ...). | [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] - -[[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 new file mode 100644 index 00000000000..124571848e6 --- /dev/null +++ b/clients/hydra/python/docs/JsonPatch.md @@ -0,0 +1,16 @@ +# JsonPatch + +A JSONPatch document as defined by RFC 6902 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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] + +[[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 new file mode 100644 index 00000000000..324e59273f4 --- /dev/null +++ b/clients/hydra/python/docs/JsonPatchDocument.md @@ -0,0 +1,12 @@ +# 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 similarity index 95% rename from clients/hydra/python/docs/JSONWebKey.md rename to clients/hydra/python/docs/JsonWebKey.md index e1d7be02a69..f48785e0c51 100644 --- a/clients/hydra/python/docs/JSONWebKey.md +++ b/clients/hydra/python/docs/JsonWebKey.md @@ -1,6 +1,5 @@ -# JSONWebKey +# JsonWebKey -It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. ## Properties Name | Type | Description | Notes diff --git a/clients/hydra/python/docs/JsonWebKeySet.md b/clients/hydra/python/docs/JsonWebKeySet.md new file mode 100644 index 00000000000..8d25e2b7a19 --- /dev/null +++ b/clients/hydra/python/docs/JsonWebKeySet.md @@ -0,0 +1,13 @@ +# JsonWebKeySet + +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] + +[[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/JsonWebKeySetGeneratorRequest.md b/clients/hydra/python/docs/JsonWebKeySetGeneratorRequest.md deleted file mode 100644 index c2f307bb9c8..00000000000 --- a/clients/hydra/python/docs/JsonWebKeySetGeneratorRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# JsonWebKeySetGeneratorRequest - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alg** | **str** | The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" | -**kid** | **str** | The kid of the key to be created | -**use** | **str** | 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] - -[[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 new file mode 100644 index 00000000000..138068dd263 --- /dev/null +++ b/clients/hydra/python/docs/JwkApi.md @@ -0,0 +1,573 @@ +# ory_hydra_client.JwkApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_json_web_key_set**](JwkApi.md#create_json_web_key_set) | **POST** /admin/keys/{set} | Create JSON Web Key +[**delete_json_web_key**](JwkApi.md#delete_json_web_key) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key +[**delete_json_web_key_set**](JwkApi.md#delete_json_web_key_set) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set +[**get_json_web_key**](JwkApi.md#get_json_web_key) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key +[**get_json_web_key_set**](JwkApi.md#get_json_web_key_set) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set +[**set_json_web_key**](JwkApi.md#set_json_web_key) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key +[**set_json_web_key_set**](JwkApi.md#set_json_web_key_set) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set + + +# **create_json_web_key_set** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + try: + # Create JSON Web Key + api_response = api_instance.create_json_web_key_set(set, create_json_web_key_set) + pprint(api_response) + except ory_hydra_client.ApiException 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)| | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | jsonWebKeySet | - | +**0** | errorOAuth2 | - | + +[[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) + +# **delete_json_web_key** +> delete_json_web_key(set, kid) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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) + + # 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: + 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) | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | errorOAuth2 | - | + +[[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) + +# **delete_json_web_key_set** +> delete_json_web_key_set(set) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + + # 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: + 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 | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | errorOAuth2 | - | + +[[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) + +# **get_json_web_key** +> 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). + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | jsonWebKeySet | - | +**0** | errorOAuth2 | - | + +[[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) + +# **get_json_web_key_set** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | jsonWebKeySet | - | +**0** | errorOAuth2 | - | + +[[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) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**JsonWebKey**](JsonWebKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | jsonWebKey | - | +**0** | errorOAuth2 | - | + +[[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) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | jsonWebKeySet | - | +**0** | errorOAuth2 | - | + +[[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) + diff --git a/clients/hydra/python/docs/MetadataApi.md b/clients/hydra/python/docs/MetadataApi.md index 788ef09022d..8f04f6feeb7 100644 --- a/clients/hydra/python/docs/MetadataApi.md +++ b/clients/hydra/python/docs/MetadataApi.md @@ -4,15 +4,17 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**prometheus**](MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +[**get_version**](MetadataApi.md#get_version) | **GET** /version | Return Running Software Version. +[**is_alive**](MetadataApi.md#is_alive) | **GET** /health/alive | Check HTTP Server Status +[**is_ready**](MetadataApi.md#is_ready) | **GET** /health/ready | Check HTTP Server and Database Status -# **prometheus** -> prometheus() +# **get_version** +> GetVersion200Response get_version() -Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +Return Running Software Version. -``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` +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. ### Example @@ -21,6 +23,7 @@ Get snapshot metrics from the service. If you're using k8s, you can then add ann 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 pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. @@ -36,10 +39,11 @@ with ory_hydra_client.ApiClient() as api_client: # example, this endpoint has no required or optional parameters try: - # Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - api_instance.prometheus() + # Return Running Software Version. + api_response = api_instance.get_version() + pprint(api_response) except ory_hydra_client.ApiException as e: - print("Exception when calling MetadataApi->prometheus: %s\n" % e) + print("Exception when calling MetadataApi->get_version: %s\n" % e) ``` @@ -48,7 +52,7 @@ This endpoint does not need any parameter. ### Return type -void (empty response body) +[**GetVersion200Response**](GetVersion200Response.md) ### Authorization @@ -57,14 +61,144 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**200** | Returns the Ory Hydra version. | - | + +[[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) + +# **is_alive** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = metadata_api.MetadataApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # Check HTTP Server Status + api_response = api_instance.is_alive() + pprint(api_response) + except ory_hydra_client.ApiException as e: + print("Exception when calling MetadataApi->is_alive: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HealthStatus**](HealthStatus.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ory Hydra is ready to accept connections. | - | +**500** | genericError | - | + +[[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) + +# **is_ready** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = metadata_api.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() + pprint(api_response) + except ory_hydra_client.ApiException as e: + print("Exception when calling MetadataApi->is_ready: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IsReady200Response**](IsReady200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Ory Hydra is ready to accept requests. | - | +**503** | Ory Kratos is not yet ready to accept requests. | - | [[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) diff --git a/clients/hydra/rust/docs/PluginConfigNetwork.md b/clients/hydra/python/docs/NullDuration.md similarity index 83% rename from clients/hydra/rust/docs/PluginConfigNetwork.md rename to clients/hydra/python/docs/NullDuration.md index eea66f4ebde..65a91ffce58 100644 --- a/clients/hydra/rust/docs/PluginConfigNetwork.md +++ b/clients/hydra/python/docs/NullDuration.md @@ -1,10 +1,10 @@ -# PluginConfigNetwork +# NullDuration -## Properties +## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_type** | **String** | type | +**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 new file mode 100644 index 00000000000..c0c60162b42 --- /dev/null +++ b/clients/hydra/python/docs/OAuth2Api.md @@ -0,0 +1,2332 @@ +# ory_hydra_client.OAuth2Api + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**accept_o_auth2_consent_request**](OAuth2Api.md#accept_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +[**accept_o_auth2_login_request**](OAuth2Api.md#accept_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +[**accept_o_auth2_logout_request**](OAuth2Api.md#accept_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +[**create_o_auth2_client**](OAuth2Api.md#create_o_auth2_client) | **POST** /admin/clients | Create OAuth 2.0 Client +[**delete_o_auth2_client**](OAuth2Api.md#delete_o_auth2_client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client +[**delete_o_auth2_token**](OAuth2Api.md#delete_o_auth2_token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +[**delete_trusted_o_auth2_jwt_grant_issuer**](OAuth2Api.md#delete_trusted_o_auth2_jwt_grant_issuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +[**get_o_auth2_client**](OAuth2Api.md#get_o_auth2_client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client +[**get_o_auth2_consent_request**](OAuth2Api.md#get_o_auth2_consent_request) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +[**get_o_auth2_login_request**](OAuth2Api.md#get_o_auth2_login_request) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +[**get_o_auth2_logout_request**](OAuth2Api.md#get_o_auth2_logout_request) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +[**get_trusted_o_auth2_jwt_grant_issuer**](OAuth2Api.md#get_trusted_o_auth2_jwt_grant_issuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +[**introspect_o_auth2_token**](OAuth2Api.md#introspect_o_auth2_token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +[**list_o_auth2_clients**](OAuth2Api.md#list_o_auth2_clients) | **GET** /admin/clients | List OAuth 2.0 Clients +[**list_o_auth2_consent_sessions**](OAuth2Api.md#list_o_auth2_consent_sessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +[**list_trusted_o_auth2_jwt_grant_issuers**](OAuth2Api.md#list_trusted_o_auth2_jwt_grant_issuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +[**o_auth2_authorize**](OAuth2Api.md#o_auth2_authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint +[**oauth2_token_exchange**](OAuth2Api.md#oauth2_token_exchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint +[**patch_o_auth2_client**](OAuth2Api.md#patch_o_auth2_client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client +[**reject_o_auth2_consent_request**](OAuth2Api.md#reject_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +[**reject_o_auth2_login_request**](OAuth2Api.md#reject_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +[**reject_o_auth2_logout_request**](OAuth2Api.md#reject_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +[**revoke_o_auth2_consent_sessions**](OAuth2Api.md#revoke_o_auth2_consent_sessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +[**revoke_o_auth2_login_sessions**](OAuth2Api.md#revoke_o_auth2_login_sessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +[**revoke_o_auth2_token**](OAuth2Api.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +[**set_o_auth2_client**](OAuth2Api.md#set_o_auth2_client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client +[**set_o_auth2_client_lifespans**](OAuth2Api.md#set_o_auth2_client_lifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +[**trust_o_auth2_jwt_grant_issuer**](OAuth2Api.md#trust_o_auth2_jwt_grant_issuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer + + +# **accept_o_auth2_consent_request** +> OAuth2RedirectTo accept_o_auth2_consent_request(consent_challenge) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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( + 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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2RedirectTo | - | +**0** | errorOAuth2 | - | + +[[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) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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, + force_subject_identifier="force_subject_identifier_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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2RedirectTo | - | +**0** | errorOAuth2 | - | + +[[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_logout_request** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2RedirectTo | - | +**0** | errorOAuth2 | - | + +[[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_o_auth2_client** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = o_auth2_api.OAuth2Api(api_client) + o_auth2_client = OAuth2Client( + 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", + subject_type="subject_type_example", + token_endpoint_auth_method="token_endpoint_auth_method_example", + 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 + try: + # Create OAuth 2.0 Client + api_response = api_instance.create_o_auth2_client(o_auth2_client) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | oAuth2Client | - | +**400** | Bad Request Error Response | - | +**0** | Default Error Response | - | + +[[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) + +# **delete_o_auth2_client** +> delete_o_auth2_client(id) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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. + + # 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: + 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. | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | genericError | - | + +[[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) + +# **delete_o_auth2_token** +> delete_o_auth2_token(client_id) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + + # 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: + 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 | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | errorOAuth2 | - | + +[[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) + +# **delete_trusted_o_auth2_jwt_grant_issuer** +> delete_trusted_o_auth2_jwt_grant_issuer(id) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + + # 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: + 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 | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | genericError | - | + +[[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) + +# **get_o_auth2_client** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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. + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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. | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2Client | - | +**0** | Default Error Response | - | + +[[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) + +# **get_o_auth2_consent_request** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2ConsentRequest | - | +**410** | oAuth2RedirectTo | - | +**0** | errorOAuth2 | - | + +[[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) + +# **get_o_auth2_login_request** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**OAuth2LoginRequest**](OAuth2LoginRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2LoginRequest | - | +**410** | oAuth2RedirectTo | - | +**0** | errorOAuth2 | - | + +[[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) + +# **get_o_auth2_logout_request** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = o_auth2_api.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) + pprint(api_response) + except ory_hydra_client.ApiException as e: + print("Exception when calling OAuth2Api->get_o_auth2_logout_request: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logout_challenge** | **str**| | + +### Return type + +[**OAuth2LogoutRequest**](OAuth2LogoutRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2LogoutRequest | - | +**410** | oAuth2RedirectTo | - | +**0** | errorOAuth2 | - | + +[[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) + +# **get_trusted_o_auth2_jwt_grant_issuer** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | trustedOAuth2JwtGrantIssuer | - | +**0** | genericError | - | + +[[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) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**IntrospectedOAuth2Token**](IntrospectedOAuth2Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | introspectedOAuth2Token | - | +**0** | errorOAuth2 | - | + +[[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 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**[OAuth2Client]**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Paginated OAuth2 Client List Response | - | +**0** | Default Error Response | - | + +[[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 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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" + + # 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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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" + +### Return type + +[**OAuth2ConsentSessions**](OAuth2ConsentSessions.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2ConsentSessions | - | +**0** | errorOAuth2 | - | + +[[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 Trusted OAuth2 JWT Bearer Grant Type Issuers + +Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**TrustedOAuth2JwtGrantIssuers**](TrustedOAuth2JwtGrantIssuers.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | trustedOAuth2JwtGrantIssuers | - | +**0** | genericError | - | + +[[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) + +# **o_auth2_authorize** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = o_auth2_api.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() + pprint(api_response) + except ory_hydra_client.ApiException as e: + print("Exception when calling OAuth2Api->o_auth2_authorize: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ErrorOAuth2**](ErrorOAuth2.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | errorOAuth2 | - | + +[[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) + +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. + +### Example + +* Basic Authentication (basic): +* 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 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( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic +configuration = ory_hydra_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure OAuth2 access token for authorization: oauth2 +configuration = ory_hydra_client.Configuration( + host = "http://localhost" +) +configuration.access_token = 'YOUR_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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**OAuth2TokenExchange**](OAuth2TokenExchange.md) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2TokenExchange | - | +**0** | errorOAuth2 | - | + +[[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) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + try: + # Patch OAuth 2.0 Client + api_response = api_instance.patch_o_auth2_client(id, json_patch_document) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2Client | - | +**404** | Not Found Error Response | - | +**0** | Default Error Response | - | + +[[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) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2RedirectTo | - | +**0** | errorOAuth2 | - | + +[[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) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2RedirectTo | - | +**0** | errorOAuth2 | - | + +[[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_logout_request** +> reject_o_auth2_logout_request(logout_challenge) + +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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = o_auth2_api.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: + print("Exception when calling OAuth2Api->reject_o_auth2_logout_request: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **logout_challenge** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | errorOAuth2 | - | + +[[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 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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) + 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: + 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] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | errorOAuth2 | - | + +[[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(subject) + +Revokes All OAuth 2.0 Login Sessions of a Subject + +This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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. + + # example passing only required values which don't have defaults set + try: + # Revokes All OAuth 2.0 Login Sessions of a Subject + api_instance.revoke_o_auth2_login_sessions(subject) + except ory_hydra_client.ApiException 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. | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | errorOAuth2 | - | + +[[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 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. + +### Example + +* Basic Authentication (basic): +* 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 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( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basic +configuration = ory_hydra_client.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Configure OAuth2 access token for authorization: oauth2 +configuration = ory_hydra_client.Configuration( + host = "http://localhost" +) +configuration.access_token = 'YOUR_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 | + + # 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) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token** | **str**| | + +### Return type + +void (empty response body) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | errorOAuth2 | - | + +[[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** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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( + 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", + subject_type="subject_type_example", + token_endpoint_auth_method="token_endpoint_auth_method_example", + 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 + try: + # Set OAuth 2.0 Client + api_response = api_instance.set_o_auth2_client(id, o_auth2_client) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2Client | - | +**400** | Bad Request Error Response | - | +**404** | Not Found Error Response | - | +**0** | Default Error Response | - | + +[[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) + +Set OAuth2 Client Token Lifespans + +Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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) + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2Client | - | +**0** | genericError | - | + +[[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() + +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). + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() 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 + 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) + pprint(api_response) + except ory_hydra_client.ApiException 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] + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | trustedOAuth2JwtGrantIssuer | - | +**0** | genericError | - | + +[[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) + diff --git a/clients/hydra/python/docs/OAuth2Client.md b/clients/hydra/python/docs/OAuth2Client.md index 160df2dd9c8..c3a1441e840 100644 --- a/clients/hydra/python/docs/OAuth2Client.md +++ b/clients/hydra/python/docs/OAuth2Client.md @@ -1,44 +1,55 @@ # 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. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**allowed_cors_origins** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**audience** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**backchannel_logout_session_required** | **bool** | 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** | RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. | [optional] -**client_id** | **str** | ID is the id for this client. | [optional] -**client_name** | **str** | Name is the human-readable string name of the client to be presented to the end-user during authorization. | [optional] -**client_secret** | **str** | Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. | [optional] -**client_secret_expires_at** | **int** | SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. | [optional] -**client_uri** | **str** | ClientURI is an 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** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**created_at** | **datetime** | CreatedAt returns the timestamp of the client's creation. | [optional] -**frontchannel_logout_session_required** | **bool** | 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** | 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** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**jwks** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] -**jwks_uri** | **str** | 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] -**logo_uri** | **str** | LogoURI is an URL string that references a logo for the client. | [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] +**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_id** | **str** | OAuth 2.0 Client ID The ID is autogenerated and immutable. | [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] +**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] +**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] +**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] -**owner** | **str** | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] -**policy_uri** | **str** | 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** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**redirect_uris** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**registration_access_token** | **str** | RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. | [optional] -**registration_client_uri** | **str** | RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] -**request_object_signing_alg** | **str** | 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** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**response_types** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**scope** | **str** | 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** | 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] -**subject_type** | **str** | SubjectType requested for responses to this Client. 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** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional] -**token_endpoint_auth_signing_alg** | **str** | Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] -**tos_uri** | **str** | TermsOfServiceURI is a URL string that points 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** | UpdatedAt returns the timestamp of the last update. | [optional] -**userinfo_signed_response_alg** | **str** | 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] +**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] +**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] +**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] +**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_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] +**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] [[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 new file mode 100644 index 00000000000..83c16789a7f --- /dev/null +++ b/clients/hydra/python/docs/OAuth2ClientTokenLifespans.md @@ -0,0 +1,22 @@ +# OAuth2ClientTokenLifespans + +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] + +[[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/ConsentRequest.md b/clients/hydra/python/docs/OAuth2ConsentRequest.md similarity index 85% rename from clients/hydra/python/docs/ConsentRequest.md rename to clients/hydra/python/docs/OAuth2ConsentRequest.md index 968767b6261..2c9709b2e8a 100644 --- a/clients/hydra/python/docs/ConsentRequest.md +++ b/clients/hydra/python/docs/OAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# ConsentRequest +# OAuth2ConsentRequest ## Properties @@ -6,15 +6,15 @@ 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** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] +**amr** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] **client** | [**OAuth2Client**](OAuth2Client.md) | | [optional] **context** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [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** | [**OpenIDConnectContext**](OpenIDConnectContext.md) | | [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** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**requested_scope** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] +**requested_access_token_audience** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] +**requested_scope** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [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] diff --git a/clients/hydra/python/docs/OpenIDConnectContext.md b/clients/hydra/python/docs/OAuth2ConsentRequestOpenIDConnectContext.md similarity index 90% rename from clients/hydra/python/docs/OpenIDConnectContext.md rename to clients/hydra/python/docs/OAuth2ConsentRequestOpenIDConnectContext.md index f56ead4e8a5..77adf658034 100644 --- a/clients/hydra/python/docs/OpenIDConnectContext.md +++ b/clients/hydra/python/docs/OAuth2ConsentRequestOpenIDConnectContext.md @@ -1,4 +1,4 @@ -# OpenIDConnectContext +# OAuth2ConsentRequestOpenIDConnectContext ## Properties @@ -6,7 +6,7 @@ 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] **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** | **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** | **{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] **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] diff --git a/clients/hydra/python/docs/OAuth2ConsentSession.md b/clients/hydra/python/docs/OAuth2ConsentSession.md new file mode 100644 index 00000000000..98fb32dcb36 --- /dev/null +++ b/clients/hydra/python/docs/OAuth2ConsentSession.md @@ -0,0 +1,20 @@ +# OAuth2ConsentSession + +A completed OAuth 2.0 Consent Session. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**consent_request** | [**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) | | [optional] +**expires_at** | [**OAuth2ConsentSessionExpiresAt**](OAuth2ConsentSessionExpiresAt.md) | | [optional] +**grant_access_token_audience** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [optional] +**grant_scope** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | [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] + +[[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/FlushInactiveOAuth2TokensRequest.md b/clients/hydra/python/docs/OAuth2ConsentSessionExpiresAt.md similarity index 61% rename from clients/hydra/python/docs/FlushInactiveOAuth2TokensRequest.md rename to clients/hydra/python/docs/OAuth2ConsentSessionExpiresAt.md index 0d548402082..724dfe77140 100644 --- a/clients/hydra/python/docs/FlushInactiveOAuth2TokensRequest.md +++ b/clients/hydra/python/docs/OAuth2ConsentSessionExpiresAt.md @@ -1,10 +1,14 @@ -# FlushInactiveOAuth2TokensRequest +# OAuth2ConsentSessionExpiresAt ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**not_after** | **datetime** | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. | [optional] +**access_token** | **datetime** | | [optional] +**authorize_code** | **datetime** | | [optional] +**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] [[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 new file mode 100644 index 00000000000..afb9e67b39e --- /dev/null +++ b/clients/hydra/python/docs/OAuth2ConsentSessions.md @@ -0,0 +1,12 @@ +# 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/LoginRequest.md b/clients/hydra/python/docs/OAuth2LoginRequest.md similarity index 86% rename from clients/hydra/python/docs/LoginRequest.md rename to clients/hydra/python/docs/OAuth2LoginRequest.md index 105546ab10e..e3559bf5ecd 100644 --- a/clients/hydra/python/docs/LoginRequest.md +++ b/clients/hydra/python/docs/OAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# LoginRequest +# OAuth2LoginRequest ## Properties @@ -7,11 +7,11 @@ 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) | | **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** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | -**requested_scope** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | +**requested_access_token_audience** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | +**requested_scope** | [**StringSliceJSONFormat**](StringSliceJSONFormat.md) | | **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** | [**OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] +**oidc_context** | [**OAuth2ConsentRequestOpenIDConnectContext**](OAuth2ConsentRequestOpenIDConnectContext.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] diff --git a/clients/hydra/python/docs/LogoutRequest.md b/clients/hydra/python/docs/OAuth2LogoutRequest.md similarity index 98% rename from clients/hydra/python/docs/LogoutRequest.md rename to clients/hydra/python/docs/OAuth2LogoutRequest.md index e02e47f3039..be61e5628f2 100644 --- a/clients/hydra/python/docs/LogoutRequest.md +++ b/clients/hydra/python/docs/OAuth2LogoutRequest.md @@ -1,4 +1,4 @@ -# LogoutRequest +# OAuth2LogoutRequest ## Properties diff --git a/clients/hydra/python/docs/CompletedRequest.md b/clients/hydra/python/docs/OAuth2RedirectTo.md similarity index 73% rename from clients/hydra/python/docs/CompletedRequest.md rename to clients/hydra/python/docs/OAuth2RedirectTo.md index f65b2393a09..db5dacfd251 100644 --- a/clients/hydra/python/docs/CompletedRequest.md +++ b/clients/hydra/python/docs/OAuth2RedirectTo.md @@ -1,10 +1,11 @@ -# CompletedRequest +# OAuth2RedirectTo +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 to once the authentication process is completed. | +**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] [[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 new file mode 100644 index 00000000000..5750637ec4a --- /dev/null +++ b/clients/hydra/python/docs/OAuth2TokenExchange.md @@ -0,0 +1,18 @@ +# OAuth2TokenExchange + +OAuth2 Token Exchange Result + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | The access token issued by the authorization server. | [optional] +**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] +**id_token** | **int** | To retrieve a refresh token request the id_token scope. | [optional] +**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** | **int** | 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] + +[[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 new file mode 100644 index 00000000000..66c433e7a01 --- /dev/null +++ b/clients/hydra/python/docs/OidcApi.md @@ -0,0 +1,649 @@ +# ory_hydra_client.OidcApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_oidc_dynamic_client**](OidcApi.md#create_oidc_dynamic_client) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +[**delete_oidc_dynamic_client**](OidcApi.md#delete_oidc_dynamic_client) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +[**discover_oidc_configuration**](OidcApi.md#discover_oidc_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery +[**get_oidc_dynamic_client**](OidcApi.md#get_oidc_dynamic_client) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +[**get_oidc_user_info**](OidcApi.md#get_oidc_user_info) | **GET** /userinfo | OpenID Connect Userinfo +[**revoke_oidc_session**](OidcApi.md#revoke_oidc_session) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +[**set_oidc_dynamic_client**](OidcApi.md#set_oidc_dynamic_client) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration + + +# **create_oidc_dynamic_client** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = oidc_api.OidcApi(api_client) + o_auth2_client = OAuth2Client( + 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", + subject_type="subject_type_example", + token_endpoint_auth_method="token_endpoint_auth_method_example", + 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 + try: + # Register OAuth2 Client using OpenID Dynamic Client Registration + api_response = api_instance.create_oidc_dynamic_client(o_auth2_client) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | oAuth2Client | - | +**400** | Bad Request Error Response | - | +**0** | Default Error Response | - | + +[[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) + +# **delete_oidc_dynamic_client** +> delete_oidc_dynamic_client(id) + +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. + +### Example + +* 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 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( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearer +configuration = ory_hydra_client.Configuration( + access_token = 'YOUR_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. + + # 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: + 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. | + +### Return type + +void (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | +**0** | genericError | - | + +[[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) + +# **discover_oidc_configuration** +> 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/ + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = oidc_api.OidcApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # OpenID Connect Discovery + api_response = api_instance.discover_oidc_configuration() + pprint(api_response) + except ory_hydra_client.ApiException as e: + print("Exception when calling OidcApi->discover_oidc_configuration: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OidcConfiguration**](OidcConfiguration.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oidcConfiguration | - | +**0** | errorOAuth2 | - | + +[[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) + +# **get_oidc_dynamic_client** +> 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. + +### Example + +* 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 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( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearer +configuration = ory_hydra_client.Configuration( + access_token = 'YOUR_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. + + # 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) + pprint(api_response) + except ory_hydra_client.ApiException 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. | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2Client | - | +**0** | Default Error Response | - | + +[[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) + +# **get_oidc_user_info** +> 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. + +### Example + +* 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 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( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# 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' + +# 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) + + # example, this endpoint has no required or optional parameters + try: + # OpenID Connect Userinfo + api_response = api_instance.get_oidc_user_info() + pprint(api_response) + except ory_hydra_client.ApiException as e: + print("Exception when calling OidcApi->get_oidc_user_info: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OidcUserInfo**](OidcUserInfo.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oidcUserInfo | - | +**0** | errorOAuth2 | - | + +[[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_oidc_session** +> revoke_oidc_session() + +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. + +### Example + + +```python +import time +import ory_hydra_client +from ory_hydra_client.api import oidc_api +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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = oidc_api.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: + print("Exception when calling OidcApi->revoke_oidc_session: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | + +[[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_oidc_dynamic_client** +> 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. + +### Example + +* 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 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( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearer +configuration = ory_hydra_client.Configuration( + access_token = 'YOUR_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( + 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", + subject_type="subject_type_example", + token_endpoint_auth_method="token_endpoint_auth_method_example", + 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 + try: + # Set OAuth2 Client using OpenID Dynamic Client Registration + api_response = api_instance.set_oidc_dynamic_client(id, o_auth2_client) + pprint(api_response) + except ory_hydra_client.ApiException 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 | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | oAuth2Client | - | +**404** | Not Found Error Response | - | +**0** | Default Error Response | - | + +[[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) + diff --git a/clients/hydra/python/docs/OidcConfiguration.md b/clients/hydra/python/docs/OidcConfiguration.md new file mode 100644 index 00000000000..9221b394617 --- /dev/null +++ b/clients/hydra/python/docs/OidcConfiguration.md @@ -0,0 +1,41 @@ +# OidcConfiguration + +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] +**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] +**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_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] +**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] +**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] + +[[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/UserinfoResponse.md b/clients/hydra/python/docs/OidcUserInfo.md similarity index 99% rename from clients/hydra/python/docs/UserinfoResponse.md rename to clients/hydra/python/docs/OidcUserInfo.md index 8e774bdd313..5b555deb64e 100644 --- a/clients/hydra/python/docs/UserinfoResponse.md +++ b/clients/hydra/python/docs/OidcUserInfo.md @@ -1,6 +1,6 @@ -# UserinfoResponse +# OidcUserInfo -The userinfo response +OpenID Connect Userinfo ## Properties Name | Type | Description | Notes diff --git a/clients/hydra/python/docs/Pagination.md b/clients/hydra/python/docs/Pagination.md new file mode 100644 index 00000000000..8c0b2c15a69 --- /dev/null +++ b/clients/hydra/python/docs/Pagination.md @@ -0,0 +1,13 @@ +# 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] + +[[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/Oauth2TokenResponse.md b/clients/hydra/python/docs/PaginationHeaders.md similarity index 57% rename from clients/hydra/python/docs/Oauth2TokenResponse.md rename to clients/hydra/python/docs/PaginationHeaders.md index 7c52839c311..5419a56e1fe 100644 --- a/clients/hydra/python/docs/Oauth2TokenResponse.md +++ b/clients/hydra/python/docs/PaginationHeaders.md @@ -1,16 +1,11 @@ -# Oauth2TokenResponse +# PaginationHeaders -The Access Token Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**access_token** | **str** | | [optional] -**expires_in** | **int** | | [optional] -**id_token** | **str** | | [optional] -**refresh_token** | **str** | | [optional] -**scope** | **str** | | [optional] -**token_type** | **str** | | [optional] +**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] [[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/PatchDocument.md b/clients/hydra/python/docs/PatchDocument.md deleted file mode 100644 index 07f9fc8a4c4..00000000000 --- a/clients/hydra/python/docs/PatchDocument.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchDocument - -A JSONPatch document as defined by RFC 6902 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**op** | **str** | The operation to be performed | -**path** | **str** | A JSON-pointer | -**_from** | **str** | A JSON-pointer | [optional] -**value** | **bool, date, datetime, dict, float, int, list, str, none_type** | The value to be used within the operations | [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] - -[[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/PluginConfig.md b/clients/hydra/python/docs/PluginConfig.md deleted file mode 100644 index 55198618051..00000000000 --- a/clients/hydra/python/docs/PluginConfig.md +++ /dev/null @@ -1,27 +0,0 @@ -# PluginConfig - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | [**PluginConfigArgs**](PluginConfigArgs.md) | | -**description** | **str** | description | -**documentation** | **str** | documentation | -**entrypoint** | **[str]** | entrypoint | -**env** | [**[PluginEnv]**](PluginEnv.md) | env | -**interface** | [**PluginConfigInterface**](PluginConfigInterface.md) | | -**ipc_host** | **bool** | ipc host | -**linux** | [**PluginConfigLinux**](PluginConfigLinux.md) | | -**mounts** | [**[PluginMount]**](PluginMount.md) | mounts | -**network** | [**PluginConfigNetwork**](PluginConfigNetwork.md) | | -**pid_host** | **bool** | pid host | -**propagated_mount** | **str** | propagated mount | -**work_dir** | **str** | work dir | -**docker_version** | **str** | Docker Version used to create the plugin | [optional] -**user** | [**PluginConfigUser**](PluginConfigUser.md) | | [optional] -**rootfs** | [**PluginConfigRootfs**](PluginConfigRootfs.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] - -[[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/PluginConfigArgs.md b/clients/hydra/python/docs/PluginConfigArgs.md deleted file mode 100644 index ec99decf2df..00000000000 --- a/clients/hydra/python/docs/PluginConfigArgs.md +++ /dev/null @@ -1,16 +0,0 @@ -# PluginConfigArgs - -PluginConfigArgs plugin config args - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | description | -**name** | **str** | name | -**settable** | **[str]** | settable | -**value** | **[str]** | value | -**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] - -[[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/PluginConfigInterface.md b/clients/hydra/python/docs/PluginConfigInterface.md deleted file mode 100644 index 98fb639ab93..00000000000 --- a/clients/hydra/python/docs/PluginConfigInterface.md +++ /dev/null @@ -1,15 +0,0 @@ -# PluginConfigInterface - -PluginConfigInterface The interface between Docker and the plugin - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**socket** | **str** | socket | -**types** | [**[PluginInterfaceType]**](PluginInterfaceType.md) | types | -**protocol_scheme** | **str** | Protocol to use for clients connecting to the plugin. | [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] - -[[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/PluginConfigLinux.md b/clients/hydra/python/docs/PluginConfigLinux.md deleted file mode 100644 index 18ae98905cd..00000000000 --- a/clients/hydra/python/docs/PluginConfigLinux.md +++ /dev/null @@ -1,15 +0,0 @@ -# PluginConfigLinux - -PluginConfigLinux plugin config linux - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allow_all_devices** | **bool** | allow all devices | -**capabilities** | **[str]** | capabilities | -**devices** | [**[PluginDevice]**](PluginDevice.md) | devices | -**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] - -[[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/PluginConfigRootfs.md b/clients/hydra/python/docs/PluginConfigRootfs.md deleted file mode 100644 index f68f1b081f7..00000000000 --- a/clients/hydra/python/docs/PluginConfigRootfs.md +++ /dev/null @@ -1,14 +0,0 @@ -# PluginConfigRootfs - -PluginConfigRootfs plugin config rootfs - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**diff_ids** | **[str]** | diff ids | [optional] -**type** | **str** | 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] - -[[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/PluginDevice.md b/clients/hydra/python/docs/PluginDevice.md deleted file mode 100644 index d5212acae67..00000000000 --- a/clients/hydra/python/docs/PluginDevice.md +++ /dev/null @@ -1,16 +0,0 @@ -# PluginDevice - -PluginDevice plugin device - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | description | -**name** | **str** | name | -**path** | **str** | path | -**settable** | **[str]** | settable | -**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] - -[[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/PluginEnv.md b/clients/hydra/python/docs/PluginEnv.md deleted file mode 100644 index a094dbe5507..00000000000 --- a/clients/hydra/python/docs/PluginEnv.md +++ /dev/null @@ -1,16 +0,0 @@ -# PluginEnv - -PluginEnv plugin env - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | description | -**name** | **str** | name | -**settable** | **[str]** | settable | -**value** | **str** | value | -**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] - -[[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/PluginInterfaceType.md b/clients/hydra/python/docs/PluginInterfaceType.md deleted file mode 100644 index ae0d4dacba5..00000000000 --- a/clients/hydra/python/docs/PluginInterfaceType.md +++ /dev/null @@ -1,15 +0,0 @@ -# PluginInterfaceType - -PluginInterfaceType plugin interface type - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capability** | **str** | capability | -**prefix** | **str** | prefix | -**version** | **str** | version | -**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] - -[[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/PluginMount.md b/clients/hydra/python/docs/PluginMount.md deleted file mode 100644 index e9f6c411a45..00000000000 --- a/clients/hydra/python/docs/PluginMount.md +++ /dev/null @@ -1,19 +0,0 @@ -# PluginMount - -PluginMount plugin mount - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | description | -**destination** | **str** | destination | -**name** | **str** | name | -**options** | **[str]** | options | -**settable** | **[str]** | settable | -**source** | **str** | source | -**type** | **str** | type | -**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] - -[[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/PluginSettings.md b/clients/hydra/python/docs/PluginSettings.md deleted file mode 100644 index 9114edd4c2f..00000000000 --- a/clients/hydra/python/docs/PluginSettings.md +++ /dev/null @@ -1,15 +0,0 @@ -# PluginSettings - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | **[str]** | args | -**devices** | [**[PluginDevice]**](PluginDevice.md) | devices | -**env** | **[str]** | env | -**mounts** | [**[PluginMount]**](PluginMount.md) | mounts | -**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] - -[[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/PreviousConsentSession.md b/clients/hydra/python/docs/PreviousConsentSession.md deleted file mode 100644 index 137261bbf4c..00000000000 --- a/clients/hydra/python/docs/PreviousConsentSession.md +++ /dev/null @@ -1,19 +0,0 @@ -# PreviousConsentSession - -The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**consent_request** | [**ConsentRequest**](ConsentRequest.md) | | [optional] -**grant_access_token_audience** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [optional] -**grant_scope** | [**StringSlicePipeDelimiter**](StringSlicePipeDelimiter.md) | | [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** | [**ConsentRequestSession**](ConsentRequestSession.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] - -[[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/PublicApi.md b/clients/hydra/python/docs/PublicApi.md deleted file mode 100644 index fb2e077b63d..00000000000 --- a/clients/hydra/python/docs/PublicApi.md +++ /dev/null @@ -1,990 +0,0 @@ -# ory_hydra_client.PublicApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disconnect_user**](PublicApi.md#disconnect_user) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -[**discover_open_id_configuration**](PublicApi.md#discover_open_id_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -[**dynamic_client_registration_create_o_auth2_client**](PublicApi.md#dynamic_client_registration_create_o_auth2_client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamic_client_registration_delete_o_auth2_client**](PublicApi.md#dynamic_client_registration_delete_o_auth2_client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamic_client_registration_get_o_auth2_client**](PublicApi.md#dynamic_client_registration_get_o_auth2_client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamic_client_registration_update_o_auth2_client**](PublicApi.md#dynamic_client_registration_update_o_auth2_client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**is_instance_ready**](PublicApi.md#is_instance_ready) | **GET** /health/ready | Check Readiness Status -[**oauth2_token**](PublicApi.md#oauth2_token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -[**oauth_auth**](PublicApi.md#oauth_auth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -[**revoke_o_auth2_token**](PublicApi.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -[**userinfo**](PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -[**well_known**](PublicApi.md#well_known) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery - - -# **disconnect_user** -> disconnect_user() - -OpenID Connect Front-Backchannel Enabled Logout - -This endpoint initiates and completes user logout at Ory Hydra 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 - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = public_api.PublicApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # OpenID Connect Front-Backchannel Enabled Logout - api_instance.disconnect_user() - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->disconnect_user: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | - -[[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) - -# **discover_open_id_configuration** -> WellKnown discover_open_id_configuration() - -OpenID Connect Discovery - -The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.well_known import WellKnown -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = public_api.PublicApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # OpenID Connect Discovery - api_response = api_instance.discover_open_id_configuration() - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->discover_open_id_configuration: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**WellKnown**](WellKnown.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | wellKnown | - | -**401** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **dynamic_client_registration_create_o_auth2_client** -> OAuth2Client dynamic_client_registration_create_o_auth2_client(body) - -Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = public_api.PublicApi(api_client) - body = OAuth2Client( - allowed_cors_origins=StringSlicePipeDelimiter([ - "allowed_cors_origins_example", - ]), - audience=StringSlicePipeDelimiter([ - "audience_example", - ]), - backchannel_logout_session_required=True, - backchannel_logout_uri="backchannel_logout_uri_example", - 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=StringSlicePipeDelimiter([ - "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=StringSlicePipeDelimiter([ - "grant_types_example", - ]), - jwks={}, - jwks_uri="jwks_uri_example", - logo_uri="logo_uri_example", - metadata={}, - owner="owner_example", - policy_uri="policy_uri_example", - post_logout_redirect_uris=StringSlicePipeDelimiter([ - "post_logout_redirect_uris_example", - ]), - redirect_uris=StringSlicePipeDelimiter([ - "redirect_uris_example", - ]), - 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=StringSlicePipeDelimiter([ - "request_uris_example", - ]), - response_types=StringSlicePipeDelimiter([ - "response_types_example", - ]), - scope="z", - sector_identifier_uri="sector_identifier_uri_example", - subject_type="subject_type_example", - token_endpoint_auth_method="token_endpoint_auth_method_example", - 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 | - - # example passing only required values which don't have defaults set - try: - # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - api_response = api_instance.dynamic_client_registration_create_o_auth2_client(body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->dynamic_client_registration_create_o_auth2_client: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | oAuth2Client | - | -**0** | jsonError | - | - -[[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) - -# **dynamic_client_registration_delete_o_auth2_client** -> dynamic_client_registration_delete_o_auth2_client(id) - -Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = public_api.PublicApi(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: - # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - api_instance.dynamic_client_registration_delete_o_auth2_client(id) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->dynamic_client_registration_delete_o_auth2_client: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**0** | jsonError | - | - -[[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) - -# **dynamic_client_registration_get_o_auth2_client** -> OAuth2Client dynamic_client_registration_get_o_auth2_client(id) - -Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = public_api.PublicApi(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 using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - api_response = api_instance.dynamic_client_registration_get_o_auth2_client(id) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->dynamic_client_registration_get_o_auth2_client: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - -[[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) - -# **dynamic_client_registration_update_o_auth2_client** -> OAuth2Client dynamic_client_registration_update_o_auth2_client(id, body) - -Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = public_api.PublicApi(api_client) - id = "id_example" # str | The id of the OAuth 2.0 Client. - body = OAuth2Client( - allowed_cors_origins=StringSlicePipeDelimiter([ - "allowed_cors_origins_example", - ]), - audience=StringSlicePipeDelimiter([ - "audience_example", - ]), - backchannel_logout_session_required=True, - backchannel_logout_uri="backchannel_logout_uri_example", - 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=StringSlicePipeDelimiter([ - "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=StringSlicePipeDelimiter([ - "grant_types_example", - ]), - jwks={}, - jwks_uri="jwks_uri_example", - logo_uri="logo_uri_example", - metadata={}, - owner="owner_example", - policy_uri="policy_uri_example", - post_logout_redirect_uris=StringSlicePipeDelimiter([ - "post_logout_redirect_uris_example", - ]), - redirect_uris=StringSlicePipeDelimiter([ - "redirect_uris_example", - ]), - 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=StringSlicePipeDelimiter([ - "request_uris_example", - ]), - response_types=StringSlicePipeDelimiter([ - "response_types_example", - ]), - scope="z", - sector_identifier_uri="sector_identifier_uri_example", - subject_type="subject_type_example", - token_endpoint_auth_method="token_endpoint_auth_method_example", - 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 | - - # example passing only required values which don't have defaults set - try: - # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - api_response = api_instance.dynamic_client_registration_update_o_auth2_client(id, body) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->dynamic_client_registration_update_o_auth2_client: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **str**| The id of the OAuth 2.0 Client. | - **body** | [**OAuth2Client**](OAuth2Client.md)| | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oAuth2Client | - | -**0** | jsonError | - | - -[[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) - -# **is_instance_ready** -> HealthStatus is_instance_ready() - -Check Readiness Status - -This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.health_status import HealthStatus -from ory_hydra_client.model.health_not_ready_status import HealthNotReadyStatus -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = public_api.PublicApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Check Readiness Status - api_response = api_instance.is_instance_ready() - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->is_instance_ready: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | healthStatus | - | -**503** | healthNotReadyStatus | - | - -[[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** -> Oauth2TokenResponse oauth2_token(grant_type) - -The OAuth 2.0 Token Endpoint - -The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - -### Example - -* Basic Authentication (basic): -* OAuth Authentication (oauth2): - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.oauth2_token_response import Oauth2TokenResponse -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic -configuration = ory_hydra_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure OAuth2 access token for authorization: oauth2 -configuration = ory_hydra_client.Configuration( - host = "http://localhost" -) -configuration.access_token = 'YOUR_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 = public_api.PublicApi(api_client) - grant_type = "grant_type_example" # str | - code = "code_example" # str | (optional) - refresh_token = "refresh_token_example" # str | (optional) - redirect_uri = "redirect_uri_example" # str | (optional) - client_id = "client_id_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(grant_type) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->oauth2_token: %s\n" % e) - - # 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(grant_type, code=code, refresh_token=refresh_token, redirect_uri=redirect_uri, client_id=client_id) - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->oauth2_token: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grant_type** | **str**| | - **code** | **str**| | [optional] - **refresh_token** | **str**| | [optional] - **redirect_uri** | **str**| | [optional] - **client_id** | **str**| | [optional] - -### Return type - -[**Oauth2TokenResponse**](Oauth2TokenResponse.md) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | oauth2TokenResponse | - | -**400** | jsonError | - | -**401** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **oauth_auth** -> oauth_auth() - -The OAuth 2.0 Authorize Endpoint - -This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = public_api.PublicApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # The OAuth 2.0 Authorize Endpoint - api_instance.oauth_auth() - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->oauth_auth: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**500** | jsonError | - | - -[[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 OAuth2 Tokens - -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. - -### Example - -* Basic Authentication (basic): -* OAuth Authentication (oauth2): - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: basic -configuration = ory_hydra_client.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) - -# Configure OAuth2 access token for authorization: oauth2 -configuration = ory_hydra_client.Configuration( - host = "http://localhost" -) -configuration.access_token = 'YOUR_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 = public_api.PublicApi(api_client) - token = "token_example" # str | - - # example passing only required values which don't have defaults set - try: - # Revoke OAuth2 Tokens - api_instance.revoke_o_auth2_token(token) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->revoke_o_auth2_token: %s\n" % e) -``` - - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token** | **str**| | - -### Return type - -void (empty response body) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - | -**401** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **userinfo** -> UserinfoResponse userinfo() - -OpenID Connect Userinfo - -This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - -### Example - -* OAuth Authentication (oauth2): - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.userinfo_response import UserinfoResponse -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# 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' - -# 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 = public_api.PublicApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # OpenID Connect Userinfo - api_response = api_instance.userinfo() - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->userinfo: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**UserinfoResponse**](UserinfoResponse.md) - -### Authorization - -[oauth2](../README.md#oauth2) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | userinfoResponse | - | -**401** | jsonError | - | -**500** | jsonError | - | - -[[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) - -# **well_known** -> JSONWebKeySet well_known() - -JSON Web Keys Discovery - -This endpoint returns JSON Web Keys to be used as public keys for 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. - -### Example - - -```python -import time -import ory_hydra_client -from ory_hydra_client.api import public_api -from ory_hydra_client.model.json_web_key_set import JSONWebKeySet -from ory_hydra_client.model.json_error import JsonError -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( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with ory_hydra_client.ApiClient() as api_client: - # Create an instance of the API class - api_instance = public_api.PublicApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # JSON Web Keys Discovery - api_response = api_instance.well_known() - pprint(api_response) - except ory_hydra_client.ApiException as e: - print("Exception when calling PublicApi->well_known: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSONWebKeySet | - | -**500** | jsonError | - | - -[[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) - diff --git a/clients/hydra/python/docs/RejectRequest.md b/clients/hydra/python/docs/RejectOAuth2Request.md similarity index 98% rename from clients/hydra/python/docs/RejectRequest.md rename to clients/hydra/python/docs/RejectOAuth2Request.md index e8085de1284..45ba0c1218c 100644 --- a/clients/hydra/python/docs/RejectRequest.md +++ b/clients/hydra/python/docs/RejectOAuth2Request.md @@ -1,4 +1,4 @@ -# RejectRequest +# RejectOAuth2Request ## Properties diff --git a/clients/hydra/python/docs/RequestWasHandledResponse.md b/clients/hydra/python/docs/RequestWasHandledResponse.md deleted file mode 100644 index 829daa3a389..00000000000 --- a/clients/hydra/python/docs/RequestWasHandledResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# RequestWasHandledResponse - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**redirect_to** | **str** | Original request URL to which you should redirect the user if request was already handled. | -**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] - -[[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/StringSlicePipeDelimiter.md b/clients/hydra/python/docs/StringSliceJSONFormat.md similarity index 91% rename from clients/hydra/python/docs/StringSlicePipeDelimiter.md rename to clients/hydra/python/docs/StringSliceJSONFormat.md index 457ce44fc96..b6786d7534a 100644 --- a/clients/hydra/python/docs/StringSlicePipeDelimiter.md +++ b/clients/hydra/python/docs/StringSliceJSONFormat.md @@ -1,4 +1,4 @@ -# StringSlicePipeDelimiter +# StringSliceJSONFormat ## Properties diff --git a/clients/hydra/python/docs/TokenPagination.md b/clients/hydra/python/docs/TokenPagination.md new file mode 100644 index 00000000000..3aaf984bad6 --- /dev/null +++ b/clients/hydra/python/docs/TokenPagination.md @@ -0,0 +1,13 @@ +# TokenPagination + + +## 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] + +[[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 new file mode 100644 index 00000000000..4a77de9c8ee --- /dev/null +++ b/clients/hydra/python/docs/TokenPaginationHeaders.md @@ -0,0 +1,13 @@ +# TokenPaginationHeaders + + +## 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] + +[[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 new file mode 100644 index 00000000000..685093747b5 --- /dev/null +++ b/clients/hydra/python/docs/TokenPaginationRequestParameters.md @@ -0,0 +1,14 @@ +# 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). + +## 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] + +[[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 new file mode 100644 index 00000000000..4ff29465d69 --- /dev/null +++ b/clients/hydra/python/docs/TokenPaginationResponseHeaders.md @@ -0,0 +1,14 @@ +# 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). + +## 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=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] + +[[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/TrustJwtGrantIssuerBody.md b/clients/hydra/python/docs/TrustOAuth2JwtGrantIssuer.md similarity index 73% rename from clients/hydra/python/docs/TrustJwtGrantIssuerBody.md rename to clients/hydra/python/docs/TrustOAuth2JwtGrantIssuer.md index 843c577f64d..f991438b8b8 100644 --- a/clients/hydra/python/docs/TrustJwtGrantIssuerBody.md +++ b/clients/hydra/python/docs/TrustOAuth2JwtGrantIssuer.md @@ -1,14 +1,16 @@ -# TrustJwtGrantIssuerBody +# TrustOAuth2JwtGrantIssuer +Trust OAuth2 JWT Bearer Grant Type Issuer Request Body ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **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) | | +**jwk** | [**JsonWebKey**](JsonWebKey.md) | | **scope** | **[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. | +**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] +**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] [[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/TrustedJwtGrantIssuer.md b/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuer.md similarity index 76% rename from clients/hydra/python/docs/TrustedJwtGrantIssuer.md rename to clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuer.md index f8ed20c8ff1..9a06d633a16 100644 --- a/clients/hydra/python/docs/TrustedJwtGrantIssuer.md +++ b/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuer.md @@ -1,14 +1,16 @@ -# TrustedJwtGrantIssuer +# TrustedOAuth2JwtGrantIssuer +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] **created_at** | **datetime** | The \"created_at\" indicates, when grant was created. | [optional] **expires_at** | **datetime** | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | [optional] **id** | **str** | | [optional] **issuer** | **str** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] -**public_key** | [**TrustedJsonWebKey**](TrustedJsonWebKey.md) | | [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] **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] diff --git a/clients/hydra/dart/doc/PluginConfigUser.md b/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuers.md similarity index 54% rename from clients/hydra/dart/doc/PluginConfigUser.md rename to clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuers.md index 034a8c300f0..c42e4264d36 100644 --- a/clients/hydra/dart/doc/PluginConfigUser.md +++ b/clients/hydra/python/docs/TrustedOAuth2JwtGrantIssuers.md @@ -1,15 +1,11 @@ -# ory_hydra_client.model.PluginConfigUser +# TrustedOAuth2JwtGrantIssuers -## Load the model package -```dart -import 'package:ory_hydra_client/api.dart'; -``` +OAuth2 JWT Bearer Grant Type Issuer Trust Relationships ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**GID** | **int** | g ID | [optional] -**UID** | **int** | UID | [optional] +**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/TrustedJsonWebKey.md b/clients/hydra/python/docs/TrustedOAuth2JwtGrantJsonWebKey.md similarity index 88% rename from clients/hydra/python/docs/TrustedJsonWebKey.md rename to clients/hydra/python/docs/TrustedOAuth2JwtGrantJsonWebKey.md index 8e1b50bb718..08fefbdde40 100644 --- a/clients/hydra/python/docs/TrustedJsonWebKey.md +++ b/clients/hydra/python/docs/TrustedOAuth2JwtGrantJsonWebKey.md @@ -1,5 +1,6 @@ -# TrustedJsonWebKey +# TrustedOAuth2JwtGrantJsonWebKey +OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key ## Properties Name | Type | Description | Notes diff --git a/clients/hydra/python/docs/Volume.md b/clients/hydra/python/docs/Volume.md deleted file mode 100644 index 1f4029a3202..00000000000 --- a/clients/hydra/python/docs/Volume.md +++ /dev/null @@ -1,21 +0,0 @@ -# Volume - -Volume volume - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**driver** | **str** | Name of the volume driver used by the volume. | -**labels** | **{str: (str,)}** | User-defined key/value metadata. | -**mountpoint** | **str** | Mount path of the volume on the host. | -**name** | **str** | Name of the volume. | -**options** | **{str: (str,)}** | The driver specific options used when creating the volume. | -**scope** | **str** | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | -**created_at** | **str** | Date/Time the volume was created. | [optional] -**status** | **bool, date, datetime, dict, float, int, list, str, none_type** | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. | [optional] -**usage_data** | [**VolumeUsageData**](VolumeUsageData.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] - -[[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/VolumeUsageData.md b/clients/hydra/python/docs/VolumeUsageData.md deleted file mode 100644 index 46d3a7a7c04..00000000000 --- a/clients/hydra/python/docs/VolumeUsageData.md +++ /dev/null @@ -1,14 +0,0 @@ -# VolumeUsageData - -VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ref_count** | **int** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | -**size** | **int** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | -**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] - -[[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/WellKnown.md b/clients/hydra/python/docs/WellKnown.md deleted file mode 100644 index 53517b5893a..00000000000 --- a/clients/hydra/python/docs/WellKnown.md +++ /dev/null @@ -1,39 +0,0 @@ -# WellKnown - -It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorization_endpoint** | **str** | URL of the OP's OAuth 2.0 Authorization Endpoint. | -**id_token_signing_alg_values_supported** | **[str]** | 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** | 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** | 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]** | 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]** | JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | -**token_endpoint** | **str** | URL of the OP's OAuth 2.0 Token Endpoint | -**backchannel_logout_session_supported** | **bool** | 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** | Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] -**claims_parameter_supported** | **bool** | Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] -**claims_supported** | **[str]** | 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]** | JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] -**end_session_endpoint** | **str** | 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** | 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** | Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] -**grant_types_supported** | **[str]** | JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] -**registration_endpoint** | **str** | URL of the OP's Dynamic Client Registration Endpoint. | [optional] -**request_object_signing_alg_values_supported** | **[str]** | 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** | Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] -**request_uri_parameter_supported** | **bool** | Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] -**require_request_uri_registration** | **bool** | 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]** | JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] -**revocation_endpoint** | **str** | URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] -**scopes_supported** | **[str]** | SON 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]** | 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** | URL of the OP's UserInfo Endpoint. | [optional] -**userinfo_signing_alg_values_supported** | **[str]** | 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] - -[[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 new file mode 100644 index 00000000000..12b5e854eb6 --- /dev/null +++ b/clients/hydra/python/docs/WellknownApi.md @@ -0,0 +1,74 @@ +# ory_hydra_client.WellknownApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**discover_json_web_keys**](WellknownApi.md#discover_json_web_keys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys + + +# **discover_json_web_keys** +> 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. + +### Example + + +```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 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( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with ory_hydra_client.ApiClient() as api_client: + # Create an instance of the API class + api_instance = wellknown_api.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() + pprint(api_response) + except ory_hydra_client.ApiException as e: + print("Exception when calling WellknownApi->discover_json_web_keys: %s\n" % e) +``` + + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | jsonWebKeySet | - | +**0** | errorOAuth2 | - | + +[[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) + diff --git a/clients/hydra/python/ory_hydra_client/__init__.py b/clients/hydra/python/ory_hydra_client/__init__.py index dcc8feba9ec..644d1531b9f 100644 --- a/clients/hydra/python/ory_hydra_client/__init__.py +++ b/clients/hydra/python/ory_hydra_client/__init__.py @@ -1,16 +1,17 @@ # flake8: noqa """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ -__version__ = "v1.11.0" +__version__ = "v2.0.1" # import ApiClient from ory_hydra_client.api_client import ApiClient diff --git a/clients/hydra/python/ory_hydra_client/api/__init__.py b/clients/hydra/python/ory_hydra_client/api/__init__.py index 2925b2a6f20..14aaf3e2ce9 100644 --- a/clients/hydra/python/ory_hydra_client/api/__init__.py +++ b/clients/hydra/python/ory_hydra_client/api/__init__.py @@ -1,3 +1,3 @@ # 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 AdminApi +# from ory_hydra_client.apis import JwkApi diff --git a/clients/hydra/python/ory_hydra_client/api/jwk_api.py b/clients/hydra/python/ory_hydra_client/api/jwk_api.py new file mode 100644 index 00000000000..4dcdc12181e --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/api/jwk_api.py @@ -0,0 +1,1021 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: 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.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 + + +class JwkApi(object): + """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): + if api_client is None: + api_client = ApiClient() + 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 + ) + + def create_json_web_key_set( + 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) + + def delete_json_web_key( + 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) + + def delete_json_web_key_set( + 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) + + def get_json_web_key( + 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) + + def get_json_web_key_set( + 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) + + def set_json_web_key( + 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) + + def set_json_web_key_set( + 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) + 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 c23a19805da..26de11410b7 100644 --- a/clients/hydra/python/ory_hydra_client/api/metadata_api.py +++ b/clients/hydra/python/ory_hydra_client/api/metadata_api.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -21,6 +22,11 @@ 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 class MetadataApi(object): @@ -34,12 +40,12 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - self.prometheus_endpoint = _Endpoint( + self.get_version_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (GetVersion200Response,), 'auth': [], - 'endpoint_path': '/metrics/prometheus', - 'operation_id': 'prometheus', + 'endpoint_path': '/version', + 'operation_id': 'get_version', 'http_method': 'GET', 'servers': None, }, @@ -69,23 +75,265 @@ def __init__(self, api_client=None): } }, headers_map={ - 'accept': [], + '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 ) - def prometheus( + 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 + ) + 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_version_endpoint.call_with_http_info(**kwargs) + + 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 + ) + 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.is_alive_endpoint.call_with_http_info(**kwargs) + + def is_ready( self, **kwargs ): - """Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: # noqa: E501 + """Check HTTP Server and Database Status # noqa: E501 - ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` # 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.prometheus(async_req=True) + >>> thread = api.is_ready(async_req=True) >>> result = thread.get() @@ -115,10 +363,14 @@ def prometheus( _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 + IsReady200Response If the method is called asynchronously, returns the request thread. """ @@ -146,5 +398,6 @@ def prometheus( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.prometheus_endpoint.call_with_http_info(**kwargs) + 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/admin_api.py b/clients/hydra/python/ory_hydra_client/api/o_auth2_api.py similarity index 67% rename from clients/hydra/python/ory_hydra_client/api/admin_api.py rename to clients/hydra/python/ory_hydra_client/api/o_auth2_api.py index 2fa12d79a2f..4e062169d69 100644 --- a/clients/hydra/python/ory_hydra_client/api/admin_api.py +++ b/clients/hydra/python/ory_hydra_client/api/o_auth2_api.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -21,32 +22,27 @@ none_type, validate_and_convert_types ) -from ory_hydra_client.model.accept_consent_request import AcceptConsentRequest -from ory_hydra_client.model.accept_login_request import AcceptLoginRequest -from ory_hydra_client.model.completed_request import CompletedRequest -from ory_hydra_client.model.consent_request import ConsentRequest -from ory_hydra_client.model.flush_inactive_o_auth2_tokens_request import FlushInactiveOAuth2TokensRequest +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.health_status import HealthStatus -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.json_error import JsonError -from ory_hydra_client.model.json_web_key_set_generator_request import JsonWebKeySetGeneratorRequest -from ory_hydra_client.model.login_request import LoginRequest -from ory_hydra_client.model.logout_request import LogoutRequest +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_token_introspection import OAuth2TokenIntrospection -from ory_hydra_client.model.patch_request import PatchRequest -from ory_hydra_client.model.previous_consent_session import PreviousConsentSession -from ory_hydra_client.model.reject_request import RejectRequest -from ory_hydra_client.model.request_was_handled_response import RequestWasHandledResponse -from ory_hydra_client.model.trust_jwt_grant_issuer_body import TrustJwtGrantIssuerBody -from ory_hydra_client.model.trusted_jwt_grant_issuer import TrustedJwtGrantIssuer -from ory_hydra_client.model.trusted_jwt_grant_issuers import TrustedJwtGrantIssuers -from ory_hydra_client.model.version import Version - - -class AdminApi(object): +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): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -57,19 +53,19 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - self.accept_consent_request_endpoint = _Endpoint( + self.accept_o_auth2_consent_request_endpoint = _Endpoint( settings={ - 'response_type': (CompletedRequest,), + 'response_type': (OAuth2RedirectTo,), 'auth': [], - 'endpoint_path': '/oauth2/auth/requests/consent/accept', - 'operation_id': 'accept_consent_request', + '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', - 'body', + 'accept_o_auth2_consent_request', ], 'required': [ 'consent_challenge', @@ -89,15 +85,15 @@ def __init__(self, api_client=None): 'openapi_types': { 'consent_challenge': (str,), - 'body': - (AcceptConsentRequest,), + 'accept_o_auth2_consent_request': + (AcceptOAuth2ConsentRequest,), }, 'attribute_map': { 'consent_challenge': 'consent_challenge', }, 'location_map': { 'consent_challenge': 'query', - 'body': 'body', + 'accept_o_auth2_consent_request': 'body', }, 'collection_format_map': { } @@ -112,19 +108,19 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.accept_login_request_endpoint = _Endpoint( + self.accept_o_auth2_login_request_endpoint = _Endpoint( settings={ - 'response_type': (CompletedRequest,), + 'response_type': (OAuth2RedirectTo,), 'auth': [], - 'endpoint_path': '/oauth2/auth/requests/login/accept', - 'operation_id': 'accept_login_request', + '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', - 'body', + 'accept_o_auth2_login_request', ], 'required': [ 'login_challenge', @@ -144,15 +140,15 @@ def __init__(self, api_client=None): 'openapi_types': { 'login_challenge': (str,), - 'body': - (AcceptLoginRequest,), + 'accept_o_auth2_login_request': + (AcceptOAuth2LoginRequest,), }, 'attribute_map': { 'login_challenge': 'login_challenge', }, 'location_map': { 'login_challenge': 'query', - 'body': 'body', + 'accept_o_auth2_login_request': 'body', }, 'collection_format_map': { } @@ -167,12 +163,12 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.accept_logout_request_endpoint = _Endpoint( + self.accept_o_auth2_logout_request_endpoint = _Endpoint( settings={ - 'response_type': (CompletedRequest,), + 'response_type': (OAuth2RedirectTo,), 'auth': [], - 'endpoint_path': '/oauth2/auth/requests/logout/accept', - 'operation_id': 'accept_logout_request', + 'endpoint_path': '/admin/oauth2/auth/requests/logout/accept', + 'operation_id': 'accept_o_auth2_logout_request', 'http_method': 'PUT', 'servers': None, }, @@ -216,22 +212,21 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.create_json_web_key_set_endpoint = _Endpoint( + self.create_o_auth2_client_endpoint = _Endpoint( settings={ - 'response_type': (JSONWebKeySet,), + 'response_type': (OAuth2Client,), 'auth': [], - 'endpoint_path': '/keys/{set}', - 'operation_id': 'create_json_web_key_set', + 'endpoint_path': '/admin/clients', + 'operation_id': 'create_o_auth2_client', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'set', - 'body', + 'o_auth2_client', ], 'required': [ - 'set', + 'o_auth2_client', ], 'nullable': [ ], @@ -246,17 +241,13 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'set': - (str,), - 'body': - (JsonWebKeySetGeneratorRequest,), + 'o_auth2_client': + (OAuth2Client,), }, 'attribute_map': { - 'set': 'set', }, 'location_map': { - 'set': 'path', - 'body': 'body', + 'o_auth2_client': 'body', }, 'collection_format_map': { } @@ -271,21 +262,21 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.create_o_auth2_client_endpoint = _Endpoint( + self.delete_o_auth2_client_endpoint = _Endpoint( settings={ - 'response_type': (OAuth2Client,), + 'response_type': None, 'auth': [], - 'endpoint_path': '/clients', - 'operation_id': 'create_o_auth2_client', - 'http_method': 'POST', + 'endpoint_path': '/admin/clients/{id}', + 'operation_id': 'delete_o_auth2_client', + 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ - 'body', + 'id', ], 'required': [ - 'body', + 'id', ], 'nullable': [ ], @@ -300,13 +291,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'body': - (OAuth2Client,), + 'id': + (str,), }, 'attribute_map': { + 'id': 'id', }, 'location_map': { - 'body': 'body', + 'id': 'path', }, 'collection_format_map': { } @@ -315,29 +307,25 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [ - 'application/json' - ] + 'content_type': [], }, api_client=api_client ) - self.delete_json_web_key_endpoint = _Endpoint( + self.delete_o_auth2_token_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], - 'endpoint_path': '/keys/{set}/{kid}', - 'operation_id': 'delete_json_web_key', + 'endpoint_path': '/admin/oauth2/tokens', + 'operation_id': 'delete_o_auth2_token', 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ - 'kid', - 'set', + 'client_id', ], 'required': [ - 'kid', - 'set', + 'client_id', ], 'nullable': [ ], @@ -352,18 +340,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'kid': - (str,), - 'set': + 'client_id': (str,), }, 'attribute_map': { - 'kid': 'kid', - 'set': 'set', + 'client_id': 'client_id', }, 'location_map': { - 'kid': 'path', - 'set': 'path', + 'client_id': 'query', }, 'collection_format_map': { } @@ -376,21 +360,21 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.delete_json_web_key_set_endpoint = _Endpoint( + self.delete_trusted_o_auth2_jwt_grant_issuer_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], - 'endpoint_path': '/keys/{set}', - 'operation_id': 'delete_json_web_key_set', + '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': [ - 'set', + 'id', ], 'required': [ - 'set', + 'id', ], 'nullable': [ ], @@ -405,14 +389,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'set': + 'id': (str,), }, 'attribute_map': { - 'set': 'set', + 'id': 'id', }, 'location_map': { - 'set': 'path', + 'id': 'path', }, 'collection_format_map': { } @@ -425,13 +409,13 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.delete_o_auth2_client_endpoint = _Endpoint( + self.get_o_auth2_client_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (OAuth2Client,), 'auth': [], - 'endpoint_path': '/clients/{id}', - 'operation_id': 'delete_o_auth2_client', - 'http_method': 'DELETE', + 'endpoint_path': '/admin/clients/{id}', + 'operation_id': 'get_o_auth2_client', + 'http_method': 'GET', 'servers': None, }, params_map={ @@ -474,21 +458,21 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.delete_o_auth2_token_endpoint = _Endpoint( + self.get_o_auth2_consent_request_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (OAuth2ConsentRequest,), 'auth': [], - 'endpoint_path': '/oauth2/tokens', - 'operation_id': 'delete_o_auth2_token', - 'http_method': 'DELETE', + 'endpoint_path': '/admin/oauth2/auth/requests/consent', + 'operation_id': 'get_o_auth2_consent_request', + 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'client_id', + 'consent_challenge', ], 'required': [ - 'client_id', + 'consent_challenge', ], 'nullable': [ ], @@ -503,14 +487,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'client_id': + 'consent_challenge': (str,), }, 'attribute_map': { - 'client_id': 'client_id', + 'consent_challenge': 'consent_challenge', }, 'location_map': { - 'client_id': 'query', + 'consent_challenge': 'query', }, 'collection_format_map': { } @@ -523,21 +507,21 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.delete_trusted_jwt_grant_issuer_endpoint = _Endpoint( + self.get_o_auth2_login_request_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (OAuth2LoginRequest,), 'auth': [], - 'endpoint_path': '/trust/grants/jwt-bearer/issuers/{id}', - 'operation_id': 'delete_trusted_jwt_grant_issuer', - 'http_method': 'DELETE', + 'endpoint_path': '/admin/oauth2/auth/requests/login', + 'operation_id': 'get_o_auth2_login_request', + 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'id', + 'login_challenge', ], 'required': [ - 'id', + 'login_challenge', ], 'nullable': [ ], @@ -552,14 +536,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'id': + 'login_challenge': (str,), }, 'attribute_map': { - 'id': 'id', + 'login_challenge': 'login_challenge', }, 'location_map': { - 'id': 'path', + 'login_challenge': 'query', }, 'collection_format_map': { } @@ -572,20 +556,22 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.flush_inactive_o_auth2_tokens_endpoint = _Endpoint( + self.get_o_auth2_logout_request_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (OAuth2LogoutRequest,), 'auth': [], - 'endpoint_path': '/oauth2/flush', - 'operation_id': 'flush_inactive_o_auth2_tokens', - 'http_method': 'POST', + 'endpoint_path': '/admin/oauth2/auth/requests/logout', + 'operation_id': 'get_o_auth2_logout_request', + 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'body', + 'logout_challenge', + ], + 'required': [ + 'logout_challenge', ], - 'required': [], 'nullable': [ ], 'enum': [ @@ -599,13 +585,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'body': - (FlushInactiveOAuth2TokensRequest,), + 'logout_challenge': + (str,), }, 'attribute_map': { + 'logout_challenge': 'logout_challenge', }, 'location_map': { - 'body': 'body', + 'logout_challenge': 'query', }, 'collection_format_map': { } @@ -614,27 +601,25 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [ - 'application/json' - ] + 'content_type': [], }, api_client=api_client ) - self.get_consent_request_endpoint = _Endpoint( + self.get_trusted_o_auth2_jwt_grant_issuer_endpoint = _Endpoint( settings={ - 'response_type': (ConsentRequest,), + 'response_type': (TrustedOAuth2JwtGrantIssuer,), 'auth': [], - 'endpoint_path': '/oauth2/auth/requests/consent', - 'operation_id': 'get_consent_request', + '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': [ - 'consent_challenge', + 'id', ], 'required': [ - 'consent_challenge', + 'id', ], 'nullable': [ ], @@ -649,14 +634,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'consent_challenge': + 'id': (str,), }, 'attribute_map': { - 'consent_challenge': 'consent_challenge', + 'id': 'id', }, 'location_map': { - 'consent_challenge': 'query', + 'id': 'path', }, 'collection_format_map': { } @@ -669,23 +654,22 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.get_json_web_key_endpoint = _Endpoint( + self.introspect_o_auth2_token_endpoint = _Endpoint( settings={ - 'response_type': (JSONWebKeySet,), + 'response_type': (IntrospectedOAuth2Token,), 'auth': [], - 'endpoint_path': '/keys/{set}/{kid}', - 'operation_id': 'get_json_web_key', - 'http_method': 'GET', + 'endpoint_path': '/admin/oauth2/introspect', + 'operation_id': 'introspect_o_auth2_token', + 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'kid', - 'set', + 'token', + 'scope', ], 'required': [ - 'kid', - 'set', + 'token', ], 'nullable': [ ], @@ -700,18 +684,18 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'kid': + 'token': (str,), - 'set': + 'scope': (str,), }, 'attribute_map': { - 'kid': 'kid', - 'set': 'set', + 'token': 'token', + 'scope': 'scope', }, 'location_map': { - 'kid': 'path', - 'set': 'path', + 'token': 'form', + 'scope': 'form', }, 'collection_format_map': { } @@ -720,47 +704,72 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [], + 'content_type': [ + 'application/x-www-form-urlencoded' + ] }, api_client=api_client ) - self.get_json_web_key_set_endpoint = _Endpoint( + self.list_o_auth2_clients_endpoint = _Endpoint( settings={ - 'response_type': (JSONWebKeySet,), + 'response_type': ([OAuth2Client],), 'auth': [], - 'endpoint_path': '/keys/{set}', - 'operation_id': 'get_json_web_key_set', + 'endpoint_path': '/admin/clients', + 'operation_id': 'list_o_auth2_clients', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'set', - ], - 'required': [ - 'set', + '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': { - 'set': + 'page_size': + (int,), + 'page_token': + (str,), + 'client_name': + (str,), + 'owner': (str,), }, 'attribute_map': { - 'set': 'set', + 'page_size': 'page_size', + 'page_token': 'page_token', + 'client_name': 'client_name', + 'owner': 'owner', }, 'location_map': { - 'set': 'path', + 'page_size': 'query', + 'page_token': 'query', + 'client_name': 'query', + 'owner': 'query', }, 'collection_format_map': { } @@ -773,43 +782,63 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.get_login_request_endpoint = _Endpoint( + self.list_o_auth2_consent_sessions_endpoint = _Endpoint( settings={ - 'response_type': (LoginRequest,), + 'response_type': (OAuth2ConsentSessions,), 'auth': [], - 'endpoint_path': '/oauth2/auth/requests/login', - 'operation_id': 'get_login_request', + 'endpoint_path': '/admin/oauth2/auth/sessions/consent', + 'operation_id': 'list_o_auth2_consent_sessions', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'login_challenge', + 'subject', + 'page_size', + 'page_token', ], 'required': [ - 'login_challenge', + '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': { - 'login_challenge': + 'subject': + (str,), + 'page_size': + (int,), + 'page_token': (str,), }, 'attribute_map': { - 'login_challenge': 'login_challenge', + 'subject': 'subject', + 'page_size': 'page_size', + 'page_token': 'page_token', }, 'location_map': { - 'login_challenge': 'query', + 'subject': 'query', + 'page_size': 'query', + 'page_token': 'query', }, 'collection_format_map': { } @@ -822,22 +851,22 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.get_logout_request_endpoint = _Endpoint( + self.list_trusted_o_auth2_jwt_grant_issuers_endpoint = _Endpoint( settings={ - 'response_type': (LogoutRequest,), + 'response_type': (TrustedOAuth2JwtGrantIssuers,), 'auth': [], - 'endpoint_path': '/oauth2/auth/requests/logout', - 'operation_id': 'get_logout_request', + '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': [ - 'logout_challenge', - ], - 'required': [ - 'logout_challenge', + 'max_items', + 'default_items', + 'issuer', ], + 'required': [], 'nullable': [ ], 'enum': [ @@ -851,14 +880,22 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'logout_challenge': + 'max_items': + (int,), + 'default_items': + (int,), + 'issuer': (str,), }, 'attribute_map': { - 'logout_challenge': 'logout_challenge', + 'max_items': 'MaxItems', + 'default_items': 'DefaultItems', + 'issuer': 'issuer', }, 'location_map': { - 'logout_challenge': 'query', + 'max_items': 'query', + 'default_items': 'query', + 'issuer': 'query', }, 'collection_format_map': { } @@ -871,22 +908,19 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.get_o_auth2_client_endpoint = _Endpoint( + self.o_auth2_authorize_endpoint = _Endpoint( settings={ - 'response_type': (OAuth2Client,), + 'response_type': (ErrorOAuth2,), 'auth': [], - 'endpoint_path': '/clients/{id}', - 'operation_id': 'get_o_auth2_client', + 'endpoint_path': '/oauth2/auth', + 'operation_id': 'o_auth2_authorize', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'id', - ], - 'required': [ - 'id', ], + 'required': [], 'nullable': [ ], 'enum': [ @@ -900,14 +934,10 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'id': - (str,), }, 'attribute_map': { - 'id': 'id', }, 'location_map': { - 'id': 'path', }, 'collection_format_map': { } @@ -920,21 +950,28 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.get_trusted_jwt_grant_issuer_endpoint = _Endpoint( + self.oauth2_token_exchange_endpoint = _Endpoint( settings={ - 'response_type': (TrustedJwtGrantIssuer,), - 'auth': [], - 'endpoint_path': '/trust/grants/jwt-bearer/issuers/{id}', - 'operation_id': 'get_trusted_jwt_grant_issuer', - 'http_method': 'GET', + 'response_type': (OAuth2TokenExchange,), + 'auth': [ + 'basic', + 'oauth2' + ], + 'endpoint_path': '/oauth2/token', + 'operation_id': 'oauth2_token_exchange', + 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'id', + 'grant_type', + 'client_id', + 'code', + 'redirect_uri', + 'refresh_token', ], 'required': [ - 'id', + 'grant_type', ], 'nullable': [ ], @@ -949,14 +986,30 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'id': + 'grant_type': + (str,), + 'client_id': + (str,), + 'code': + (str,), + 'redirect_uri': + (str,), + 'refresh_token': (str,), }, 'attribute_map': { - 'id': 'id', + 'grant_type': 'grant_type', + 'client_id': 'client_id', + 'code': 'code', + 'redirect_uri': 'redirect_uri', + 'refresh_token': 'refresh_token', }, 'location_map': { - 'id': 'path', + 'grant_type': 'form', + 'client_id': 'form', + 'code': 'form', + 'redirect_uri': 'form', + 'refresh_token': 'form', }, 'collection_format_map': { } @@ -965,23 +1018,30 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [], + 'content_type': [ + 'application/x-www-form-urlencoded' + ] }, api_client=api_client ) - self.get_version_endpoint = _Endpoint( + self.patch_o_auth2_client_endpoint = _Endpoint( settings={ - 'response_type': (Version,), + 'response_type': (OAuth2Client,), 'auth': [], - 'endpoint_path': '/version', - 'operation_id': 'get_version', - 'http_method': 'GET', + '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', ], - 'required': [], 'nullable': [ ], 'enum': [ @@ -995,10 +1055,17 @@ def __init__(self, api_client=None): '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': { } @@ -1007,26 +1074,28 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [], + 'content_type': [ + 'application/json' + ] }, api_client=api_client ) - self.introspect_o_auth2_token_endpoint = _Endpoint( + self.reject_o_auth2_consent_request_endpoint = _Endpoint( settings={ - 'response_type': (OAuth2TokenIntrospection,), + 'response_type': (OAuth2RedirectTo,), 'auth': [], - 'endpoint_path': '/oauth2/introspect', - 'operation_id': 'introspect_o_auth2_token', - 'http_method': 'POST', + 'endpoint_path': '/admin/oauth2/auth/requests/consent/reject', + 'operation_id': 'reject_o_auth2_consent_request', + 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ - 'token', - 'scope', + 'consent_challenge', + 'reject_o_auth2_request', ], 'required': [ - 'token', + 'consent_challenge', ], 'nullable': [ ], @@ -1041,18 +1110,17 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'token': - (str,), - 'scope': + 'consent_challenge': (str,), + 'reject_o_auth2_request': + (RejectOAuth2Request,), }, 'attribute_map': { - 'token': 'token', - 'scope': 'scope', + 'consent_challenge': 'consent_challenge', }, 'location_map': { - 'token': 'form', - 'scope': 'form', + 'consent_challenge': 'query', + 'reject_o_auth2_request': 'body', }, 'collection_format_map': { } @@ -1062,24 +1130,28 @@ def __init__(self, api_client=None): 'application/json' ], 'content_type': [ - 'application/x-www-form-urlencoded' + 'application/json' ] }, api_client=api_client ) - self.is_instance_alive_endpoint = _Endpoint( + self.reject_o_auth2_login_request_endpoint = _Endpoint( settings={ - 'response_type': (HealthStatus,), + 'response_type': (OAuth2RedirectTo,), 'auth': [], - 'endpoint_path': '/health/alive', - 'operation_id': 'is_instance_alive', - 'http_method': 'GET', + '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', ], - 'required': [], 'nullable': [ ], 'enum': [ @@ -1093,10 +1165,17 @@ def __init__(self, api_client=None): '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': { } @@ -1105,27 +1184,28 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [], + 'content_type': [ + 'application/json' + ] }, api_client=api_client ) - self.list_o_auth2_clients_endpoint = _Endpoint( + self.reject_o_auth2_logout_request_endpoint = _Endpoint( settings={ - 'response_type': ([OAuth2Client],), + 'response_type': None, 'auth': [], - 'endpoint_path': '/clients', - 'operation_id': 'list_o_auth2_clients', - 'http_method': 'GET', + 'endpoint_path': '/admin/oauth2/auth/requests/logout/reject', + 'operation_id': 'reject_o_auth2_logout_request', + 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ - 'limit', - 'offset', - 'client_name', - 'owner', + 'logout_challenge', + ], + 'required': [ + 'logout_challenge', ], - 'required': [], 'nullable': [ ], 'enum': [ @@ -1139,26 +1219,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'limit': - (int,), - 'offset': - (int,), - 'client_name': - (str,), - 'owner': + 'logout_challenge': (str,), }, 'attribute_map': { - 'limit': 'limit', - 'offset': 'offset', - 'client_name': 'client_name', - 'owner': 'owner', + 'logout_challenge': 'logout_challenge', }, 'location_map': { - 'limit': 'query', - 'offset': 'query', - 'client_name': 'query', - 'owner': 'query', + 'logout_challenge': 'query', }, 'collection_format_map': { } @@ -1171,18 +1239,20 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.list_subject_consent_sessions_endpoint = _Endpoint( + self.revoke_o_auth2_consent_sessions_endpoint = _Endpoint( settings={ - 'response_type': ([PreviousConsentSession],), + 'response_type': None, 'auth': [], - 'endpoint_path': '/oauth2/auth/sessions/consent', - 'operation_id': 'list_subject_consent_sessions', - 'http_method': 'GET', + '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', @@ -1202,12 +1272,20 @@ def __init__(self, api_client=None): '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': { } @@ -1220,80 +1298,21 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.list_trusted_jwt_grant_issuers_endpoint = _Endpoint( - settings={ - 'response_type': (TrustedJwtGrantIssuers,), - 'auth': [], - 'endpoint_path': '/trust/grants/jwt-bearer/issuers', - 'operation_id': 'list_trusted_jwt_grant_issuers', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - 'issuer', - 'limit', - 'offset', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'issuer': - (str,), - 'limit': - (int,), - 'offset': - (int,), - }, - 'attribute_map': { - 'issuer': 'issuer', - 'limit': 'limit', - 'offset': 'offset', - }, - 'location_map': { - 'issuer': 'query', - 'limit': 'query', - 'offset': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.patch_o_auth2_client_endpoint = _Endpoint( + self.revoke_o_auth2_login_sessions_endpoint = _Endpoint( settings={ - 'response_type': (OAuth2Client,), + 'response_type': None, 'auth': [], - 'endpoint_path': '/clients/{id}', - 'operation_id': 'patch_o_auth2_client', - 'http_method': 'PATCH', + 'endpoint_path': '/admin/oauth2/auth/sessions/login', + 'operation_id': 'revoke_o_auth2_login_sessions', + 'http_method': 'DELETE', 'servers': None, }, params_map={ 'all': [ - 'id', - 'body', + 'subject', ], 'required': [ - 'id', - 'body', + 'subject', ], 'nullable': [ ], @@ -1308,17 +1327,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'id': + 'subject': (str,), - 'body': - (PatchRequest,), }, 'attribute_map': { - 'id': 'id', + 'subject': 'subject', }, 'location_map': { - 'id': 'path', - 'body': 'body', + 'subject': 'query', }, 'collection_format_map': { } @@ -1327,28 +1343,28 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [ - 'application/json' - ] + 'content_type': [], }, api_client=api_client ) - self.reject_consent_request_endpoint = _Endpoint( + self.revoke_o_auth2_token_endpoint = _Endpoint( settings={ - 'response_type': (CompletedRequest,), - 'auth': [], - 'endpoint_path': '/oauth2/auth/requests/consent/reject', - 'operation_id': 'reject_consent_request', - 'http_method': 'PUT', + 'response_type': None, + 'auth': [ + 'basic', + 'oauth2' + ], + 'endpoint_path': '/oauth2/revoke', + 'operation_id': 'revoke_o_auth2_token', + 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'consent_challenge', - 'body', + 'token', ], 'required': [ - 'consent_challenge', + 'token', ], 'nullable': [ ], @@ -1363,17 +1379,14 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'consent_challenge': + 'token': (str,), - 'body': - (RejectRequest,), }, 'attribute_map': { - 'consent_challenge': 'consent_challenge', + 'token': 'token', }, 'location_map': { - 'consent_challenge': 'query', - 'body': 'body', + 'token': 'form', }, 'collection_format_map': { } @@ -1383,27 +1396,28 @@ def __init__(self, api_client=None): 'application/json' ], 'content_type': [ - 'application/json' + 'application/x-www-form-urlencoded' ] }, api_client=api_client ) - self.reject_login_request_endpoint = _Endpoint( + self.set_o_auth2_client_endpoint = _Endpoint( settings={ - 'response_type': (CompletedRequest,), + 'response_type': (OAuth2Client,), 'auth': [], - 'endpoint_path': '/oauth2/auth/requests/login/reject', - 'operation_id': 'reject_login_request', + 'endpoint_path': '/admin/clients/{id}', + 'operation_id': 'set_o_auth2_client', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ - 'login_challenge', - 'body', + 'id', + 'o_auth2_client', ], 'required': [ - 'login_challenge', + 'id', + 'o_auth2_client', ], 'nullable': [ ], @@ -1418,17 +1432,17 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'login_challenge': + 'id': (str,), - 'body': - (RejectRequest,), + 'o_auth2_client': + (OAuth2Client,), }, 'attribute_map': { - 'login_challenge': 'login_challenge', + 'id': 'id', }, 'location_map': { - 'login_challenge': 'query', - 'body': 'body', + 'id': 'path', + 'o_auth2_client': 'body', }, 'collection_format_map': { } @@ -1443,22 +1457,22 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.reject_logout_request_endpoint = _Endpoint( + self.set_o_auth2_client_lifespans_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (OAuth2Client,), 'auth': [], - 'endpoint_path': '/oauth2/auth/requests/logout/reject', - 'operation_id': 'reject_logout_request', + 'endpoint_path': '/admin/clients/{id}/lifespans', + 'operation_id': 'set_o_auth2_client_lifespans', 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ - 'logout_challenge', - 'body', + 'id', + 'o_auth2_client_token_lifespans', ], 'required': [ - 'logout_challenge', + 'id', ], 'nullable': [ ], @@ -1473,17 +1487,17 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'logout_challenge': + 'id': (str,), - 'body': - (RejectRequest,), + 'o_auth2_client_token_lifespans': + (OAuth2ClientTokenLifespans,), }, 'attribute_map': { - 'logout_challenge': 'logout_challenge', + 'id': 'id', }, 'location_map': { - 'logout_challenge': 'query', - 'body': 'body', + 'id': 'path', + 'o_auth2_client_token_lifespans': 'body', }, 'collection_format_map': { } @@ -1493,754 +1507,79 @@ def __init__(self, api_client=None): 'application/json' ], 'content_type': [ - 'application/json', - 'application/x-www-form-urlencoded' - ] - }, - api_client=api_client - ) - self.revoke_authentication_session_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/oauth2/auth/sessions/login', - 'operation_id': 'revoke_authentication_session', - 'http_method': 'DELETE', - 'servers': None, - }, - params_map={ - 'all': [ - 'subject', - ], - 'required': [ - 'subject', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'subject': - (str,), - }, - 'attribute_map': { - 'subject': 'subject', - }, - 'location_map': { - 'subject': 'query', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.revoke_consent_sessions_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/oauth2/auth/sessions/consent', - 'operation_id': 'revoke_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.trust_jwt_grant_issuer_endpoint = _Endpoint( - settings={ - 'response_type': (TrustedJwtGrantIssuer,), - 'auth': [], - 'endpoint_path': '/trust/grants/jwt-bearer/issuers', - 'operation_id': 'trust_jwt_grant_issuer', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - 'body', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'body': - (TrustJwtGrantIssuerBody,), - }, - 'attribute_map': { - }, - 'location_map': { - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_json_web_key_endpoint = _Endpoint( - settings={ - 'response_type': (JSONWebKey,), - 'auth': [], - 'endpoint_path': '/keys/{set}/{kid}', - 'operation_id': 'update_json_web_key', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'kid', - 'set', - 'body', - ], - 'required': [ - 'kid', - 'set', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'kid': - (str,), - 'set': - (str,), - 'body': - (JSONWebKey,), - }, - 'attribute_map': { - 'kid': 'kid', - 'set': 'set', - }, - 'location_map': { - 'kid': 'path', - 'set': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_json_web_key_set_endpoint = _Endpoint( - settings={ - 'response_type': (JSONWebKeySet,), - 'auth': [], - 'endpoint_path': '/keys/{set}', - 'operation_id': 'update_json_web_key_set', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'set', - 'body', - ], - 'required': [ - 'set', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'set': - (str,), - 'body': - (JSONWebKeySet,), - }, - 'attribute_map': { - 'set': 'set', - }, - 'location_map': { - 'set': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.update_o_auth2_client_endpoint = _Endpoint( - settings={ - 'response_type': (OAuth2Client,), - 'auth': [], - 'endpoint_path': '/clients/{id}', - 'operation_id': 'update_o_auth2_client', - 'http_method': 'PUT', - 'servers': None, - }, - params_map={ - 'all': [ - 'id', - 'body', - ], - 'required': [ - 'id', - 'body', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'body': - (OAuth2Client,), - }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - - def accept_consent_request( - self, - consent_challenge, - **kwargs - ): - """Accept a Consent Request # noqa: E501 - - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. # 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_consent_request(consent_challenge, async_req=True) - >>> result = thread.get() - - Args: - consent_challenge (str): - - Keyword Args: - body (AcceptConsentRequest): [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. - async_req (bool): execute request asynchronously - - Returns: - CompletedRequest - 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['consent_challenge'] = \ - consent_challenge - return self.accept_consent_request_endpoint.call_with_http_info(**kwargs) - - def accept_login_request( - self, - login_challenge, - **kwargs - ): - """Accept a Login Request # noqa: E501 - - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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_login_request(login_challenge, async_req=True) - >>> result = thread.get() - - Args: - login_challenge (str): - - Keyword Args: - body (AcceptLoginRequest): [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. - async_req (bool): execute request asynchronously - - Returns: - CompletedRequest - 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['login_challenge'] = \ - login_challenge - return self.accept_login_request_endpoint.call_with_http_info(**kwargs) - - def accept_logout_request( - self, - logout_challenge, - **kwargs - ): - """Accept a Logout Request # noqa: E501 - - When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. 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_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. - async_req (bool): execute request asynchronously - - Returns: - CompletedRequest - 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['logout_challenge'] = \ - logout_challenge - return self.accept_logout_request_endpoint.call_with_http_info(**kwargs) - - def create_json_web_key_set( - self, - set, - **kwargs - ): - """Generate a New 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, async_req=True) - >>> result = thread.get() - - Args: - set (str): The set - - Keyword Args: - body (JsonWebKeySetGeneratorRequest): [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. - 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['set'] = \ - set - return self.create_json_web_key_set_endpoint.call_with_http_info(**kwargs) - - def create_o_auth2_client( - self, - body, - **kwargs - ): - """Create an OAuth 2.0 Client # noqa: E501 - - Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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.create_o_auth2_client(body, async_req=True) - >>> result = thread.get() - - Args: - body (OAuth2Client): - - 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. - 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 + api_client=api_client ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False + 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 ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['body'] = \ - body - return self.create_o_auth2_client_endpoint.call_with_http_info(**kwargs) - def delete_json_web_key( + def accept_o_auth2_consent_request( self, - kid, - set, + consent_challenge, **kwargs ): - """Delete a JSON Web Key # noqa: E501 + """Accept OAuth 2.0 Consent Request # 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 + 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.delete_json_web_key(kid, set, async_req=True) + >>> thread = api.accept_o_auth2_consent_request(consent_challenge, async_req=True) >>> result = thread.get() Args: - kid (str): The kid of the desired key - set (str): The set + 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 @@ -2266,10 +1605,14 @@ def delete_json_web_key( _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 + OAuth2RedirectTo If the method is called asynchronously, returns the request thread. """ @@ -2297,30 +1640,30 @@ def delete_json_web_key( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['kid'] = \ - kid - kwargs['set'] = \ - set - return self.delete_json_web_key_endpoint.call_with_http_info(**kwargs) + 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) - def delete_json_web_key_set( + def accept_o_auth2_login_request( self, - set, + login_challenge, **kwargs ): - """Delete a JSON Web Key Set # noqa: E501 + """Accept OAuth 2.0 Login Request # 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 + 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.delete_json_web_key_set(set, async_req=True) + >>> thread = api.accept_o_auth2_login_request(login_challenge, async_req=True) >>> result = thread.get() Args: - set (str): The set + 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 @@ -2346,10 +1689,14 @@ def delete_json_web_key_set( _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 + OAuth2RedirectTo If the method is called asynchronously, returns the request thread. """ @@ -2377,26 +1724,27 @@ def delete_json_web_key_set( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['set'] = \ - set - return self.delete_json_web_key_set_endpoint.call_with_http_info(**kwargs) + 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) - def delete_o_auth2_client( + def accept_o_auth2_logout_request( self, - id, + logout_challenge, **kwargs ): - """Deletes an OAuth 2.0 Client # noqa: E501 + """Accept OAuth 2.0 Session Logout Request # 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 + 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.delete_o_auth2_client(id, async_req=True) + >>> thread = api.accept_o_auth2_logout_request(logout_challenge, async_req=True) >>> result = thread.get() Args: - id (str): The id of the OAuth 2.0 Client. + logout_challenge (str): OAuth 2.0 Logout Request Challenge Keyword Args: _return_http_data_only (bool): response data without head status @@ -2424,10 +1772,14 @@ def delete_o_auth2_client( _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 + OAuth2RedirectTo If the method is called asynchronously, returns the request thread. """ @@ -2455,26 +1807,27 @@ def delete_o_auth2_client( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id - return self.delete_o_auth2_client_endpoint.call_with_http_info(**kwargs) + 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) - def delete_o_auth2_token( + def create_o_auth2_client( self, - client_id, + o_auth2_client, **kwargs ): - """Delete OAuth2 Access Tokens from a Client # noqa: E501 + """Create OAuth 2.0 Client # noqa: E501 - This endpoint deletes OAuth2 access tokens issued for a client from the database # 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.delete_o_auth2_token(client_id, async_req=True) + >>> thread = api.create_o_auth2_client(o_auth2_client, async_req=True) >>> result = thread.get() Args: - client_id (str): + o_auth2_client (OAuth2Client): OAuth 2.0 Client Request Body Keyword Args: _return_http_data_only (bool): response data without head status @@ -2502,10 +1855,14 @@ def delete_o_auth2_token( _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 + OAuth2Client If the method is called asynchronously, returns the request thread. """ @@ -2533,26 +1890,27 @@ def delete_o_auth2_token( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['client_id'] = \ - client_id - return self.delete_o_auth2_token_endpoint.call_with_http_info(**kwargs) + 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) - def delete_trusted_jwt_grant_issuer( + def delete_o_auth2_client( self, id, **kwargs ): - """Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 + """Delete OAuth 2.0 Client # 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 + 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_trusted_jwt_grant_issuer(id, async_req=True) + >>> thread = api.delete_o_auth2_client(id, async_req=True) >>> result = thread.get() Args: - id (str): The id of the desired grant + id (str): The id of the OAuth 2.0 Client. Keyword Args: _return_http_data_only (bool): response data without head status @@ -2580,6 +1938,10 @@ def delete_trusted_jwt_grant_issuer( _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: @@ -2611,26 +1973,29 @@ def delete_trusted_jwt_grant_issuer( 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_jwt_grant_issuer_endpoint.call_with_http_info(**kwargs) + return self.delete_o_auth2_client_endpoint.call_with_http_info(**kwargs) - def flush_inactive_o_auth2_tokens( + def delete_o_auth2_token( self, + client_id, **kwargs ): - """Flush Expired OAuth2 Access Tokens # noqa: E501 + """Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client # noqa: E501 - This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. # 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.flush_inactive_o_auth2_tokens(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: - body (FlushInactiveOAuth2TokensRequest): [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 @@ -2656,6 +2021,10 @@ def flush_inactive_o_auth2_tokens( _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: @@ -2687,24 +2056,27 @@ def flush_inactive_o_auth2_tokens( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.flush_inactive_o_auth2_tokens_endpoint.call_with_http_info(**kwargs) + 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) - def get_consent_request( + def delete_trusted_o_auth2_jwt_grant_issuer( self, - consent_challenge, + id, **kwargs ): - """Get Consent Request Information # noqa: E501 + """Delete Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. # 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.get_consent_request(consent_challenge, async_req=True) + >>> thread = api.delete_trusted_o_auth2_jwt_grant_issuer(id, async_req=True) >>> result = thread.get() Args: - consent_challenge (str): + id (str): The id of the desired grant Keyword Args: _return_http_data_only (bool): response data without head status @@ -2732,10 +2104,14 @@ def get_consent_request( _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: - ConsentRequest + None If the method is called asynchronously, returns the request thread. """ @@ -2763,28 +2139,27 @@ def get_consent_request( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['consent_challenge'] = \ - consent_challenge - return self.get_consent_request_endpoint.call_with_http_info(**kwargs) + 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) - def get_json_web_key( + def get_o_auth2_client( self, - kid, - set, + id, **kwargs ): - """Fetch a JSON Web Key # noqa: E501 + """Get an OAuth 2.0 Client # noqa: E501 - This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). # 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_json_web_key(kid, set, async_req=True) + >>> thread = api.get_o_auth2_client(id, async_req=True) >>> result = thread.get() Args: - kid (str): The kid of the desired key - set (str): The set + id (str): The id of the OAuth 2.0 Client. Keyword Args: _return_http_data_only (bool): response data without head status @@ -2812,10 +2187,14 @@ def get_json_web_key( _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 + OAuth2Client If the method is called asynchronously, returns the request thread. """ @@ -2843,28 +2222,27 @@ def get_json_web_key( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['kid'] = \ - kid - kwargs['set'] = \ - set - return self.get_json_web_key_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.get_o_auth2_client_endpoint.call_with_http_info(**kwargs) - def get_json_web_key_set( + def get_o_auth2_consent_request( self, - set, + consent_challenge, **kwargs ): - """Retrieve a JSON Web Key Set # noqa: E501 + """Get OAuth 2.0 Consent Request # 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 + 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_json_web_key_set(set, async_req=True) + >>> thread = api.get_o_auth2_consent_request(consent_challenge, async_req=True) >>> result = thread.get() Args: - set (str): The set + consent_challenge (str): OAuth 2.0 Consent Request Challenge Keyword Args: _return_http_data_only (bool): response data without head status @@ -2892,10 +2270,14 @@ def get_json_web_key_set( _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 + OAuth2ConsentRequest If the method is called asynchronously, returns the request thread. """ @@ -2923,26 +2305,27 @@ def get_json_web_key_set( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['set'] = \ - set - return self.get_json_web_key_set_endpoint.call_with_http_info(**kwargs) + 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) - def get_login_request( + def get_o_auth2_login_request( self, login_challenge, **kwargs ): - """Get a Login Request # noqa: E501 + """Get OAuth 2.0 Login Request # noqa: E501 - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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 + 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_login_request(login_challenge, async_req=True) + >>> thread = api.get_o_auth2_login_request(login_challenge, async_req=True) >>> result = thread.get() Args: - login_challenge (str): + login_challenge (str): OAuth 2.0 Login Request Challenge Keyword Args: _return_http_data_only (bool): response data without head status @@ -2970,10 +2353,14 @@ def get_login_request( _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: - LoginRequest + OAuth2LoginRequest If the method is called asynchronously, returns the request thread. """ @@ -3001,22 +2388,23 @@ def get_login_request( 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_login_request_endpoint.call_with_http_info(**kwargs) + return self.get_o_auth2_login_request_endpoint.call_with_http_info(**kwargs) - def get_logout_request( + def get_o_auth2_logout_request( self, logout_challenge, **kwargs ): - """Get a Logout Request # noqa: E501 + """Get OAuth 2.0 Session Logout Request # noqa: E501 - Use this endpoint to fetch a 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_logout_request(logout_challenge, async_req=True) + >>> thread = api.get_o_auth2_logout_request(logout_challenge, async_req=True) >>> result = thread.get() Args: @@ -3048,10 +2436,14 @@ def get_logout_request( _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: - LogoutRequest + OAuth2LogoutRequest If the method is called asynchronously, returns the request thread. """ @@ -3079,26 +2471,27 @@ def get_logout_request( 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_logout_request_endpoint.call_with_http_info(**kwargs) + return self.get_o_auth2_logout_request_endpoint.call_with_http_info(**kwargs) - def get_o_auth2_client( + def get_trusted_o_auth2_jwt_grant_issuer( self, id, **kwargs ): - """Get an OAuth 2.0 Client # noqa: E501 + """Get Trusted OAuth2 JWT Bearer Grant Type Issuer # 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 + 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_o_auth2_client(id, 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 OAuth 2.0 Client. + id (str): The id of the desired grant Keyword Args: _return_http_data_only (bool): response data without head status @@ -3126,10 +2519,14 @@ def get_o_auth2_client( _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 + TrustedOAuth2JwtGrantIssuer If the method is called asynchronously, returns the request thread. """ @@ -3157,28 +2554,30 @@ def get_o_auth2_client( 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) + return self.get_trusted_o_auth2_jwt_grant_issuer_endpoint.call_with_http_info(**kwargs) - def get_trusted_jwt_grant_issuer( + def introspect_o_auth2_token( self, - id, + token, **kwargs ): - """Get a Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 + """Introspect OAuth2 Access and Refresh Tokens # 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 + 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.get_trusted_jwt_grant_issuer(id, async_req=True) + >>> thread = api.introspect_o_auth2_token(token, async_req=True) >>> result = thread.get() Args: - id (str): The id of the desired grant + 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 @@ -3204,10 +2603,14 @@ def get_trusted_jwt_grant_issuer( _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: - TrustedJwtGrantIssuer + IntrospectedOAuth2Token If the method is called asynchronously, returns the request thread. """ @@ -3235,25 +2638,30 @@ def get_trusted_jwt_grant_issuer( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id - return self.get_trusted_jwt_grant_issuer_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['token'] = \ + token + return self.introspect_o_auth2_token_endpoint.call_with_http_info(**kwargs) - def get_version( + def list_o_auth2_clients( self, **kwargs ): - """Get Service Version # noqa: E501 + """List OAuth 2.0 Clients # noqa: E501 - This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. # 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.get_version(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 @@ -3279,10 +2687,14 @@ def get_version( _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: - Version + [OAuth2Client] If the method is called asynchronously, returns the request thread. """ @@ -3310,27 +2722,29 @@ def get_version( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.get_version_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_o_auth2_clients_endpoint.call_with_http_info(**kwargs) - def introspect_o_auth2_token( + def list_o_auth2_consent_sessions( self, - token, + subject, **kwargs ): - """Introspect OAuth2 Tokens # noqa: E501 + """List OAuth 2.0 Consent Sessions of a Subject # 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). # 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.introspect_o_auth2_token(token, async_req=True) + >>> thread = api.list_o_auth2_consent_sessions(subject, 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. + subject (str): The subject to list the consent sessions for. 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] + 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" _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 @@ -3356,10 +2770,14 @@ def introspect_o_auth2_token( _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: - OAuth2TokenIntrospection + OAuth2ConsentSessions If the method is called asynchronously, returns the request thread. """ @@ -3387,25 +2805,29 @@ def introspect_o_auth2_token( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['token'] = \ - token - return self.introspect_o_auth2_token_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['subject'] = \ + subject + return self.list_o_auth2_consent_sessions_endpoint.call_with_http_info(**kwargs) - def is_instance_alive( + def list_trusted_o_auth2_jwt_grant_issuers( self, **kwargs ): - """Check Alive Status # noqa: E501 + """List Trusted OAuth2 JWT Bearer Grant Type Issuers # noqa: E501 - This endpoint returns a 200 status code when the HTTP server is up running. 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 + 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.is_instance_alive(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 @@ -3431,10 +2853,14 @@ def is_instance_alive( _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 + TrustedOAuth2JwtGrantIssuers If the method is called asynchronously, returns the request thread. """ @@ -3462,27 +2888,24 @@ def is_instance_alive( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.is_instance_alive_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.list_trusted_o_auth2_jwt_grant_issuers_endpoint.call_with_http_info(**kwargs) - def list_o_auth2_clients( + def o_auth2_authorize( self, **kwargs ): - """List OAuth 2.0 Clients # noqa: E501 + """OAuth 2.0 Authorize Endpoint # noqa: E501 - This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. # 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.list_o_auth2_clients(async_req=True) + >>> thread = api.o_auth2_authorize(async_req=True) >>> result = thread.get() Keyword Args: - limit (int): The maximum amount of clients to returned, upper bound is 500 clients.. [optional] - offset (int): The offset from where to start looking.. [optional] - 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 @@ -3508,10 +2931,14 @@ def list_o_auth2_clients( _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] + ErrorOAuth2 If the method is called asynchronously, returns the request thread. """ @@ -3539,104 +2966,31 @@ def list_o_auth2_clients( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.list_o_auth2_clients_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.o_auth2_authorize_endpoint.call_with_http_info(**kwargs) - def list_subject_consent_sessions( + def oauth2_token_exchange( self, - subject, + grant_type, **kwargs ): - """Lists All Consent Sessions of a Subject # noqa: E501 + """The OAuth 2.0 Token Endpoint # 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. # 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.list_subject_consent_sessions(subject, async_req=True) + >>> thread = api.oauth2_token_exchange(grant_type, async_req=True) >>> result = thread.get() Args: - subject (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. - async_req (bool): execute request asynchronously - - Returns: - [PreviousConsentSession] - 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['subject'] = \ - subject - return self.list_subject_consent_sessions_endpoint.call_with_http_info(**kwargs) - - def list_trusted_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_jwt_grant_issuers(async_req=True) - >>> result = thread.get() - + grant_type (str): Keyword Args: - issuer (str): If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned.. [optional] - limit (int): The maximum amount of policies returned, upper bound is 500 policies. [optional] - offset (int): The offset from where to start looking.. [optional] + 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 @@ -3662,10 +3016,14 @@ def list_trusted_jwt_grant_issuers( _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: - TrustedJwtGrantIssuers + OAuth2TokenExchange If the method is called asynchronously, returns the request thread. """ @@ -3693,26 +3051,29 @@ def list_trusted_jwt_grant_issuers( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.list_trusted_jwt_grant_issuers_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['grant_type'] = \ + grant_type + return self.oauth2_token_exchange_endpoint.call_with_http_info(**kwargs) def patch_o_auth2_client( self, id, - body, + json_patch_document, **kwargs ): - """Patch an OAuth 2.0 Client # noqa: E501 + """Patch OAuth 2.0 Client # noqa: E501 - Patch an existing OAuth 2.0 Client. 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 + 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, body, 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. - body (PatchRequest): + json_patch_document (JsonPatchDocument): OAuth 2.0 Client JSON Patch Body Keyword Args: _return_http_data_only (bool): response data without head status @@ -3740,6 +3101,10 @@ def patch_o_auth2_client( _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: @@ -3771,31 +3136,32 @@ def patch_o_auth2_client( 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['body'] = \ - body + kwargs['json_patch_document'] = \ + json_patch_document return self.patch_o_auth2_client_endpoint.call_with_http_info(**kwargs) - def reject_consent_request( + def reject_o_auth2_consent_request( self, consent_challenge, **kwargs ): - """Reject a Consent Request # noqa: E501 + """Reject OAuth 2.0 Consent Request # noqa: E501 - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. # 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_consent_request(consent_challenge, async_req=True) + >>> thread = api.reject_o_auth2_consent_request(consent_challenge, async_req=True) >>> result = thread.get() Args: - consent_challenge (str): + consent_challenge (str): OAuth 2.0 Consent Request Challenge Keyword Args: - body (RejectRequest): [optional] + 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 @@ -3821,10 +3187,14 @@ def reject_consent_request( _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: - CompletedRequest + OAuth2RedirectTo If the method is called asynchronously, returns the request thread. """ @@ -3852,29 +3222,30 @@ def reject_consent_request( 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_consent_request_endpoint.call_with_http_info(**kwargs) + return self.reject_o_auth2_consent_request_endpoint.call_with_http_info(**kwargs) - def reject_login_request( + def reject_o_auth2_login_request( self, login_challenge, **kwargs ): - """Reject a Login Request # noqa: E501 + """Reject OAuth 2.0 Login Request # noqa: E501 - When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. # 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_login_request(login_challenge, async_req=True) + >>> thread = api.reject_o_auth2_login_request(login_challenge, async_req=True) >>> result = thread.get() Args: - login_challenge (str): + login_challenge (str): OAuth 2.0 Login Request Challenge Keyword Args: - body (RejectRequest): [optional] + 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 @@ -3900,10 +3271,14 @@ def reject_login_request( _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: - CompletedRequest + OAuth2RedirectTo If the method is called asynchronously, returns the request thread. """ @@ -3931,29 +3306,29 @@ def reject_login_request( 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_login_request_endpoint.call_with_http_info(**kwargs) + return self.reject_o_auth2_login_request_endpoint.call_with_http_info(**kwargs) - def reject_logout_request( + def reject_o_auth2_logout_request( self, logout_challenge, **kwargs ): - """Reject a Logout Request # noqa: E501 + """Reject OAuth 2.0 Session Logout Request # noqa: E501 - When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. # 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_logout_request(logout_challenge, async_req=True) + >>> thread = api.reject_o_auth2_logout_request(logout_challenge, async_req=True) >>> result = thread.get() Args: logout_challenge (str): Keyword Args: - body (RejectRequest): [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 @@ -3979,6 +3354,10 @@ def reject_logout_request( _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: @@ -4010,28 +3389,31 @@ def reject_logout_request( 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_logout_request_endpoint.call_with_http_info(**kwargs) + return self.reject_o_auth2_logout_request_endpoint.call_with_http_info(**kwargs) - def revoke_authentication_session( + def revoke_o_auth2_consent_sessions( self, subject, **kwargs ): - """Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session # noqa: E501 + """Revoke OAuth 2.0 Consent Sessions of a Subject # noqa: E501 - This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. # 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_authentication_session(subject, async_req=True) + >>> thread = api.revoke_o_auth2_consent_sessions(subject, async_req=True) >>> result = thread.get() Args: - subject (str): + 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 @@ -4057,6 +3439,10 @@ def revoke_authentication_session( _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: @@ -4088,30 +3474,29 @@ def revoke_authentication_session( 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_authentication_session_endpoint.call_with_http_info(**kwargs) + return self.revoke_o_auth2_consent_sessions_endpoint.call_with_http_info(**kwargs) - def revoke_consent_sessions( + def revoke_o_auth2_login_sessions( self, subject, **kwargs ): - """Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client # noqa: E501 + """Revokes All OAuth 2.0 Login Sessions of a Subject # noqa: E501 - This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. # noqa: E501 + This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. # 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_consent_sessions(subject, async_req=True) + >>> thread = api.revoke_o_auth2_login_sessions(subject, async_req=True) >>> result = thread.get() Args: - subject (str): The subject (Subject) who's consent sessions should be deleted. + subject (str): OAuth 2.0 Subject The subject to revoke authentication sessions for. Keyword Args: - client (str): If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID. [optional] - all (bool): If set to `?all=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 @@ -4137,6 +3522,10 @@ def revoke_consent_sessions( _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: @@ -4168,26 +3557,29 @@ def revoke_consent_sessions( 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_consent_sessions_endpoint.call_with_http_info(**kwargs) + return self.revoke_o_auth2_login_sessions_endpoint.call_with_http_info(**kwargs) - def trust_jwt_grant_issuer( + def revoke_o_auth2_token( self, + token, **kwargs ): - """Trust an OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 + """Revoke OAuth 2.0 Access or Refresh Token # 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 + 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.trust_jwt_grant_issuer(async_req=True) + >>> thread = api.revoke_o_auth2_token(token, async_req=True) >>> result = thread.get() + Args: + token (str): Keyword Args: - body (TrustJwtGrantIssuerBody): [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 @@ -4213,10 +3605,14 @@ def trust_jwt_grant_issuer( _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: - TrustedJwtGrantIssuer + None If the method is called asynchronously, returns the request thread. """ @@ -4244,29 +3640,31 @@ def trust_jwt_grant_issuer( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.trust_jwt_grant_issuer_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['token'] = \ + token + return self.revoke_o_auth2_token_endpoint.call_with_http_info(**kwargs) - def update_json_web_key( + def set_o_auth2_client( self, - kid, - set, + id, + o_auth2_client, **kwargs ): - """Update a JSON Web Key # noqa: E501 + """Set OAuth 2.0 Client # 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 + 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.update_json_web_key(kid, set, async_req=True) + >>> thread = api.set_o_auth2_client(id, o_auth2_client, async_req=True) >>> result = thread.get() Args: - kid (str): The kid of the desired key - set (str): The set + id (str): OAuth 2.0 Client ID + o_auth2_client (OAuth2Client): OAuth 2.0 Client Request Body Keyword Args: - body (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 @@ -4292,10 +3690,14 @@ def update_json_web_key( _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 + OAuth2Client If the method is called asynchronously, returns the request thread. """ @@ -4323,31 +3725,32 @@ def update_json_web_key( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['kid'] = \ - kid - kwargs['set'] = \ - set - return self.update_json_web_key_endpoint.call_with_http_info(**kwargs) + 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) - def update_json_web_key_set( + def set_o_auth2_client_lifespans( self, - set, + id, **kwargs ): - """Update a JSON Web Key Set # noqa: E501 + """Set OAuth2 Client Token Lifespans # 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 + 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.update_json_web_key_set(set, async_req=True) + >>> thread = api.set_o_auth2_client_lifespans(id, async_req=True) >>> result = thread.get() Args: - set (str): The set + id (str): OAuth 2.0 Client ID Keyword Args: - body (JSONWebKeySet): [optional] + 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 @@ -4373,10 +3776,14 @@ def update_json_web_key_set( _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 + OAuth2Client If the method is called asynchronously, returns the request thread. """ @@ -4404,30 +3811,27 @@ def update_json_web_key_set( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['set'] = \ - set - return self.update_json_web_key_set_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + kwargs['id'] = \ + id + return self.set_o_auth2_client_lifespans_endpoint.call_with_http_info(**kwargs) - def update_o_auth2_client( + def trust_o_auth2_jwt_grant_issuer( self, - id, - body, **kwargs ): - """Update an OAuth 2.0 Client # noqa: E501 + """Trust OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 - Update an existing OAuth 2.0 Client. 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 + 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.update_o_auth2_client(id, body, async_req=True) + >>> thread = api.trust_o_auth2_jwt_grant_issuer(async_req=True) >>> result = thread.get() - Args: - id (str): The id of the OAuth 2.0 Client. - body (OAuth2Client): 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 @@ -4453,10 +3857,14 @@ def update_o_auth2_client( _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 + TrustedOAuth2JwtGrantIssuer If the method is called asynchronously, returns the request thread. """ @@ -4484,9 +3892,6 @@ def update_o_auth2_client( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id - kwargs['body'] = \ - body - return self.update_o_auth2_client_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.trust_o_auth2_jwt_grant_issuer_endpoint.call_with_http_info(**kwargs) diff --git a/clients/hydra/python/ory_hydra_client/api/public_api.py b/clients/hydra/python/ory_hydra_client/api/oidc_api.py similarity index 50% rename from clients/hydra/python/ory_hydra_client/api/public_api.py rename to clients/hydra/python/ory_hydra_client/api/oidc_api.py index 7ce4cf0fdc9..cd21c04fcb0 100644 --- a/clients/hydra/python/ory_hydra_client/api/public_api.py +++ b/clients/hydra/python/ory_hydra_client/api/oidc_api.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -21,17 +22,14 @@ none_type, validate_and_convert_types ) -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.json_web_key_set import JSONWebKeySet -from ory_hydra_client.model.json_error import JsonError +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.oauth2_token_response import Oauth2TokenResponse -from ory_hydra_client.model.userinfo_response import UserinfoResponse -from ory_hydra_client.model.well_known import WellKnown +from ory_hydra_client.model.oidc_configuration import OidcConfiguration +from ory_hydra_client.model.oidc_user_info import OidcUserInfo -class PublicApi(object): +class OidcApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech @@ -42,103 +40,21 @@ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client - self.disconnect_user_endpoint = _Endpoint( - settings={ - 'response_type': None, - 'auth': [], - 'endpoint_path': '/oauth2/sessions/logout', - 'operation_id': 'disconnect_user', - '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.discover_open_id_configuration_endpoint = _Endpoint( - settings={ - 'response_type': (WellKnown,), - 'auth': [], - 'endpoint_path': '/.well-known/openid-configuration', - 'operation_id': 'discover_open_id_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': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.dynamic_client_registration_create_o_auth2_client_endpoint = _Endpoint( + self.create_oidc_dynamic_client_endpoint = _Endpoint( settings={ 'response_type': (OAuth2Client,), 'auth': [], - 'endpoint_path': '/connect/register', - 'operation_id': 'dynamic_client_registration_create_o_auth2_client', + 'endpoint_path': '/oauth2/register', + 'operation_id': 'create_oidc_dynamic_client', 'http_method': 'POST', 'servers': None, }, params_map={ 'all': [ - 'body', + 'o_auth2_client', ], 'required': [ - 'body', + 'o_auth2_client', ], 'nullable': [ ], @@ -153,13 +69,13 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'body': + 'o_auth2_client': (OAuth2Client,), }, 'attribute_map': { }, 'location_map': { - 'body': 'body', + 'o_auth2_client': 'body', }, 'collection_format_map': { } @@ -174,12 +90,14 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.dynamic_client_registration_delete_o_auth2_client_endpoint = _Endpoint( + self.delete_oidc_dynamic_client_endpoint = _Endpoint( settings={ 'response_type': None, - 'auth': [], - 'endpoint_path': '/connect/register/{id}', - 'operation_id': 'dynamic_client_registration_delete_o_auth2_client', + 'auth': [ + 'bearer' + ], + 'endpoint_path': '/oauth2/register/{id}', + 'operation_id': 'delete_oidc_dynamic_client', 'http_method': 'DELETE', 'servers': None, }, @@ -223,22 +141,19 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.dynamic_client_registration_get_o_auth2_client_endpoint = _Endpoint( + self.discover_oidc_configuration_endpoint = _Endpoint( settings={ - 'response_type': (OAuth2Client,), + 'response_type': (OidcConfiguration,), 'auth': [], - 'endpoint_path': '/connect/register/{id}', - 'operation_id': 'dynamic_client_registration_get_o_auth2_client', + 'endpoint_path': '/.well-known/openid-configuration', + 'operation_id': 'discover_oidc_configuration', 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'id', - ], - 'required': [ - 'id', ], + 'required': [], 'nullable': [ ], 'enum': [ @@ -252,14 +167,10 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'id': - (str,), }, 'attribute_map': { - 'id': 'id', }, 'location_map': { - 'id': 'path', }, 'collection_format_map': { } @@ -272,23 +183,23 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.dynamic_client_registration_update_o_auth2_client_endpoint = _Endpoint( + self.get_oidc_dynamic_client_endpoint = _Endpoint( settings={ 'response_type': (OAuth2Client,), - 'auth': [], - 'endpoint_path': '/connect/register/{id}', - 'operation_id': 'dynamic_client_registration_update_o_auth2_client', - 'http_method': 'PUT', + 'auth': [ + 'bearer' + ], + 'endpoint_path': '/oauth2/register/{id}', + 'operation_id': 'get_oidc_dynamic_client', + 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ 'id', - 'body', ], 'required': [ 'id', - 'body', ], 'nullable': [ ], @@ -305,59 +216,12 @@ def __init__(self, api_client=None): 'openapi_types': { 'id': (str,), - 'body': - (OAuth2Client,), }, 'attribute_map': { 'id': 'id', }, 'location_map': { 'id': 'path', - 'body': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - api_client=api_client - ) - self.is_instance_ready_endpoint = _Endpoint( - settings={ - 'response_type': (HealthStatus,), - 'auth': [], - 'endpoint_path': '/health/ready', - 'operation_id': 'is_instance_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': { } @@ -370,29 +234,21 @@ def __init__(self, api_client=None): }, api_client=api_client ) - self.oauth2_token_endpoint = _Endpoint( + self.get_oidc_user_info_endpoint = _Endpoint( settings={ - 'response_type': (Oauth2TokenResponse,), + 'response_type': (OidcUserInfo,), 'auth': [ - 'basic', 'oauth2' ], - 'endpoint_path': '/oauth2/token', - 'operation_id': 'oauth2_token', - 'http_method': 'POST', + 'endpoint_path': '/userinfo', + 'operation_id': 'get_oidc_user_info', + 'http_method': 'GET', 'servers': None, }, params_map={ 'all': [ - 'grant_type', - 'code', - 'refresh_token', - 'redirect_uri', - 'client_id', - ], - 'required': [ - 'grant_type', ], + 'required': [], 'nullable': [ ], 'enum': [ @@ -406,30 +262,10 @@ def __init__(self, api_client=None): 'allowed_values': { }, 'openapi_types': { - 'grant_type': - (str,), - 'code': - (str,), - 'refresh_token': - (str,), - 'redirect_uri': - (str,), - 'client_id': - (str,), }, 'attribute_map': { - 'grant_type': 'grant_type', - 'code': 'code', - 'refresh_token': 'refresh_token', - 'redirect_uri': 'redirect_uri', - 'client_id': 'client_id', }, 'location_map': { - 'grant_type': 'form', - 'code': 'form', - 'refresh_token': 'form', - 'redirect_uri': 'form', - 'client_id': 'form', }, 'collection_format_map': { } @@ -438,18 +274,16 @@ def __init__(self, api_client=None): 'accept': [ 'application/json' ], - 'content_type': [ - 'application/x-www-form-urlencoded' - ] + 'content_type': [], }, api_client=api_client ) - self.oauth_auth_endpoint = _Endpoint( + self.revoke_oidc_session_endpoint = _Endpoint( settings={ 'response_type': None, 'auth': [], - 'endpoint_path': '/oauth2/auth', - 'operation_id': 'oauth_auth', + 'endpoint_path': '/oauth2/sessions/logout', + 'operation_id': 'revoke_oidc_session', 'http_method': 'GET', 'servers': None, }, @@ -479,316 +313,86 @@ def __init__(self, api_client=None): } }, headers_map={ - 'accept': [ - 'application/json' - ], + 'accept': [], 'content_type': [], }, api_client=api_client ) - self.revoke_o_auth2_token_endpoint = _Endpoint( + self.set_oidc_dynamic_client_endpoint = _Endpoint( settings={ - 'response_type': None, + 'response_type': (OAuth2Client,), 'auth': [ - 'basic', - 'oauth2' + 'bearer' ], - 'endpoint_path': '/oauth2/revoke', - 'operation_id': 'revoke_o_auth2_token', - 'http_method': 'POST', + 'endpoint_path': '/oauth2/register/{id}', + 'operation_id': 'set_oidc_dynamic_client', + 'http_method': 'PUT', 'servers': None, }, params_map={ 'all': [ - 'token', + 'id', + 'o_auth2_client', ], 'required': [ - 'token', - ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'token': - (str,), - }, - 'attribute_map': { - 'token': 'token', - }, - 'location_map': { - 'token': 'form', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/x-www-form-urlencoded' - ] - }, - api_client=api_client - ) - self.userinfo_endpoint = _Endpoint( - settings={ - 'response_type': (UserinfoResponse,), - 'auth': [ - 'oauth2' - ], - 'endpoint_path': '/userinfo', - 'operation_id': 'userinfo', - '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.well_known_endpoint = _Endpoint( - settings={ - 'response_type': (JSONWebKeySet,), - 'auth': [], - 'endpoint_path': '/.well-known/jwks.json', - 'operation_id': 'well_known', - '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 - ) - - def disconnect_user( - self, - **kwargs - ): - """OpenID Connect Front-Backchannel Enabled Logout # noqa: E501 - - This endpoint initiates and completes user logout at Ory Hydra 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 # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.disconnect_user(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. - 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') - return self.disconnect_user_endpoint.call_with_http_info(**kwargs) - - def discover_open_id_configuration( - self, - **kwargs - ): - """OpenID Connect Discovery # noqa: E501 - - The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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_open_id_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. - async_req (bool): execute request asynchronously - - Returns: - WellKnown - 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 + '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 ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - return self.discover_open_id_configuration_endpoint.call_with_http_info(**kwargs) - def dynamic_client_registration_create_o_auth2_client( + def create_oidc_dynamic_client( self, - body, + o_auth2_client, **kwargs ): - """Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol # noqa: E501 + """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.dynamic_client_registration_create_o_auth2_client(body, async_req=True) + >>> thread = api.create_oidc_dynamic_client(o_auth2_client, async_req=True) >>> result = thread.get() Args: - body (OAuth2Client): + o_auth2_client (OAuth2Client): Dynamic Client Registration Request Body Keyword Args: _return_http_data_only (bool): response data without head status @@ -816,6 +420,10 @@ def dynamic_client_registration_create_o_auth2_client( _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: @@ -847,22 +455,23 @@ def dynamic_client_registration_create_o_auth2_client( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['body'] = \ - body - return self.dynamic_client_registration_create_o_auth2_client_endpoint.call_with_http_info(**kwargs) + 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) - def dynamic_client_registration_delete_o_auth2_client( + def delete_oidc_dynamic_client( self, id, **kwargs ): - """Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol # noqa: E501 + """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.dynamic_client_registration_delete_o_auth2_client(id, async_req=True) + >>> thread = api.delete_oidc_dynamic_client(id, async_req=True) >>> result = thread.get() Args: @@ -894,6 +503,10 @@ def dynamic_client_registration_delete_o_auth2_client( _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: @@ -925,26 +538,24 @@ def dynamic_client_registration_delete_o_auth2_client( 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.dynamic_client_registration_delete_o_auth2_client_endpoint.call_with_http_info(**kwargs) + return self.delete_oidc_dynamic_client_endpoint.call_with_http_info(**kwargs) - def dynamic_client_registration_get_o_auth2_client( + def discover_oidc_configuration( self, - id, **kwargs ): - """Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol # noqa: E501 + """OpenID Connect Discovery # 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. 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 + 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.dynamic_client_registration_get_o_auth2_client(id, async_req=True) + >>> thread = api.discover_oidc_configuration(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 @@ -972,10 +583,14 @@ def dynamic_client_registration_get_o_auth2_client( _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 + OidcConfiguration If the method is called asynchronously, returns the request thread. """ @@ -1003,28 +618,25 @@ def dynamic_client_registration_get_o_auth2_client( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id - return self.dynamic_client_registration_get_o_auth2_client_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.discover_oidc_configuration_endpoint.call_with_http_info(**kwargs) - def dynamic_client_registration_update_o_auth2_client( + def get_oidc_dynamic_client( self, id, - body, **kwargs ): - """Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol # noqa: E501 + """Get OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 - This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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 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.dynamic_client_registration_update_o_auth2_client(id, body, 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. - body (OAuth2Client): Keyword Args: _return_http_data_only (bool): response data without head status @@ -1052,6 +664,10 @@ def dynamic_client_registration_update_o_auth2_client( _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: @@ -1083,107 +699,26 @@ def dynamic_client_registration_update_o_auth2_client( 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['body'] = \ - body - return self.dynamic_client_registration_update_o_auth2_client_endpoint.call_with_http_info(**kwargs) - - def is_instance_ready( - self, - **kwargs - ): - """Check Readiness Status # noqa: E501 - - This endpoint returns a 200 status code when the HTTP server 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 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_instance_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. - 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 - ) - 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') - return self.is_instance_ready_endpoint.call_with_http_info(**kwargs) + return self.get_oidc_dynamic_client_endpoint.call_with_http_info(**kwargs) - def oauth2_token( + def get_oidc_user_info( self, - grant_type, **kwargs ): - """The OAuth 2.0 Token Endpoint # noqa: E501 + """OpenID Connect Userinfo # noqa: E501 - The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! # 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.oauth2_token(grant_type, async_req=True) + >>> thread = api.get_oidc_user_info(async_req=True) >>> result = thread.get() - Args: - grant_type (str): Keyword Args: - code (str): [optional] - refresh_token (str): [optional] - redirect_uri (str): [optional] - client_id (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 @@ -1209,10 +744,14 @@ def oauth2_token( _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: - Oauth2TokenResponse + OidcUserInfo If the method is called asynchronously, returns the request thread. """ @@ -1240,21 +779,20 @@ def oauth2_token( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['grant_type'] = \ - grant_type - return self.oauth2_token_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.get_oidc_user_info_endpoint.call_with_http_info(**kwargs) - def oauth_auth( + def revoke_oidc_session( self, **kwargs ): - """The OAuth 2.0 Authorize Endpoint # noqa: E501 + """OpenID Connect Front- and Back-channel Enabled Logout # noqa: E501 - This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 # 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.oauth_auth(async_req=True) + >>> thread = api.revoke_oidc_session(async_req=True) >>> result = thread.get() @@ -1284,6 +822,10 @@ def oauth_auth( _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: @@ -1315,172 +857,27 @@ def oauth_auth( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.oauth_auth_endpoint.call_with_http_info(**kwargs) + kwargs['_request_auths'] = kwargs.get('_request_auths', None) + return self.revoke_oidc_session_endpoint.call_with_http_info(**kwargs) - def revoke_o_auth2_token( + def set_oidc_dynamic_client( self, - token, + id, + o_auth2_client, **kwargs ): - """Revoke OAuth2 Tokens # noqa: E501 + """Set OAuth2 Client using OpenID Dynamic Client Registration # 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 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.revoke_o_auth2_token(token, async_req=True) + >>> thread = api.set_oidc_dynamic_client(id, o_auth2_client, async_req=True) >>> result = thread.get() Args: - token (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. - 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['token'] = \ - token - return self.revoke_o_auth2_token_endpoint.call_with_http_info(**kwargs) - - def userinfo( - self, - **kwargs - ): - """OpenID Connect Userinfo # noqa: E501 - - This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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.userinfo(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. - async_req (bool): execute request asynchronously - - Returns: - UserinfoResponse - 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') - return self.userinfo_endpoint.call_with_http_info(**kwargs) - - def well_known( - self, - **kwargs - ): - """JSON Web Keys Discovery # noqa: E501 - - This endpoint returns JSON Web Keys to be used as public keys for 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.well_known(async_req=True) - >>> result = thread.get() - + 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 @@ -1508,10 +905,14 @@ def well_known( _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 + OAuth2Client If the method is called asynchronously, returns the request thread. """ @@ -1539,5 +940,10 @@ def well_known( kwargs['_content_type'] = kwargs.get( '_content_type') kwargs['_host_index'] = kwargs.get('_host_index') - return self.well_known_endpoint.call_with_http_info(**kwargs) + 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) diff --git a/clients/hydra/python/ory_hydra_client/api/wellknown_api.py b/clients/hydra/python/ory_hydra_client/api/wellknown_api.py new file mode 100644 index 00000000000..54418bf4505 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/api/wellknown_api.py @@ -0,0 +1,160 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: 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.error_o_auth2 import ErrorOAuth2 +from ory_hydra_client.model.json_web_key_set import JsonWebKeySet + + +class WellknownApi(object): + """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): + if api_client is None: + api_client = ApiClient() + 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 + ) + + 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 + ) + 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_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 844c63375cc..40b868a626b 100644 --- a/clients/hydra/python/ory_hydra_client/api_client.py +++ b/clients/hydra/python/ory_hydra_client/api_client.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -76,7 +77,7 @@ 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/v1.11.0/python' + self.user_agent = 'OpenAPI-Generator/v2.0.1/python' def __enter__(self): return self @@ -132,7 +133,8 @@ def __call_api( _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 + _content_type: typing.Optional[str] = None, + _request_auths: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None ): config = self.configuration @@ -174,7 +176,7 @@ def __call_api( post_params.extend(self.files_parameters(files)) if header_params['Content-Type'].startswith("multipart"): post_params = self.parameters_to_multipart(post_params, - (dict) ) + (dict)) # body if body: @@ -182,7 +184,8 @@ def __call_api( # auth setting self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) + auth_settings, resource_path, method, body, + request_auths=_request_auths) # request url if _host is None: @@ -246,13 +249,14 @@ def parameters_to_multipart(self, params, collection_types): 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) + 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)) + new_params.append((k, v)) return new_params @classmethod @@ -271,8 +275,10 @@ def sanitize_for_serialization(cls, obj): """ if isinstance(obj, (ModelNormal, ModelComposed)): return { - key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() - } + 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)): @@ -285,7 +291,9 @@ def sanitize_for_serialization(cls, obj): 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__)) + raise ApiValueError( + 'Unable to prepare type {} for serialization'.format( + obj.__class__.__name__)) def deserialize(self, response, response_type, _check_type): """Deserializes response into an object. @@ -350,7 +358,8 @@ def call_api( _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 + _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. @@ -398,6 +407,10 @@ def call_api( :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. @@ -412,7 +425,7 @@ def call_api( response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host, - _check_type) + _check_type, _request_auths=_request_auths) return self.pool.apply_async(self.__call_api, (resource_path, method, path_params, @@ -425,7 +438,7 @@ def call_api( collection_formats, _preload_content, _request_timeout, - _host, _check_type)) + _host, _check_type, None, _request_auths)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -524,7 +537,9 @@ def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes: file_instance.close() return file_data - def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None): + def files_parameters(self, + files: typing.Optional[typing.Dict[str, + typing.List[io.IOBase]]] = None): """Builds form parameters. :param files: None or a dict with key=param_name and @@ -582,7 +597,7 @@ def select_header_content_type(self, content_types, method=None, body=None): :return: Content-Type (e.g. application/json). """ if not content_types: - return 'application/json' + return None content_types = [x.lower() for x in content_types] @@ -597,7 +612,7 @@ def select_header_content_type(self, content_types, method=None, body=None): return content_types[0] def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + resource_path, method, body, request_auths=None): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -607,24 +622,36 @@ def update_params_for_auth(self, headers, queries, auth_settings, :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. """ 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 + for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + 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): + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['key'] + "=" + auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) class Endpoint(object): @@ -674,7 +701,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type', '_check_return_type', '_content_type', - '_spec_property_naming' + '_spec_property_naming', + '_request_auths' ]) self.params_map['nullable'].extend(['_request_timeout']) self.validations = root_map['validations'] @@ -689,7 +717,8 @@ def __init__(self, settings=None, params_map=None, root_map=None, '_check_input_type': (bool,), '_check_return_type': (bool,), '_spec_property_naming': (bool,), - '_content_type': (none_type, str) + '_content_type': (none_type, str), + '_request_auths': (none_type, list) } self.openapi_types.update(extra_types) self.attribute_map = root_map['attribute_map'] @@ -773,11 +802,11 @@ def __call__(self, *args, **kwargs): """ This method is invoked when endpoints are called Example: - api_instance = AdminApi() - api_instance.accept_consent_request # this is an instance of the class Endpoint - api_instance.accept_consent_request() # this invokes api_instance.accept_consent_request.__call__() + 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.accept_consent_request.callable or self.callable in this class + api_instance.create_json_web_key_set.callable or self.callable in this class """ return self.callable(self, *args, **kwargs) @@ -842,10 +871,11 @@ def call_with_http_info(self, **kwargs): content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: if params['body'] != "": - header_list = self.api_client.select_header_content_type( + content_types_list = self.api_client.select_header_content_type( content_type_headers_list, self.settings['http_method'], params['body']) - params['header']['Content-Type'] = header_list + 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'], @@ -863,4 +893,5 @@ def call_with_http_info(self, **kwargs): _preload_content=kwargs['_preload_content'], _request_timeout=kwargs['_request_timeout'], _host=_host, + _request_auths=kwargs['_request_auths'], collection_formats=params['collection_format']) diff --git a/clients/hydra/python/ory_hydra_client/apis/__init__.py b/clients/hydra/python/ory_hydra_client/apis/__init__.py index a9a4c685d03..a31599613f7 100644 --- a/clients/hydra/python/ory_hydra_client/apis/__init__.py +++ b/clients/hydra/python/ory_hydra_client/apis/__init__.py @@ -6,7 +6,7 @@ # raise a `RecursionError`. # In order to avoid this, import only the API that you directly need like: # -# from .api.admin_api import AdminApi +# from ory_hydra_client.api.jwk_api import JwkApi # # or import this package, but before doing it, use: # @@ -14,6 +14,8 @@ # sys.setrecursionlimit(n) # Import APIs into API package: -from ory_hydra_client.api.admin_api import AdminApi +from ory_hydra_client.api.jwk_api import JwkApi from ory_hydra_client.api.metadata_api import MetadataApi -from ory_hydra_client.api.public_api import PublicApi +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 36c3c38a57d..993484b57f2 100644 --- a/clients/hydra/python/ory_hydra_client/configuration.py +++ b/clients/hydra/python/ory_hydra_client/configuration.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -393,6 +394,13 @@ def auth_settings(self): 'key': 'Authorization', 'value': self.get_basic_auth_token() } + if self.access_token is not None: + auth['bearer'] = { + 'type': 'bearer', + 'in': 'header', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } if self.access_token is not None: auth['oauth2'] = { 'type': 'oauth2', @@ -410,8 +418,8 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v1.11.0\n"\ - "SDK Package Version: v1.11.0".\ + "Version of the API: v2.0.1\n"\ + "SDK Package Version: v2.0.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 8644f739665..bd575570c60 100644 --- a/clients/hydra/python/ory_hydra_client/exceptions.py +++ b/clients/hydra/python/ory_hydra_client/exceptions.py @@ -1,14 +1,14 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ - class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -112,7 +112,7 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ + error_message = "Status Code: {0}\n"\ "Reason: {1}\n".format(self.status, self.reason) if self.headers: error_message += "HTTP response headers: {0}\n".format( diff --git a/clients/hydra/python/ory_hydra_client/model/__init__.py b/clients/hydra/python/ory_hydra_client/model/__init__.py index cfe32b78492..f5b07714fc3 100644 --- a/clients/hydra/python/ory_hydra_client/model/__init__.py +++ b/clients/hydra/python/ory_hydra_client/model/__init__.py @@ -2,4 +2,4 @@ # 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 {{packageName}.models import ModelA, ModelB +# from ory_hydra_client.models import ModelA, ModelB diff --git a/clients/hydra/python/ory_hydra_client/model/previous_consent_session.py b/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request.py similarity index 82% rename from clients/hydra/python/ory_hydra_client/model/previous_consent_session.py rename to clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request.py index 55d06bee8c3..86647c61907 100644 --- a/clients/hydra/python/ory_hydra_client/model/previous_consent_session.py +++ b/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,15 +31,13 @@ def lazy_import(): - from ory_hydra_client.model.consent_request import ConsentRequest - from ory_hydra_client.model.consent_request_session import ConsentRequestSession - from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter - globals()['ConsentRequest'] = ConsentRequest - globals()['ConsentRequestSession'] = ConsentRequestSession - globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter + 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 PreviousConsentSession(ModelNormal): +class AcceptOAuth2ConsentRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -91,13 +90,12 @@ def openapi_types(): """ lazy_import() return { - 'consent_request': (ConsentRequest,), # noqa: E501 - 'grant_access_token_audience': (StringSlicePipeDelimiter,), # noqa: E501 - 'grant_scope': (StringSlicePipeDelimiter,), # 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': (ConsentRequestSession,), # noqa: E501 + 'session': (AcceptOAuth2ConsentRequestSession,), # noqa: E501 } @cached_property @@ -106,7 +104,6 @@ def discriminator(): attribute_map = { - 'consent_request': 'consent_request', # noqa: E501 'grant_access_token_audience': 'grant_access_token_audience', # noqa: E501 'grant_scope': 'grant_scope', # noqa: E501 'handled_at': 'handled_at', # noqa: E501 @@ -123,7 +120,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PreviousConsentSession - a model defined in OpenAPI + """AcceptOAuth2ConsentRequest - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -156,17 +153,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - consent_request (ConsentRequest): [optional] # noqa: E501 - grant_access_token_audience (StringSlicePipeDelimiter): [optional] # noqa: E501 - grant_scope (StringSlicePipeDelimiter): [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 (ConsentRequestSession): [optional] # noqa: E501 + session (AcceptOAuth2ConsentRequestSession): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -174,14 +170,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -211,7 +211,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """PreviousConsentSession - a model defined in OpenAPI + """AcceptOAuth2ConsentRequest - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -244,13 +244,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - consent_request (ConsentRequest): [optional] # noqa: E501 - grant_access_token_audience (StringSlicePipeDelimiter): [optional] # noqa: E501 - grant_scope (StringSlicePipeDelimiter): [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 (ConsentRequestSession): [optional] # noqa: E501 + session (AcceptOAuth2ConsentRequestSession): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -260,14 +259,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/consent_request_session.py b/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request_session.py similarity index 89% rename from clients/hydra/python/ory_hydra_client/model/consent_request_session.py rename to clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request_session.py index 337da18607d..b1367e918bf 100644 --- a/clients/hydra/python/ory_hydra_client/model/consent_request_session.py +++ b/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_consent_request_session.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class ConsentRequestSession(ModelNormal): +class AcceptOAuth2ConsentRequestSession(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -103,7 +104,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ConsentRequestSession - a model defined in OpenAPI + """AcceptOAuth2ConsentRequestSession - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -141,7 +142,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -149,14 +150,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -186,7 +191,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """ConsentRequestSession - a model defined in OpenAPI + """AcceptOAuth2ConsentRequestSession - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -230,14 +235,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/accept_login_request.py b/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_login_request.py similarity index 89% rename from clients/hydra/python/ory_hydra_client/model/accept_login_request.py rename to clients/hydra/python/ory_hydra_client/model/accept_o_auth2_login_request.py index 7b2a8d0dccd..cc7c748e00f 100644 --- a/clients/hydra/python/ory_hydra_client/model/accept_login_request.py +++ b/clients/hydra/python/ory_hydra_client/model/accept_o_auth2_login_request.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,11 +31,11 @@ def lazy_import(): - from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter - globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter + from ory_hydra_client.model.string_slice_json_format import StringSliceJSONFormat + globals()['StringSliceJSONFormat'] = StringSliceJSONFormat -class AcceptLoginRequest(ModelNormal): +class AcceptOAuth2LoginRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -89,7 +90,7 @@ def openapi_types(): return { 'subject': (str,), # noqa: E501 'acr': (str,), # noqa: E501 - 'amr': (StringSlicePipeDelimiter,), # noqa: E501 + 'amr': (StringSliceJSONFormat,), # noqa: E501 'context': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 'force_subject_identifier': (str,), # noqa: E501 'remember': (bool,), # noqa: E501 @@ -119,7 +120,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, subject, *args, **kwargs): # noqa: E501 - """AcceptLoginRequest - a model defined in OpenAPI + """AcceptOAuth2LoginRequest - a model defined in OpenAPI Args: subject (str): Subject is the user ID of the end-user that authenticated. @@ -156,7 +157,7 @@ def _from_openapi_data(cls, subject, *args, **kwargs): # noqa: E501 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 + amr (StringSliceJSONFormat): [optional] # noqa: E501 context (bool, date, datetime, dict, float, int, list, str, none_type): [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 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 @@ -164,7 +165,7 @@ def _from_openapi_data(cls, subject, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -172,14 +173,18 @@ def _from_openapi_data(cls, subject, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -210,7 +215,7 @@ def _from_openapi_data(cls, subject, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, subject, *args, **kwargs): # noqa: E501 - """AcceptLoginRequest - a model defined in OpenAPI + """AcceptOAuth2LoginRequest - a model defined in OpenAPI Args: subject (str): Subject is the user ID of the end-user that authenticated. @@ -247,7 +252,7 @@ def __init__(self, subject, *args, **kwargs): # noqa: E501 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 + amr (StringSliceJSONFormat): [optional] # noqa: E501 context (bool, date, datetime, dict, float, int, list, str, none_type): [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 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 @@ -261,14 +266,18 @@ def __init__(self, subject, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/json_web_key_set_generator_request.py b/clients/hydra/python/ory_hydra_client/model/create_json_web_key_set.py similarity index 80% rename from clients/hydra/python/ory_hydra_client/model/json_web_key_set_generator_request.py rename to clients/hydra/python/ory_hydra_client/model/create_json_web_key_set.py index eca4aad4650..32e96cb8257 100644 --- a/clients/hydra/python/ory_hydra_client/model/json_web_key_set_generator_request.py +++ b/clients/hydra/python/ory_hydra_client/model/create_json_web_key_set.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class JsonWebKeySetGeneratorRequest(ModelNormal): +class CreateJsonWebKeySet(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -105,12 +106,12 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, alg, kid, use, *args, **kwargs): # noqa: E501 - """JsonWebKeySetGeneratorRequest - a model defined in OpenAPI + """CreateJsonWebKeySet - a model defined in OpenAPI Args: - alg (str): The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" - kid (str): The kid of the key to be created - use (str): 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\". + 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 @@ -146,7 +147,7 @@ def _from_openapi_data(cls, alg, kid, use, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -154,14 +155,18 @@ def _from_openapi_data(cls, alg, kid, use, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -194,12 +199,12 @@ def _from_openapi_data(cls, alg, kid, use, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, alg, kid, use, *args, **kwargs): # noqa: E501 - """JsonWebKeySetGeneratorRequest - a model defined in OpenAPI + """CreateJsonWebKeySet - a model defined in OpenAPI Args: - alg (str): The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" - kid (str): The kid of the key to be created - use (str): 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\". + 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 @@ -241,14 +246,18 @@ def __init__(self, alg, kid, use, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/json_error.py b/clients/hydra/python/ory_hydra_client/model/error_o_auth2.py similarity index 81% rename from clients/hydra/python/ory_hydra_client/model/json_error.py rename to clients/hydra/python/ory_hydra_client/model/error_o_auth2.py index 8bc13fa62cf..42de6a723d9 100644 --- a/clients/hydra/python/ory_hydra_client/model/json_error.py +++ b/clients/hydra/python/ory_hydra_client/model/error_o_auth2.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class JsonError(ModelNormal): +class ErrorOAuth2(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -84,6 +85,7 @@ def openapi_types(): 'error': (str,), # noqa: E501 'error_debug': (str,), # noqa: E501 'error_description': (str,), # noqa: E501 + 'error_hint': (str,), # noqa: E501 'status_code': (int,), # noqa: E501 } @@ -96,6 +98,7 @@ def discriminator(): '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 } @@ -107,7 +110,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """JsonError - a model defined in OpenAPI + """ErrorOAuth2 - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -140,14 +143,15 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - error (str): Name is the error name.. [optional] # noqa: E501 - error_debug (str): Debug contains debug information. This is usually not available and has to be enabled.. [optional] # noqa: E501 - error_description (str): Description contains further information on the nature of the error.. [optional] # noqa: E501 - status_code (int): Code represents the error status code (404, 403, 401, ...).. [optional] # noqa: E501 + 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) + _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', ()) @@ -155,14 +159,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -192,7 +200,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """JsonError - a model defined in OpenAPI + """ErrorOAuth2 - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -225,10 +233,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - error (str): Name is the error name.. [optional] # noqa: E501 - error_debug (str): Debug contains debug information. This is usually not available and has to be enabled.. [optional] # noqa: E501 - error_description (str): Description contains further information on the nature of the error.. [optional] # noqa: E501 - status_code (int): Code represents the error status code (404, 403, 401, ...).. [optional] # noqa: E501 + 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) @@ -238,14 +247,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/generic_error.py b/clients/hydra/python/ory_hydra_client/model/generic_error.py index 4168b0ce626..8ce5f3f1d3e 100644 --- a/clients/hydra/python/ory_hydra_client/model/generic_error.py +++ b/clients/hydra/python/ory_hydra_client/model/generic_error.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -161,7 +162,7 @@ def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -169,14 +170,18 @@ def _from_openapi_data(cls, message, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -259,14 +264,18 @@ def __init__(self, message, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/container_wait_ok_body_error.py b/clients/hydra/python/ory_hydra_client/model/get_version200_response.py similarity index 85% rename from clients/hydra/python/ory_hydra_client/model/container_wait_ok_body_error.py rename to clients/hydra/python/ory_hydra_client/model/get_version200_response.py index 8ba943aa0b5..b2dc419c34b 100644 --- a/clients/hydra/python/ory_hydra_client/model/container_wait_ok_body_error.py +++ b/clients/hydra/python/ory_hydra_client/model/get_version200_response.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class ContainerWaitOKBodyError(ModelNormal): +class GetVersion200Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -81,7 +82,7 @@ def openapi_types(): and the value is attribute type. """ return { - 'message': (str,), # noqa: E501 + 'version': (str,), # noqa: E501 } @cached_property @@ -90,7 +91,7 @@ def discriminator(): attribute_map = { - 'message': 'Message', # noqa: E501 + 'version': 'version', # noqa: E501 } read_only_vars = { @@ -101,7 +102,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """ContainerWaitOKBodyError - a model defined in OpenAPI + """GetVersion200Response - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -134,11 +135,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - message (str): Details of an error. [optional] # noqa: E501 + 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) + _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', ()) @@ -146,14 +147,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -183,7 +188,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """ContainerWaitOKBodyError - a model defined in OpenAPI + """GetVersion200Response - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -216,7 +221,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - message (str): Details of an error. [optional] # noqa: E501 + version (str): The version of Ory Hydra.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -226,14 +231,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 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 index 4c5326cdce0..644b8ac007f 100644 --- 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 @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -138,7 +139,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -146,14 +147,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -226,14 +231,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/health_status.py b/clients/hydra/python/ory_hydra_client/model/health_status.py index 002899665c8..03cbee1336d 100644 --- a/clients/hydra/python/ory_hydra_client/model/health_status.py +++ b/clients/hydra/python/ory_hydra_client/model/health_status.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -138,7 +139,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -146,14 +147,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -226,14 +231,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/o_auth2_token_introspection.py b/clients/hydra/python/ory_hydra_client/model/introspected_o_auth2_token.py similarity index 89% rename from clients/hydra/python/ory_hydra_client/model/o_auth2_token_introspection.py rename to clients/hydra/python/ory_hydra_client/model/introspected_o_auth2_token.py index b1dba7bd737..9522bae64a9 100644 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_token_introspection.py +++ b/clients/hydra/python/ory_hydra_client/model/introspected_o_auth2_token.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class OAuth2TokenIntrospection(ModelNormal): +class IntrospectedOAuth2Token(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -85,7 +86,7 @@ def openapi_types(): 'aud': ([str],), # noqa: E501 'client_id': (str,), # noqa: E501 'exp': (int,), # noqa: E501 - 'ext': (bool, date, datetime, dict, float, int, list, str, none_type,), # 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 @@ -127,7 +128,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, active, *args, **kwargs): # noqa: E501 - """OAuth2TokenIntrospection - a model defined in OpenAPI + """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). @@ -166,7 +167,7 @@ def _from_openapi_data(cls, active, *args, **kwargs): # noqa: E501 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 (bool, date, datetime, dict, float, int, list, str, none_type): Extra is arbitrary data set by the session.. [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 @@ -179,7 +180,7 @@ def _from_openapi_data(cls, active, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -187,14 +188,18 @@ def _from_openapi_data(cls, active, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -225,7 +230,7 @@ def _from_openapi_data(cls, active, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, active, *args, **kwargs): # noqa: E501 - """OAuth2TokenIntrospection - a model defined in OpenAPI + """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). @@ -264,7 +269,7 @@ def __init__(self, active, *args, **kwargs): # noqa: E501 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 (bool, date, datetime, dict, float, int, list, str, none_type): Extra is arbitrary data set by the session.. [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 @@ -283,14 +288,18 @@ def __init__(self, active, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/flush_inactive_o_auth2_tokens_request.py b/clients/hydra/python/ory_hydra_client/model/is_ready200_response.py similarity index 85% rename from clients/hydra/python/ory_hydra_client/model/flush_inactive_o_auth2_tokens_request.py rename to clients/hydra/python/ory_hydra_client/model/is_ready200_response.py index c47b723e259..0d5381119a3 100644 --- a/clients/hydra/python/ory_hydra_client/model/flush_inactive_o_auth2_tokens_request.py +++ b/clients/hydra/python/ory_hydra_client/model/is_ready200_response.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class FlushInactiveOAuth2TokensRequest(ModelNormal): +class IsReady200Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -81,7 +82,7 @@ def openapi_types(): and the value is attribute type. """ return { - 'not_after': (datetime,), # noqa: E501 + 'status': (str,), # noqa: E501 } @cached_property @@ -90,7 +91,7 @@ def discriminator(): attribute_map = { - 'not_after': 'notAfter', # noqa: E501 + 'status': 'status', # noqa: E501 } read_only_vars = { @@ -101,7 +102,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """FlushInactiveOAuth2TokensRequest - a model defined in OpenAPI + """IsReady200Response - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -134,11 +135,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - not_after (datetime): NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing.. [optional] # noqa: E501 + status (str): Always \"ok\".. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -146,14 +147,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -183,7 +188,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """FlushInactiveOAuth2TokensRequest - a model defined in OpenAPI + """IsReady200Response - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -216,7 +221,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - not_after (datetime): NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing.. [optional] # noqa: E501 + status (str): Always \"ok\".. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -226,14 +231,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/plugin_config_rootfs.py b/clients/hydra/python/ory_hydra_client/model/is_ready503_response.py similarity index 84% rename from clients/hydra/python/ory_hydra_client/model/plugin_config_rootfs.py rename to clients/hydra/python/ory_hydra_client/model/is_ready503_response.py index a7bed98f4e6..3375dcf6f88 100644 --- a/clients/hydra/python/ory_hydra_client/model/plugin_config_rootfs.py +++ b/clients/hydra/python/ory_hydra_client/model/is_ready503_response.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class PluginConfigRootfs(ModelNormal): +class IsReady503Response(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -81,8 +82,7 @@ def openapi_types(): and the value is attribute type. """ return { - 'diff_ids': ([str],), # noqa: E501 - 'type': (str,), # noqa: E501 + 'errors': ({str: (str,)},), # noqa: E501 } @cached_property @@ -91,8 +91,7 @@ def discriminator(): attribute_map = { - 'diff_ids': 'diff_ids', # noqa: E501 - 'type': 'type', # noqa: E501 + 'errors': 'errors', # noqa: E501 } read_only_vars = { @@ -103,7 +102,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PluginConfigRootfs - a model defined in OpenAPI + """IsReady503Response - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -136,12 +135,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - diff_ids ([str]): diff ids. [optional] # noqa: E501 - type (str): type. [optional] # noqa: E501 + 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) + _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', ()) @@ -149,14 +147,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -186,7 +188,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """PluginConfigRootfs - a model defined in OpenAPI + """IsReady503Response - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -219,8 +221,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - diff_ids ([str]): diff ids. [optional] # noqa: E501 - type (str): type. [optional] # noqa: E501 + 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) @@ -230,14 +231,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/patch_document.py b/clients/hydra/python/ory_hydra_client/model/json_patch.py similarity index 79% rename from clients/hydra/python/ory_hydra_client/model/patch_document.py rename to clients/hydra/python/ory_hydra_client/model/json_patch.py index f401a0ac631..4d9a0170c26 100644 --- a/clients/hydra/python/ory_hydra_client/model/patch_document.py +++ b/clients/hydra/python/ory_hydra_client/model/json_patch.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class PatchDocument(ModelNormal): +class JsonPatch(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -107,11 +108,11 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, op, path, *args, **kwargs): # noqa: E501 - """PatchDocument - a model defined in OpenAPI + """JsonPatch - a model defined in OpenAPI Args: - op (str): The operation to be performed - path (str): A JSON-pointer + 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 @@ -144,12 +145,12 @@ def _from_openapi_data(cls, op, path, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - _from (str): A JSON-pointer. [optional] # noqa: E501 - value (bool, date, datetime, dict, float, int, list, str, none_type): The value to be used within the operations. [optional] # noqa: E501 + _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) + _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', ()) @@ -157,14 +158,18 @@ def _from_openapi_data(cls, op, path, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -196,11 +201,11 @@ def _from_openapi_data(cls, op, path, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, op, path, *args, **kwargs): # noqa: E501 - """PatchDocument - a model defined in OpenAPI + """JsonPatch - a model defined in OpenAPI Args: - op (str): The operation to be performed - path (str): A JSON-pointer + 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 @@ -233,8 +238,8 @@ def __init__(self, op, path, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - _from (str): A JSON-pointer. [optional] # noqa: E501 - value (bool, date, datetime, dict, float, int, list, str, none_type): The value to be used within the operations. [optional] # noqa: E501 + _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) @@ -244,14 +249,18 @@ def __init__(self, op, path, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/patch_request.py b/clients/hydra/python/ory_hydra_client/model/json_patch_document.py similarity index 84% rename from clients/hydra/python/ory_hydra_client/model/patch_request.py rename to clients/hydra/python/ory_hydra_client/model/json_patch_document.py index 721f992256c..e6d1f738f40 100644 --- a/clients/hydra/python/ory_hydra_client/model/patch_request.py +++ b/clients/hydra/python/ory_hydra_client/model/json_patch_document.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,11 +31,11 @@ def lazy_import(): - from ory_hydra_client.model.patch_document import PatchDocument - globals()['PatchDocument'] = PatchDocument + from ory_hydra_client.model.json_patch import JsonPatch + globals()['JsonPatch'] = JsonPatch -class PatchRequest(ModelSimple): +class JsonPatchDocument(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,7 +77,7 @@ def openapi_types(): """ lazy_import() return { - 'value': ([PatchDocument],), + 'value': ([JsonPatch],), } @cached_property @@ -101,15 +102,15 @@ def discriminator(): @convert_js_args_to_python_args def __init__(self, *args, **kwargs): - """PatchRequest - a model defined in OpenAPI + """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] ([PatchDocument]): A JSONPatch request. # noqa: E501 + args[0] ([JsonPatch]): A JSONPatchDocument request. # noqa: E501 Keyword Args: - value ([PatchDocument]): A JSONPatch request. # noqa: E501 + 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. @@ -162,14 +163,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 @@ -191,15 +196,15 @@ def __init__(self, *args, **kwargs): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): - """PatchRequest - a model defined in OpenAPI + """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] ([PatchDocument]): A JSONPatch request. # noqa: E501 + args[0] ([JsonPatch]): A JSONPatchDocument request. # noqa: E501 Keyword Args: - value ([PatchDocument]): A JSONPatch request. # noqa: E501 + 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. @@ -254,14 +259,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 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 index 6d5461617a8..d04c02abd0b 100644 --- a/clients/hydra/python/ory_hydra_client/model/json_web_key.py +++ b/clients/hydra/python/ory_hydra_client/model/json_web_key.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class JSONWebKey(ModelNormal): +class JsonWebKey(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -133,7 +134,7 @@ def discriminator(): @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 + """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. @@ -188,7 +189,7 @@ def _from_openapi_data(cls, alg, kid, kty, use, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -196,14 +197,18 @@ def _from_openapi_data(cls, alg, kid, kty, use, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -237,7 +242,7 @@ def _from_openapi_data(cls, alg, kid, kty, use, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, alg, kid, kty, use, *args, **kwargs): # noqa: E501 - """JSONWebKey - a model defined in OpenAPI + """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. @@ -298,14 +303,18 @@ def __init__(self, alg, kid, kty, use, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 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 index 27fb3484ca8..97917ee2992 100644 --- 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 @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,11 +31,11 @@ def lazy_import(): - from ory_hydra_client.model.json_web_key import JSONWebKey - globals()['JSONWebKey'] = JSONWebKey + from ory_hydra_client.model.json_web_key import JsonWebKey + globals()['JsonWebKey'] = JsonWebKey -class JSONWebKeySet(ModelNormal): +class JsonWebKeySet(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -87,7 +88,7 @@ def openapi_types(): """ lazy_import() return { - 'keys': ([JSONWebKey],), # noqa: E501 + 'keys': ([JsonWebKey],), # noqa: E501 } @cached_property @@ -107,7 +108,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """JSONWebKeySet - a model defined in OpenAPI + """JsonWebKeySet - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -140,11 +141,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - keys ([JSONWebKey]): The value of the \"keys\" parameter is an array of 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 + 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) + _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', ()) @@ -152,14 +153,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -189,7 +194,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """JSONWebKeySet - a model defined in OpenAPI + """JsonWebKeySet - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -222,7 +227,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - keys ([JSONWebKey]): The value of the \"keys\" parameter is an array of 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 + 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) @@ -232,14 +237,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/trusted_jwt_grant_issuers.py b/clients/hydra/python/ory_hydra_client/model/null_duration.py similarity index 85% rename from clients/hydra/python/ory_hydra_client/model/trusted_jwt_grant_issuers.py rename to clients/hydra/python/ory_hydra_client/model/null_duration.py index 789e4404e03..ecda25928ab 100644 --- a/clients/hydra/python/ory_hydra_client/model/trusted_jwt_grant_issuers.py +++ b/clients/hydra/python/ory_hydra_client/model/null_duration.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -29,12 +30,8 @@ from ory_hydra_client.exceptions import ApiAttributeError -def lazy_import(): - from ory_hydra_client.model.trusted_jwt_grant_issuer import TrustedJwtGrantIssuer - globals()['TrustedJwtGrantIssuer'] = TrustedJwtGrantIssuer - -class TrustedJwtGrantIssuers(ModelSimple): +class NullDuration(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -58,11 +55,16 @@ class TrustedJwtGrantIssuers(ModelSimple): } validations = { + ('value',): { + 'regex': { + 'pattern': r'', # noqa: E501 + }, + }, } additional_properties_type = None - _nullable = False + _nullable = True @cached_property def openapi_types(): @@ -74,9 +76,8 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - 'value': ([TrustedJwtGrantIssuer],), + 'value': (str,), } @cached_property @@ -101,15 +102,15 @@ def discriminator(): @convert_js_args_to_python_args def __init__(self, *args, **kwargs): - """TrustedJwtGrantIssuers - a model defined in OpenAPI + """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] ([TrustedJwtGrantIssuer]): # noqa: E501 + args[0] (str): # noqa: E501 Keyword Args: - value ([TrustedJwtGrantIssuer]): # noqa: E501 + 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. @@ -162,14 +163,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 @@ -191,15 +196,15 @@ def __init__(self, *args, **kwargs): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): - """TrustedJwtGrantIssuers - a model defined in OpenAPI + """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] ([TrustedJwtGrantIssuer]): # noqa: E501 + args[0] (str): # noqa: E501 Keyword Args: - value ([TrustedJwtGrantIssuer]): # noqa: E501 + 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. @@ -254,14 +259,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 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 index b91e4ac3cc8..d064a71356e 100644 --- a/clients/hydra/python/ory_hydra_client/model/o_auth2_client.py +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_client.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,8 +31,10 @@ def lazy_import(): - from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter - globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter + 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): @@ -62,11 +65,6 @@ class OAuth2Client(ModelNormal): } validations = { - ('scope',): { - 'regex': { - 'pattern': r'([a-zA-Z0-9\.\*]+\s?)+', # noqa: E501 - }, - }, } @cached_property @@ -92,33 +90,43 @@ def openapi_types(): """ lazy_import() return { - 'allowed_cors_origins': (StringSlicePipeDelimiter,), # noqa: E501 - 'audience': (StringSlicePipeDelimiter,), # 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': (StringSlicePipeDelimiter,), # 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': (StringSlicePipeDelimiter,), # 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': (StringSlicePipeDelimiter,), # noqa: E501 - 'redirect_uris': (StringSlicePipeDelimiter,), # 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': (StringSlicePipeDelimiter,), # noqa: E501 - 'response_types': (StringSlicePipeDelimiter,), # noqa: E501 + 'request_uris': (StringSliceJSONFormat,), # noqa: E501 + 'response_types': (StringSliceJSONFormat,), # noqa: E501 'scope': (str,), # noqa: E501 'sector_identifier_uri': (str,), # noqa: E501 'subject_type': (str,), # noqa: E501 @@ -137,8 +145,12 @@ def discriminator(): attribute_map = { '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 @@ -149,14 +161,20 @@ def discriminator(): '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 @@ -213,45 +231,55 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - allowed_cors_origins (StringSlicePipeDelimiter): [optional] # noqa: E501 - audience (StringSlicePipeDelimiter): [optional] # noqa: E501 - backchannel_logout_session_required (bool): 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): RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.. [optional] # noqa: E501 - client_id (str): ID is the id for this client.. [optional] # noqa: E501 - client_name (str): Name is the human-readable string name of the client to be presented to the end-user during authorization.. [optional] # noqa: E501 - client_secret (str): Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again.. [optional] # noqa: E501 - client_secret_expires_at (int): SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0.. [optional] # noqa: E501 - client_uri (str): ClientURI is an 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - created_at (datetime): CreatedAt returns the timestamp of the client's creation.. [optional] # noqa: E501 - frontchannel_logout_session_required (bool): 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): 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - jwks (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - jwks_uri (str): 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 - logo_uri (str): LogoURI is an URL string that references a logo for the client.. [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 autogenerated and immutable.. [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): Owner is a string identifying the owner of the OAuth 2.0 Client.. [optional] # noqa: E501 - policy_uri (str): 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - redirect_uris (StringSlicePipeDelimiter): [optional] # noqa: E501 - registration_access_token (str): RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client.. [optional] # noqa: E501 - registration_client_uri (str): RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.. [optional] # noqa: E501 - request_object_signing_alg (str): 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - response_types (StringSlicePipeDelimiter): [optional] # noqa: E501 - scope (str): 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): 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 - subject_type (str): SubjectType requested for responses to this Client. 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): Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none.. [optional] # noqa: E501 - token_endpoint_auth_signing_alg (str): Requested Client Authentication signing algorithm for the Token Endpoint.. [optional] # noqa: E501 - tos_uri (str): TermsOfServiceURI is a URL string that points 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): UpdatedAt returns the timestamp of the last update.. [optional] # noqa: E501 - userinfo_signed_response_alg (str): 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 + 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 + 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_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] # 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) + _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', ()) @@ -259,14 +287,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -329,41 +361,51 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - allowed_cors_origins (StringSlicePipeDelimiter): [optional] # noqa: E501 - audience (StringSlicePipeDelimiter): [optional] # noqa: E501 - backchannel_logout_session_required (bool): 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): RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.. [optional] # noqa: E501 - client_id (str): ID is the id for this client.. [optional] # noqa: E501 - client_name (str): Name is the human-readable string name of the client to be presented to the end-user during authorization.. [optional] # noqa: E501 - client_secret (str): Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again.. [optional] # noqa: E501 - client_secret_expires_at (int): SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0.. [optional] # noqa: E501 - client_uri (str): ClientURI is an 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - created_at (datetime): CreatedAt returns the timestamp of the client's creation.. [optional] # noqa: E501 - frontchannel_logout_session_required (bool): 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): 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - jwks (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - jwks_uri (str): 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 - logo_uri (str): LogoURI is an URL string that references a logo for the client.. [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 autogenerated and immutable.. [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): Owner is a string identifying the owner of the OAuth 2.0 Client.. [optional] # noqa: E501 - policy_uri (str): 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - redirect_uris (StringSlicePipeDelimiter): [optional] # noqa: E501 - registration_access_token (str): RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client.. [optional] # noqa: E501 - registration_client_uri (str): RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.. [optional] # noqa: E501 - request_object_signing_alg (str): 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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - response_types (StringSlicePipeDelimiter): [optional] # noqa: E501 - scope (str): 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): 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 - subject_type (str): SubjectType requested for responses to this Client. 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): Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none.. [optional] # noqa: E501 - token_endpoint_auth_signing_alg (str): Requested Client Authentication signing algorithm for the Token Endpoint.. [optional] # noqa: E501 - tos_uri (str): TermsOfServiceURI is a URL string that points 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): UpdatedAt returns the timestamp of the last update.. [optional] # noqa: E501 - userinfo_signed_response_alg (str): 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 + 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 + 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_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] # 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) @@ -373,14 +415,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 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 new file mode 100644 index 00000000000..59688a9984b --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_client_token_lifespans.py @@ -0,0 +1,306 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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/consent_request.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request.py similarity index 85% rename from clients/hydra/python/ory_hydra_client/model/consent_request.py rename to clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request.py index dfef04ab8f6..f65a070927f 100644 --- a/clients/hydra/python/ory_hydra_client/model/consent_request.py +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -31,14 +32,14 @@ def lazy_import(): from ory_hydra_client.model.o_auth2_client import OAuth2Client - from ory_hydra_client.model.open_id_connect_context import OpenIDConnectContext - from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter + 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()['OpenIDConnectContext'] = OpenIDConnectContext - globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter + globals()['OAuth2ConsentRequestOpenIDConnectContext'] = OAuth2ConsentRequestOpenIDConnectContext + globals()['StringSliceJSONFormat'] = StringSliceJSONFormat -class ConsentRequest(ModelNormal): +class OAuth2ConsentRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -93,15 +94,15 @@ def openapi_types(): return { 'challenge': (str,), # noqa: E501 'acr': (str,), # noqa: E501 - 'amr': (StringSlicePipeDelimiter,), # 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': (OpenIDConnectContext,), # noqa: E501 + 'oidc_context': (OAuth2ConsentRequestOpenIDConnectContext,), # noqa: E501 'request_url': (str,), # noqa: E501 - 'requested_access_token_audience': (StringSlicePipeDelimiter,), # noqa: E501 - 'requested_scope': (StringSlicePipeDelimiter,), # noqa: E501 + 'requested_access_token_audience': (StringSliceJSONFormat,), # noqa: E501 + 'requested_scope': (StringSliceJSONFormat,), # noqa: E501 'skip': (bool,), # noqa: E501 'subject': (str,), # noqa: E501 } @@ -135,7 +136,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, challenge, *args, **kwargs): # noqa: E501 - """ConsentRequest - a model defined in OpenAPI + """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. @@ -172,21 +173,21 @@ def _from_openapi_data(cls, challenge, *args, **kwargs): # noqa: E501 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 (StringSlicePipeDelimiter): [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 (OpenIDConnectContext): [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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - requested_scope (StringSlicePipeDelimiter): [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) + _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', ()) @@ -194,14 +195,18 @@ def _from_openapi_data(cls, challenge, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -232,7 +237,7 @@ def _from_openapi_data(cls, challenge, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, challenge, *args, **kwargs): # noqa: E501 - """ConsentRequest - a model defined in OpenAPI + """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. @@ -269,15 +274,15 @@ def __init__(self, challenge, *args, **kwargs): # noqa: E501 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 (StringSlicePipeDelimiter): [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 (OpenIDConnectContext): [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 (StringSlicePipeDelimiter): [optional] # noqa: E501 - requested_scope (StringSlicePipeDelimiter): [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 """ @@ -289,14 +294,18 @@ def __init__(self, challenge, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/open_id_connect_context.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request_open_id_connect_context.py similarity index 87% rename from clients/hydra/python/ory_hydra_client/model/open_id_connect_context.py rename to clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request_open_id_connect_context.py index 61f81196bc3..2661d735aa3 100644 --- a/clients/hydra/python/ory_hydra_client/model/open_id_connect_context.py +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_request_open_id_connect_context.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class OpenIDConnectContext(ModelNormal): +class OAuth2ConsentRequestOpenIDConnectContext(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -83,7 +84,7 @@ def openapi_types(): return { 'acr_values': ([str],), # noqa: E501 'display': (str,), # noqa: E501 - 'id_token_hint_claims': (bool, date, datetime, dict, float, int, list, str, none_type,), # 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 } @@ -109,7 +110,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """OpenIDConnectContext - a model defined in OpenAPI + """OAuth2ConsentRequestOpenIDConnectContext - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -144,13 +145,13 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 _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 (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 + 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) + _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', ()) @@ -158,14 +159,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -195,7 +200,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """OpenIDConnectContext - a model defined in OpenAPI + """OAuth2ConsentRequestOpenIDConnectContext - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -230,7 +235,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 _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 (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 + 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 """ @@ -242,14 +247,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 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 new file mode 100644 index 00000000000..cbb1de0b033 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session.py @@ -0,0 +1,304 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 + '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 + '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 + 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 + 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 new file mode 100644 index 00000000000..2f74ae6ceae --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_session_expires_at.py @@ -0,0 +1,280 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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/plugin_env.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_sessions.py similarity index 70% rename from clients/hydra/python/ory_hydra_client/model/plugin_env.py rename to clients/hydra/python/ory_hydra_client/model/o_auth2_consent_sessions.py index 4b858ba2df0..d420a177e9f 100644 --- a/clients/hydra/python/ory_hydra_client/model/plugin_env.py +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_consent_sessions.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -29,8 +30,12 @@ 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 PluginEnv(ModelNormal): + +class OAuth2ConsentSessions(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -41,10 +46,6 @@ class PluginEnv(ModelNormal): 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, @@ -60,13 +61,7 @@ class PluginEnv(ModelNormal): 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 + additional_properties_type = None _nullable = False @@ -80,11 +75,9 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ + lazy_import() return { - 'description': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'settable': ([str],), # noqa: E501 - 'value': (str,), # noqa: E501 + 'value': ([OAuth2ConsentSession],), } @cached_property @@ -92,30 +85,32 @@ def discriminator(): return None - attribute_map = { - 'description': 'Description', # noqa: E501 - 'name': 'Name', # noqa: E501 - 'settable': 'Settable', # noqa: E501 - 'value': 'Value', # noqa: E501 - } + attribute_map = {} - read_only_vars = { - } + read_only_vars = set() - _composed_schemas = {} + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) - @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, description, name, settable, value, *args, **kwargs): # noqa: E501 - """PluginEnv - a model defined in OpenAPI + 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: - description (str): description - name (str): name - settable ([str]): settable - value (str): value + 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. @@ -147,24 +142,39 @@ def _from_openapi_data(cls, description, name, settable, value, *args, **kwargs) 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) - _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: - 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__,), - ) + 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 @@ -172,41 +182,29 @@ def _from_openapi_data(cls, description, name, settable, value, *args, **kwargs) self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.description = description - self.name = name - self.settable = settable self.value = value - 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', - ]) + 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 __init__(self, description, name, settable, value, *args, **kwargs): # noqa: E501 - """PluginEnv - a model defined in OpenAPI + 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: - description (str): description - name (str): name - settable ([str]): settable - value (str): value + 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. @@ -238,22 +236,41 @@ def __init__(self, description, name, settable, value, *args, **kwargs): # noqa 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) - _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 @@ -261,19 +278,15 @@ def __init__(self, description, name, settable, value, *args, **kwargs): # noqa self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.description = description - self.name = name - self.settable = settable self.value = value - 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.") + 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/login_request.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_login_request.py similarity index 85% rename from clients/hydra/python/ory_hydra_client/model/login_request.py rename to clients/hydra/python/ory_hydra_client/model/o_auth2_login_request.py index b8e51ea69a9..e2a5dbc565c 100644 --- a/clients/hydra/python/ory_hydra_client/model/login_request.py +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_login_request.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -31,14 +32,14 @@ def lazy_import(): from ory_hydra_client.model.o_auth2_client import OAuth2Client - from ory_hydra_client.model.open_id_connect_context import OpenIDConnectContext - from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter + 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()['OpenIDConnectContext'] = OpenIDConnectContext - globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter + globals()['OAuth2ConsentRequestOpenIDConnectContext'] = OAuth2ConsentRequestOpenIDConnectContext + globals()['StringSliceJSONFormat'] = StringSliceJSONFormat -class LoginRequest(ModelNormal): +class OAuth2LoginRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -94,11 +95,11 @@ def openapi_types(): 'challenge': (str,), # noqa: E501 'client': (OAuth2Client,), # noqa: E501 'request_url': (str,), # noqa: E501 - 'requested_access_token_audience': (StringSlicePipeDelimiter,), # noqa: E501 - 'requested_scope': (StringSlicePipeDelimiter,), # noqa: E501 + 'requested_access_token_audience': (StringSliceJSONFormat,), # noqa: E501 + 'requested_scope': (StringSliceJSONFormat,), # noqa: E501 'skip': (bool,), # noqa: E501 'subject': (str,), # noqa: E501 - 'oidc_context': (OpenIDConnectContext,), # noqa: E501 + 'oidc_context': (OAuth2ConsentRequestOpenIDConnectContext,), # noqa: E501 'session_id': (str,), # noqa: E501 } @@ -127,14 +128,14 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, challenge, client, request_url, requested_access_token_audience, requested_scope, skip, subject, *args, **kwargs): # noqa: E501 - """LoginRequest - a model defined in OpenAPI + """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. - requested_access_token_audience (StringSlicePipeDelimiter): - requested_scope (StringSlicePipeDelimiter): + requested_access_token_audience (StringSliceJSONFormat): + requested_scope (StringSliceJSONFormat): 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. @@ -169,12 +170,12 @@ def _from_openapi_data(cls, challenge, client, request_url, requested_access_tok Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - oidc_context (OpenIDConnectContext): [optional] # noqa: E501 + oidc_context (OAuth2ConsentRequestOpenIDConnectContext): [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) + _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', ()) @@ -182,14 +183,18 @@ def _from_openapi_data(cls, challenge, client, request_url, requested_access_tok self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -226,14 +231,14 @@ def _from_openapi_data(cls, challenge, client, request_url, requested_access_tok @convert_js_args_to_python_args def __init__(self, challenge, client, request_url, requested_access_token_audience, requested_scope, skip, subject, *args, **kwargs): # noqa: E501 - """LoginRequest - a model defined in OpenAPI + """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. - requested_access_token_audience (StringSlicePipeDelimiter): - requested_scope (StringSlicePipeDelimiter): + requested_access_token_audience (StringSliceJSONFormat): + requested_scope (StringSliceJSONFormat): 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. @@ -268,7 +273,7 @@ def __init__(self, challenge, client, request_url, requested_access_token_audien Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - oidc_context (OpenIDConnectContext): [optional] # noqa: E501 + oidc_context (OAuth2ConsentRequestOpenIDConnectContext): [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 """ @@ -279,14 +284,18 @@ def __init__(self, challenge, client, request_url, requested_access_token_audien _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/logout_request.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_logout_request.py similarity index 89% rename from clients/hydra/python/ory_hydra_client/model/logout_request.py rename to clients/hydra/python/ory_hydra_client/model/o_auth2_logout_request.py index c435652bdae..79dce773325 100644 --- a/clients/hydra/python/ory_hydra_client/model/logout_request.py +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_logout_request.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -34,7 +35,7 @@ def lazy_import(): globals()['OAuth2Client'] = OAuth2Client -class LogoutRequest(ModelNormal): +class OAuth2LogoutRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -117,7 +118,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """LogoutRequest - a model defined in OpenAPI + """OAuth2LogoutRequest - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -159,7 +160,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -167,14 +168,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -204,7 +209,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """LogoutRequest - a model defined in OpenAPI + """OAuth2LogoutRequest - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -252,14 +257,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/completed_request.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_redirect_to.py similarity index 86% rename from clients/hydra/python/ory_hydra_client/model/completed_request.py rename to clients/hydra/python/ory_hydra_client/model/o_auth2_redirect_to.py index 310af776e40..410896c64ae 100644 --- a/clients/hydra/python/ory_hydra_client/model/completed_request.py +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_redirect_to.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class CompletedRequest(ModelNormal): +class OAuth2RedirectTo(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -101,10 +102,10 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, redirect_to, *args, **kwargs): # noqa: E501 - """CompletedRequest - a model defined in OpenAPI + """OAuth2RedirectTo - a model defined in OpenAPI Args: - redirect_to (str): RedirectURL is the URL which you should redirect the user to once the authentication process is completed. + 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 @@ -140,7 +141,7 @@ def _from_openapi_data(cls, redirect_to, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -148,14 +149,18 @@ def _from_openapi_data(cls, redirect_to, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -186,10 +191,10 @@ def _from_openapi_data(cls, redirect_to, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, redirect_to, *args, **kwargs): # noqa: E501 - """CompletedRequest - a model defined in OpenAPI + """OAuth2RedirectTo - a model defined in OpenAPI Args: - redirect_to (str): RedirectURL is the URL which you should redirect the user to once the authentication process is completed. + 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 @@ -231,14 +236,18 @@ def __init__(self, redirect_to, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/accept_consent_request.py b/clients/hydra/python/ory_hydra_client/model/o_auth2_token_exchange.py similarity index 73% rename from clients/hydra/python/ory_hydra_client/model/accept_consent_request.py rename to clients/hydra/python/ory_hydra_client/model/o_auth2_token_exchange.py index 4db37ad03fb..dca1413a20b 100644 --- a/clients/hydra/python/ory_hydra_client/model/accept_consent_request.py +++ b/clients/hydra/python/ory_hydra_client/model/o_auth2_token_exchange.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -29,14 +30,8 @@ from ory_hydra_client.exceptions import ApiAttributeError -def lazy_import(): - from ory_hydra_client.model.consent_request_session import ConsentRequestSession - from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter - globals()['ConsentRequestSession'] = ConsentRequestSession - globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter - -class AcceptConsentRequest(ModelNormal): +class OAuth2TokenExchange(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -72,7 +67,6 @@ 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 @@ -87,14 +81,13 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - 'grant_access_token_audience': (StringSlicePipeDelimiter,), # noqa: E501 - 'grant_scope': (StringSlicePipeDelimiter,), # noqa: E501 - 'handled_at': (datetime,), # noqa: E501 - 'remember': (bool,), # noqa: E501 - 'remember_for': (int,), # noqa: E501 - 'session': (ConsentRequestSession,), # noqa: E501 + 'access_token': (str,), # noqa: E501 + 'expires_in': (int,), # noqa: E501 + 'id_token': (int,), # noqa: E501 + 'refresh_token': (str,), # noqa: E501 + 'scope': (int,), # noqa: E501 + 'token_type': (str,), # noqa: E501 } @cached_property @@ -103,12 +96,12 @@ def discriminator(): attribute_map = { - '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 + '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 = { @@ -119,7 +112,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """AcceptConsentRequest - a model defined in OpenAPI + """OAuth2TokenExchange - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -152,16 +145,16 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - grant_access_token_audience (StringSlicePipeDelimiter): [optional] # noqa: E501 - grant_scope (StringSlicePipeDelimiter): [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 (ConsentRequestSession): [optional] # noqa: E501 + 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 (int): 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 (int): 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) + _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', ()) @@ -169,14 +162,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -206,7 +203,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """AcceptConsentRequest - a model defined in OpenAPI + """OAuth2TokenExchange - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -239,12 +236,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - grant_access_token_audience (StringSlicePipeDelimiter): [optional] # noqa: E501 - grant_scope (StringSlicePipeDelimiter): [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 (ConsentRequestSession): [optional] # noqa: E501 + 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 (int): 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 (int): 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) @@ -254,14 +251,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/oidc_configuration.py b/clients/hydra/python/ory_hydra_client/model/oidc_configuration.py new file mode 100644 index 00000000000..0e53b9f6c78 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/model/oidc_configuration.py @@ -0,0 +1,398 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 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 + """ + 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 { + '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 + '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 + '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 + 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 + 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/userinfo_response.py b/clients/hydra/python/ory_hydra_client/model/oidc_user_info.py similarity index 94% rename from clients/hydra/python/ory_hydra_client/model/userinfo_response.py rename to clients/hydra/python/ory_hydra_client/model/oidc_user_info.py index ec3497b1ae5..bb5278ab8c0 100644 --- a/clients/hydra/python/ory_hydra_client/model/userinfo_response.py +++ b/clients/hydra/python/ory_hydra_client/model/oidc_user_info.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class UserinfoResponse(ModelNormal): +class OidcUserInfo(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -137,7 +138,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """UserinfoResponse - a model defined in OpenAPI + """OidcUserInfo - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -192,7 +193,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -200,14 +201,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -237,7 +242,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """UserinfoResponse - a model defined in OpenAPI + """OidcUserInfo - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -298,14 +303,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/pagination.py b/clients/hydra/python/ory_hydra_client/model/pagination.py new file mode 100644 index 00000000000..75cdc3398c3 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/model/pagination.py @@ -0,0 +1,274 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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/plugin_config_user.py b/clients/hydra/python/ory_hydra_client/model/pagination_headers.py similarity index 81% rename from clients/hydra/python/ory_hydra_client/model/plugin_config_user.py rename to clients/hydra/python/ory_hydra_client/model/pagination_headers.py index ffe491d3956..e7635bd9a5a 100644 --- a/clients/hydra/python/ory_hydra_client/model/plugin_config_user.py +++ b/clients/hydra/python/ory_hydra_client/model/pagination_headers.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class PluginConfigUser(ModelNormal): +class PaginationHeaders(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -81,8 +82,8 @@ def openapi_types(): and the value is attribute type. """ return { - 'gid': (int,), # noqa: E501 - 'uid': (int,), # noqa: E501 + 'link': (str,), # noqa: E501 + 'x_total_count': (str,), # noqa: E501 } @cached_property @@ -91,8 +92,8 @@ def discriminator(): attribute_map = { - 'gid': 'GID', # noqa: E501 - 'uid': 'UID', # noqa: E501 + 'link': 'link', # noqa: E501 + 'x_total_count': 'x-total-count', # noqa: E501 } read_only_vars = { @@ -103,7 +104,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """PluginConfigUser - a model defined in OpenAPI + """PaginationHeaders - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -136,12 +137,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - gid (int): g ID. [optional] # noqa: E501 - uid (int): UID. [optional] # noqa: E501 + 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) + _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', ()) @@ -149,14 +150,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -186,7 +191,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """PluginConfigUser - a model defined in OpenAPI + """PaginationHeaders - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -219,8 +224,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - gid (int): g ID. [optional] # noqa: E501 - uid (int): UID. [optional] # noqa: E501 + 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) @@ -230,14 +235,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/plugin_config.py b/clients/hydra/python/ory_hydra_client/model/plugin_config.py deleted file mode 100644 index 15cb790a8a1..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/plugin_config.py +++ /dev/null @@ -1,365 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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.plugin_config_args import PluginConfigArgs - from ory_hydra_client.model.plugin_config_interface import PluginConfigInterface - from ory_hydra_client.model.plugin_config_linux import PluginConfigLinux - from ory_hydra_client.model.plugin_config_network import PluginConfigNetwork - from ory_hydra_client.model.plugin_config_rootfs import PluginConfigRootfs - from ory_hydra_client.model.plugin_config_user import PluginConfigUser - from ory_hydra_client.model.plugin_env import PluginEnv - from ory_hydra_client.model.plugin_mount import PluginMount - globals()['PluginConfigArgs'] = PluginConfigArgs - globals()['PluginConfigInterface'] = PluginConfigInterface - globals()['PluginConfigLinux'] = PluginConfigLinux - globals()['PluginConfigNetwork'] = PluginConfigNetwork - globals()['PluginConfigRootfs'] = PluginConfigRootfs - globals()['PluginConfigUser'] = PluginConfigUser - globals()['PluginEnv'] = PluginEnv - globals()['PluginMount'] = PluginMount - - -class PluginConfig(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 { - 'args': (PluginConfigArgs,), # noqa: E501 - 'description': (str,), # noqa: E501 - 'documentation': (str,), # noqa: E501 - 'entrypoint': ([str],), # noqa: E501 - 'env': ([PluginEnv],), # noqa: E501 - 'interface': (PluginConfigInterface,), # noqa: E501 - 'ipc_host': (bool,), # noqa: E501 - 'linux': (PluginConfigLinux,), # noqa: E501 - 'mounts': ([PluginMount],), # noqa: E501 - 'network': (PluginConfigNetwork,), # noqa: E501 - 'pid_host': (bool,), # noqa: E501 - 'propagated_mount': (str,), # noqa: E501 - 'work_dir': (str,), # noqa: E501 - 'docker_version': (str,), # noqa: E501 - 'user': (PluginConfigUser,), # noqa: E501 - 'rootfs': (PluginConfigRootfs,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'args': 'Args', # noqa: E501 - 'description': 'Description', # noqa: E501 - 'documentation': 'Documentation', # noqa: E501 - 'entrypoint': 'Entrypoint', # noqa: E501 - 'env': 'Env', # noqa: E501 - 'interface': 'Interface', # noqa: E501 - 'ipc_host': 'IpcHost', # noqa: E501 - 'linux': 'Linux', # noqa: E501 - 'mounts': 'Mounts', # noqa: E501 - 'network': 'Network', # noqa: E501 - 'pid_host': 'PidHost', # noqa: E501 - 'propagated_mount': 'PropagatedMount', # noqa: E501 - 'work_dir': 'WorkDir', # noqa: E501 - 'docker_version': 'DockerVersion', # noqa: E501 - 'user': 'User', # noqa: E501 - 'rootfs': 'rootfs', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, args, description, documentation, entrypoint, env, interface, ipc_host, linux, mounts, network, pid_host, propagated_mount, work_dir, *args, **kwargs): # noqa: E501 - """PluginConfig - a model defined in OpenAPI - - Args: - args (PluginConfigArgs): - description (str): description - documentation (str): documentation - entrypoint ([str]): entrypoint - env ([PluginEnv]): env - interface (PluginConfigInterface): - ipc_host (bool): ipc host - linux (PluginConfigLinux): - mounts ([PluginMount]): mounts - network (PluginConfigNetwork): - pid_host (bool): pid host - propagated_mount (str): propagated mount - work_dir (str): work dir - - 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,) - docker_version (str): Docker Version used to create the plugin. [optional] # noqa: E501 - user (PluginConfigUser): [optional] # noqa: E501 - rootfs (PluginConfigRootfs): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.args = args - self.description = description - self.documentation = documentation - self.entrypoint = entrypoint - self.env = env - self.interface = interface - self.ipc_host = ipc_host - self.linux = linux - self.mounts = mounts - self.network = network - self.pid_host = pid_host - self.propagated_mount = propagated_mount - self.work_dir = work_dir - 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, description, documentation, entrypoint, env, interface, ipc_host, linux, mounts, network, pid_host, propagated_mount, work_dir, *args, **kwargs): # noqa: E501 - """PluginConfig - a model defined in OpenAPI - - Args: - args (PluginConfigArgs): - description (str): description - documentation (str): documentation - entrypoint ([str]): entrypoint - env ([PluginEnv]): env - interface (PluginConfigInterface): - ipc_host (bool): ipc host - linux (PluginConfigLinux): - mounts ([PluginMount]): mounts - network (PluginConfigNetwork): - pid_host (bool): pid host - propagated_mount (str): propagated mount - work_dir (str): work dir - - 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,) - docker_version (str): Docker Version used to create the plugin. [optional] # noqa: E501 - user (PluginConfigUser): [optional] # noqa: E501 - rootfs (PluginConfigRootfs): [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: - 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.args = args - self.description = description - self.documentation = documentation - self.entrypoint = entrypoint - self.env = env - self.interface = interface - self.ipc_host = ipc_host - self.linux = linux - self.mounts = mounts - self.network = network - self.pid_host = pid_host - self.propagated_mount = propagated_mount - self.work_dir = work_dir - 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/plugin_config_args.py b/clients/hydra/python/ory_hydra_client/model/plugin_config_args.py deleted file mode 100644 index 4e270a57769..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/plugin_config_args.py +++ /dev/null @@ -1,279 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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 PluginConfigArgs(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 { - 'description': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'settable': ([str],), # noqa: E501 - 'value': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'description': 'Description', # noqa: E501 - 'name': 'Name', # noqa: E501 - 'settable': 'Settable', # noqa: E501 - 'value': 'Value', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, description, name, settable, value, *args, **kwargs): # noqa: E501 - """PluginConfigArgs - a model defined in OpenAPI - - Args: - description (str): description - name (str): name - settable ([str]): settable - value ([str]): value - - 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.description = description - self.name = name - self.settable = settable - self.value = value - 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, description, name, settable, value, *args, **kwargs): # noqa: E501 - """PluginConfigArgs - a model defined in OpenAPI - - Args: - description (str): description - name (str): name - settable ([str]): settable - value ([str]): value - - 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: - 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.description = description - self.name = name - self.settable = settable - self.value = value - 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/plugin_config_interface.py b/clients/hydra/python/ory_hydra_client/model/plugin_config_interface.py deleted file mode 100644 index ab52240e79f..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/plugin_config_interface.py +++ /dev/null @@ -1,277 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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.plugin_interface_type import PluginInterfaceType - globals()['PluginInterfaceType'] = PluginInterfaceType - - -class PluginConfigInterface(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 { - 'socket': (str,), # noqa: E501 - 'types': ([PluginInterfaceType],), # noqa: E501 - 'protocol_scheme': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'socket': 'Socket', # noqa: E501 - 'types': 'Types', # noqa: E501 - 'protocol_scheme': 'ProtocolScheme', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, socket, types, *args, **kwargs): # noqa: E501 - """PluginConfigInterface - a model defined in OpenAPI - - Args: - socket (str): socket - types ([PluginInterfaceType]): types - - 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,) - protocol_scheme (str): Protocol to use for clients connecting to the plugin.. [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.socket = socket - self.types = types - 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, socket, types, *args, **kwargs): # noqa: E501 - """PluginConfigInterface - a model defined in OpenAPI - - Args: - socket (str): socket - types ([PluginInterfaceType]): types - - 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,) - protocol_scheme (str): Protocol to use for clients connecting to the plugin.. [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: - 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.socket = socket - self.types = types - 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/plugin_config_linux.py b/clients/hydra/python/ory_hydra_client/model/plugin_config_linux.py deleted file mode 100644 index 904a997f6df..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/plugin_config_linux.py +++ /dev/null @@ -1,279 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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.plugin_device import PluginDevice - globals()['PluginDevice'] = PluginDevice - - -class PluginConfigLinux(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_all_devices': (bool,), # noqa: E501 - 'capabilities': ([str],), # noqa: E501 - 'devices': ([PluginDevice],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'allow_all_devices': 'AllowAllDevices', # noqa: E501 - 'capabilities': 'Capabilities', # noqa: E501 - 'devices': 'Devices', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, allow_all_devices, capabilities, devices, *args, **kwargs): # noqa: E501 - """PluginConfigLinux - a model defined in OpenAPI - - Args: - allow_all_devices (bool): allow all devices - capabilities ([str]): capabilities - devices ([PluginDevice]): devices - - 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.allow_all_devices = allow_all_devices - self.capabilities = capabilities - self.devices = devices - 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, allow_all_devices, capabilities, devices, *args, **kwargs): # noqa: E501 - """PluginConfigLinux - a model defined in OpenAPI - - Args: - allow_all_devices (bool): allow all devices - capabilities ([str]): capabilities - devices ([PluginDevice]): devices - - 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: - 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.allow_all_devices = allow_all_devices - self.capabilities = capabilities - self.devices = devices - 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/plugin_config_network.py b/clients/hydra/python/ory_hydra_client/model/plugin_config_network.py deleted file mode 100644 index 45a49826104..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/plugin_config_network.py +++ /dev/null @@ -1,261 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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 PluginConfigNetwork(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 { - 'type': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'type': 'Type', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501 - """PluginConfigNetwork - a model defined in OpenAPI - - Args: - type (str): type - - 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.type = type - 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, type, *args, **kwargs): # noqa: E501 - """PluginConfigNetwork - a model defined in OpenAPI - - Args: - type (str): type - - 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: - 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.type = type - 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/plugin_device.py b/clients/hydra/python/ory_hydra_client/model/plugin_device.py deleted file mode 100644 index 39b78566362..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/plugin_device.py +++ /dev/null @@ -1,279 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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 PluginDevice(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 { - 'description': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'path': (str,), # noqa: E501 - 'settable': ([str],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'description': 'Description', # noqa: E501 - 'name': 'Name', # noqa: E501 - 'path': 'Path', # noqa: E501 - 'settable': 'Settable', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, description, name, path, settable, *args, **kwargs): # noqa: E501 - """PluginDevice - a model defined in OpenAPI - - Args: - description (str): description - name (str): name - path (str): path - settable ([str]): settable - - 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.description = description - self.name = name - self.path = path - self.settable = settable - 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, description, name, path, settable, *args, **kwargs): # noqa: E501 - """PluginDevice - a model defined in OpenAPI - - Args: - description (str): description - name (str): name - path (str): path - settable ([str]): settable - - 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: - 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.description = description - self.name = name - self.path = path - self.settable = settable - 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/plugin_interface_type.py b/clients/hydra/python/ory_hydra_client/model/plugin_interface_type.py deleted file mode 100644 index 1c611da433f..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/plugin_interface_type.py +++ /dev/null @@ -1,273 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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 PluginInterfaceType(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 { - 'capability': (str,), # noqa: E501 - 'prefix': (str,), # noqa: E501 - 'version': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'capability': 'Capability', # noqa: E501 - 'prefix': 'Prefix', # noqa: E501 - 'version': 'Version', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, capability, prefix, version, *args, **kwargs): # noqa: E501 - """PluginInterfaceType - a model defined in OpenAPI - - Args: - capability (str): capability - prefix (str): prefix - version (str): version - - 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.capability = capability - self.prefix = prefix - self.version = version - 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, capability, prefix, version, *args, **kwargs): # noqa: E501 - """PluginInterfaceType - a model defined in OpenAPI - - Args: - capability (str): capability - prefix (str): prefix - version (str): version - - 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: - 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.capability = capability - self.prefix = prefix - self.version = version - 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/plugin_mount.py b/clients/hydra/python/ory_hydra_client/model/plugin_mount.py deleted file mode 100644 index 446dd69866b..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/plugin_mount.py +++ /dev/null @@ -1,297 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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 PluginMount(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 { - 'description': (str,), # noqa: E501 - 'destination': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'options': ([str],), # noqa: E501 - 'settable': ([str],), # noqa: E501 - 'source': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'description': 'Description', # noqa: E501 - 'destination': 'Destination', # noqa: E501 - 'name': 'Name', # noqa: E501 - 'options': 'Options', # noqa: E501 - 'settable': 'Settable', # noqa: E501 - 'source': 'Source', # noqa: E501 - 'type': 'Type', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, description, destination, name, options, settable, source, type, *args, **kwargs): # noqa: E501 - """PluginMount - a model defined in OpenAPI - - Args: - description (str): description - destination (str): destination - name (str): name - options ([str]): options - settable ([str]): settable - source (str): source - type (str): type - - 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.description = description - self.destination = destination - self.name = name - self.options = options - self.settable = settable - self.source = source - self.type = type - 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, description, destination, name, options, settable, source, type, *args, **kwargs): # noqa: E501 - """PluginMount - a model defined in OpenAPI - - Args: - description (str): description - destination (str): destination - name (str): name - options ([str]): options - settable ([str]): settable - source (str): source - type (str): type - - 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: - 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.description = description - self.destination = destination - self.name = name - self.options = options - self.settable = settable - self.source = source - self.type = type - 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/plugin_settings.py b/clients/hydra/python/ory_hydra_client/model/plugin_settings.py deleted file mode 100644 index 5acf1ba83c4..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/plugin_settings.py +++ /dev/null @@ -1,287 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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.plugin_device import PluginDevice - from ory_hydra_client.model.plugin_mount import PluginMount - globals()['PluginDevice'] = PluginDevice - globals()['PluginMount'] = PluginMount - - -class PluginSettings(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 { - 'args': ([str],), # noqa: E501 - 'devices': ([PluginDevice],), # noqa: E501 - 'env': ([str],), # noqa: E501 - 'mounts': ([PluginMount],), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'args': 'Args', # noqa: E501 - 'devices': 'Devices', # noqa: E501 - 'env': 'Env', # noqa: E501 - 'mounts': 'Mounts', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, args, devices, env, mounts, *args, **kwargs): # noqa: E501 - """PluginSettings - a model defined in OpenAPI - - Args: - args ([str]): args - devices ([PluginDevice]): devices - env ([str]): env - mounts ([PluginMount]): mounts - - 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.args = args - self.devices = devices - self.env = env - self.mounts = mounts - 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, devices, env, mounts, *args, **kwargs): # noqa: E501 - """PluginSettings - a model defined in OpenAPI - - Args: - args ([str]): args - devices ([PluginDevice]): devices - env ([str]): env - mounts ([PluginMount]): mounts - - 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: - 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.args = args - self.devices = devices - self.env = env - self.mounts = mounts - 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_request.py b/clients/hydra/python/ory_hydra_client/model/reject_o_auth2_request.py similarity index 89% rename from clients/hydra/python/ory_hydra_client/model/reject_request.py rename to clients/hydra/python/ory_hydra_client/model/reject_o_auth2_request.py index 6c499bfcf18..6cb006258d4 100644 --- a/clients/hydra/python/ory_hydra_client/model/reject_request.py +++ b/clients/hydra/python/ory_hydra_client/model/reject_o_auth2_request.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class RejectRequest(ModelNormal): +class RejectOAuth2Request(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -109,7 +110,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """RejectRequest - a model defined in OpenAPI + """RejectOAuth2Request - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -150,7 +151,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -158,14 +159,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -195,7 +200,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """RejectRequest - a model defined in OpenAPI + """RejectOAuth2Request - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -242,14 +247,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/request_was_handled_response.py b/clients/hydra/python/ory_hydra_client/model/request_was_handled_response.py deleted file mode 100644 index 6b5de95ad79..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/request_was_handled_response.py +++ /dev/null @@ -1,261 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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 RequestWasHandledResponse(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 - """RequestWasHandledResponse - a model defined in OpenAPI - - Args: - redirect_to (str): Original request URL to which you should redirect the user if request was already handled. - - 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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 - """RequestWasHandledResponse - a model defined in OpenAPI - - Args: - redirect_to (str): Original request URL to which you should redirect the user if request was already handled. - - 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: - 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/string_slice_pipe_delimiter.py b/clients/hydra/python/ory_hydra_client/model/string_slice_json_format.py similarity index 88% rename from clients/hydra/python/ory_hydra_client/model/string_slice_pipe_delimiter.py rename to clients/hydra/python/ory_hydra_client/model/string_slice_json_format.py index 227f6f02d3e..e13ada1d264 100644 --- a/clients/hydra/python/ory_hydra_client/model/string_slice_pipe_delimiter.py +++ b/clients/hydra/python/ory_hydra_client/model/string_slice_json_format.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class StringSlicePipeDelimiter(ModelSimple): +class StringSliceJSONFormat(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -96,7 +97,7 @@ def discriminator(): @convert_js_args_to_python_args def __init__(self, *args, **kwargs): - """StringSlicePipeDelimiter - a model defined in OpenAPI + """StringSliceJSONFormat - a model defined in OpenAPI Note that value can be passed either in args or in kwargs, but not in both. @@ -157,14 +158,18 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 @@ -186,7 +191,7 @@ def __init__(self, *args, **kwargs): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): - """StringSlicePipeDelimiter - a model defined in OpenAPI + """StringSliceJSONFormat - a model defined in OpenAPI Note that value can be passed either in args or in kwargs, but not in both. @@ -249,14 +254,18 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/token_pagination.py b/clients/hydra/python/ory_hydra_client/model/token_pagination.py new file mode 100644 index 00000000000..8c424b67233 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/model/token_pagination.py @@ -0,0 +1,274 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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/oauth2_token_response.py b/clients/hydra/python/ory_hydra_client/model/token_pagination_headers.py similarity index 81% rename from clients/hydra/python/ory_hydra_client/model/oauth2_token_response.py rename to clients/hydra/python/ory_hydra_client/model/token_pagination_headers.py index e71a4200511..24e749683af 100644 --- a/clients/hydra/python/ory_hydra_client/model/oauth2_token_response.py +++ b/clients/hydra/python/ory_hydra_client/model/token_pagination_headers.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class Oauth2TokenResponse(ModelNormal): +class TokenPaginationHeaders(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -81,12 +82,8 @@ def openapi_types(): 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 + 'link': (str,), # noqa: E501 + 'x_total_count': (str,), # noqa: E501 } @cached_property @@ -95,12 +92,8 @@ def discriminator(): 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 + 'link': 'link', # noqa: E501 + 'x_total_count': 'x-total-count', # noqa: E501 } read_only_vars = { @@ -111,7 +104,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """Oauth2TokenResponse - a model defined in OpenAPI + """TokenPaginationHeaders - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -144,16 +137,12 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - access_token (str): [optional] # noqa: E501 - expires_in (int): [optional] # noqa: E501 - id_token (str): [optional] # noqa: E501 - refresh_token (str): [optional] # noqa: E501 - scope (str): [optional] # noqa: E501 - token_type (str): [optional] # noqa: E501 + 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) + _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', ()) @@ -161,14 +150,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -198,7 +191,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """Oauth2TokenResponse - a model defined in OpenAPI + """TokenPaginationHeaders - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -231,12 +224,8 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - access_token (str): [optional] # noqa: E501 - expires_in (int): [optional] # noqa: E501 - id_token (str): [optional] # noqa: E501 - refresh_token (str): [optional] # noqa: E501 - scope (str): [optional] # noqa: E501 - token_type (str): [optional] # noqa: E501 + 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) @@ -246,14 +235,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 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 new file mode 100644 index 00000000000..4a00ce15b87 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/model/token_pagination_request_parameters.py @@ -0,0 +1,274 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 new file mode 100644 index 00000000000..773d28fd8e1 --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/model/token_pagination_response_headers.py @@ -0,0 +1,268 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_jwt_grant_issuer_body.py b/clients/hydra/python/ory_hydra_client/model/trust_o_auth2_jwt_grant_issuer.py similarity index 83% rename from clients/hydra/python/ory_hydra_client/model/trust_jwt_grant_issuer_body.py rename to clients/hydra/python/ory_hydra_client/model/trust_o_auth2_jwt_grant_issuer.py index 9aaca3d76ff..ae42d8a6c35 100644 --- a/clients/hydra/python/ory_hydra_client/model/trust_jwt_grant_issuer_body.py +++ b/clients/hydra/python/ory_hydra_client/model/trust_o_auth2_jwt_grant_issuer.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,11 +31,11 @@ def lazy_import(): - from ory_hydra_client.model.json_web_key import JSONWebKey - globals()['JSONWebKey'] = JSONWebKey + from ory_hydra_client.model.json_web_key import JsonWebKey + globals()['JsonWebKey'] = JsonWebKey -class TrustJwtGrantIssuerBody(ModelNormal): +class TrustOAuth2JwtGrantIssuer(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -89,8 +90,9 @@ def openapi_types(): return { 'expires_at': (datetime,), # noqa: E501 'issuer': (str,), # noqa: E501 - 'jwk': (JSONWebKey,), # noqa: E501 + 'jwk': (JsonWebKey,), # noqa: E501 'scope': ([str],), # noqa: E501 + 'allow_any_subject': (bool,), # noqa: E501 'subject': (str,), # noqa: E501 } @@ -104,6 +106,7 @@ def discriminator(): 'issuer': 'issuer', # noqa: E501 'jwk': 'jwk', # noqa: E501 'scope': 'scope', # noqa: E501 + 'allow_any_subject': 'allow_any_subject', # noqa: E501 'subject': 'subject', # noqa: E501 } @@ -114,15 +117,14 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, expires_at, issuer, jwk, scope, subject, *args, **kwargs): # noqa: E501 - """TrustJwtGrantIssuerBody - a model defined in OpenAPI + 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): + jwk (JsonWebKey): scope ([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. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -155,10 +157,12 @@ def _from_openapi_data(cls, expires_at, issuer, jwk, scope, subject, *args, **kw 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) + _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', ()) @@ -166,14 +170,18 @@ def _from_openapi_data(cls, expires_at, issuer, jwk, scope, subject, *args, **kw self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -186,7 +194,6 @@ def _from_openapi_data(cls, expires_at, issuer, jwk, scope, subject, *args, **kw self.issuer = issuer self.jwk = jwk self.scope = scope - 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 \ @@ -207,15 +214,14 @@ def _from_openapi_data(cls, expires_at, issuer, jwk, scope, subject, *args, **kw ]) @convert_js_args_to_python_args - def __init__(self, expires_at, issuer, jwk, scope, subject, *args, **kwargs): # noqa: E501 - """TrustJwtGrantIssuerBody - a model defined in OpenAPI + 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): + jwk (JsonWebKey): scope ([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. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -248,6 +254,8 @@ def __init__(self, expires_at, issuer, jwk, scope, subject, *args, **kwargs): # 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) @@ -257,14 +265,18 @@ def __init__(self, expires_at, issuer, jwk, scope, subject, *args, **kwargs): # _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 @@ -277,7 +289,6 @@ def __init__(self, expires_at, issuer, jwk, scope, subject, *args, **kwargs): # self.issuer = issuer self.jwk = jwk self.scope = scope - 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 \ diff --git a/clients/hydra/python/ory_hydra_client/model/trusted_jwt_grant_issuer.py b/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuer.py similarity index 83% rename from clients/hydra/python/ory_hydra_client/model/trusted_jwt_grant_issuer.py rename to clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuer.py index 1e5dbd1acd6..bcaa45191fa 100644 --- a/clients/hydra/python/ory_hydra_client/model/trusted_jwt_grant_issuer.py +++ b/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuer.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,11 +31,11 @@ def lazy_import(): - from ory_hydra_client.model.trusted_json_web_key import TrustedJsonWebKey - globals()['TrustedJsonWebKey'] = TrustedJsonWebKey + from ory_hydra_client.model.trusted_o_auth2_jwt_grant_json_web_key import TrustedOAuth2JwtGrantJsonWebKey + globals()['TrustedOAuth2JwtGrantJsonWebKey'] = TrustedOAuth2JwtGrantJsonWebKey -class TrustedJwtGrantIssuer(ModelNormal): +class TrustedOAuth2JwtGrantIssuer(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -87,11 +88,12 @@ def openapi_types(): """ 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': (TrustedJsonWebKey,), # noqa: E501 + 'public_key': (TrustedOAuth2JwtGrantJsonWebKey,), # noqa: E501 'scope': ([str],), # noqa: E501 'subject': (str,), # noqa: E501 } @@ -102,6 +104,7 @@ def discriminator(): 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 @@ -119,7 +122,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TrustedJwtGrantIssuer - a model defined in OpenAPI + """TrustedOAuth2JwtGrantIssuer - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -152,17 +155,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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 (TrustedJsonWebKey): [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) + _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', ()) @@ -170,14 +174,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -207,7 +215,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """TrustedJwtGrantIssuer - a model defined in OpenAPI + """TrustedOAuth2JwtGrantIssuer - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -240,11 +248,12 @@ def __init__(self, *args, **kwargs): # noqa: E501 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 (TrustedJsonWebKey): [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 """ @@ -256,14 +265,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 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 new file mode 100644 index 00000000000..b12f6af61ce --- /dev/null +++ b/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_issuers.py @@ -0,0 +1,292 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_json_web_key.py b/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_json_web_key.py similarity index 88% rename from clients/hydra/python/ory_hydra_client/model/trusted_json_web_key.py rename to clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_json_web_key.py index 8491009817d..25b36c2727e 100644 --- a/clients/hydra/python/ory_hydra_client/model/trusted_json_web_key.py +++ b/clients/hydra/python/ory_hydra_client/model/trusted_o_auth2_jwt_grant_json_web_key.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -30,7 +31,7 @@ -class TrustedJsonWebKey(ModelNormal): +class TrustedOAuth2JwtGrantJsonWebKey(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -103,7 +104,7 @@ def discriminator(): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """TrustedJsonWebKey - a model defined in OpenAPI + """TrustedOAuth2JwtGrantJsonWebKey - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -141,7 +142,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -149,14 +150,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -186,7 +191,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 - """TrustedJsonWebKey - a model defined in OpenAPI + """TrustedOAuth2JwtGrantJsonWebKey - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -230,14 +235,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/version.py b/clients/hydra/python/ory_hydra_client/model/version.py index 89bc43bdacd..6904845c27d 100644 --- a/clients/hydra/python/ory_hydra_client/model/version.py +++ b/clients/hydra/python/ory_hydra_client/model/version.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -138,7 +139,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _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', ()) @@ -146,14 +147,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self = super(OpenApiModel, cls).__new__(cls) if args: - 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__,), - ) + 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 @@ -226,14 +231,18 @@ def __init__(self, *args, **kwargs): # noqa: E501 _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: - 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__,), - ) + 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 diff --git a/clients/hydra/python/ory_hydra_client/model/volume.py b/clients/hydra/python/ory_hydra_client/model/volume.py deleted file mode 100644 index 628d316c035..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/volume.py +++ /dev/null @@ -1,309 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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.volume_usage_data import VolumeUsageData - globals()['VolumeUsageData'] = VolumeUsageData - - -class Volume(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 { - 'driver': (str,), # noqa: E501 - 'labels': ({str: (str,)},), # noqa: E501 - 'mountpoint': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'options': ({str: (str,)},), # noqa: E501 - 'scope': (str,), # noqa: E501 - 'created_at': (str,), # noqa: E501 - 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'usage_data': (VolumeUsageData,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'driver': 'Driver', # noqa: E501 - 'labels': 'Labels', # noqa: E501 - 'mountpoint': 'Mountpoint', # noqa: E501 - 'name': 'Name', # noqa: E501 - 'options': 'Options', # noqa: E501 - 'scope': 'Scope', # noqa: E501 - 'created_at': 'CreatedAt', # noqa: E501 - 'status': 'Status', # noqa: E501 - 'usage_data': 'UsageData', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, driver, labels, mountpoint, name, options, scope, *args, **kwargs): # noqa: E501 - """Volume - a model defined in OpenAPI - - Args: - driver (str): Name of the volume driver used by the volume. - labels ({str: (str,)}): User-defined key/value metadata. - mountpoint (str): Mount path of the volume on the host. - name (str): Name of the volume. - options ({str: (str,)}): The driver specific options used when creating the volume. - scope (str): The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - - 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,) - created_at (str): Date/Time the volume was created.. [optional] # noqa: E501 - status (bool, date, datetime, dict, float, int, list, str, none_type): Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature.. [optional] # noqa: E501 - usage_data (VolumeUsageData): [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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.driver = driver - self.labels = labels - self.mountpoint = mountpoint - self.name = name - self.options = options - 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, driver, labels, mountpoint, name, options, scope, *args, **kwargs): # noqa: E501 - """Volume - a model defined in OpenAPI - - Args: - driver (str): Name of the volume driver used by the volume. - labels ({str: (str,)}): User-defined key/value metadata. - mountpoint (str): Mount path of the volume on the host. - name (str): Name of the volume. - options ({str: (str,)}): The driver specific options used when creating the volume. - scope (str): The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - - 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,) - created_at (str): Date/Time the volume was created.. [optional] # noqa: E501 - status (bool, date, datetime, dict, float, int, list, str, none_type): Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature.. [optional] # noqa: E501 - usage_data (VolumeUsageData): [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: - 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.driver = driver - self.labels = labels - self.mountpoint = mountpoint - self.name = name - self.options = options - 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/volume_usage_data.py b/clients/hydra/python/ory_hydra_client/model/volume_usage_data.py deleted file mode 100644 index cf8f323d3f8..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/volume_usage_data.py +++ /dev/null @@ -1,267 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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 VolumeUsageData(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 { - 'ref_count': (int,), # noqa: E501 - 'size': (int,), # noqa: E501 - } - - @cached_property - def discriminator(): - return None - - - attribute_map = { - 'ref_count': 'RefCount', # noqa: E501 - 'size': 'Size', # noqa: E501 - } - - read_only_vars = { - } - - _composed_schemas = {} - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls, ref_count, size, *args, **kwargs): # noqa: E501 - """VolumeUsageData - a model defined in OpenAPI - - Args: - ref_count (int): The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - size (int): Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - - 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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.ref_count = ref_count - self.size = size - 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, ref_count, size, *args, **kwargs): # noqa: E501 - """VolumeUsageData - a model defined in OpenAPI - - Args: - ref_count (int): The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - size (int): Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - - 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: - 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.ref_count = ref_count - self.size = size - 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/well_known.py b/clients/hydra/python/ory_hydra_client/model/well_known.py deleted file mode 100644 index 7b54d9381b8..00000000000 --- a/clients/hydra/python/ory_hydra_client/model/well_known.py +++ /dev/null @@ -1,377 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - 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 WellKnown(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 { - 'authorization_endpoint': (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 - '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 - '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_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 - '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 - '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_signing_alg_values_supported, issuer, jwks_uri, response_types_supported, subject_types_supported, token_endpoint, *args, **kwargs): # noqa: E501 - """WellKnown - a model defined in OpenAPI - - Args: - authorization_endpoint (str): URL of the OP's OAuth 2.0 Authorization Endpoint. - id_token_signing_alg_values_supported ([str]): 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): 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): 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]): 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]): JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. - token_endpoint (str): URL of the OP's OAuth 2.0 Token Endpoint - - 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): 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): Boolean value specifying whether the OP supports back-channel logout, with true indicating support.. [optional] # noqa: E501 - claims_parameter_supported (bool): Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.. [optional] # noqa: E501 - claims_supported ([str]): 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]): JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.. [optional] # noqa: E501 - end_session_endpoint (str): 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): 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): Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.. [optional] # noqa: E501 - grant_types_supported ([str]): JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.. [optional] # noqa: E501 - registration_endpoint (str): URL of the OP's Dynamic Client Registration Endpoint.. [optional] # noqa: E501 - request_object_signing_alg_values_supported ([str]): 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): Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.. [optional] # noqa: E501 - request_uri_parameter_supported (bool): 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): 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]): JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.. [optional] # noqa: E501 - revocation_endpoint (str): URL of the authorization server's OAuth 2.0 revocation endpoint.. [optional] # noqa: E501 - scopes_supported ([str]): SON 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]): 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): URL of the OP's UserInfo Endpoint.. [optional] # noqa: E501 - userinfo_signing_alg_values_supported ([str]): 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', ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - 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_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 - 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_signing_alg_values_supported, issuer, jwks_uri, response_types_supported, subject_types_supported, token_endpoint, *args, **kwargs): # noqa: E501 - """WellKnown - a model defined in OpenAPI - - Args: - authorization_endpoint (str): URL of the OP's OAuth 2.0 Authorization Endpoint. - id_token_signing_alg_values_supported ([str]): 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): 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): 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]): 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]): JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. - token_endpoint (str): URL of the OP's OAuth 2.0 Token Endpoint - - 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): 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): Boolean value specifying whether the OP supports back-channel logout, with true indicating support.. [optional] # noqa: E501 - claims_parameter_supported (bool): Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.. [optional] # noqa: E501 - claims_supported ([str]): 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]): JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server.. [optional] # noqa: E501 - end_session_endpoint (str): 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): 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): Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.. [optional] # noqa: E501 - grant_types_supported ([str]): JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.. [optional] # noqa: E501 - registration_endpoint (str): URL of the OP's Dynamic Client Registration Endpoint.. [optional] # noqa: E501 - request_object_signing_alg_values_supported ([str]): 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): Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.. [optional] # noqa: E501 - request_uri_parameter_supported (bool): 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): 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]): JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.. [optional] # noqa: E501 - revocation_endpoint (str): URL of the authorization server's OAuth 2.0 revocation endpoint.. [optional] # noqa: E501 - scopes_supported ([str]): SON 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]): 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): URL of the OP's UserInfo Endpoint.. [optional] # noqa: E501 - userinfo_signing_alg_values_supported ([str]): 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: - 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_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 - 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 index 12136c4e9e4..f323e2a5d3e 100644 --- a/clients/hydra/python/ory_hydra_client/model_utils.py +++ b/clients/hydra/python/ory_hydra_client/model_utils.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -16,6 +17,7 @@ import pprint import re import tempfile +import uuid from dateutil.parser import parse @@ -41,7 +43,9 @@ def wrapped_init(_self, *args, **kwargs): """ 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__) + kwargs = change_keys_js_to_python( + kwargs, _self if isinstance( + _self, type) else _self.__class__) return fn(_self, *args, **kwargs) return wrapped_init @@ -66,6 +70,7 @@ def __get__(self, instance, cls=None): 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 @@ -90,6 +95,7 @@ def allows_single_value_input(cls): 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 @@ -192,7 +198,7 @@ def __copy__(self): if self.get("_spec_property_naming", False): return cls._new_from_openapi_data(**self.__dict__) else: - return new_cls.__new__(cls, **self.__dict__) + return cls.__new__(cls, **self.__dict__) def __deepcopy__(self, memo): cls = self.__class__ @@ -223,7 +229,6 @@ def __new__(cls, *args, **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 @@ -270,7 +275,7 @@ def __new__(cls, *args, **kwargs): # 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, []) + cls, discr_propertyname_py, discr_value, []) if new_cls is None: path_to_item = kwargs.get('_path_to_item', ()) disc_prop_value = kwargs.get( @@ -325,7 +330,6 @@ def __new__(cls, *args, **kwargs): return new_inst - @classmethod @convert_js_args_to_python_args def _new_from_openapi_data(cls, *args, **kwargs): @@ -344,7 +348,6 @@ def _new_from_openapi_data(cls, *args, **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 @@ -391,7 +394,7 @@ def _new_from_openapi_data(cls, *args, **kwargs): # 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, []) + cls, discr_propertyname_py, discr_value, []) if new_cls is None: path_to_item = kwargs.get('_path_to_item', ()) disc_prop_value = kwargs.get( @@ -436,7 +439,6 @@ def _new_from_openapi_data(cls, *args, **kwargs): # 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 @@ -737,7 +739,8 @@ def __eq__(self, other): UPCONVERSION_TYPE_PAIRS = ( (str, datetime), (str, date), - (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + (int, float), (list, ModelComposed), (dict, ModelComposed), (str, ModelComposed), @@ -890,8 +893,8 @@ def is_json_validation_enabled(schema_keyword, configuration=None): """ return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) def check_validations( @@ -1029,9 +1032,9 @@ def check_validations( 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'] - ) + 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. @@ -1122,6 +1125,7 @@ def remove_uncoercible(required_types_classes, current_item, spec_property_namin results_classes.append(required_type_class) return results_classes + def get_discriminated_classes(cls): """ Returns all the classes that a discriminator converts to @@ -1320,7 +1324,7 @@ def get_discriminator_class(model_class, # 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', ()) + \ + 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 @@ -1328,7 +1332,7 @@ def get_discriminator_class(model_class, # 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) + cls, discr_name, discr_value, cls_visited) if used_model_class is not None: return used_model_class return used_model_class @@ -1399,7 +1403,13 @@ def deserialize_file(response_data, configuration, content_disposition=None): if content_disposition: filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + 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: @@ -1489,9 +1499,11 @@ def is_type_nullable(input_type): 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 + if is_type_nullable(t): + return True for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): return True + if is_type_nullable(t): + return True return False @@ -1506,7 +1518,7 @@ def is_valid_type(input_class_simple, valid_classes): bool """ if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): + 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 ( @@ -1564,7 +1576,9 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, input_class_simple = get_simple_class(input_value) valid_type = is_valid_type(input_class_simple, valid_classes) if not valid_type: - if configuration: + 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, @@ -1657,7 +1671,11 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} - extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item + + 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: @@ -1677,24 +1695,24 @@ def model_to_dict(model_instance, serialize=True): 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 + 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, @@ -1846,13 +1864,15 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): try: if not single_value_input: if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data(**model_kwargs, **constant_kwargs) + 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) + 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: @@ -2027,11 +2047,13 @@ def validate_get_composed_info(constant_args, model_args, self): 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] + composed_instances + 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 + 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 f4353ae2faf..48dde12f4f0 100644 --- a/clients/hydra/python/ory_hydra_client/models/__init__.py +++ b/clients/hydra/python/ory_hydra_client/models/__init__.py @@ -9,50 +9,46 @@ # import sys # sys.setrecursionlimit(n) -from ory_hydra_client.model.accept_consent_request import AcceptConsentRequest -from ory_hydra_client.model.accept_login_request import AcceptLoginRequest -from ory_hydra_client.model.completed_request import CompletedRequest -from ory_hydra_client.model.consent_request import ConsentRequest -from ory_hydra_client.model.consent_request_session import ConsentRequestSession -from ory_hydra_client.model.container_wait_ok_body_error import ContainerWaitOKBodyError -from ory_hydra_client.model.flush_inactive_o_auth2_tokens_request import FlushInactiveOAuth2TokensRequest +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.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.json_web_key import JSONWebKey -from ory_hydra_client.model.json_web_key_set import JSONWebKeySet -from ory_hydra_client.model.json_error import JsonError -from ory_hydra_client.model.json_web_key_set_generator_request import JsonWebKeySetGeneratorRequest -from ory_hydra_client.model.login_request import LoginRequest -from ory_hydra_client.model.logout_request import LogoutRequest +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_token_introspection import OAuth2TokenIntrospection -from ory_hydra_client.model.oauth2_token_response import Oauth2TokenResponse -from ory_hydra_client.model.open_id_connect_context import OpenIDConnectContext -from ory_hydra_client.model.patch_document import PatchDocument -from ory_hydra_client.model.patch_request import PatchRequest -from ory_hydra_client.model.plugin_config import PluginConfig -from ory_hydra_client.model.plugin_config_args import PluginConfigArgs -from ory_hydra_client.model.plugin_config_interface import PluginConfigInterface -from ory_hydra_client.model.plugin_config_linux import PluginConfigLinux -from ory_hydra_client.model.plugin_config_network import PluginConfigNetwork -from ory_hydra_client.model.plugin_config_rootfs import PluginConfigRootfs -from ory_hydra_client.model.plugin_config_user import PluginConfigUser -from ory_hydra_client.model.plugin_device import PluginDevice -from ory_hydra_client.model.plugin_env import PluginEnv -from ory_hydra_client.model.plugin_interface_type import PluginInterfaceType -from ory_hydra_client.model.plugin_mount import PluginMount -from ory_hydra_client.model.plugin_settings import PluginSettings -from ory_hydra_client.model.previous_consent_session import PreviousConsentSession -from ory_hydra_client.model.reject_request import RejectRequest -from ory_hydra_client.model.request_was_handled_response import RequestWasHandledResponse -from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter -from ory_hydra_client.model.trust_jwt_grant_issuer_body import TrustJwtGrantIssuerBody -from ory_hydra_client.model.trusted_json_web_key import TrustedJsonWebKey -from ory_hydra_client.model.trusted_jwt_grant_issuer import TrustedJwtGrantIssuer -from ory_hydra_client.model.trusted_jwt_grant_issuers import TrustedJwtGrantIssuers -from ory_hydra_client.model.userinfo_response import UserinfoResponse +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.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.version import Version -from ory_hydra_client.model.volume import Volume -from ory_hydra_client.model.volume_usage_data import VolumeUsageData -from ory_hydra_client.model.well_known import WellKnown diff --git a/clients/hydra/python/ory_hydra_client/rest.py b/clients/hydra/python/ory_hydra_client/rest.py index 362bceb2297..54de2a55866 100644 --- a/clients/hydra/python/ory_hydra_client/rest.py +++ b/clients/hydra/python/ory_hydra_client/rest.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -74,7 +75,8 @@ def __init__(self, configuration, pools_size=4, maxsize=None): maxsize = 4 # https pool manager - if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ''): + 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, @@ -147,7 +149,8 @@ def request(self, method, url, query_params=None, headers=None, 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)): + if ('Content-Type' not in headers) or (re.search('json', + headers['Content-Type'], re.IGNORECASE)): request_body = None if body is not None: request_body = json.dumps(body) @@ -294,14 +297,17 @@ def PATCH(self, url, headers=None, query_params=None, post_params=None, body=body) # end of class RESTClientObject + + def is_ipv4(target): """ Test if IPv4 address or not """ try: - chk = ipaddress.IPv4Address(target) - return True + chk = ipaddress.IPv4Address(target) + return True except ipaddress.AddressValueError: - return False + return False + def in_ipv4net(target, net): """ Test if target belongs to given IPv4 network @@ -317,6 +323,7 @@ def in_ipv4net(target, net): 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. @@ -329,18 +336,18 @@ def should_bypass_proxies(url, no_proxy=None): return True # special cases - if no_proxy in [None , '']: + if no_proxy in [None, '']: return False if no_proxy == '*': return True - no_proxy = no_proxy.lower().replace(' ',''); + 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} ) + if in_ipv4net(parsed.hostname, item): + return True + return proxy_bypass_environment(parsed.hostname, {'no': no_proxy}) diff --git a/clients/hydra/python/setup.py b/clients/hydra/python/setup.py index 11d9f1e6b2a..84cedadd811 100644 --- a/clients/hydra/python/setup.py +++ b/clients/hydra/python/setup.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -11,7 +12,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "ory-hydra-client" -VERSION = "v1.11.0" +VERSION = "v2.0.1" # To install the library, run the following # # python setup.py install @@ -27,16 +28,17 @@ setup( name=NAME, version=VERSION, - description="ORY Hydra", + description="Ory Hydra API", author="OpenAPI Generator community", - author_email="team@openapitools.org", + author_email="hi@ory.sh", url="https://github.com/ory/sdk", - keywords=["OpenAPI", "OpenAPI-Generator", "ORY Hydra"], + 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="""\ - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 """ ) diff --git a/clients/hydra/python/test/test_accept_consent_request.py b/clients/hydra/python/test/test_accept_consent_request.py deleted file mode 100644 index d1f31bc0c4c..00000000000 --- a/clients/hydra/python/test/test_accept_consent_request.py +++ /dev/null @@ -1,39 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.consent_request_session import ConsentRequestSession -from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter -globals()['ConsentRequestSession'] = ConsentRequestSession -globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter -from ory_hydra_client.model.accept_consent_request import AcceptConsentRequest - - -class TestAcceptConsentRequest(unittest.TestCase): - """AcceptConsentRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAcceptConsentRequest(self): - """Test AcceptConsentRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = AcceptConsentRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_accept_login_request.py b/clients/hydra/python/test/test_accept_login_request.py deleted file mode 100644 index 2398a701321..00000000000 --- a/clients/hydra/python/test/test_accept_login_request.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter -globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter -from ory_hydra_client.model.accept_login_request import AcceptLoginRequest - - -class TestAcceptLoginRequest(unittest.TestCase): - """AcceptLoginRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAcceptLoginRequest(self): - """Test AcceptLoginRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = AcceptLoginRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() 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 new file mode 100644 index 00000000000..8af85a6b2b7 --- /dev/null +++ b/clients/hydra/python/test/test_accept_o_auth2_consent_request.py @@ -0,0 +1,40 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +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 + + +class TestAcceptOAuth2ConsentRequest(unittest.TestCase): + """AcceptOAuth2ConsentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAcceptOAuth2ConsentRequest(self): + """Test AcceptOAuth2ConsentRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = AcceptOAuth2ConsentRequest() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..90555827218 --- /dev/null +++ b/clients/hydra/python/test/test_accept_o_auth2_consent_request_session.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.accept_o_auth2_consent_request_session import AcceptOAuth2ConsentRequestSession + + +class TestAcceptOAuth2ConsentRequestSession(unittest.TestCase): + """AcceptOAuth2ConsentRequestSession unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAcceptOAuth2ConsentRequestSession(self): + """Test AcceptOAuth2ConsentRequestSession""" + # FIXME: construct object with mandatory attributes with example values + # model = AcceptOAuth2ConsentRequestSession() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..f1942549b95 --- /dev/null +++ b/clients/hydra/python/test/test_accept_o_auth2_login_request.py @@ -0,0 +1,38 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 +globals()['StringSliceJSONFormat'] = StringSliceJSONFormat +from ory_hydra_client.model.accept_o_auth2_login_request import AcceptOAuth2LoginRequest + + +class TestAcceptOAuth2LoginRequest(unittest.TestCase): + """AcceptOAuth2LoginRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAcceptOAuth2LoginRequest(self): + """Test AcceptOAuth2LoginRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = AcceptOAuth2LoginRequest() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_admin_api.py b/clients/hydra/python/test/test_admin_api.py deleted file mode 100644 index a0d547112bf..00000000000 --- a/clients/hydra/python/test/test_admin_api.py +++ /dev/null @@ -1,266 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import ory_hydra_client -from ory_hydra_client.api.admin_api import AdminApi # noqa: E501 - - -class TestAdminApi(unittest.TestCase): - """AdminApi unit test stubs""" - - def setUp(self): - self.api = AdminApi() # noqa: E501 - - def tearDown(self): - pass - - def test_accept_consent_request(self): - """Test case for accept_consent_request - - Accept a Consent Request # noqa: E501 - """ - pass - - def test_accept_login_request(self): - """Test case for accept_login_request - - Accept a Login Request # noqa: E501 - """ - pass - - def test_accept_logout_request(self): - """Test case for accept_logout_request - - Accept a Logout Request # noqa: E501 - """ - pass - - def test_create_json_web_key_set(self): - """Test case for create_json_web_key_set - - Generate a New JSON Web Key # noqa: E501 - """ - pass - - def test_create_o_auth2_client(self): - """Test case for create_o_auth2_client - - Create an OAuth 2.0 Client # noqa: E501 - """ - pass - - def test_delete_json_web_key(self): - """Test case for delete_json_web_key - - Delete a JSON Web Key # noqa: E501 - """ - pass - - def test_delete_json_web_key_set(self): - """Test case for delete_json_web_key_set - - Delete a JSON Web Key Set # noqa: E501 - """ - pass - - def test_delete_o_auth2_client(self): - """Test case for delete_o_auth2_client - - Deletes an OAuth 2.0 Client # noqa: E501 - """ - pass - - def test_delete_o_auth2_token(self): - """Test case for delete_o_auth2_token - - Delete OAuth2 Access Tokens from a Client # noqa: E501 - """ - pass - - def test_delete_trusted_jwt_grant_issuer(self): - """Test case for delete_trusted_jwt_grant_issuer - - Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 - """ - pass - - def test_flush_inactive_o_auth2_tokens(self): - """Test case for flush_inactive_o_auth2_tokens - - Flush Expired OAuth2 Access Tokens # noqa: E501 - """ - pass - - def test_get_consent_request(self): - """Test case for get_consent_request - - Get Consent Request Information # noqa: E501 - """ - pass - - def test_get_json_web_key(self): - """Test case for get_json_web_key - - Fetch a JSON Web Key # noqa: E501 - """ - pass - - def test_get_json_web_key_set(self): - """Test case for get_json_web_key_set - - Retrieve a JSON Web Key Set # noqa: E501 - """ - pass - - def test_get_login_request(self): - """Test case for get_login_request - - Get a Login Request # noqa: E501 - """ - pass - - def test_get_logout_request(self): - """Test case for get_logout_request - - Get a Logout Request # noqa: E501 - """ - pass - - def test_get_o_auth2_client(self): - """Test case for get_o_auth2_client - - Get an OAuth 2.0 Client # noqa: E501 - """ - pass - - def test_get_trusted_jwt_grant_issuer(self): - """Test case for get_trusted_jwt_grant_issuer - - Get a Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 - """ - pass - - def test_get_version(self): - """Test case for get_version - - Get Service Version # noqa: E501 - """ - pass - - def test_introspect_o_auth2_token(self): - """Test case for introspect_o_auth2_token - - Introspect OAuth2 Tokens # noqa: E501 - """ - pass - - def test_is_instance_alive(self): - """Test case for is_instance_alive - - Check Alive Status # noqa: E501 - """ - pass - - def test_list_o_auth2_clients(self): - """Test case for list_o_auth2_clients - - List OAuth 2.0 Clients # noqa: E501 - """ - pass - - def test_list_subject_consent_sessions(self): - """Test case for list_subject_consent_sessions - - Lists All Consent Sessions of a Subject # noqa: E501 - """ - pass - - def test_list_trusted_jwt_grant_issuers(self): - """Test case for list_trusted_jwt_grant_issuers - - List Trusted OAuth2 JWT Bearer Grant Type Issuers # noqa: E501 - """ - pass - - def test_patch_o_auth2_client(self): - """Test case for patch_o_auth2_client - - Patch an OAuth 2.0 Client # noqa: E501 - """ - pass - - def test_reject_consent_request(self): - """Test case for reject_consent_request - - Reject a Consent Request # noqa: E501 - """ - pass - - def test_reject_login_request(self): - """Test case for reject_login_request - - Reject a Login Request # noqa: E501 - """ - pass - - def test_reject_logout_request(self): - """Test case for reject_logout_request - - Reject a Logout Request # noqa: E501 - """ - pass - - def test_revoke_authentication_session(self): - """Test case for revoke_authentication_session - - Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session # noqa: E501 - """ - pass - - def test_revoke_consent_sessions(self): - """Test case for revoke_consent_sessions - - Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client # noqa: E501 - """ - pass - - def test_trust_jwt_grant_issuer(self): - """Test case for trust_jwt_grant_issuer - - Trust an OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 - """ - pass - - def test_update_json_web_key(self): - """Test case for update_json_web_key - - Update a JSON Web Key # noqa: E501 - """ - pass - - def test_update_json_web_key_set(self): - """Test case for update_json_web_key_set - - Update a JSON Web Key Set # noqa: E501 - """ - pass - - def test_update_o_auth2_client(self): - """Test case for update_o_auth2_client - - Update an OAuth 2.0 Client # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_completed_request.py b/clients/hydra/python/test/test_completed_request.py deleted file mode 100644 index 1979bd12b63..00000000000 --- a/clients/hydra/python/test/test_completed_request.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.completed_request import CompletedRequest - - -class TestCompletedRequest(unittest.TestCase): - """CompletedRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testCompletedRequest(self): - """Test CompletedRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = CompletedRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_consent_request.py b/clients/hydra/python/test/test_consent_request.py deleted file mode 100644 index 75caaa0b359..00000000000 --- a/clients/hydra/python/test/test_consent_request.py +++ /dev/null @@ -1,41 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.open_id_connect_context import OpenIDConnectContext -from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter -globals()['OAuth2Client'] = OAuth2Client -globals()['OpenIDConnectContext'] = OpenIDConnectContext -globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter -from ory_hydra_client.model.consent_request import ConsentRequest - - -class TestConsentRequest(unittest.TestCase): - """ConsentRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testConsentRequest(self): - """Test ConsentRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = ConsentRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_consent_request_session.py b/clients/hydra/python/test/test_consent_request_session.py deleted file mode 100644 index df4b1f4a7ab..00000000000 --- a/clients/hydra/python/test/test_consent_request_session.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.consent_request_session import ConsentRequestSession - - -class TestConsentRequestSession(unittest.TestCase): - """ConsentRequestSession unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testConsentRequestSession(self): - """Test ConsentRequestSession""" - # FIXME: construct object with mandatory attributes with example values - # model = ConsentRequestSession() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_container_wait_ok_body_error.py b/clients/hydra/python/test/test_container_wait_ok_body_error.py deleted file mode 100644 index 46b7bf43115..00000000000 --- a/clients/hydra/python/test/test_container_wait_ok_body_error.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.container_wait_ok_body_error import ContainerWaitOKBodyError - - -class TestContainerWaitOKBodyError(unittest.TestCase): - """ContainerWaitOKBodyError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testContainerWaitOKBodyError(self): - """Test ContainerWaitOKBodyError""" - # FIXME: construct object with mandatory attributes with example values - # model = ContainerWaitOKBodyError() # noqa: E501 - pass - - -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 new file mode 100644 index 00000000000..9f04413ab2c --- /dev/null +++ b/clients/hydra/python/test/test_create_json_web_key_set.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.create_json_web_key_set import CreateJsonWebKeySet + + +class TestCreateJsonWebKeySet(unittest.TestCase): + """CreateJsonWebKeySet unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateJsonWebKeySet(self): + """Test CreateJsonWebKeySet""" + # FIXME: construct object with mandatory attributes with example values + # model = CreateJsonWebKeySet() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..6cf1ef13a21 --- /dev/null +++ b/clients/hydra/python/test/test_error_o_auth2.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.error_o_auth2 import ErrorOAuth2 + + +class TestErrorOAuth2(unittest.TestCase): + """ErrorOAuth2 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testErrorOAuth2(self): + """Test ErrorOAuth2""" + # FIXME: construct object with mandatory attributes with example values + # model = ErrorOAuth2() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_flush_inactive_o_auth2_tokens_request.py b/clients/hydra/python/test/test_flush_inactive_o_auth2_tokens_request.py deleted file mode 100644 index 3a40cf888c7..00000000000 --- a/clients/hydra/python/test/test_flush_inactive_o_auth2_tokens_request.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.flush_inactive_o_auth2_tokens_request import FlushInactiveOAuth2TokensRequest - - -class TestFlushInactiveOAuth2TokensRequest(unittest.TestCase): - """FlushInactiveOAuth2TokensRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFlushInactiveOAuth2TokensRequest(self): - """Test FlushInactiveOAuth2TokensRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = FlushInactiveOAuth2TokensRequest() # noqa: E501 - pass - - -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 85f6c2407cd..bc1349e672c 100644 --- a/clients/hydra/python/test/test_generic_error.py +++ b/clients/hydra/python/test/test_generic_error.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ diff --git a/clients/hydra/python/test/test_get_version200_response.py b/clients/hydra/python/test/test_get_version200_response.py new file mode 100644 index 00000000000..b81a07258b0 --- /dev/null +++ b/clients/hydra/python/test/test_get_version200_response.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.get_version200_response import GetVersion200Response + + +class TestGetVersion200Response(unittest.TestCase): + """GetVersion200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGetVersion200Response(self): + """Test GetVersion200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = GetVersion200Response() # noqa: E501 + pass + + +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 8b574e2db54..406667f22e3 100644 --- a/clients/hydra/python/test/test_health_not_ready_status.py +++ b/clients/hydra/python/test/test_health_not_ready_status.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ diff --git a/clients/hydra/python/test/test_health_status.py b/clients/hydra/python/test/test_health_status.py index ff0d398a3b0..da1cb85531d 100644 --- a/clients/hydra/python/test/test_health_status.py +++ b/clients/hydra/python/test/test_health_status.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ diff --git a/clients/hydra/python/test/test_introspected_o_auth2_token.py b/clients/hydra/python/test/test_introspected_o_auth2_token.py new file mode 100644 index 00000000000..9ca2a079095 --- /dev/null +++ b/clients/hydra/python/test/test_introspected_o_auth2_token.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.introspected_o_auth2_token import IntrospectedOAuth2Token + + +class TestIntrospectedOAuth2Token(unittest.TestCase): + """IntrospectedOAuth2Token unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIntrospectedOAuth2Token(self): + """Test IntrospectedOAuth2Token""" + # FIXME: construct object with mandatory attributes with example values + # model = IntrospectedOAuth2Token() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..b2c2fb0f4ff --- /dev/null +++ b/clients/hydra/python/test/test_is_ready200_response.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.is_ready200_response import IsReady200Response + + +class TestIsReady200Response(unittest.TestCase): + """IsReady200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIsReady200Response(self): + """Test IsReady200Response""" + # FIXME: construct object with mandatory attributes with example values + # model = IsReady200Response() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..383a4d982d6 --- /dev/null +++ b/clients/hydra/python/test/test_is_ready503_response.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.is_ready503_response import IsReady503Response + + +class TestIsReady503Response(unittest.TestCase): + """IsReady503Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIsReady503Response(self): + """Test IsReady503Response""" + # FIXME: construct object with mandatory attributes with example values + # model = IsReady503Response() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_json_error.py b/clients/hydra/python/test/test_json_error.py deleted file mode 100644 index 30b9e2a59d7..00000000000 --- a/clients/hydra/python/test/test_json_error.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.json_error import JsonError - - -class TestJsonError(unittest.TestCase): - """JsonError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testJsonError(self): - """Test JsonError""" - # FIXME: construct object with mandatory attributes with example values - # model = JsonError() # noqa: E501 - pass - - -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 new file mode 100644 index 00000000000..ae82969dc92 --- /dev/null +++ b/clients/hydra/python/test/test_json_patch.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 + + +class TestJsonPatch(unittest.TestCase): + """JsonPatch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testJsonPatch(self): + """Test JsonPatch""" + # FIXME: construct object with mandatory attributes with example values + # model = JsonPatch() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..5d999ae1c4d --- /dev/null +++ b/clients/hydra/python/test/test_json_patch_document.py @@ -0,0 +1,38 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 8b6ed86b22b..5f65ab1df67 100644 --- a/clients/hydra/python/test/test_json_web_key.py +++ b/clients/hydra/python/test/test_json_web_key.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -12,11 +13,11 @@ import unittest import ory_hydra_client -from ory_hydra_client.model.json_web_key import JSONWebKey +from ory_hydra_client.model.json_web_key import JsonWebKey -class TestJSONWebKey(unittest.TestCase): - """JSONWebKey unit test stubs""" +class TestJsonWebKey(unittest.TestCase): + """JsonWebKey unit test stubs""" def setUp(self): pass @@ -24,10 +25,10 @@ def setUp(self): def tearDown(self): pass - def testJSONWebKey(self): - """Test JSONWebKey""" + def testJsonWebKey(self): + """Test JsonWebKey""" # FIXME: construct object with mandatory attributes with example values - # model = JSONWebKey() # noqa: E501 + # model = JsonWebKey() # noqa: E501 pass 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 4aa27ef4f67..01f7f5eaf93 100644 --- a/clients/hydra/python/test/test_json_web_key_set.py +++ b/clients/hydra/python/test/test_json_web_key_set.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -12,13 +13,13 @@ 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 +from ory_hydra_client.model.json_web_key import JsonWebKey +globals()['JsonWebKey'] = JsonWebKey +from ory_hydra_client.model.json_web_key_set import JsonWebKeySet -class TestJSONWebKeySet(unittest.TestCase): - """JSONWebKeySet unit test stubs""" +class TestJsonWebKeySet(unittest.TestCase): + """JsonWebKeySet unit test stubs""" def setUp(self): pass @@ -26,10 +27,10 @@ def setUp(self): def tearDown(self): pass - def testJSONWebKeySet(self): - """Test JSONWebKeySet""" + def testJsonWebKeySet(self): + """Test JsonWebKeySet""" # FIXME: construct object with mandatory attributes with example values - # model = JSONWebKeySet() # noqa: E501 + # model = JsonWebKeySet() # noqa: E501 pass diff --git a/clients/hydra/python/test/test_json_web_key_set_generator_request.py b/clients/hydra/python/test/test_json_web_key_set_generator_request.py deleted file mode 100644 index 07ebac8a4c4..00000000000 --- a/clients/hydra/python/test/test_json_web_key_set_generator_request.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.json_web_key_set_generator_request import JsonWebKeySetGeneratorRequest - - -class TestJsonWebKeySetGeneratorRequest(unittest.TestCase): - """JsonWebKeySetGeneratorRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testJsonWebKeySetGeneratorRequest(self): - """Test JsonWebKeySetGeneratorRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = JsonWebKeySetGeneratorRequest() # noqa: E501 - pass - - -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 new file mode 100644 index 00000000000..26ab7f7bbe9 --- /dev/null +++ b/clients/hydra/python/test/test_jwk_api.py @@ -0,0 +1,78 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import ory_hydra_client +from ory_hydra_client.api.jwk_api import JwkApi # noqa: E501 + + +class TestJwkApi(unittest.TestCase): + """JwkApi unit test stubs""" + + def setUp(self): + self.api = JwkApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_json_web_key_set(self): + """Test case for create_json_web_key_set + + Create JSON Web Key # noqa: E501 + """ + pass + + def test_delete_json_web_key(self): + """Test case for delete_json_web_key + + Delete JSON Web Key # noqa: E501 + """ + pass + + def test_delete_json_web_key_set(self): + """Test case for delete_json_web_key_set + + Delete JSON Web Key Set # noqa: E501 + """ + pass + + def test_get_json_web_key(self): + """Test case for get_json_web_key + + Get JSON Web Key # noqa: E501 + """ + pass + + def test_get_json_web_key_set(self): + """Test case for get_json_web_key_set + + Retrieve a JSON Web Key Set # noqa: E501 + """ + pass + + def test_set_json_web_key(self): + """Test case for set_json_web_key + + Set JSON Web Key # noqa: E501 + """ + pass + + def test_set_json_web_key_set(self): + """Test case for set_json_web_key_set + + Update a JSON Web Key Set # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_login_request.py b/clients/hydra/python/test/test_login_request.py deleted file mode 100644 index fe6920809ec..00000000000 --- a/clients/hydra/python/test/test_login_request.py +++ /dev/null @@ -1,41 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.o_auth2_client import OAuth2Client -from ory_hydra_client.model.open_id_connect_context import OpenIDConnectContext -from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter -globals()['OAuth2Client'] = OAuth2Client -globals()['OpenIDConnectContext'] = OpenIDConnectContext -globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter -from ory_hydra_client.model.login_request import LoginRequest - - -class TestLoginRequest(unittest.TestCase): - """LoginRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLoginRequest(self): - """Test LoginRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = LoginRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_logout_request.py b/clients/hydra/python/test/test_logout_request.py deleted file mode 100644 index 784fa8e9b99..00000000000 --- a/clients/hydra/python/test/test_logout_request.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -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.logout_request import LogoutRequest - - -class TestLogoutRequest(unittest.TestCase): - """LogoutRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testLogoutRequest(self): - """Test LogoutRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = LogoutRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_metadata_api.py b/clients/hydra/python/test/test_metadata_api.py index 5fcf31df566..40a78466288 100644 --- a/clients/hydra/python/test/test_metadata_api.py +++ b/clients/hydra/python/test/test_metadata_api.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -23,10 +24,24 @@ def setUp(self): def tearDown(self): pass - def test_prometheus(self): - """Test case for prometheus + def test_get_version(self): + """Test case for get_version - Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: # noqa: E501 + Return Running Software Version. # noqa: E501 + """ + pass + + def test_is_alive(self): + """Test case for is_alive + + Check HTTP Server Status # noqa: E501 + """ + pass + + def test_is_ready(self): + """Test case for is_ready + + Check HTTP Server and Database Status # noqa: E501 """ pass diff --git a/clients/hydra/python/test/test_null_duration.py b/clients/hydra/python/test/test_null_duration.py new file mode 100644 index 00000000000..0c9bcb7f9c8 --- /dev/null +++ b/clients/hydra/python/test/test_null_duration.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 new file mode 100644 index 00000000000..31673fe4816 --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_api.py @@ -0,0 +1,225 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import ory_hydra_client +from ory_hydra_client.api.o_auth2_api import OAuth2Api # noqa: E501 + + +class TestOAuth2Api(unittest.TestCase): + """OAuth2Api unit test stubs""" + + def setUp(self): + self.api = OAuth2Api() # noqa: E501 + + def tearDown(self): + pass + + def test_accept_o_auth2_consent_request(self): + """Test case for accept_o_auth2_consent_request + + Accept OAuth 2.0 Consent Request # noqa: E501 + """ + pass + + def test_accept_o_auth2_login_request(self): + """Test case for accept_o_auth2_login_request + + Accept OAuth 2.0 Login Request # noqa: E501 + """ + pass + + def test_accept_o_auth2_logout_request(self): + """Test case for accept_o_auth2_logout_request + + Accept OAuth 2.0 Session Logout Request # noqa: E501 + """ + pass + + def test_create_o_auth2_client(self): + """Test case for create_o_auth2_client + + Create OAuth 2.0 Client # noqa: E501 + """ + pass + + def test_delete_o_auth2_client(self): + """Test case for delete_o_auth2_client + + Delete OAuth 2.0 Client # noqa: E501 + """ + pass + + def test_delete_o_auth2_token(self): + """Test case for delete_o_auth2_token + + Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client # noqa: E501 + """ + pass + + def test_delete_trusted_o_auth2_jwt_grant_issuer(self): + """Test case for delete_trusted_o_auth2_jwt_grant_issuer + + Delete Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 + """ + pass + + def test_get_o_auth2_client(self): + """Test case for get_o_auth2_client + + Get an OAuth 2.0 Client # noqa: E501 + """ + pass + + def test_get_o_auth2_consent_request(self): + """Test case for get_o_auth2_consent_request + + Get OAuth 2.0 Consent Request # noqa: E501 + """ + pass + + def test_get_o_auth2_login_request(self): + """Test case for get_o_auth2_login_request + + Get OAuth 2.0 Login Request # noqa: E501 + """ + pass + + def test_get_o_auth2_logout_request(self): + """Test case for get_o_auth2_logout_request + + Get OAuth 2.0 Session Logout Request # noqa: E501 + """ + pass + + def test_get_trusted_o_auth2_jwt_grant_issuer(self): + """Test case for get_trusted_o_auth2_jwt_grant_issuer + + Get Trusted OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 + """ + pass + + def test_introspect_o_auth2_token(self): + """Test case for introspect_o_auth2_token + + Introspect OAuth2 Access and Refresh Tokens # noqa: E501 + """ + pass + + def test_list_o_auth2_clients(self): + """Test case for list_o_auth2_clients + + List OAuth 2.0 Clients # noqa: E501 + """ + pass + + def test_list_o_auth2_consent_sessions(self): + """Test case for list_o_auth2_consent_sessions + + List OAuth 2.0 Consent Sessions of a Subject # noqa: E501 + """ + pass + + def test_list_trusted_o_auth2_jwt_grant_issuers(self): + """Test case for list_trusted_o_auth2_jwt_grant_issuers + + List Trusted OAuth2 JWT Bearer Grant Type Issuers # noqa: E501 + """ + pass + + def test_o_auth2_authorize(self): + """Test case for o_auth2_authorize + + OAuth 2.0 Authorize Endpoint # noqa: E501 + """ + pass + + def test_oauth2_token_exchange(self): + """Test case for oauth2_token_exchange + + The OAuth 2.0 Token Endpoint # noqa: E501 + """ + pass + + def test_patch_o_auth2_client(self): + """Test case for patch_o_auth2_client + + Patch OAuth 2.0 Client # noqa: E501 + """ + pass + + def test_reject_o_auth2_consent_request(self): + """Test case for reject_o_auth2_consent_request + + Reject OAuth 2.0 Consent Request # noqa: E501 + """ + pass + + def test_reject_o_auth2_login_request(self): + """Test case for reject_o_auth2_login_request + + Reject OAuth 2.0 Login Request # noqa: E501 + """ + pass + + def test_reject_o_auth2_logout_request(self): + """Test case for reject_o_auth2_logout_request + + Reject OAuth 2.0 Session Logout Request # noqa: E501 + """ + pass + + def test_revoke_o_auth2_consent_sessions(self): + """Test case for revoke_o_auth2_consent_sessions + + Revoke OAuth 2.0 Consent Sessions of a Subject # noqa: E501 + """ + pass + + def test_revoke_o_auth2_login_sessions(self): + """Test case for revoke_o_auth2_login_sessions + + Revokes All OAuth 2.0 Login Sessions of a Subject # noqa: E501 + """ + pass + + def test_revoke_o_auth2_token(self): + """Test case for revoke_o_auth2_token + + Revoke OAuth 2.0 Access or Refresh Token # noqa: E501 + """ + pass + + def test_set_o_auth2_client(self): + """Test case for set_o_auth2_client + + Set OAuth 2.0 Client # noqa: E501 + """ + pass + + def test_set_o_auth2_client_lifespans(self): + """Test case for set_o_auth2_client_lifespans + + Set OAuth2 Client Token Lifespans # noqa: E501 + """ + pass + + def test_trust_o_auth2_jwt_grant_issuer(self): + """Test case for trust_o_auth2_jwt_grant_issuer + + Trust OAuth2 JWT Bearer Grant Type Issuer # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_client.py b/clients/hydra/python/test/test_o_auth2_client.py index 38b223c3180..203fef7b047 100644 --- a/clients/hydra/python/test/test_o_auth2_client.py +++ b/clients/hydra/python/test/test_o_auth2_client.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ @@ -12,8 +13,10 @@ import unittest import ory_hydra_client -from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter -globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter +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 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 new file mode 100644 index 00000000000..a71501d2b2e --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_client_token_lifespans.py @@ -0,0 +1,38 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 +globals()['NullDuration'] = NullDuration +from ory_hydra_client.model.o_auth2_client_token_lifespans import OAuth2ClientTokenLifespans + + +class TestOAuth2ClientTokenLifespans(unittest.TestCase): + """OAuth2ClientTokenLifespans unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2ClientTokenLifespans(self): + """Test OAuth2ClientTokenLifespans""" + # FIXME: construct object with mandatory attributes with example values + # model = OAuth2ClientTokenLifespans() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..dce56acf151 --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_consent_request.py @@ -0,0 +1,42 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_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 + + +class TestOAuth2ConsentRequest(unittest.TestCase): + """OAuth2ConsentRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2ConsentRequest(self): + """Test OAuth2ConsentRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = OAuth2ConsentRequest() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..9f6aa14cc66 --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_consent_request_open_id_connect_context.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_request_open_id_connect_context import OAuth2ConsentRequestOpenIDConnectContext + + +class TestOAuth2ConsentRequestOpenIDConnectContext(unittest.TestCase): + """OAuth2ConsentRequestOpenIDConnectContext unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2ConsentRequestOpenIDConnectContext(self): + """Test OAuth2ConsentRequestOpenIDConnectContext""" + # FIXME: construct object with mandatory attributes with example values + # model = OAuth2ConsentRequestOpenIDConnectContext() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..2209713fd8c --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_consent_session.py @@ -0,0 +1,44 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +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 + + +class TestOAuth2ConsentSession(unittest.TestCase): + """OAuth2ConsentSession unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2ConsentSession(self): + """Test OAuth2ConsentSession""" + # FIXME: construct object with mandatory attributes with example values + # model = OAuth2ConsentSession() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..52660481971 --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_consent_session_expires_at.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_expires_at import OAuth2ConsentSessionExpiresAt + + +class TestOAuth2ConsentSessionExpiresAt(unittest.TestCase): + """OAuth2ConsentSessionExpiresAt unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2ConsentSessionExpiresAt(self): + """Test OAuth2ConsentSessionExpiresAt""" + # FIXME: construct object with mandatory attributes with example values + # model = OAuth2ConsentSessionExpiresAt() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..b6cd8f0a3a4 --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_consent_sessions.py @@ -0,0 +1,38 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 new file mode 100644 index 00000000000..4c43bee62fb --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_login_request.py @@ -0,0 +1,42 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_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 + + +class TestOAuth2LoginRequest(unittest.TestCase): + """OAuth2LoginRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2LoginRequest(self): + """Test OAuth2LoginRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = OAuth2LoginRequest() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..6b3b1864c80 --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_logout_request.py @@ -0,0 +1,38 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_client import OAuth2Client +globals()['OAuth2Client'] = OAuth2Client +from ory_hydra_client.model.o_auth2_logout_request import OAuth2LogoutRequest + + +class TestOAuth2LogoutRequest(unittest.TestCase): + """OAuth2LogoutRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2LogoutRequest(self): + """Test OAuth2LogoutRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = OAuth2LogoutRequest() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..68c46cacb0b --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_redirect_to.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_redirect_to import OAuth2RedirectTo + + +class TestOAuth2RedirectTo(unittest.TestCase): + """OAuth2RedirectTo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2RedirectTo(self): + """Test OAuth2RedirectTo""" + # FIXME: construct object with mandatory attributes with example values + # model = OAuth2RedirectTo() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..3eed984e499 --- /dev/null +++ b/clients/hydra/python/test/test_o_auth2_token_exchange.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_token_exchange import OAuth2TokenExchange + + +class TestOAuth2TokenExchange(unittest.TestCase): + """OAuth2TokenExchange unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2TokenExchange(self): + """Test OAuth2TokenExchange""" + # FIXME: construct object with mandatory attributes with example values + # model = OAuth2TokenExchange() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_o_auth2_token_introspection.py b/clients/hydra/python/test/test_o_auth2_token_introspection.py deleted file mode 100644 index 2f2cd439f2f..00000000000 --- a/clients/hydra/python/test/test_o_auth2_token_introspection.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.o_auth2_token_introspection import OAuth2TokenIntrospection - - -class TestOAuth2TokenIntrospection(unittest.TestCase): - """OAuth2TokenIntrospection unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOAuth2TokenIntrospection(self): - """Test OAuth2TokenIntrospection""" - # FIXME: construct object with mandatory attributes with example values - # model = OAuth2TokenIntrospection() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_oauth2_token_response.py b/clients/hydra/python/test/test_oauth2_token_response.py deleted file mode 100644 index 63867f6a513..00000000000 --- a/clients/hydra/python/test/test_oauth2_token_response.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.oauth2_token_response import Oauth2TokenResponse - - -class TestOauth2TokenResponse(unittest.TestCase): - """Oauth2TokenResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOauth2TokenResponse(self): - """Test Oauth2TokenResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = Oauth2TokenResponse() # noqa: E501 - pass - - -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 new file mode 100644 index 00000000000..6bcbac3ad2c --- /dev/null +++ b/clients/hydra/python/test/test_oidc_api.py @@ -0,0 +1,78 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import ory_hydra_client +from ory_hydra_client.api.oidc_api import OidcApi # noqa: E501 + + +class TestOidcApi(unittest.TestCase): + """OidcApi unit test stubs""" + + def setUp(self): + self.api = OidcApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_oidc_dynamic_client(self): + """Test case for create_oidc_dynamic_client + + Register OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 + """ + pass + + def test_delete_oidc_dynamic_client(self): + """Test case for delete_oidc_dynamic_client + + Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol # noqa: E501 + """ + pass + + def test_discover_oidc_configuration(self): + """Test case for discover_oidc_configuration + + OpenID Connect Discovery # noqa: E501 + """ + pass + + def test_get_oidc_dynamic_client(self): + """Test case for get_oidc_dynamic_client + + Get OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 + """ + pass + + def test_get_oidc_user_info(self): + """Test case for get_oidc_user_info + + OpenID Connect Userinfo # noqa: E501 + """ + pass + + def test_revoke_oidc_session(self): + """Test case for revoke_oidc_session + + OpenID Connect Front- and Back-channel Enabled Logout # noqa: E501 + """ + pass + + def test_set_oidc_dynamic_client(self): + """Test case for set_oidc_dynamic_client + + Set OAuth2 Client using OpenID Dynamic Client Registration # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_oidc_configuration.py b/clients/hydra/python/test/test_oidc_configuration.py new file mode 100644 index 00000000000..ab0ad009e07 --- /dev/null +++ b/clients/hydra/python/test/test_oidc_configuration.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.oidc_configuration import OidcConfiguration + + +class TestOidcConfiguration(unittest.TestCase): + """OidcConfiguration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOidcConfiguration(self): + """Test OidcConfiguration""" + # FIXME: construct object with mandatory attributes with example values + # model = OidcConfiguration() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..10b13fb4b6b --- /dev/null +++ b/clients/hydra/python/test/test_oidc_user_info.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.oidc_user_info import OidcUserInfo + + +class TestOidcUserInfo(unittest.TestCase): + """OidcUserInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOidcUserInfo(self): + """Test OidcUserInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = OidcUserInfo() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_open_id_connect_context.py b/clients/hydra/python/test/test_open_id_connect_context.py deleted file mode 100644 index f9b188eeeee..00000000000 --- a/clients/hydra/python/test/test_open_id_connect_context.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.open_id_connect_context import OpenIDConnectContext - - -class TestOpenIDConnectContext(unittest.TestCase): - """OpenIDConnectContext unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testOpenIDConnectContext(self): - """Test OpenIDConnectContext""" - # FIXME: construct object with mandatory attributes with example values - # model = OpenIDConnectContext() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_pagination.py b/clients/hydra/python/test/test_pagination.py new file mode 100644 index 00000000000..b795beadcf4 --- /dev/null +++ b/clients/hydra/python/test/test_pagination.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.pagination import Pagination + + +class TestPagination(unittest.TestCase): + """Pagination unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPagination(self): + """Test Pagination""" + # FIXME: construct object with mandatory attributes with example values + # model = Pagination() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..80d461f90c2 --- /dev/null +++ b/clients/hydra/python/test/test_pagination_headers.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.pagination_headers import PaginationHeaders + + +class TestPaginationHeaders(unittest.TestCase): + """PaginationHeaders unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPaginationHeaders(self): + """Test PaginationHeaders""" + # FIXME: construct object with mandatory attributes with example values + # model = PaginationHeaders() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_patch_document.py b/clients/hydra/python/test/test_patch_document.py deleted file mode 100644 index 7a247a2c6e4..00000000000 --- a/clients/hydra/python/test/test_patch_document.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.patch_document import PatchDocument - - -class TestPatchDocument(unittest.TestCase): - """PatchDocument unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPatchDocument(self): - """Test PatchDocument""" - # FIXME: construct object with mandatory attributes with example values - # model = PatchDocument() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_patch_request.py b/clients/hydra/python/test/test_patch_request.py deleted file mode 100644 index ee98558759b..00000000000 --- a/clients/hydra/python/test/test_patch_request.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.patch_document import PatchDocument -globals()['PatchDocument'] = PatchDocument -from ory_hydra_client.model.patch_request import PatchRequest - - -class TestPatchRequest(unittest.TestCase): - """PatchRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPatchRequest(self): - """Test PatchRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = PatchRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_config.py b/clients/hydra/python/test/test_plugin_config.py deleted file mode 100644 index 97fc7b0976e..00000000000 --- a/clients/hydra/python/test/test_plugin_config.py +++ /dev/null @@ -1,51 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_config_args import PluginConfigArgs -from ory_hydra_client.model.plugin_config_interface import PluginConfigInterface -from ory_hydra_client.model.plugin_config_linux import PluginConfigLinux -from ory_hydra_client.model.plugin_config_network import PluginConfigNetwork -from ory_hydra_client.model.plugin_config_rootfs import PluginConfigRootfs -from ory_hydra_client.model.plugin_config_user import PluginConfigUser -from ory_hydra_client.model.plugin_env import PluginEnv -from ory_hydra_client.model.plugin_mount import PluginMount -globals()['PluginConfigArgs'] = PluginConfigArgs -globals()['PluginConfigInterface'] = PluginConfigInterface -globals()['PluginConfigLinux'] = PluginConfigLinux -globals()['PluginConfigNetwork'] = PluginConfigNetwork -globals()['PluginConfigRootfs'] = PluginConfigRootfs -globals()['PluginConfigUser'] = PluginConfigUser -globals()['PluginEnv'] = PluginEnv -globals()['PluginMount'] = PluginMount -from ory_hydra_client.model.plugin_config import PluginConfig - - -class TestPluginConfig(unittest.TestCase): - """PluginConfig unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginConfig(self): - """Test PluginConfig""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginConfig() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_config_args.py b/clients/hydra/python/test/test_plugin_config_args.py deleted file mode 100644 index 63465fb174a..00000000000 --- a/clients/hydra/python/test/test_plugin_config_args.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_config_args import PluginConfigArgs - - -class TestPluginConfigArgs(unittest.TestCase): - """PluginConfigArgs unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginConfigArgs(self): - """Test PluginConfigArgs""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginConfigArgs() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_config_interface.py b/clients/hydra/python/test/test_plugin_config_interface.py deleted file mode 100644 index 04f3576aa7a..00000000000 --- a/clients/hydra/python/test/test_plugin_config_interface.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_interface_type import PluginInterfaceType -globals()['PluginInterfaceType'] = PluginInterfaceType -from ory_hydra_client.model.plugin_config_interface import PluginConfigInterface - - -class TestPluginConfigInterface(unittest.TestCase): - """PluginConfigInterface unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginConfigInterface(self): - """Test PluginConfigInterface""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginConfigInterface() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_config_linux.py b/clients/hydra/python/test/test_plugin_config_linux.py deleted file mode 100644 index c46bdc8551f..00000000000 --- a/clients/hydra/python/test/test_plugin_config_linux.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_device import PluginDevice -globals()['PluginDevice'] = PluginDevice -from ory_hydra_client.model.plugin_config_linux import PluginConfigLinux - - -class TestPluginConfigLinux(unittest.TestCase): - """PluginConfigLinux unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginConfigLinux(self): - """Test PluginConfigLinux""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginConfigLinux() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_config_network.py b/clients/hydra/python/test/test_plugin_config_network.py deleted file mode 100644 index b33e8198aec..00000000000 --- a/clients/hydra/python/test/test_plugin_config_network.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_config_network import PluginConfigNetwork - - -class TestPluginConfigNetwork(unittest.TestCase): - """PluginConfigNetwork unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginConfigNetwork(self): - """Test PluginConfigNetwork""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginConfigNetwork() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_config_rootfs.py b/clients/hydra/python/test/test_plugin_config_rootfs.py deleted file mode 100644 index a8b9f6ef5d0..00000000000 --- a/clients/hydra/python/test/test_plugin_config_rootfs.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_config_rootfs import PluginConfigRootfs - - -class TestPluginConfigRootfs(unittest.TestCase): - """PluginConfigRootfs unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginConfigRootfs(self): - """Test PluginConfigRootfs""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginConfigRootfs() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_config_user.py b/clients/hydra/python/test/test_plugin_config_user.py deleted file mode 100644 index 131489d8bbf..00000000000 --- a/clients/hydra/python/test/test_plugin_config_user.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_config_user import PluginConfigUser - - -class TestPluginConfigUser(unittest.TestCase): - """PluginConfigUser unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginConfigUser(self): - """Test PluginConfigUser""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginConfigUser() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_device.py b/clients/hydra/python/test/test_plugin_device.py deleted file mode 100644 index e30c4192498..00000000000 --- a/clients/hydra/python/test/test_plugin_device.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_device import PluginDevice - - -class TestPluginDevice(unittest.TestCase): - """PluginDevice unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginDevice(self): - """Test PluginDevice""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginDevice() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_env.py b/clients/hydra/python/test/test_plugin_env.py deleted file mode 100644 index 4977f9896c4..00000000000 --- a/clients/hydra/python/test/test_plugin_env.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_env import PluginEnv - - -class TestPluginEnv(unittest.TestCase): - """PluginEnv unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginEnv(self): - """Test PluginEnv""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginEnv() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_interface_type.py b/clients/hydra/python/test/test_plugin_interface_type.py deleted file mode 100644 index 5af7f035f2d..00000000000 --- a/clients/hydra/python/test/test_plugin_interface_type.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_interface_type import PluginInterfaceType - - -class TestPluginInterfaceType(unittest.TestCase): - """PluginInterfaceType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginInterfaceType(self): - """Test PluginInterfaceType""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginInterfaceType() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_mount.py b/clients/hydra/python/test/test_plugin_mount.py deleted file mode 100644 index c33b1e8f200..00000000000 --- a/clients/hydra/python/test/test_plugin_mount.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_mount import PluginMount - - -class TestPluginMount(unittest.TestCase): - """PluginMount unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginMount(self): - """Test PluginMount""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginMount() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_plugin_settings.py b/clients/hydra/python/test/test_plugin_settings.py deleted file mode 100644 index ae0268e0be8..00000000000 --- a/clients/hydra/python/test/test_plugin_settings.py +++ /dev/null @@ -1,39 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.plugin_device import PluginDevice -from ory_hydra_client.model.plugin_mount import PluginMount -globals()['PluginDevice'] = PluginDevice -globals()['PluginMount'] = PluginMount -from ory_hydra_client.model.plugin_settings import PluginSettings - - -class TestPluginSettings(unittest.TestCase): - """PluginSettings unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPluginSettings(self): - """Test PluginSettings""" - # FIXME: construct object with mandatory attributes with example values - # model = PluginSettings() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_previous_consent_session.py b/clients/hydra/python/test/test_previous_consent_session.py deleted file mode 100644 index 808db4640e5..00000000000 --- a/clients/hydra/python/test/test_previous_consent_session.py +++ /dev/null @@ -1,41 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.consent_request import ConsentRequest -from ory_hydra_client.model.consent_request_session import ConsentRequestSession -from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter -globals()['ConsentRequest'] = ConsentRequest -globals()['ConsentRequestSession'] = ConsentRequestSession -globals()['StringSlicePipeDelimiter'] = StringSlicePipeDelimiter -from ory_hydra_client.model.previous_consent_session import PreviousConsentSession - - -class TestPreviousConsentSession(unittest.TestCase): - """PreviousConsentSession unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testPreviousConsentSession(self): - """Test PreviousConsentSession""" - # FIXME: construct object with mandatory attributes with example values - # model = PreviousConsentSession() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_public_api.py b/clients/hydra/python/test/test_public_api.py deleted file mode 100644 index 9d8adffcd6e..00000000000 --- a/clients/hydra/python/test/test_public_api.py +++ /dev/null @@ -1,112 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import ory_hydra_client -from ory_hydra_client.api.public_api import PublicApi # noqa: E501 - - -class TestPublicApi(unittest.TestCase): - """PublicApi unit test stubs""" - - def setUp(self): - self.api = PublicApi() # noqa: E501 - - def tearDown(self): - pass - - def test_disconnect_user(self): - """Test case for disconnect_user - - OpenID Connect Front-Backchannel Enabled Logout # noqa: E501 - """ - pass - - def test_discover_open_id_configuration(self): - """Test case for discover_open_id_configuration - - OpenID Connect Discovery # noqa: E501 - """ - pass - - def test_dynamic_client_registration_create_o_auth2_client(self): - """Test case for dynamic_client_registration_create_o_auth2_client - - Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol # noqa: E501 - """ - pass - - def test_dynamic_client_registration_delete_o_auth2_client(self): - """Test case for dynamic_client_registration_delete_o_auth2_client - - Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol # noqa: E501 - """ - pass - - def test_dynamic_client_registration_get_o_auth2_client(self): - """Test case for dynamic_client_registration_get_o_auth2_client - - Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol # noqa: E501 - """ - pass - - def test_dynamic_client_registration_update_o_auth2_client(self): - """Test case for dynamic_client_registration_update_o_auth2_client - - Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol # noqa: E501 - """ - pass - - def test_is_instance_ready(self): - """Test case for is_instance_ready - - Check Readiness Status # noqa: E501 - """ - pass - - def test_oauth2_token(self): - """Test case for oauth2_token - - The OAuth 2.0 Token Endpoint # noqa: E501 - """ - pass - - def test_oauth_auth(self): - """Test case for oauth_auth - - The OAuth 2.0 Authorize Endpoint # noqa: E501 - """ - pass - - def test_revoke_o_auth2_token(self): - """Test case for revoke_o_auth2_token - - Revoke OAuth2 Tokens # noqa: E501 - """ - pass - - def test_userinfo(self): - """Test case for userinfo - - OpenID Connect Userinfo # noqa: E501 - """ - pass - - def test_well_known(self): - """Test case for well_known - - JSON Web Keys Discovery # noqa: E501 - """ - pass - - -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 new file mode 100644 index 00000000000..04b421eb79d --- /dev/null +++ b/clients/hydra/python/test/test_reject_o_auth2_request.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.reject_o_auth2_request import RejectOAuth2Request + + +class TestRejectOAuth2Request(unittest.TestCase): + """RejectOAuth2Request unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRejectOAuth2Request(self): + """Test RejectOAuth2Request""" + # FIXME: construct object with mandatory attributes with example values + # model = RejectOAuth2Request() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_reject_request.py b/clients/hydra/python/test/test_reject_request.py deleted file mode 100644 index dca5c099219..00000000000 --- a/clients/hydra/python/test/test_reject_request.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.reject_request import RejectRequest - - -class TestRejectRequest(unittest.TestCase): - """RejectRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRejectRequest(self): - """Test RejectRequest""" - # FIXME: construct object with mandatory attributes with example values - # model = RejectRequest() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_request_was_handled_response.py b/clients/hydra/python/test/test_request_was_handled_response.py deleted file mode 100644 index 3ec4972d895..00000000000 --- a/clients/hydra/python/test/test_request_was_handled_response.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.request_was_handled_response import RequestWasHandledResponse - - -class TestRequestWasHandledResponse(unittest.TestCase): - """RequestWasHandledResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testRequestWasHandledResponse(self): - """Test RequestWasHandledResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = RequestWasHandledResponse() # noqa: E501 - pass - - -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 new file mode 100644 index 00000000000..bec41e51699 --- /dev/null +++ b/clients/hydra/python/test/test_string_slice_json_format.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_string_slice_pipe_delimiter.py b/clients/hydra/python/test/test_string_slice_pipe_delimiter.py deleted file mode 100644 index 375b8317ccd..00000000000 --- a/clients/hydra/python/test/test_string_slice_pipe_delimiter.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.string_slice_pipe_delimiter import StringSlicePipeDelimiter - - -class TestStringSlicePipeDelimiter(unittest.TestCase): - """StringSlicePipeDelimiter unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testStringSlicePipeDelimiter(self): - """Test StringSlicePipeDelimiter""" - # FIXME: construct object with mandatory attributes with example values - # model = StringSlicePipeDelimiter() # 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 new file mode 100644 index 00000000000..86101bb5de0 --- /dev/null +++ b/clients/hydra/python/test/test_token_pagination.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.token_pagination import TokenPagination + + +class TestTokenPagination(unittest.TestCase): + """TokenPagination unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTokenPagination(self): + """Test TokenPagination""" + # FIXME: construct object with mandatory attributes with example values + # model = TokenPagination() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..f998900ab33 --- /dev/null +++ b/clients/hydra/python/test/test_token_pagination_headers.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.token_pagination_headers import TokenPaginationHeaders + + +class TestTokenPaginationHeaders(unittest.TestCase): + """TokenPaginationHeaders unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTokenPaginationHeaders(self): + """Test TokenPaginationHeaders""" + # FIXME: construct object with mandatory attributes with example values + # model = TokenPaginationHeaders() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..7a355725d09 --- /dev/null +++ b/clients/hydra/python/test/test_token_pagination_request_parameters.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.token_pagination_request_parameters import TokenPaginationRequestParameters + + +class TestTokenPaginationRequestParameters(unittest.TestCase): + """TokenPaginationRequestParameters unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTokenPaginationRequestParameters(self): + """Test TokenPaginationRequestParameters""" + # FIXME: construct object with mandatory attributes with example values + # model = TokenPaginationRequestParameters() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..64a8c8b4862 --- /dev/null +++ b/clients/hydra/python/test/test_token_pagination_response_headers.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import ory_hydra_client +from ory_hydra_client.model.token_pagination_response_headers import TokenPaginationResponseHeaders + + +class TestTokenPaginationResponseHeaders(unittest.TestCase): + """TokenPaginationResponseHeaders unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTokenPaginationResponseHeaders(self): + """Test TokenPaginationResponseHeaders""" + # FIXME: construct object with mandatory attributes with example values + # model = TokenPaginationResponseHeaders() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_trust_jwt_grant_issuer_body.py b/clients/hydra/python/test/test_trust_jwt_grant_issuer_body.py deleted file mode 100644 index aa112dc1088..00000000000 --- a/clients/hydra/python/test/test_trust_jwt_grant_issuer_body.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -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_jwt_grant_issuer_body import TrustJwtGrantIssuerBody - - -class TestTrustJwtGrantIssuerBody(unittest.TestCase): - """TrustJwtGrantIssuerBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTrustJwtGrantIssuerBody(self): - """Test TrustJwtGrantIssuerBody""" - # FIXME: construct object with mandatory attributes with example values - # model = TrustJwtGrantIssuerBody() # noqa: E501 - pass - - -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 new file mode 100644 index 00000000000..30dabd6fa51 --- /dev/null +++ b/clients/hydra/python/test/test_trust_o_auth2_jwt_grant_issuer.py @@ -0,0 +1,38 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +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 + + +class TestTrustOAuth2JwtGrantIssuer(unittest.TestCase): + """TrustOAuth2JwtGrantIssuer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTrustOAuth2JwtGrantIssuer(self): + """Test TrustOAuth2JwtGrantIssuer""" + # FIXME: construct object with mandatory attributes with example values + # model = TrustOAuth2JwtGrantIssuer() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_trusted_json_web_key.py b/clients/hydra/python/test/test_trusted_json_web_key.py deleted file mode 100644 index 3d39d5957b8..00000000000 --- a/clients/hydra/python/test/test_trusted_json_web_key.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.trusted_json_web_key import TrustedJsonWebKey - - -class TestTrustedJsonWebKey(unittest.TestCase): - """TrustedJsonWebKey unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTrustedJsonWebKey(self): - """Test TrustedJsonWebKey""" - # FIXME: construct object with mandatory attributes with example values - # model = TrustedJsonWebKey() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_trusted_jwt_grant_issuer.py b/clients/hydra/python/test/test_trusted_jwt_grant_issuer.py deleted file mode 100644 index 782d0f18536..00000000000 --- a/clients/hydra/python/test/test_trusted_jwt_grant_issuer.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.trusted_json_web_key import TrustedJsonWebKey -globals()['TrustedJsonWebKey'] = TrustedJsonWebKey -from ory_hydra_client.model.trusted_jwt_grant_issuer import TrustedJwtGrantIssuer - - -class TestTrustedJwtGrantIssuer(unittest.TestCase): - """TrustedJwtGrantIssuer unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTrustedJwtGrantIssuer(self): - """Test TrustedJwtGrantIssuer""" - # FIXME: construct object with mandatory attributes with example values - # model = TrustedJwtGrantIssuer() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_trusted_jwt_grant_issuers.py b/clients/hydra/python/test/test_trusted_jwt_grant_issuers.py deleted file mode 100644 index 442072322b5..00000000000 --- a/clients/hydra/python/test/test_trusted_jwt_grant_issuers.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.trusted_jwt_grant_issuer import TrustedJwtGrantIssuer -globals()['TrustedJwtGrantIssuer'] = TrustedJwtGrantIssuer -from ory_hydra_client.model.trusted_jwt_grant_issuers import TrustedJwtGrantIssuers - - -class TestTrustedJwtGrantIssuers(unittest.TestCase): - """TrustedJwtGrantIssuers unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testTrustedJwtGrantIssuers(self): - """Test TrustedJwtGrantIssuers""" - # FIXME: construct object with mandatory attributes with example values - # model = TrustedJwtGrantIssuers() # noqa: E501 - pass - - -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 new file mode 100644 index 00000000000..5548f059a26 --- /dev/null +++ b/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuer.py @@ -0,0 +1,38 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_json_web_key import TrustedOAuth2JwtGrantJsonWebKey +globals()['TrustedOAuth2JwtGrantJsonWebKey'] = TrustedOAuth2JwtGrantJsonWebKey +from ory_hydra_client.model.trusted_o_auth2_jwt_grant_issuer import TrustedOAuth2JwtGrantIssuer + + +class TestTrustedOAuth2JwtGrantIssuer(unittest.TestCase): + """TrustedOAuth2JwtGrantIssuer unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTrustedOAuth2JwtGrantIssuer(self): + """Test TrustedOAuth2JwtGrantIssuer""" + # FIXME: construct object with mandatory attributes with example values + # model = TrustedOAuth2JwtGrantIssuer() # noqa: E501 + pass + + +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 new file mode 100644 index 00000000000..dd3a1384758 --- /dev/null +++ b/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_issuers.py @@ -0,0 +1,38 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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 new file mode 100644 index 00000000000..a6de2193e56 --- /dev/null +++ b/clients/hydra/python/test/test_trusted_o_auth2_jwt_grant_json_web_key.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + 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_json_web_key import TrustedOAuth2JwtGrantJsonWebKey + + +class TestTrustedOAuth2JwtGrantJsonWebKey(unittest.TestCase): + """TrustedOAuth2JwtGrantJsonWebKey unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTrustedOAuth2JwtGrantJsonWebKey(self): + """Test TrustedOAuth2JwtGrantJsonWebKey""" + # FIXME: construct object with mandatory attributes with example values + # model = TrustedOAuth2JwtGrantJsonWebKey() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/python/test/test_userinfo_response.py b/clients/hydra/python/test/test_userinfo_response.py deleted file mode 100644 index 30541164311..00000000000 --- a/clients/hydra/python/test/test_userinfo_response.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.userinfo_response import UserinfoResponse - - -class TestUserinfoResponse(unittest.TestCase): - """UserinfoResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testUserinfoResponse(self): - """Test UserinfoResponse""" - # FIXME: construct object with mandatory attributes with example values - # model = UserinfoResponse() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_version.py b/clients/hydra/python/test/test_version.py index aab19f63dc4..9950136c01e 100644 --- a/clients/hydra/python/test/test_version.py +++ b/clients/hydra/python/test/test_version.py @@ -1,9 +1,10 @@ """ - ORY Hydra + Ory Hydra API - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 + Documentation for all of Ory Hydra's APIs. # noqa: E501 - The version of the OpenAPI document: v1.11.0 + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh Generated by: https://openapi-generator.tech """ diff --git a/clients/hydra/python/test/test_volume.py b/clients/hydra/python/test/test_volume.py deleted file mode 100644 index 4c3b2f5f21e..00000000000 --- a/clients/hydra/python/test/test_volume.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.volume_usage_data import VolumeUsageData -globals()['VolumeUsageData'] = VolumeUsageData -from ory_hydra_client.model.volume import Volume - - -class TestVolume(unittest.TestCase): - """Volume unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVolume(self): - """Test Volume""" - # FIXME: construct object with mandatory attributes with example values - # model = Volume() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_volume_usage_data.py b/clients/hydra/python/test/test_volume_usage_data.py deleted file mode 100644 index a106275741f..00000000000 --- a/clients/hydra/python/test/test_volume_usage_data.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.volume_usage_data import VolumeUsageData - - -class TestVolumeUsageData(unittest.TestCase): - """VolumeUsageData unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testVolumeUsageData(self): - """Test VolumeUsageData""" - # FIXME: construct object with mandatory attributes with example values - # model = VolumeUsageData() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/clients/hydra/python/test/test_well_known.py b/clients/hydra/python/test/test_well_known.py deleted file mode 100644 index ca5e01270e9..00000000000 --- a/clients/hydra/python/test/test_well_known.py +++ /dev/null @@ -1,35 +0,0 @@ -""" - ORY Hydra - - Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 - - The version of the OpenAPI document: v1.11.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import ory_hydra_client -from ory_hydra_client.model.well_known import WellKnown - - -class TestWellKnown(unittest.TestCase): - """WellKnown unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testWellKnown(self): - """Test WellKnown""" - # FIXME: construct object with mandatory attributes with example values - # model = WellKnown() # noqa: E501 - pass - - -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 new file mode 100644 index 00000000000..50c45a0895d --- /dev/null +++ b/clients/hydra/python/test/test_wellknown_api.py @@ -0,0 +1,36 @@ +""" + Ory Hydra API + + Documentation for all of Ory Hydra's APIs. # noqa: E501 + + The version of the OpenAPI document: v2.0.1 + Contact: hi@ory.sh + Generated by: https://openapi-generator.tech +""" + + +import unittest + +import ory_hydra_client +from ory_hydra_client.api.wellknown_api import WellknownApi # noqa: E501 + + +class TestWellknownApi(unittest.TestCase): + """WellknownApi unit test stubs""" + + def setUp(self): + self.api = WellknownApi() # noqa: E501 + + def tearDown(self): + pass + + def test_discover_json_web_keys(self): + """Test case for discover_json_web_keys + + Discover Well-Known JSON Web Keys # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/clients/hydra/ruby/.gitlab-ci.yml b/clients/hydra/ruby/.gitlab-ci.yml new file mode 100644 index 00000000000..3d57c5b30c0 --- /dev/null +++ b/clients/hydra/ruby/.gitlab-ci.yml @@ -0,0 +1,26 @@ +.ruby: &ruby + variables: + LANG: "C.UTF-8" + before_script: + - ruby -v + - bundle config set --local deployment true + - bundle install -j $(nproc) + parallel: + matrix: + - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + image: "ruby:$RUBY_VERSION" + cache: + paths: + - vendor/ruby + key: 'ruby-$RUBY_VERSION' + +gem: + extends: .ruby + script: + - bundle exec rspec + - bundle exec rake build + - bundle exec rake install + artifacts: + paths: + - pkg/*.gem + diff --git a/clients/hydra/ruby/.openapi-generator/FILES b/clients/hydra/ruby/.openapi-generator/FILES index b54fb1f28bf..230a645eebb 100644 --- a/clients/hydra/ruby/.openapi-generator/FILES +++ b/clients/hydra/ruby/.openapi-generator/FILES @@ -1,4 +1,5 @@ .gitignore +.gitlab-ci.yml .openapi-generator-ignore .rspec .rubocop.yml @@ -6,154 +7,142 @@ Gemfile README.md Rakefile -docs/AcceptConsentRequest.md -docs/AcceptLoginRequest.md -docs/AdminApi.md -docs/CompletedRequest.md -docs/ConsentRequest.md -docs/ConsentRequestSession.md -docs/ContainerWaitOKBodyError.md -docs/FlushInactiveOAuth2TokensRequest.md +docs/AcceptOAuth2ConsentRequest.md +docs/AcceptOAuth2ConsentRequestSession.md +docs/AcceptOAuth2LoginRequest.md +docs/CreateJsonWebKeySet.md +docs/ErrorOAuth2.md docs/GenericError.md +docs/GetVersion200Response.md docs/HealthNotReadyStatus.md docs/HealthStatus.md -docs/JSONWebKey.md -docs/JSONWebKeySet.md -docs/JsonError.md -docs/JsonWebKeySetGeneratorRequest.md -docs/LoginRequest.md -docs/LogoutRequest.md +docs/IntrospectedOAuth2Token.md +docs/IsReady200Response.md +docs/IsReady503Response.md +docs/JsonPatch.md +docs/JsonWebKey.md +docs/JsonWebKeySet.md +docs/JwkApi.md docs/MetadataApi.md +docs/OAuth2Api.md docs/OAuth2Client.md -docs/OAuth2TokenIntrospection.md -docs/Oauth2TokenResponse.md -docs/OpenIDConnectContext.md -docs/PatchDocument.md -docs/PluginConfig.md -docs/PluginConfigArgs.md -docs/PluginConfigInterface.md -docs/PluginConfigLinux.md -docs/PluginConfigNetwork.md -docs/PluginConfigRootfs.md -docs/PluginConfigUser.md -docs/PluginDevice.md -docs/PluginEnv.md -docs/PluginInterfaceType.md -docs/PluginMount.md -docs/PluginSettings.md -docs/PreviousConsentSession.md -docs/PublicApi.md -docs/RejectRequest.md -docs/RequestWasHandledResponse.md -docs/TrustJwtGrantIssuerBody.md -docs/TrustedJsonWebKey.md -docs/TrustedJwtGrantIssuer.md -docs/UserinfoResponse.md +docs/OAuth2ClientTokenLifespans.md +docs/OAuth2ConsentRequest.md +docs/OAuth2ConsentRequestOpenIDConnectContext.md +docs/OAuth2ConsentSession.md +docs/OAuth2ConsentSessionExpiresAt.md +docs/OAuth2LoginRequest.md +docs/OAuth2LogoutRequest.md +docs/OAuth2RedirectTo.md +docs/OAuth2TokenExchange.md +docs/OidcApi.md +docs/OidcConfiguration.md +docs/OidcUserInfo.md +docs/Pagination.md +docs/PaginationHeaders.md +docs/RejectOAuth2Request.md +docs/TokenPagination.md +docs/TokenPaginationHeaders.md +docs/TokenPaginationRequestParameters.md +docs/TokenPaginationResponseHeaders.md +docs/TrustOAuth2JwtGrantIssuer.md +docs/TrustedOAuth2JwtGrantIssuer.md +docs/TrustedOAuth2JwtGrantJsonWebKey.md docs/Version.md -docs/Volume.md -docs/VolumeUsageData.md -docs/WellKnown.md +docs/WellknownApi.md git_push.sh lib/ory-hydra-client.rb -lib/ory-hydra-client/api/admin_api.rb +lib/ory-hydra-client/api/jwk_api.rb lib/ory-hydra-client/api/metadata_api.rb -lib/ory-hydra-client/api/public_api.rb +lib/ory-hydra-client/api/o_auth2_api.rb +lib/ory-hydra-client/api/oidc_api.rb +lib/ory-hydra-client/api/wellknown_api.rb lib/ory-hydra-client/api_client.rb lib/ory-hydra-client/api_error.rb lib/ory-hydra-client/configuration.rb -lib/ory-hydra-client/models/accept_consent_request.rb -lib/ory-hydra-client/models/accept_login_request.rb -lib/ory-hydra-client/models/completed_request.rb -lib/ory-hydra-client/models/consent_request.rb -lib/ory-hydra-client/models/consent_request_session.rb -lib/ory-hydra-client/models/container_wait_ok_body_error.rb -lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +lib/ory-hydra-client/models/accept_o_auth2_consent_request.rb +lib/ory-hydra-client/models/accept_o_auth2_consent_request_session.rb +lib/ory-hydra-client/models/accept_o_auth2_login_request.rb +lib/ory-hydra-client/models/create_json_web_key_set.rb +lib/ory-hydra-client/models/error_o_auth2.rb lib/ory-hydra-client/models/generic_error.rb +lib/ory-hydra-client/models/get_version200_response.rb lib/ory-hydra-client/models/health_not_ready_status.rb lib/ory-hydra-client/models/health_status.rb -lib/ory-hydra-client/models/json_error.rb +lib/ory-hydra-client/models/introspected_o_auth2_token.rb +lib/ory-hydra-client/models/is_ready200_response.rb +lib/ory-hydra-client/models/is_ready503_response.rb +lib/ory-hydra-client/models/json_patch.rb lib/ory-hydra-client/models/json_web_key.rb lib/ory-hydra-client/models/json_web_key_set.rb -lib/ory-hydra-client/models/json_web_key_set_generator_request.rb -lib/ory-hydra-client/models/login_request.rb -lib/ory-hydra-client/models/logout_request.rb lib/ory-hydra-client/models/o_auth2_client.rb -lib/ory-hydra-client/models/o_auth2_token_introspection.rb -lib/ory-hydra-client/models/oauth2_token_response.rb -lib/ory-hydra-client/models/open_id_connect_context.rb -lib/ory-hydra-client/models/patch_document.rb -lib/ory-hydra-client/models/plugin_config.rb -lib/ory-hydra-client/models/plugin_config_args.rb -lib/ory-hydra-client/models/plugin_config_interface.rb -lib/ory-hydra-client/models/plugin_config_linux.rb -lib/ory-hydra-client/models/plugin_config_network.rb -lib/ory-hydra-client/models/plugin_config_rootfs.rb -lib/ory-hydra-client/models/plugin_config_user.rb -lib/ory-hydra-client/models/plugin_device.rb -lib/ory-hydra-client/models/plugin_env.rb -lib/ory-hydra-client/models/plugin_interface_type.rb -lib/ory-hydra-client/models/plugin_mount.rb -lib/ory-hydra-client/models/plugin_settings.rb -lib/ory-hydra-client/models/previous_consent_session.rb -lib/ory-hydra-client/models/reject_request.rb -lib/ory-hydra-client/models/request_was_handled_response.rb -lib/ory-hydra-client/models/trust_jwt_grant_issuer_body.rb -lib/ory-hydra-client/models/trusted_json_web_key.rb -lib/ory-hydra-client/models/trusted_jwt_grant_issuer.rb -lib/ory-hydra-client/models/userinfo_response.rb +lib/ory-hydra-client/models/o_auth2_client_token_lifespans.rb +lib/ory-hydra-client/models/o_auth2_consent_request.rb +lib/ory-hydra-client/models/o_auth2_consent_request_open_id_connect_context.rb +lib/ory-hydra-client/models/o_auth2_consent_session.rb +lib/ory-hydra-client/models/o_auth2_consent_session_expires_at.rb +lib/ory-hydra-client/models/o_auth2_login_request.rb +lib/ory-hydra-client/models/o_auth2_logout_request.rb +lib/ory-hydra-client/models/o_auth2_redirect_to.rb +lib/ory-hydra-client/models/o_auth2_token_exchange.rb +lib/ory-hydra-client/models/oidc_configuration.rb +lib/ory-hydra-client/models/oidc_user_info.rb +lib/ory-hydra-client/models/pagination.rb +lib/ory-hydra-client/models/pagination_headers.rb +lib/ory-hydra-client/models/reject_o_auth2_request.rb +lib/ory-hydra-client/models/token_pagination.rb +lib/ory-hydra-client/models/token_pagination_headers.rb +lib/ory-hydra-client/models/token_pagination_request_parameters.rb +lib/ory-hydra-client/models/token_pagination_response_headers.rb +lib/ory-hydra-client/models/trust_o_auth2_jwt_grant_issuer.rb +lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_issuer.rb +lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb lib/ory-hydra-client/models/version.rb -lib/ory-hydra-client/models/volume.rb -lib/ory-hydra-client/models/volume_usage_data.rb -lib/ory-hydra-client/models/well_known.rb lib/ory-hydra-client/version.rb ory-hydra-client.gemspec -spec/api/admin_api_spec.rb +spec/api/jwk_api_spec.rb spec/api/metadata_api_spec.rb -spec/api/public_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_consent_request_spec.rb -spec/models/accept_login_request_spec.rb -spec/models/completed_request_spec.rb -spec/models/consent_request_session_spec.rb -spec/models/consent_request_spec.rb -spec/models/container_wait_ok_body_error_spec.rb -spec/models/flush_inactive_o_auth2_tokens_request_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 +spec/models/create_json_web_key_set_spec.rb +spec/models/error_o_auth2_spec.rb spec/models/generic_error_spec.rb +spec/models/get_version200_response_spec.rb spec/models/health_not_ready_status_spec.rb spec/models/health_status_spec.rb -spec/models/json_error_spec.rb -spec/models/json_web_key_set_generator_request_spec.rb +spec/models/introspected_o_auth2_token_spec.rb +spec/models/is_ready200_response_spec.rb +spec/models/is_ready503_response_spec.rb +spec/models/json_patch_spec.rb spec/models/json_web_key_set_spec.rb spec/models/json_web_key_spec.rb -spec/models/login_request_spec.rb -spec/models/logout_request_spec.rb spec/models/o_auth2_client_spec.rb -spec/models/o_auth2_token_introspection_spec.rb -spec/models/oauth2_token_response_spec.rb -spec/models/open_id_connect_context_spec.rb -spec/models/patch_document_spec.rb -spec/models/plugin_config_args_spec.rb -spec/models/plugin_config_interface_spec.rb -spec/models/plugin_config_linux_spec.rb -spec/models/plugin_config_network_spec.rb -spec/models/plugin_config_rootfs_spec.rb -spec/models/plugin_config_spec.rb -spec/models/plugin_config_user_spec.rb -spec/models/plugin_device_spec.rb -spec/models/plugin_env_spec.rb -spec/models/plugin_interface_type_spec.rb -spec/models/plugin_mount_spec.rb -spec/models/plugin_settings_spec.rb -spec/models/previous_consent_session_spec.rb -spec/models/reject_request_spec.rb -spec/models/request_was_handled_response_spec.rb -spec/models/trust_jwt_grant_issuer_body_spec.rb -spec/models/trusted_json_web_key_spec.rb -spec/models/trusted_jwt_grant_issuer_spec.rb -spec/models/userinfo_response_spec.rb +spec/models/o_auth2_client_token_lifespans_spec.rb +spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb +spec/models/o_auth2_consent_request_spec.rb +spec/models/o_auth2_consent_session_expires_at_spec.rb +spec/models/o_auth2_consent_session_spec.rb +spec/models/o_auth2_login_request_spec.rb +spec/models/o_auth2_logout_request_spec.rb +spec/models/o_auth2_redirect_to_spec.rb +spec/models/o_auth2_token_exchange_spec.rb +spec/models/oidc_configuration_spec.rb +spec/models/oidc_user_info_spec.rb +spec/models/pagination_headers_spec.rb +spec/models/pagination_spec.rb +spec/models/reject_o_auth2_request_spec.rb +spec/models/token_pagination_headers_spec.rb +spec/models/token_pagination_request_parameters_spec.rb +spec/models/token_pagination_response_headers_spec.rb +spec/models/token_pagination_spec.rb +spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb +spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb +spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb spec/models/version_spec.rb -spec/models/volume_spec.rb -spec/models/volume_usage_data_spec.rb -spec/models/well_known_spec.rb spec/spec_helper.rb diff --git a/clients/hydra/ruby/.openapi-generator/VERSION b/clients/hydra/ruby/.openapi-generator/VERSION index 1e20ec35c64..6d54bbd7751 100644 --- a/clients/hydra/ruby/.openapi-generator/VERSION +++ b/clients/hydra/ruby/.openapi-generator/VERSION @@ -1 +1 @@ -5.4.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/clients/hydra/ruby/Gemfile.lock b/clients/hydra/ruby/Gemfile.lock new file mode 100644 index 00000000000..e0b8d1af652 --- /dev/null +++ b/clients/hydra/ruby/Gemfile.lock @@ -0,0 +1,70 @@ +PATH + remote: . + specs: + ory-hydra-client (2.0.1) + typhoeus (~> 1.0, >= 1.0.1) + +GEM + remote: https://rubygems.org/ + specs: + ast (2.4.2) + byebug (11.1.3) + coderay (1.1.3) + diff-lcs (1.5.0) + ethon (0.15.0) + ffi (>= 1.15.0) + ffi (1.15.5) + jaro_winkler (1.5.4) + method_source (1.0.0) + parallel (1.22.1) + parser (3.1.2.1) + ast (~> 2.4.1) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.9.0) + byebug (~> 11.0) + pry (~> 0.13.0) + psych (4.0.6) + stringio + rainbow (3.1.1) + rake (13.0.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.0) + rubocop (0.66.0) + jaro_winkler (~> 1.5.1) + parallel (~> 1.10) + parser (>= 2.5, != 2.5.1.1) + psych (>= 3.1.0) + rainbow (>= 2.2.2, < 4.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 1.6) + ruby-progressbar (1.11.0) + stringio (3.0.2) + typhoeus (1.4.0) + ethon (>= 0.9.0) + unicode-display_width (1.5.0) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + ory-hydra-client! + pry-byebug + rake (~> 13.0.1) + rspec (~> 3.6, >= 3.6.0) + rubocop (~> 0.66.0) + +BUNDLED WITH + 2.3.14 diff --git a/clients/hydra/ruby/README.md b/clients/hydra/ruby/README.md index e1b273fc4b2..ab031d932a6 100644 --- a/clients/hydra/ruby/README.md +++ b/clients/hydra/ruby/README.md @@ -1,13 +1,14 @@ # ory-hydra-client -OryHydraClient - the Ruby gem for the ORY Hydra +OryHydraClient - the Ruby gem for the Ory Hydra API + +Documentation for all of Ory Hydra's APIs. -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v1.11.0 -- Package version: v1.11.0 +- API version: v2.0.1 +- Package version: v2.0.1 - Build package: org.openapitools.codegen.languages.RubyClientCodegen ## Installation @@ -23,16 +24,16 @@ gem build ory-hydra-client.gemspec Then either install the gem locally: ```shell -gem install ./ory-hydra-client-v1.11.0.gem +gem install ./ory-hydra-client-v2.0.1.gem ``` -(for development, run `gem install --dev ./ory-hydra-client-v1.11.0.gem` to install the development dependencies) +(for development, run `gem install --dev ./ory-hydra-client-v2.0.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', '~> v1.11.0' + gem 'ory-hydra-client', '~> v2.0.1' ### Install from Git @@ -56,18 +57,16 @@ Please follow the [installation](#installation) procedure and then run the follo # Load the gem require 'ory-hydra-client' -api_instance = OryHydraClient::AdminApi.new -consent_challenge = 'consent_challenge_example' # String | -opts = { - body: OryHydraClient::AcceptConsentRequest.new # AcceptConsentRequest | -} +api_instance = OryHydraClient::JwkApi.new +set = 'set_example' # String | The JSON Web Key Set ID +create_json_web_key_set = OryHydraClient::CreateJsonWebKeySet.new({alg: 'alg_example', kid: 'kid_example', use: 'use_example'}) # CreateJsonWebKeySet | begin - #Accept a Consent Request - result = api_instance.accept_consent_request(consent_challenge, opts) + #Create JSON Web Key + result = api_instance.create_json_web_key_set(set, create_json_web_key_set) p result rescue OryHydraClient::ApiError => e - puts "Exception when calling AdminApi->accept_consent_request: #{e}" + puts "Exception when calling JwkApi->create_json_web_key_set: #{e}" end ``` @@ -78,101 +77,94 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*OryHydraClient::AdminApi* | [**accept_consent_request**](docs/AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -*OryHydraClient::AdminApi* | [**accept_login_request**](docs/AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -*OryHydraClient::AdminApi* | [**accept_logout_request**](docs/AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -*OryHydraClient::AdminApi* | [**create_json_web_key_set**](docs/AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a New JSON Web Key -*OryHydraClient::AdminApi* | [**create_o_auth2_client**](docs/AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 Client -*OryHydraClient::AdminApi* | [**delete_json_web_key**](docs/AdminApi.md#delete_json_web_key) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -*OryHydraClient::AdminApi* | [**delete_json_web_key_set**](docs/AdminApi.md#delete_json_web_key_set) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -*OryHydraClient::AdminApi* | [**delete_o_auth2_client**](docs/AdminApi.md#delete_o_auth2_client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -*OryHydraClient::AdminApi* | [**delete_o_auth2_token**](docs/AdminApi.md#delete_o_auth2_token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -*OryHydraClient::AdminApi* | [**delete_trusted_jwt_grant_issuer**](docs/AdminApi.md#delete_trusted_jwt_grant_issuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -*OryHydraClient::AdminApi* | [**flush_inactive_o_auth2_tokens**](docs/AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -*OryHydraClient::AdminApi* | [**get_consent_request**](docs/AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -*OryHydraClient::AdminApi* | [**get_json_web_key**](docs/AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -*OryHydraClient::AdminApi* | [**get_json_web_key_set**](docs/AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -*OryHydraClient::AdminApi* | [**get_login_request**](docs/AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a Login Request -*OryHydraClient::AdminApi* | [**get_logout_request**](docs/AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -*OryHydraClient::AdminApi* | [**get_o_auth2_client**](docs/AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -*OryHydraClient::AdminApi* | [**get_trusted_jwt_grant_issuer**](docs/AdminApi.md#get_trusted_jwt_grant_issuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -*OryHydraClient::AdminApi* | [**get_version**](docs/AdminApi.md#get_version) | **GET** /version | Get Service Version -*OryHydraClient::AdminApi* | [**introspect_o_auth2_token**](docs/AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -*OryHydraClient::AdminApi* | [**is_instance_alive**](docs/AdminApi.md#is_instance_alive) | **GET** /health/alive | Check Alive Status -*OryHydraClient::AdminApi* | [**list_o_auth2_clients**](docs/AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients -*OryHydraClient::AdminApi* | [**list_subject_consent_sessions**](docs/AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -*OryHydraClient::AdminApi* | [**list_trusted_jwt_grant_issuers**](docs/AdminApi.md#list_trusted_jwt_grant_issuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -*OryHydraClient::AdminApi* | [**patch_o_auth2_client**](docs/AdminApi.md#patch_o_auth2_client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -*OryHydraClient::AdminApi* | [**reject_consent_request**](docs/AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -*OryHydraClient::AdminApi* | [**reject_login_request**](docs/AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -*OryHydraClient::AdminApi* | [**reject_logout_request**](docs/AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -*OryHydraClient::AdminApi* | [**revoke_authentication_session**](docs/AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -*OryHydraClient::AdminApi* | [**revoke_consent_sessions**](docs/AdminApi.md#revoke_consent_sessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -*OryHydraClient::AdminApi* | [**trust_jwt_grant_issuer**](docs/AdminApi.md#trust_jwt_grant_issuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -*OryHydraClient::AdminApi* | [**update_json_web_key**](docs/AdminApi.md#update_json_web_key) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -*OryHydraClient::AdminApi* | [**update_json_web_key_set**](docs/AdminApi.md#update_json_web_key_set) | **PUT** /keys/{set} | Update a JSON Web Key Set -*OryHydraClient::AdminApi* | [**update_o_auth2_client**](docs/AdminApi.md#update_o_auth2_client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client -*OryHydraClient::MetadataApi* | [**prometheus**](docs/MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: -*OryHydraClient::PublicApi* | [**disconnect_user**](docs/PublicApi.md#disconnect_user) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -*OryHydraClient::PublicApi* | [**discover_open_id_configuration**](docs/PublicApi.md#discover_open_id_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -*OryHydraClient::PublicApi* | [**dynamic_client_registration_create_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_create_o_auth2_client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*OryHydraClient::PublicApi* | [**dynamic_client_registration_delete_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_delete_o_auth2_client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*OryHydraClient::PublicApi* | [**dynamic_client_registration_get_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_get_o_auth2_client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*OryHydraClient::PublicApi* | [**dynamic_client_registration_update_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_update_o_auth2_client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*OryHydraClient::PublicApi* | [**is_instance_ready**](docs/PublicApi.md#is_instance_ready) | **GET** /health/ready | Check Readiness Status -*OryHydraClient::PublicApi* | [**oauth2_token**](docs/PublicApi.md#oauth2_token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -*OryHydraClient::PublicApi* | [**oauth_auth**](docs/PublicApi.md#oauth_auth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -*OryHydraClient::PublicApi* | [**revoke_o_auth2_token**](docs/PublicApi.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -*OryHydraClient::PublicApi* | [**userinfo**](docs/PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -*OryHydraClient::PublicApi* | [**well_known**](docs/PublicApi.md#well_known) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery +*OryHydraClient::JwkApi* | [**create_json_web_key_set**](docs/JwkApi.md#create_json_web_key_set) | **POST** /admin/keys/{set} | Create JSON Web Key +*OryHydraClient::JwkApi* | [**delete_json_web_key**](docs/JwkApi.md#delete_json_web_key) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key +*OryHydraClient::JwkApi* | [**delete_json_web_key_set**](docs/JwkApi.md#delete_json_web_key_set) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set +*OryHydraClient::JwkApi* | [**get_json_web_key**](docs/JwkApi.md#get_json_web_key) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key +*OryHydraClient::JwkApi* | [**get_json_web_key_set**](docs/JwkApi.md#get_json_web_key_set) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set +*OryHydraClient::JwkApi* | [**set_json_web_key**](docs/JwkApi.md#set_json_web_key) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key +*OryHydraClient::JwkApi* | [**set_json_web_key_set**](docs/JwkApi.md#set_json_web_key_set) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set +*OryHydraClient::MetadataApi* | [**get_version**](docs/MetadataApi.md#get_version) | **GET** /version | Return Running Software Version. +*OryHydraClient::MetadataApi* | [**is_alive**](docs/MetadataApi.md#is_alive) | **GET** /health/alive | Check HTTP Server Status +*OryHydraClient::MetadataApi* | [**is_ready**](docs/MetadataApi.md#is_ready) | **GET** /health/ready | Check HTTP Server and Database Status +*OryHydraClient::OAuth2Api* | [**accept_o_auth2_consent_request**](docs/OAuth2Api.md#accept_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +*OryHydraClient::OAuth2Api* | [**accept_o_auth2_login_request**](docs/OAuth2Api.md#accept_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +*OryHydraClient::OAuth2Api* | [**accept_o_auth2_logout_request**](docs/OAuth2Api.md#accept_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +*OryHydraClient::OAuth2Api* | [**create_o_auth2_client**](docs/OAuth2Api.md#create_o_auth2_client) | **POST** /admin/clients | Create OAuth 2.0 Client +*OryHydraClient::OAuth2Api* | [**delete_o_auth2_client**](docs/OAuth2Api.md#delete_o_auth2_client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client +*OryHydraClient::OAuth2Api* | [**delete_o_auth2_token**](docs/OAuth2Api.md#delete_o_auth2_token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +*OryHydraClient::OAuth2Api* | [**delete_trusted_o_auth2_jwt_grant_issuer**](docs/OAuth2Api.md#delete_trusted_o_auth2_jwt_grant_issuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +*OryHydraClient::OAuth2Api* | [**get_o_auth2_client**](docs/OAuth2Api.md#get_o_auth2_client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client +*OryHydraClient::OAuth2Api* | [**get_o_auth2_consent_request**](docs/OAuth2Api.md#get_o_auth2_consent_request) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +*OryHydraClient::OAuth2Api* | [**get_o_auth2_login_request**](docs/OAuth2Api.md#get_o_auth2_login_request) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +*OryHydraClient::OAuth2Api* | [**get_o_auth2_logout_request**](docs/OAuth2Api.md#get_o_auth2_logout_request) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +*OryHydraClient::OAuth2Api* | [**get_trusted_o_auth2_jwt_grant_issuer**](docs/OAuth2Api.md#get_trusted_o_auth2_jwt_grant_issuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +*OryHydraClient::OAuth2Api* | [**introspect_o_auth2_token**](docs/OAuth2Api.md#introspect_o_auth2_token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +*OryHydraClient::OAuth2Api* | [**list_o_auth2_clients**](docs/OAuth2Api.md#list_o_auth2_clients) | **GET** /admin/clients | List OAuth 2.0 Clients +*OryHydraClient::OAuth2Api* | [**list_o_auth2_consent_sessions**](docs/OAuth2Api.md#list_o_auth2_consent_sessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +*OryHydraClient::OAuth2Api* | [**list_trusted_o_auth2_jwt_grant_issuers**](docs/OAuth2Api.md#list_trusted_o_auth2_jwt_grant_issuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +*OryHydraClient::OAuth2Api* | [**o_auth2_authorize**](docs/OAuth2Api.md#o_auth2_authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint +*OryHydraClient::OAuth2Api* | [**oauth2_token_exchange**](docs/OAuth2Api.md#oauth2_token_exchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint +*OryHydraClient::OAuth2Api* | [**patch_o_auth2_client**](docs/OAuth2Api.md#patch_o_auth2_client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client +*OryHydraClient::OAuth2Api* | [**reject_o_auth2_consent_request**](docs/OAuth2Api.md#reject_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +*OryHydraClient::OAuth2Api* | [**reject_o_auth2_login_request**](docs/OAuth2Api.md#reject_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +*OryHydraClient::OAuth2Api* | [**reject_o_auth2_logout_request**](docs/OAuth2Api.md#reject_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +*OryHydraClient::OAuth2Api* | [**revoke_o_auth2_consent_sessions**](docs/OAuth2Api.md#revoke_o_auth2_consent_sessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +*OryHydraClient::OAuth2Api* | [**revoke_o_auth2_login_sessions**](docs/OAuth2Api.md#revoke_o_auth2_login_sessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +*OryHydraClient::OAuth2Api* | [**revoke_o_auth2_token**](docs/OAuth2Api.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +*OryHydraClient::OAuth2Api* | [**set_o_auth2_client**](docs/OAuth2Api.md#set_o_auth2_client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client +*OryHydraClient::OAuth2Api* | [**set_o_auth2_client_lifespans**](docs/OAuth2Api.md#set_o_auth2_client_lifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +*OryHydraClient::OAuth2Api* | [**trust_o_auth2_jwt_grant_issuer**](docs/OAuth2Api.md#trust_o_auth2_jwt_grant_issuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer +*OryHydraClient::OidcApi* | [**create_oidc_dynamic_client**](docs/OidcApi.md#create_oidc_dynamic_client) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +*OryHydraClient::OidcApi* | [**delete_oidc_dynamic_client**](docs/OidcApi.md#delete_oidc_dynamic_client) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +*OryHydraClient::OidcApi* | [**discover_oidc_configuration**](docs/OidcApi.md#discover_oidc_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery +*OryHydraClient::OidcApi* | [**get_oidc_dynamic_client**](docs/OidcApi.md#get_oidc_dynamic_client) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +*OryHydraClient::OidcApi* | [**get_oidc_user_info**](docs/OidcApi.md#get_oidc_user_info) | **GET** /userinfo | OpenID Connect Userinfo +*OryHydraClient::OidcApi* | [**revoke_oidc_session**](docs/OidcApi.md#revoke_oidc_session) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +*OryHydraClient::OidcApi* | [**set_oidc_dynamic_client**](docs/OidcApi.md#set_oidc_dynamic_client) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration +*OryHydraClient::WellknownApi* | [**discover_json_web_keys**](docs/WellknownApi.md#discover_json_web_keys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys ## Documentation for Models - - [OryHydraClient::AcceptConsentRequest](docs/AcceptConsentRequest.md) - - [OryHydraClient::AcceptLoginRequest](docs/AcceptLoginRequest.md) - - [OryHydraClient::CompletedRequest](docs/CompletedRequest.md) - - [OryHydraClient::ConsentRequest](docs/ConsentRequest.md) - - [OryHydraClient::ConsentRequestSession](docs/ConsentRequestSession.md) - - [OryHydraClient::ContainerWaitOKBodyError](docs/ContainerWaitOKBodyError.md) - - [OryHydraClient::FlushInactiveOAuth2TokensRequest](docs/FlushInactiveOAuth2TokensRequest.md) + - [OryHydraClient::AcceptOAuth2ConsentRequest](docs/AcceptOAuth2ConsentRequest.md) + - [OryHydraClient::AcceptOAuth2ConsentRequestSession](docs/AcceptOAuth2ConsentRequestSession.md) + - [OryHydraClient::AcceptOAuth2LoginRequest](docs/AcceptOAuth2LoginRequest.md) + - [OryHydraClient::CreateJsonWebKeySet](docs/CreateJsonWebKeySet.md) + - [OryHydraClient::ErrorOAuth2](docs/ErrorOAuth2.md) - [OryHydraClient::GenericError](docs/GenericError.md) + - [OryHydraClient::GetVersion200Response](docs/GetVersion200Response.md) - [OryHydraClient::HealthNotReadyStatus](docs/HealthNotReadyStatus.md) - [OryHydraClient::HealthStatus](docs/HealthStatus.md) - - [OryHydraClient::JSONWebKey](docs/JSONWebKey.md) - - [OryHydraClient::JSONWebKeySet](docs/JSONWebKeySet.md) - - [OryHydraClient::JsonError](docs/JsonError.md) - - [OryHydraClient::JsonWebKeySetGeneratorRequest](docs/JsonWebKeySetGeneratorRequest.md) - - [OryHydraClient::LoginRequest](docs/LoginRequest.md) - - [OryHydraClient::LogoutRequest](docs/LogoutRequest.md) + - [OryHydraClient::IntrospectedOAuth2Token](docs/IntrospectedOAuth2Token.md) + - [OryHydraClient::IsReady200Response](docs/IsReady200Response.md) + - [OryHydraClient::IsReady503Response](docs/IsReady503Response.md) + - [OryHydraClient::JsonPatch](docs/JsonPatch.md) + - [OryHydraClient::JsonWebKey](docs/JsonWebKey.md) + - [OryHydraClient::JsonWebKeySet](docs/JsonWebKeySet.md) - [OryHydraClient::OAuth2Client](docs/OAuth2Client.md) - - [OryHydraClient::OAuth2TokenIntrospection](docs/OAuth2TokenIntrospection.md) - - [OryHydraClient::Oauth2TokenResponse](docs/Oauth2TokenResponse.md) - - [OryHydraClient::OpenIDConnectContext](docs/OpenIDConnectContext.md) - - [OryHydraClient::PatchDocument](docs/PatchDocument.md) - - [OryHydraClient::PluginConfig](docs/PluginConfig.md) - - [OryHydraClient::PluginConfigArgs](docs/PluginConfigArgs.md) - - [OryHydraClient::PluginConfigInterface](docs/PluginConfigInterface.md) - - [OryHydraClient::PluginConfigLinux](docs/PluginConfigLinux.md) - - [OryHydraClient::PluginConfigNetwork](docs/PluginConfigNetwork.md) - - [OryHydraClient::PluginConfigRootfs](docs/PluginConfigRootfs.md) - - [OryHydraClient::PluginConfigUser](docs/PluginConfigUser.md) - - [OryHydraClient::PluginDevice](docs/PluginDevice.md) - - [OryHydraClient::PluginEnv](docs/PluginEnv.md) - - [OryHydraClient::PluginInterfaceType](docs/PluginInterfaceType.md) - - [OryHydraClient::PluginMount](docs/PluginMount.md) - - [OryHydraClient::PluginSettings](docs/PluginSettings.md) - - [OryHydraClient::PreviousConsentSession](docs/PreviousConsentSession.md) - - [OryHydraClient::RejectRequest](docs/RejectRequest.md) - - [OryHydraClient::RequestWasHandledResponse](docs/RequestWasHandledResponse.md) - - [OryHydraClient::TrustJwtGrantIssuerBody](docs/TrustJwtGrantIssuerBody.md) - - [OryHydraClient::TrustedJsonWebKey](docs/TrustedJsonWebKey.md) - - [OryHydraClient::TrustedJwtGrantIssuer](docs/TrustedJwtGrantIssuer.md) - - [OryHydraClient::UserinfoResponse](docs/UserinfoResponse.md) + - [OryHydraClient::OAuth2ClientTokenLifespans](docs/OAuth2ClientTokenLifespans.md) + - [OryHydraClient::OAuth2ConsentRequest](docs/OAuth2ConsentRequest.md) + - [OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext](docs/OAuth2ConsentRequestOpenIDConnectContext.md) + - [OryHydraClient::OAuth2ConsentSession](docs/OAuth2ConsentSession.md) + - [OryHydraClient::OAuth2ConsentSessionExpiresAt](docs/OAuth2ConsentSessionExpiresAt.md) + - [OryHydraClient::OAuth2LoginRequest](docs/OAuth2LoginRequest.md) + - [OryHydraClient::OAuth2LogoutRequest](docs/OAuth2LogoutRequest.md) + - [OryHydraClient::OAuth2RedirectTo](docs/OAuth2RedirectTo.md) + - [OryHydraClient::OAuth2TokenExchange](docs/OAuth2TokenExchange.md) + - [OryHydraClient::OidcConfiguration](docs/OidcConfiguration.md) + - [OryHydraClient::OidcUserInfo](docs/OidcUserInfo.md) + - [OryHydraClient::Pagination](docs/Pagination.md) + - [OryHydraClient::PaginationHeaders](docs/PaginationHeaders.md) + - [OryHydraClient::RejectOAuth2Request](docs/RejectOAuth2Request.md) + - [OryHydraClient::TokenPagination](docs/TokenPagination.md) + - [OryHydraClient::TokenPaginationHeaders](docs/TokenPaginationHeaders.md) + - [OryHydraClient::TokenPaginationRequestParameters](docs/TokenPaginationRequestParameters.md) + - [OryHydraClient::TokenPaginationResponseHeaders](docs/TokenPaginationResponseHeaders.md) + - [OryHydraClient::TrustOAuth2JwtGrantIssuer](docs/TrustOAuth2JwtGrantIssuer.md) + - [OryHydraClient::TrustedOAuth2JwtGrantIssuer](docs/TrustedOAuth2JwtGrantIssuer.md) + - [OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey](docs/TrustedOAuth2JwtGrantJsonWebKey.md) - [OryHydraClient::Version](docs/Version.md) - - [OryHydraClient::Volume](docs/Volume.md) - - [OryHydraClient::VolumeUsageData](docs/VolumeUsageData.md) - - [OryHydraClient::WellKnown](docs/WellKnown.md) ## Documentation for Authorization @@ -182,6 +174,10 @@ Class | Method | HTTP request | Description - **Type**: HTTP basic authentication +### bearer + +- **Type**: Bearer authentication + ### oauth2 diff --git a/clients/hydra/ruby/docs/AcceptConsentRequest.md b/clients/hydra/ruby/docs/AcceptOAuth2ConsentRequest.md similarity index 80% rename from clients/hydra/ruby/docs/AcceptConsentRequest.md rename to clients/hydra/ruby/docs/AcceptOAuth2ConsentRequest.md index d379196fb9e..28c47d051f8 100644 --- a/clients/hydra/ruby/docs/AcceptConsentRequest.md +++ b/clients/hydra/ruby/docs/AcceptOAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# OryHydraClient::AcceptConsentRequest +# OryHydraClient::AcceptOAuth2ConsentRequest ## Properties @@ -9,14 +9,14 @@ | **handled_at** | **Time** | | [optional] | | **remember** | **Boolean** | 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** | **Integer** | 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** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] | +| **session** | [**AcceptOAuth2ConsentRequestSession**](AcceptOAuth2ConsentRequestSession.md) | | [optional] | ## Example ```ruby require 'ory-hydra-client' -instance = OryHydraClient::AcceptConsentRequest.new( +instance = OryHydraClient::AcceptOAuth2ConsentRequest.new( grant_access_token_audience: null, grant_scope: null, handled_at: null, diff --git a/clients/hydra/ruby/docs/ConsentRequestSession.md b/clients/hydra/ruby/docs/AcceptOAuth2ConsentRequestSession.md similarity index 88% rename from clients/hydra/ruby/docs/ConsentRequestSession.md rename to clients/hydra/ruby/docs/AcceptOAuth2ConsentRequestSession.md index 282eee5018f..ca58b253dcd 100644 --- a/clients/hydra/ruby/docs/ConsentRequestSession.md +++ b/clients/hydra/ruby/docs/AcceptOAuth2ConsentRequestSession.md @@ -1,4 +1,4 @@ -# OryHydraClient::ConsentRequestSession +# OryHydraClient::AcceptOAuth2ConsentRequestSession ## Properties @@ -12,7 +12,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::ConsentRequestSession.new( +instance = OryHydraClient::AcceptOAuth2ConsentRequestSession.new( access_token: null, id_token: null ) diff --git a/clients/hydra/ruby/docs/AcceptLoginRequest.md b/clients/hydra/ruby/docs/AcceptOAuth2LoginRequest.md similarity index 96% rename from clients/hydra/ruby/docs/AcceptLoginRequest.md rename to clients/hydra/ruby/docs/AcceptOAuth2LoginRequest.md index dbf6fab6246..10c201483f9 100644 --- a/clients/hydra/ruby/docs/AcceptLoginRequest.md +++ b/clients/hydra/ruby/docs/AcceptOAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# OryHydraClient::AcceptLoginRequest +# OryHydraClient::AcceptOAuth2LoginRequest ## Properties @@ -17,7 +17,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::AcceptLoginRequest.new( +instance = OryHydraClient::AcceptOAuth2LoginRequest.new( acr: null, amr: null, context: null, diff --git a/clients/hydra/ruby/docs/AdminApi.md b/clients/hydra/ruby/docs/AdminApi.md deleted file mode 100644 index 54ed10b52a0..00000000000 --- a/clients/hydra/ruby/docs/AdminApi.md +++ /dev/null @@ -1,2272 +0,0 @@ -# OryHydraClient::AdminApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -| ------ | ------------ | ----------- | -| [**accept_consent_request**](AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request | -| [**accept_login_request**](AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request | -| [**accept_logout_request**](AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request | -| [**create_json_web_key_set**](AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a New JSON Web Key | -| [**create_o_auth2_client**](AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 Client | -| [**delete_json_web_key**](AdminApi.md#delete_json_web_key) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key | -| [**delete_json_web_key_set**](AdminApi.md#delete_json_web_key_set) | **DELETE** /keys/{set} | Delete a JSON Web Key Set | -| [**delete_o_auth2_client**](AdminApi.md#delete_o_auth2_client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client | -| [**delete_o_auth2_token**](AdminApi.md#delete_o_auth2_token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client | -| [**delete_trusted_jwt_grant_issuer**](AdminApi.md#delete_trusted_jwt_grant_issuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer | -| [**flush_inactive_o_auth2_tokens**](AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens | -| [**get_consent_request**](AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information | -| [**get_json_web_key**](AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key | -| [**get_json_web_key_set**](AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set | -| [**get_login_request**](AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a Login Request | -| [**get_logout_request**](AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a Logout Request | -| [**get_o_auth2_client**](AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client | -| [**get_trusted_jwt_grant_issuer**](AdminApi.md#get_trusted_jwt_grant_issuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer | -| [**get_version**](AdminApi.md#get_version) | **GET** /version | Get Service Version | -| [**introspect_o_auth2_token**](AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens | -| [**is_instance_alive**](AdminApi.md#is_instance_alive) | **GET** /health/alive | Check Alive Status | -| [**list_o_auth2_clients**](AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients | -| [**list_subject_consent_sessions**](AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject | -| [**list_trusted_jwt_grant_issuers**](AdminApi.md#list_trusted_jwt_grant_issuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers | -| [**patch_o_auth2_client**](AdminApi.md#patch_o_auth2_client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client | -| [**reject_consent_request**](AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request | -| [**reject_login_request**](AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request | -| [**reject_logout_request**](AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request | -| [**revoke_authentication_session**](AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session | -| [**revoke_consent_sessions**](AdminApi.md#revoke_consent_sessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client | -| [**trust_jwt_grant_issuer**](AdminApi.md#trust_jwt_grant_issuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer | -| [**update_json_web_key**](AdminApi.md#update_json_web_key) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key | -| [**update_json_web_key_set**](AdminApi.md#update_json_web_key_set) | **PUT** /keys/{set} | Update a JSON Web Key Set | -| [**update_o_auth2_client**](AdminApi.md#update_o_auth2_client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client | - - -## accept_consent_request - -> accept_consent_request(consent_challenge, opts) - -Accept a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -consent_challenge = 'consent_challenge_example' # String | -opts = { - body: OryHydraClient::AcceptConsentRequest.new # AcceptConsentRequest | -} - -begin - # Accept a Consent Request - result = api_instance.accept_consent_request(consent_challenge, opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->accept_consent_request: #{e}" -end -``` - -#### Using the accept_consent_request_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> accept_consent_request_with_http_info(consent_challenge, opts) - -```ruby -begin - # Accept a Consent Request - data, status_code, headers = api_instance.accept_consent_request_with_http_info(consent_challenge, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->accept_consent_request_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **consent_challenge** | **String** | | | -| **body** | [**AcceptConsentRequest**](AcceptConsentRequest.md) | | [optional] | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## accept_login_request - -> accept_login_request(login_challenge, opts) - -Accept a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -login_challenge = 'login_challenge_example' # String | -opts = { - body: OryHydraClient::AcceptLoginRequest.new({subject: 'subject_example'}) # AcceptLoginRequest | -} - -begin - # Accept a Login Request - result = api_instance.accept_login_request(login_challenge, opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->accept_login_request: #{e}" -end -``` - -#### Using the accept_login_request_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> accept_login_request_with_http_info(login_challenge, opts) - -```ruby -begin - # Accept a Login Request - data, status_code, headers = api_instance.accept_login_request_with_http_info(login_challenge, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->accept_login_request_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **login_challenge** | **String** | | | -| **body** | [**AcceptLoginRequest**](AcceptLoginRequest.md) | | [optional] | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## accept_logout_request - -> accept_logout_request(logout_challenge) - -Accept a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -logout_challenge = 'logout_challenge_example' # String | - -begin - # Accept a Logout Request - result = api_instance.accept_logout_request(logout_challenge) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->accept_logout_request: #{e}" -end -``` - -#### Using the accept_logout_request_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> accept_logout_request_with_http_info(logout_challenge) - -```ruby -begin - # Accept a Logout Request - data, status_code, headers = api_instance.accept_logout_request_with_http_info(logout_challenge) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->accept_logout_request_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **logout_challenge** | **String** | | | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## create_json_web_key_set - -> create_json_web_key_set(set, opts) - -Generate a New 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -set = 'set_example' # String | The set -opts = { - body: OryHydraClient::JsonWebKeySetGeneratorRequest.new({alg: 'alg_example', kid: 'kid_example', use: 'use_example'}) # JsonWebKeySetGeneratorRequest | -} - -begin - # Generate a New JSON Web Key - result = api_instance.create_json_web_key_set(set, opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->create_json_web_key_set: #{e}" -end -``` - -#### Using the create_json_web_key_set_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> create_json_web_key_set_with_http_info(set, opts) - -```ruby -begin - # Generate a New JSON Web Key - data, status_code, headers = api_instance.create_json_web_key_set_with_http_info(set, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->create_json_web_key_set_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **set** | **String** | The set | | -| **body** | [**JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md) | | [optional] | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## create_o_auth2_client - -> create_o_auth2_client(body) - -Create an OAuth 2.0 Client - -Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -body = OryHydraClient::OAuth2Client.new # OAuth2Client | - -begin - # Create an OAuth 2.0 Client - result = api_instance.create_o_auth2_client(body) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->create_o_auth2_client: #{e}" -end -``` - -#### Using the create_o_auth2_client_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> create_o_auth2_client_with_http_info(body) - -```ruby -begin - # Create an OAuth 2.0 Client - data, status_code, headers = api_instance.create_o_auth2_client_with_http_info(body) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->create_o_auth2_client_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **body** | [**OAuth2Client**](OAuth2Client.md) | | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## delete_json_web_key - -> delete_json_web_key(kid, set) - -Delete a 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -kid = 'kid_example' # String | The kid of the desired key -set = 'set_example' # String | The set - -begin - # Delete a JSON Web Key - api_instance.delete_json_web_key(kid, set) -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_json_web_key: #{e}" -end -``` - -#### Using the delete_json_web_key_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> delete_json_web_key_with_http_info(kid, set) - -```ruby -begin - # Delete a JSON Web Key - data, status_code, headers = api_instance.delete_json_web_key_with_http_info(kid, set) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_json_web_key_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **kid** | **String** | The kid of the desired key | | -| **set** | **String** | The set | | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## delete_json_web_key_set - -> delete_json_web_key_set(set) - -Delete a 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -set = 'set_example' # String | The set - -begin - # Delete a JSON Web Key Set - api_instance.delete_json_web_key_set(set) -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_json_web_key_set: #{e}" -end -``` - -#### Using the delete_json_web_key_set_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> delete_json_web_key_set_with_http_info(set) - -```ruby -begin - # Delete a JSON Web Key Set - data, status_code, headers = api_instance.delete_json_web_key_set_with_http_info(set) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_json_web_key_set_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **set** | **String** | The set | | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## delete_o_auth2_client - -> delete_o_auth2_client(id) - -Deletes an 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -id = 'id_example' # String | The id of the OAuth 2.0 Client. - -begin - # Deletes an OAuth 2.0 Client - api_instance.delete_o_auth2_client(id) -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_o_auth2_client: #{e}" -end -``` - -#### Using the delete_o_auth2_client_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> delete_o_auth2_client_with_http_info(id) - -```ruby -begin - # Deletes an OAuth 2.0 Client - data, status_code, headers = api_instance.delete_o_auth2_client_with_http_info(id) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_o_auth2_client_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **id** | **String** | The id of the OAuth 2.0 Client. | | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## delete_o_auth2_token - -> delete_o_auth2_token(client_id) - -Delete OAuth2 Access Tokens from a Client - -This endpoint deletes OAuth2 access tokens issued for a client from the database - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -client_id = 'client_id_example' # String | - -begin - # Delete OAuth2 Access Tokens from a Client - api_instance.delete_o_auth2_token(client_id) -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_o_auth2_token: #{e}" -end -``` - -#### Using the delete_o_auth2_token_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> delete_o_auth2_token_with_http_info(client_id) - -```ruby -begin - # Delete OAuth2 Access Tokens from a Client - data, status_code, headers = api_instance.delete_o_auth2_token_with_http_info(client_id) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_o_auth2_token_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **client_id** | **String** | | | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## delete_trusted_jwt_grant_issuer - -> delete_trusted_jwt_grant_issuer(id) - -Delete a 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -id = 'id_example' # String | The id of the desired grant - -begin - # Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - api_instance.delete_trusted_jwt_grant_issuer(id) -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_trusted_jwt_grant_issuer: #{e}" -end -``` - -#### Using the delete_trusted_jwt_grant_issuer_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> delete_trusted_jwt_grant_issuer_with_http_info(id) - -```ruby -begin - # Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - data, status_code, headers = api_instance.delete_trusted_jwt_grant_issuer_with_http_info(id) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->delete_trusted_jwt_grant_issuer_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **id** | **String** | The id of the desired grant | | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## flush_inactive_o_auth2_tokens - -> flush_inactive_o_auth2_tokens(opts) - -Flush Expired OAuth2 Access Tokens - -This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -opts = { - body: OryHydraClient::FlushInactiveOAuth2TokensRequest.new # FlushInactiveOAuth2TokensRequest | -} - -begin - # Flush Expired OAuth2 Access Tokens - api_instance.flush_inactive_o_auth2_tokens(opts) -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->flush_inactive_o_auth2_tokens: #{e}" -end -``` - -#### Using the flush_inactive_o_auth2_tokens_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> flush_inactive_o_auth2_tokens_with_http_info(opts) - -```ruby -begin - # Flush Expired OAuth2 Access Tokens - data, status_code, headers = api_instance.flush_inactive_o_auth2_tokens_with_http_info(opts) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->flush_inactive_o_auth2_tokens_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **body** | [**FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md) | | [optional] | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## get_consent_request - -> get_consent_request(consent_challenge) - -Get Consent Request Information - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -consent_challenge = 'consent_challenge_example' # String | - -begin - # Get Consent Request Information - result = api_instance.get_consent_request(consent_challenge) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_consent_request: #{e}" -end -``` - -#### Using the get_consent_request_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_consent_request_with_http_info(consent_challenge) - -```ruby -begin - # Get Consent Request Information - data, status_code, headers = api_instance.get_consent_request_with_http_info(consent_challenge) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_consent_request_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **consent_challenge** | **String** | | | - -### Return type - -[**ConsentRequest**](ConsentRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## get_json_web_key - -> get_json_web_key(kid, set) - -Fetch a JSON Web Key - -This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -kid = 'kid_example' # String | The kid of the desired key -set = 'set_example' # String | The set - -begin - # Fetch a JSON Web Key - result = api_instance.get_json_web_key(kid, set) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_json_web_key: #{e}" -end -``` - -#### Using the get_json_web_key_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_json_web_key_with_http_info(kid, set) - -```ruby -begin - # Fetch a JSON Web Key - data, status_code, headers = api_instance.get_json_web_key_with_http_info(kid, set) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_json_web_key_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **kid** | **String** | The kid of the desired key | | -| **set** | **String** | The set | | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## get_json_web_key_set - -> 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -set = 'set_example' # String | The set - -begin - # Retrieve a JSON Web Key Set - result = api_instance.get_json_web_key_set(set) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_json_web_key_set: #{e}" -end -``` - -#### Using the get_json_web_key_set_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_json_web_key_set_with_http_info(set) - -```ruby -begin - # Retrieve a JSON Web Key Set - data, status_code, headers = api_instance.get_json_web_key_set_with_http_info(set) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_json_web_key_set_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **set** | **String** | The set | | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## get_login_request - -> get_login_request(login_challenge) - -Get a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -login_challenge = 'login_challenge_example' # String | - -begin - # Get a Login Request - result = api_instance.get_login_request(login_challenge) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_login_request: #{e}" -end -``` - -#### Using the get_login_request_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_login_request_with_http_info(login_challenge) - -```ruby -begin - # Get a Login Request - data, status_code, headers = api_instance.get_login_request_with_http_info(login_challenge) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_login_request_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **login_challenge** | **String** | | | - -### Return type - -[**LoginRequest**](LoginRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## get_logout_request - -> get_logout_request(logout_challenge) - -Get a Logout Request - -Use this endpoint to fetch a logout request. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -logout_challenge = 'logout_challenge_example' # String | - -begin - # Get a Logout Request - result = api_instance.get_logout_request(logout_challenge) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_logout_request: #{e}" -end -``` - -#### Using the get_logout_request_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_logout_request_with_http_info(logout_challenge) - -```ruby -begin - # Get a Logout Request - data, status_code, headers = api_instance.get_logout_request_with_http_info(logout_challenge) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_logout_request_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **logout_challenge** | **String** | | | - -### Return type - -[**LogoutRequest**](LogoutRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## get_o_auth2_client - -> 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -id = 'id_example' # String | The id of the OAuth 2.0 Client. - -begin - # Get an OAuth 2.0 Client - result = api_instance.get_o_auth2_client(id) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_o_auth2_client: #{e}" -end -``` - -#### Using the get_o_auth2_client_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_o_auth2_client_with_http_info(id) - -```ruby -begin - # Get an OAuth 2.0 Client - data, status_code, headers = api_instance.get_o_auth2_client_with_http_info(id) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_o_auth2_client_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **id** | **String** | The id of the OAuth 2.0 Client. | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## get_trusted_jwt_grant_issuer - -> get_trusted_jwt_grant_issuer(id) - -Get a 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -id = 'id_example' # String | The id of the desired grant - -begin - # Get a Trusted OAuth2 JWT Bearer Grant Type Issuer - result = api_instance.get_trusted_jwt_grant_issuer(id) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_trusted_jwt_grant_issuer: #{e}" -end -``` - -#### Using the get_trusted_jwt_grant_issuer_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_trusted_jwt_grant_issuer_with_http_info(id) - -```ruby -begin - # Get a Trusted OAuth2 JWT Bearer Grant Type Issuer - data, status_code, headers = api_instance.get_trusted_jwt_grant_issuer_with_http_info(id) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_trusted_jwt_grant_issuer_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **id** | **String** | The id of the desired grant | | - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## get_version - -> get_version - -Get Service Version - -This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new - -begin - # Get Service Version - result = api_instance.get_version - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_version: #{e}" -end -``` - -#### Using the get_version_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_version_with_http_info - -```ruby -begin - # Get Service Version - data, status_code, headers = api_instance.get_version_with_http_info - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->get_version_with_http_info: #{e}" -end -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Version**](Version.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## introspect_o_auth2_token - -> introspect_o_auth2_token(token, opts) - -Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -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. -opts = { - 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. -} - -begin - # Introspect OAuth2 Tokens - result = api_instance.introspect_o_auth2_token(token, opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->introspect_o_auth2_token: #{e}" -end -``` - -#### Using the introspect_o_auth2_token_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> introspect_o_auth2_token_with_http_info(token, opts) - -```ruby -begin - # Introspect OAuth2 Tokens - data, status_code, headers = api_instance.introspect_o_auth2_token_with_http_info(token, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->introspect_o_auth2_token_with_http_info: #{e}" -end -``` - -### 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] | - -### Return type - -[**OAuth2TokenIntrospection**](OAuth2TokenIntrospection.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - - -## is_instance_alive - -> is_instance_alive - -Check Alive Status - -This endpoint returns a 200 status code when the HTTP server is up running. 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new - -begin - # Check Alive Status - result = api_instance.is_instance_alive - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->is_instance_alive: #{e}" -end -``` - -#### Using the is_instance_alive_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> is_instance_alive_with_http_info - -```ruby -begin - # Check Alive Status - data, status_code, headers = api_instance.is_instance_alive_with_http_info - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->is_instance_alive_with_http_info: #{e}" -end -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## list_o_auth2_clients - -> > list_o_auth2_clients(opts) - -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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -opts = { - limit: 789, # Integer | The maximum amount of clients to returned, upper bound is 500 clients. - offset: 789, # Integer | The offset from where to start looking. - client_name: 'client_name_example', # String | The name of the clients to filter by. - owner: 'owner_example' # String | The owner of the clients to filter by. -} - -begin - # List OAuth 2.0 Clients - result = api_instance.list_o_auth2_clients(opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->list_o_auth2_clients: #{e}" -end -``` - -#### Using the list_o_auth2_clients_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> >, Integer, Hash)> list_o_auth2_clients_with_http_info(opts) - -```ruby -begin - # List OAuth 2.0 Clients - data, status_code, headers = api_instance.list_o_auth2_clients_with_http_info(opts) - p status_code # => 2xx - p headers # => { ... } - p data # => > -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->list_o_auth2_clients_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **limit** | **Integer** | The maximum amount of clients to returned, upper bound is 500 clients. | [optional] | -| **offset** | **Integer** | The offset from where to start looking. | [optional] | -| **client_name** | **String** | The name of the clients to filter by. | [optional] | -| **owner** | **String** | The owner of the clients to filter by. | [optional] | - -### Return type - -[**Array<OAuth2Client>**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## list_subject_consent_sessions - -> > list_subject_consent_sessions(subject) - -Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -subject = 'subject_example' # String | - -begin - # Lists All Consent Sessions of a Subject - result = api_instance.list_subject_consent_sessions(subject) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->list_subject_consent_sessions: #{e}" -end -``` - -#### Using the list_subject_consent_sessions_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> >, Integer, Hash)> list_subject_consent_sessions_with_http_info(subject) - -```ruby -begin - # Lists All Consent Sessions of a Subject - data, status_code, headers = api_instance.list_subject_consent_sessions_with_http_info(subject) - p status_code # => 2xx - p headers # => { ... } - p data # => > -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->list_subject_consent_sessions_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **subject** | **String** | | | - -### Return type - -[**Array<PreviousConsentSession>**](PreviousConsentSession.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## list_trusted_jwt_grant_issuers - -> > list_trusted_jwt_grant_issuers(opts) - -List Trusted OAuth2 JWT Bearer Grant Type Issuers - -Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -opts = { - issuer: 'issuer_example', # String | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - limit: 789, # Integer | The maximum amount of policies returned, upper bound is 500 policies - offset: 789 # Integer | The offset from where to start looking. -} - -begin - # List Trusted OAuth2 JWT Bearer Grant Type Issuers - result = api_instance.list_trusted_jwt_grant_issuers(opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->list_trusted_jwt_grant_issuers: #{e}" -end -``` - -#### Using the list_trusted_jwt_grant_issuers_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> >, Integer, Hash)> list_trusted_jwt_grant_issuers_with_http_info(opts) - -```ruby -begin - # List Trusted OAuth2 JWT Bearer Grant Type Issuers - data, status_code, headers = api_instance.list_trusted_jwt_grant_issuers_with_http_info(opts) - p status_code # => 2xx - p headers # => { ... } - p data # => > -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->list_trusted_jwt_grant_issuers_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **issuer** | **String** | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] | -| **limit** | **Integer** | The maximum amount of policies returned, upper bound is 500 policies | [optional] | -| **offset** | **Integer** | The offset from where to start looking. | [optional] | - -### Return type - -[**Array<TrustedJwtGrantIssuer>**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## patch_o_auth2_client - -> patch_o_auth2_client(id, body) - -Patch an OAuth 2.0 Client - -Patch an existing OAuth 2.0 Client. 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -id = 'id_example' # String | The id of the OAuth 2.0 Client. -body = [OryHydraClient::PatchDocument.new({op: '"replace"', path: '"/name"'})] # Array | - -begin - # Patch an OAuth 2.0 Client - result = api_instance.patch_o_auth2_client(id, body) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->patch_o_auth2_client: #{e}" -end -``` - -#### Using the patch_o_auth2_client_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> patch_o_auth2_client_with_http_info(id, body) - -```ruby -begin - # Patch an OAuth 2.0 Client - data, status_code, headers = api_instance.patch_o_auth2_client_with_http_info(id, body) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->patch_o_auth2_client_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **id** | **String** | The id of the OAuth 2.0 Client. | | -| **body** | [**Array<PatchDocument>**](PatchDocument.md) | | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## reject_consent_request - -> reject_consent_request(consent_challenge, opts) - -Reject a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -consent_challenge = 'consent_challenge_example' # String | -opts = { - body: OryHydraClient::RejectRequest.new # RejectRequest | -} - -begin - # Reject a Consent Request - result = api_instance.reject_consent_request(consent_challenge, opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->reject_consent_request: #{e}" -end -``` - -#### Using the reject_consent_request_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> reject_consent_request_with_http_info(consent_challenge, opts) - -```ruby -begin - # Reject a Consent Request - data, status_code, headers = api_instance.reject_consent_request_with_http_info(consent_challenge, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->reject_consent_request_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **consent_challenge** | **String** | | | -| **body** | [**RejectRequest**](RejectRequest.md) | | [optional] | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## reject_login_request - -> reject_login_request(login_challenge, opts) - -Reject a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -login_challenge = 'login_challenge_example' # String | -opts = { - body: OryHydraClient::RejectRequest.new # RejectRequest | -} - -begin - # Reject a Login Request - result = api_instance.reject_login_request(login_challenge, opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->reject_login_request: #{e}" -end -``` - -#### Using the reject_login_request_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> reject_login_request_with_http_info(login_challenge, opts) - -```ruby -begin - # Reject a Login Request - data, status_code, headers = api_instance.reject_login_request_with_http_info(login_challenge, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->reject_login_request_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **login_challenge** | **String** | | | -| **body** | [**RejectRequest**](RejectRequest.md) | | [optional] | - -### Return type - -[**CompletedRequest**](CompletedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## reject_logout_request - -> reject_logout_request(logout_challenge, opts) - -Reject a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -logout_challenge = 'logout_challenge_example' # String | -opts = { - body: OryHydraClient::RejectRequest.new # RejectRequest | -} - -begin - # Reject a Logout Request - api_instance.reject_logout_request(logout_challenge, opts) -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->reject_logout_request: #{e}" -end -``` - -#### Using the reject_logout_request_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> reject_logout_request_with_http_info(logout_challenge, opts) - -```ruby -begin - # Reject a Logout Request - data, status_code, headers = api_instance.reject_logout_request_with_http_info(logout_challenge, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->reject_logout_request_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **logout_challenge** | **String** | | | -| **body** | [**RejectRequest**](RejectRequest.md) | | [optional] | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json, application/x-www-form-urlencoded -- **Accept**: application/json - - -## revoke_authentication_session - -> revoke_authentication_session(subject) - -Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - -This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -subject = 'subject_example' # String | - -begin - # Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - api_instance.revoke_authentication_session(subject) -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->revoke_authentication_session: #{e}" -end -``` - -#### Using the revoke_authentication_session_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> revoke_authentication_session_with_http_info(subject) - -```ruby -begin - # Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - data, status_code, headers = api_instance.revoke_authentication_session_with_http_info(subject) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->revoke_authentication_session_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **subject** | **String** | | | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## revoke_consent_sessions - -> revoke_consent_sessions(subject, opts) - -Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - -This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -subject = 'subject_example' # String | The subject (Subject) who's consent sessions should be deleted. -opts = { - client: 'client_example', # String | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - all: true # Boolean | If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. -} - -begin - # Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - api_instance.revoke_consent_sessions(subject, opts) -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->revoke_consent_sessions: #{e}" -end -``` - -#### Using the revoke_consent_sessions_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> revoke_consent_sessions_with_http_info(subject, opts) - -```ruby -begin - # Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - data, status_code, headers = api_instance.revoke_consent_sessions_with_http_info(subject, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->revoke_consent_sessions_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **subject** | **String** | The subject (Subject) who's consent sessions should be deleted. | | -| **client** | **String** | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | [optional] | -| **all** | **Boolean** | If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. | [optional] | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## trust_jwt_grant_issuer - -> trust_jwt_grant_issuer(opts) - -Trust an 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). - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -opts = { - body: OryHydraClient::TrustJwtGrantIssuerBody.new({expires_at: Time.now, issuer: 'https://jwt-idp.example.com', jwk: OryHydraClient::JSONWebKey.new({alg: 'RS256', kid: '1603dfe0af8f4596', kty: 'RSA', use: 'sig'}), scope: [openid, offline], subject: 'mike@example.com'}) # TrustJwtGrantIssuerBody | -} - -begin - # Trust an OAuth2 JWT Bearer Grant Type Issuer - result = api_instance.trust_jwt_grant_issuer(opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->trust_jwt_grant_issuer: #{e}" -end -``` - -#### Using the trust_jwt_grant_issuer_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> trust_jwt_grant_issuer_with_http_info(opts) - -```ruby -begin - # Trust an OAuth2 JWT Bearer Grant Type Issuer - data, status_code, headers = api_instance.trust_jwt_grant_issuer_with_http_info(opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->trust_jwt_grant_issuer_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **body** | [**TrustJwtGrantIssuerBody**](TrustJwtGrantIssuerBody.md) | | [optional] | - -### Return type - -[**TrustedJwtGrantIssuer**](TrustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## update_json_web_key - -> update_json_web_key(kid, set, opts) - -Update a 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -kid = 'kid_example' # String | The kid of the desired key -set = 'set_example' # String | The set -opts = { - body: OryHydraClient::JSONWebKey.new({alg: 'RS256', kid: '1603dfe0af8f4596', kty: 'RSA', use: 'sig'}) # JSONWebKey | -} - -begin - # Update a JSON Web Key - result = api_instance.update_json_web_key(kid, set, opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->update_json_web_key: #{e}" -end -``` - -#### Using the update_json_web_key_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> update_json_web_key_with_http_info(kid, set, opts) - -```ruby -begin - # Update a JSON Web Key - data, status_code, headers = api_instance.update_json_web_key_with_http_info(kid, set, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->update_json_web_key_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **kid** | **String** | The kid of the desired key | | -| **set** | **String** | The set | | -| **body** | [**JSONWebKey**](JSONWebKey.md) | | [optional] | - -### Return type - -[**JSONWebKey**](JSONWebKey.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## update_json_web_key_set - -> update_json_web_key_set(set, opts) - -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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -set = 'set_example' # String | The set -opts = { - body: OryHydraClient::JSONWebKeySet.new # JSONWebKeySet | -} - -begin - # Update a JSON Web Key Set - result = api_instance.update_json_web_key_set(set, opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->update_json_web_key_set: #{e}" -end -``` - -#### Using the update_json_web_key_set_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> update_json_web_key_set_with_http_info(set, opts) - -```ruby -begin - # Update a JSON Web Key Set - data, status_code, headers = api_instance.update_json_web_key_set_with_http_info(set, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->update_json_web_key_set_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **set** | **String** | The set | | -| **body** | [**JSONWebKeySet**](JSONWebKeySet.md) | | [optional] | - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## update_o_auth2_client - -> update_o_auth2_client(id, body) - -Update an OAuth 2.0 Client - -Update an existing OAuth 2.0 Client. 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::AdminApi.new -id = 'id_example' # String | The id of the OAuth 2.0 Client. -body = OryHydraClient::OAuth2Client.new # OAuth2Client | - -begin - # Update an OAuth 2.0 Client - result = api_instance.update_o_auth2_client(id, body) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->update_o_auth2_client: #{e}" -end -``` - -#### Using the update_o_auth2_client_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> update_o_auth2_client_with_http_info(id, body) - -```ruby -begin - # Update an OAuth 2.0 Client - data, status_code, headers = api_instance.update_o_auth2_client_with_http_info(id, body) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling AdminApi->update_o_auth2_client_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **id** | **String** | The id of the OAuth 2.0 Client. | | -| **body** | [**OAuth2Client**](OAuth2Client.md) | | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/clients/hydra/ruby/docs/ContainerWaitOKBodyError.md b/clients/hydra/ruby/docs/ContainerWaitOKBodyError.md deleted file mode 100644 index a7cb14bd738..00000000000 --- a/clients/hydra/ruby/docs/ContainerWaitOKBodyError.md +++ /dev/null @@ -1,18 +0,0 @@ -# OryHydraClient::ContainerWaitOKBodyError - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **message** | **String** | Details of an error | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::ContainerWaitOKBodyError.new( - message: null -) -``` - diff --git a/clients/hydra/ruby/docs/CreateJsonWebKeySet.md b/clients/hydra/ruby/docs/CreateJsonWebKeySet.md new file mode 100644 index 00000000000..20454a3d039 --- /dev/null +++ b/clients/hydra/ruby/docs/CreateJsonWebKeySet.md @@ -0,0 +1,22 @@ +# OryHydraClient::CreateJsonWebKeySet + +## Properties + +| 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\". | | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::CreateJsonWebKeySet.new( + alg: null, + kid: null, + use: null +) +``` + diff --git a/clients/hydra/ruby/docs/ErrorOAuth2.md b/clients/hydra/ruby/docs/ErrorOAuth2.md new file mode 100644 index 00000000000..dd552581f94 --- /dev/null +++ b/clients/hydra/ruby/docs/ErrorOAuth2.md @@ -0,0 +1,26 @@ +# OryHydraClient::ErrorOAuth2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **error** | **String** | Error | [optional] | +| **error_debug** | **String** | Error Debug Information Only available in dev mode. | [optional] | +| **error_description** | **String** | Error Description | [optional] | +| **error_hint** | **String** | Error Hint Helps the user identify the error cause. | [optional] | +| **status_code** | **Integer** | HTTP Status Code | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::ErrorOAuth2.new( + error: null, + error_debug: null, + error_description: null, + error_hint: The redirect URL is not allowed., + status_code: 401 +) +``` + diff --git a/clients/hydra/ruby/docs/FlushInactiveOAuth2TokensRequest.md b/clients/hydra/ruby/docs/FlushInactiveOAuth2TokensRequest.md deleted file mode 100644 index f3dfa679d4d..00000000000 --- a/clients/hydra/ruby/docs/FlushInactiveOAuth2TokensRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# OryHydraClient::FlushInactiveOAuth2TokensRequest - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **not_after** | **Time** | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::FlushInactiveOAuth2TokensRequest.new( - not_after: null -) -``` - diff --git a/clients/hydra/ruby/docs/GetVersion200Response.md b/clients/hydra/ruby/docs/GetVersion200Response.md new file mode 100644 index 00000000000..f532bc77409 --- /dev/null +++ b/clients/hydra/ruby/docs/GetVersion200Response.md @@ -0,0 +1,18 @@ +# OryHydraClient::GetVersion200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **version** | **String** | The version of Ory Hydra. | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::GetVersion200Response.new( + version: null +) +``` + diff --git a/clients/hydra/ruby/docs/OAuth2TokenIntrospection.md b/clients/hydra/ruby/docs/IntrospectedOAuth2Token.md similarity index 93% rename from clients/hydra/ruby/docs/OAuth2TokenIntrospection.md rename to clients/hydra/ruby/docs/IntrospectedOAuth2Token.md index 8353e684d11..7e0a61b33ed 100644 --- a/clients/hydra/ruby/docs/OAuth2TokenIntrospection.md +++ b/clients/hydra/ruby/docs/IntrospectedOAuth2Token.md @@ -1,4 +1,4 @@ -# OryHydraClient::OAuth2TokenIntrospection +# OryHydraClient::IntrospectedOAuth2Token ## Properties @@ -8,7 +8,7 @@ | **aud** | **Array<String>** | Audience contains a list of the token's intended audiences. | [optional] | | **client_id** | **String** | ID is aclient identifier for the OAuth 2.0 client that requested this token. | [optional] | | **exp** | **Integer** | 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** | **Object** | Extra is arbitrary data set by the session. | [optional] | +| **ext** | **Hash<String, Object>** | Extra is arbitrary data set by the session. | [optional] | | **iat** | **Integer** | 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** | **String** | IssuerURL is a string representing the issuer of this token | [optional] | | **nbf** | **Integer** | 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] | @@ -24,7 +24,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::OAuth2TokenIntrospection.new( +instance = OryHydraClient::IntrospectedOAuth2Token.new( active: null, aud: null, client_id: null, diff --git a/clients/hydra/ruby/docs/IsReady200Response.md b/clients/hydra/ruby/docs/IsReady200Response.md new file mode 100644 index 00000000000..efaa9b71d1e --- /dev/null +++ b/clients/hydra/ruby/docs/IsReady200Response.md @@ -0,0 +1,18 @@ +# OryHydraClient::IsReady200Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **status** | **String** | Always \"ok\". | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::IsReady200Response.new( + status: null +) +``` + diff --git a/clients/hydra/ruby/docs/IsReady503Response.md b/clients/hydra/ruby/docs/IsReady503Response.md new file mode 100644 index 00000000000..ce72d4a369b --- /dev/null +++ b/clients/hydra/ruby/docs/IsReady503Response.md @@ -0,0 +1,18 @@ +# OryHydraClient::IsReady503Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | **Hash<String, String>** | Errors contains a list of errors that caused the not ready status. | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::IsReady503Response.new( + errors: null +) +``` + diff --git a/clients/hydra/ruby/docs/JSONWebKeySet.md b/clients/hydra/ruby/docs/JSONWebKeySet.md deleted file mode 100644 index e682333869e..00000000000 --- a/clients/hydra/ruby/docs/JSONWebKeySet.md +++ /dev/null @@ -1,18 +0,0 @@ -# OryHydraClient::JSONWebKeySet - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **keys** | [**Array<JSONWebKey>**](JSONWebKey.md) | The value of the \"keys\" parameter is an array of 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 - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::JSONWebKeySet.new( - keys: null -) -``` - diff --git a/clients/hydra/ruby/docs/JsonError.md b/clients/hydra/ruby/docs/JsonError.md deleted file mode 100644 index 296068fb396..00000000000 --- a/clients/hydra/ruby/docs/JsonError.md +++ /dev/null @@ -1,24 +0,0 @@ -# OryHydraClient::JsonError - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **error** | **String** | Name is the error name. | [optional] | -| **error_debug** | **String** | Debug contains debug information. This is usually not available and has to be enabled. | [optional] | -| **error_description** | **String** | Description contains further information on the nature of the error. | [optional] | -| **status_code** | **Integer** | Code represents the error status code (404, 403, 401, ...). | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::JsonError.new( - error: The requested resource could not be found, - error_debug: The database adapter was unable to find the element, - error_description: Object with ID 12345 does not exist, - status_code: 404 -) -``` - diff --git a/clients/hydra/ruby/docs/JsonPatch.md b/clients/hydra/ruby/docs/JsonPatch.md new file mode 100644 index 00000000000..a4e1aba9aa7 --- /dev/null +++ b/clients/hydra/ruby/docs/JsonPatch.md @@ -0,0 +1,24 @@ +# OryHydraClient::JsonPatch + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **from** | **String** | 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** | **String** | The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". | | +| **path** | **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). | | +| **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 + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::JsonPatch.new( + from: /name, + op: replace, + path: /name, + value: foobar +) +``` + diff --git a/clients/hydra/ruby/docs/JSONWebKey.md b/clients/hydra/ruby/docs/JsonWebKey.md similarity index 98% rename from clients/hydra/ruby/docs/JSONWebKey.md rename to clients/hydra/ruby/docs/JsonWebKey.md index f102fb39017..fb16a43a698 100644 --- a/clients/hydra/ruby/docs/JSONWebKey.md +++ b/clients/hydra/ruby/docs/JsonWebKey.md @@ -1,4 +1,4 @@ -# OryHydraClient::JSONWebKey +# OryHydraClient::JsonWebKey ## Properties @@ -27,7 +27,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::JSONWebKey.new( +instance = OryHydraClient::JsonWebKey.new( 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, diff --git a/clients/hydra/ruby/docs/JsonWebKeySet.md b/clients/hydra/ruby/docs/JsonWebKeySet.md new file mode 100644 index 00000000000..2c962b6d68f --- /dev/null +++ b/clients/hydra/ruby/docs/JsonWebKeySet.md @@ -0,0 +1,18 @@ +# OryHydraClient::JsonWebKeySet + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **keys** | [**Array<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 + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::JsonWebKeySet.new( + keys: null +) +``` + diff --git a/clients/hydra/ruby/docs/JsonWebKeySetGeneratorRequest.md b/clients/hydra/ruby/docs/JsonWebKeySetGeneratorRequest.md deleted file mode 100644 index 8151ef0fc01..00000000000 --- a/clients/hydra/ruby/docs/JsonWebKeySetGeneratorRequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# OryHydraClient::JsonWebKeySetGeneratorRequest - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **alg** | **String** | The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" | | -| **kid** | **String** | The kid of the key to be created | | -| **use** | **String** | 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\". | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::JsonWebKeySetGeneratorRequest.new( - alg: null, - kid: null, - use: null -) -``` - diff --git a/clients/hydra/ruby/docs/JwkApi.md b/clients/hydra/ruby/docs/JwkApi.md new file mode 100644 index 00000000000..609a3a0d591 --- /dev/null +++ b/clients/hydra/ruby/docs/JwkApi.md @@ -0,0 +1,476 @@ +# OryHydraClient::JwkApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_json_web_key_set**](JwkApi.md#create_json_web_key_set) | **POST** /admin/keys/{set} | Create JSON Web Key | +| [**delete_json_web_key**](JwkApi.md#delete_json_web_key) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key | +| [**delete_json_web_key_set**](JwkApi.md#delete_json_web_key_set) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set | +| [**get_json_web_key**](JwkApi.md#get_json_web_key) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key | +| [**get_json_web_key_set**](JwkApi.md#get_json_web_key_set) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set | +| [**set_json_web_key**](JwkApi.md#set_json_web_key) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key | +| [**set_json_web_key_set**](JwkApi.md#set_json_web_key_set) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set | + + +## create_json_web_key_set + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::JwkApi.new +set = 'set_example' # String | The JSON Web Key Set ID +create_json_web_key_set = OryHydraClient::CreateJsonWebKeySet.new({alg: 'alg_example', kid: 'kid_example', use: 'use_example'}) # CreateJsonWebKeySet | + +begin + # Create JSON Web Key + result = api_instance.create_json_web_key_set(set, create_json_web_key_set) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->create_json_web_key_set: #{e}" +end +``` + +#### Using the create_json_web_key_set_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_json_web_key_set_with_http_info(set, create_json_web_key_set) + +```ruby +begin + # Create JSON Web Key + data, status_code, headers = api_instance.create_json_web_key_set_with_http_info(set, create_json_web_key_set) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->create_json_web_key_set_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **set** | **String** | The JSON Web Key Set ID | | +| **create_json_web_key_set** | [**CreateJsonWebKeySet**](CreateJsonWebKeySet.md) | | | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## delete_json_web_key + +> delete_json_web_key(set, kid) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::JwkApi.new +set = 'set_example' # String | The JSON Web Key Set +kid = 'kid_example' # String | The JSON Web Key ID (kid) + +begin + # Delete JSON Web Key + api_instance.delete_json_web_key(set, kid) +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->delete_json_web_key: #{e}" +end +``` + +#### Using the delete_json_web_key_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_json_web_key_with_http_info(set, kid) + +```ruby +begin + # Delete JSON Web Key + data, status_code, headers = api_instance.delete_json_web_key_with_http_info(set, kid) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->delete_json_web_key_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **set** | **String** | The JSON Web Key Set | | +| **kid** | **String** | The JSON Web Key ID (kid) | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_json_web_key_set + +> delete_json_web_key_set(set) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::JwkApi.new +set = 'set_example' # String | The JSON Web Key Set + +begin + # Delete JSON Web Key Set + api_instance.delete_json_web_key_set(set) +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->delete_json_web_key_set: #{e}" +end +``` + +#### Using the delete_json_web_key_set_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_json_web_key_set_with_http_info(set) + +```ruby +begin + # Delete JSON Web Key Set + data, status_code, headers = api_instance.delete_json_web_key_set_with_http_info(set) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->delete_json_web_key_set_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **set** | **String** | The JSON Web Key Set | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_json_web_key + +> 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). + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::JwkApi.new +set = 'set_example' # String | JSON Web Key Set ID +kid = 'kid_example' # String | JSON Web Key ID + +begin + # Get JSON Web Key + result = api_instance.get_json_web_key(set, kid) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->get_json_web_key: #{e}" +end +``` + +#### Using the get_json_web_key_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_json_web_key_with_http_info(set, kid) + +```ruby +begin + # Get JSON Web Key + data, status_code, headers = api_instance.get_json_web_key_with_http_info(set, kid) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->get_json_web_key_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **set** | **String** | JSON Web Key Set ID | | +| **kid** | **String** | JSON Web Key ID | | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_json_web_key_set + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::JwkApi.new +set = 'set_example' # String | JSON Web Key Set ID + +begin + # Retrieve a JSON Web Key Set + result = api_instance.get_json_web_key_set(set) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->get_json_web_key_set: #{e}" +end +``` + +#### Using the get_json_web_key_set_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_json_web_key_set_with_http_info(set) + +```ruby +begin + # Retrieve a JSON Web Key Set + data, status_code, headers = api_instance.get_json_web_key_set_with_http_info(set) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->get_json_web_key_set_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **set** | **String** | JSON Web Key Set ID | | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## set_json_web_key + +> set_json_web_key(set, kid, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::JwkApi.new +set = 'set_example' # String | The JSON Web Key Set ID +kid = 'kid_example' # String | JSON Web Key ID +opts = { + json_web_key: OryHydraClient::JsonWebKey.new({alg: 'RS256', kid: '1603dfe0af8f4596', kty: 'RSA', use: 'sig'}) # JsonWebKey | +} + +begin + # Set JSON Web Key + result = api_instance.set_json_web_key(set, kid, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->set_json_web_key: #{e}" +end +``` + +#### Using the set_json_web_key_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> set_json_web_key_with_http_info(set, kid, opts) + +```ruby +begin + # Set JSON Web Key + data, status_code, headers = api_instance.set_json_web_key_with_http_info(set, kid, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->set_json_web_key_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **set** | **String** | The JSON Web Key Set ID | | +| **kid** | **String** | JSON Web Key ID | | +| **json_web_key** | [**JsonWebKey**](JsonWebKey.md) | | [optional] | + +### Return type + +[**JsonWebKey**](JsonWebKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## set_json_web_key_set + +> set_json_web_key_set(set, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::JwkApi.new +set = 'set_example' # String | The JSON Web Key Set ID +opts = { + json_web_key_set: OryHydraClient::JsonWebKeySet.new # JsonWebKeySet | +} + +begin + # Update a JSON Web Key Set + result = api_instance.set_json_web_key_set(set, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->set_json_web_key_set: #{e}" +end +``` + +#### Using the set_json_web_key_set_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> set_json_web_key_set_with_http_info(set, opts) + +```ruby +begin + # Update a JSON Web Key Set + data, status_code, headers = api_instance.set_json_web_key_set_with_http_info(set, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling JwkApi->set_json_web_key_set_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **set** | **String** | The JSON Web Key Set ID | | +| **json_web_key_set** | [**JsonWebKeySet**](JsonWebKeySet.md) | | [optional] | + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/clients/hydra/ruby/docs/MetadataApi.md b/clients/hydra/ruby/docs/MetadataApi.md index a1b0865aea3..20165c54ea0 100644 --- a/clients/hydra/ruby/docs/MetadataApi.md +++ b/clients/hydra/ruby/docs/MetadataApi.md @@ -4,16 +4,18 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**prometheus**](MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: | +| [**get_version**](MetadataApi.md#get_version) | **GET** /version | Return Running Software Version. | +| [**is_alive**](MetadataApi.md#is_alive) | **GET** /health/alive | Check HTTP Server Status | +| [**is_ready**](MetadataApi.md#is_ready) | **GET** /health/ready | Check HTTP Server and Database Status | -## prometheus +## get_version -> prometheus +> get_version -Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +Return Running Software Version. -``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` +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. ### Examples @@ -24,28 +26,29 @@ require 'ory-hydra-client' api_instance = OryHydraClient::MetadataApi.new begin - # Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - api_instance.prometheus + # Return Running Software Version. + result = api_instance.get_version + p result rescue OryHydraClient::ApiError => e - puts "Error when calling MetadataApi->prometheus: #{e}" + puts "Error when calling MetadataApi->get_version: #{e}" end ``` -#### Using the prometheus_with_http_info variant +#### Using the get_version_with_http_info variant -This returns an Array which contains the response data (`nil` in this case), status code and headers. +This returns an Array which contains the response data, status code and headers. -> prometheus_with_http_info +> , Integer, Hash)> get_version_with_http_info ```ruby begin - # Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - data, status_code, headers = api_instance.prometheus_with_http_info + # Return Running Software Version. + data, status_code, headers = api_instance.get_version_with_http_info p status_code # => 2xx p headers # => { ... } - p data # => nil + p data # => rescue OryHydraClient::ApiError => e - puts "Error when calling MetadataApi->prometheus_with_http_info: #{e}" + puts "Error when calling MetadataApi->get_version_with_http_info: #{e}" end ``` @@ -55,7 +58,7 @@ This endpoint does not need any parameter. ### Return type -nil (empty response body) +[**GetVersion200Response**](GetVersion200Response.md) ### Authorization @@ -64,5 +67,127 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json + + +## is_alive + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::MetadataApi.new + +begin + # Check HTTP Server Status + result = api_instance.is_alive + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling MetadataApi->is_alive: #{e}" +end +``` + +#### Using the is_alive_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> is_alive_with_http_info + +```ruby +begin + # Check HTTP Server Status + data, status_code, headers = api_instance.is_alive_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling MetadataApi->is_alive_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthStatus**](HealthStatus.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## is_ready + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::MetadataApi.new + +begin + # Check HTTP Server and Database Status + result = api_instance.is_ready + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling MetadataApi->is_ready: #{e}" +end +``` + +#### Using the is_ready_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> is_ready_with_http_info + +```ruby +begin + # Check HTTP Server and Database Status + data, status_code, headers = api_instance.is_ready_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling MetadataApi->is_ready_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**IsReady200Response**](IsReady200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json diff --git a/clients/hydra/ruby/docs/OAuth2Api.md b/clients/hydra/ruby/docs/OAuth2Api.md new file mode 100644 index 00000000000..ad17248c673 --- /dev/null +++ b/clients/hydra/ruby/docs/OAuth2Api.md @@ -0,0 +1,1901 @@ +# OryHydraClient::OAuth2Api + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**accept_o_auth2_consent_request**](OAuth2Api.md#accept_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request | +| [**accept_o_auth2_login_request**](OAuth2Api.md#accept_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request | +| [**accept_o_auth2_logout_request**](OAuth2Api.md#accept_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request | +| [**create_o_auth2_client**](OAuth2Api.md#create_o_auth2_client) | **POST** /admin/clients | Create OAuth 2.0 Client | +| [**delete_o_auth2_client**](OAuth2Api.md#delete_o_auth2_client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client | +| [**delete_o_auth2_token**](OAuth2Api.md#delete_o_auth2_token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client | +| [**delete_trusted_o_auth2_jwt_grant_issuer**](OAuth2Api.md#delete_trusted_o_auth2_jwt_grant_issuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer | +| [**get_o_auth2_client**](OAuth2Api.md#get_o_auth2_client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client | +| [**get_o_auth2_consent_request**](OAuth2Api.md#get_o_auth2_consent_request) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request | +| [**get_o_auth2_login_request**](OAuth2Api.md#get_o_auth2_login_request) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request | +| [**get_o_auth2_logout_request**](OAuth2Api.md#get_o_auth2_logout_request) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request | +| [**get_trusted_o_auth2_jwt_grant_issuer**](OAuth2Api.md#get_trusted_o_auth2_jwt_grant_issuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer | +| [**introspect_o_auth2_token**](OAuth2Api.md#introspect_o_auth2_token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens | +| [**list_o_auth2_clients**](OAuth2Api.md#list_o_auth2_clients) | **GET** /admin/clients | List OAuth 2.0 Clients | +| [**list_o_auth2_consent_sessions**](OAuth2Api.md#list_o_auth2_consent_sessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject | +| [**list_trusted_o_auth2_jwt_grant_issuers**](OAuth2Api.md#list_trusted_o_auth2_jwt_grant_issuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers | +| [**o_auth2_authorize**](OAuth2Api.md#o_auth2_authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint | +| [**oauth2_token_exchange**](OAuth2Api.md#oauth2_token_exchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint | +| [**patch_o_auth2_client**](OAuth2Api.md#patch_o_auth2_client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client | +| [**reject_o_auth2_consent_request**](OAuth2Api.md#reject_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request | +| [**reject_o_auth2_login_request**](OAuth2Api.md#reject_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request | +| [**reject_o_auth2_logout_request**](OAuth2Api.md#reject_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request | +| [**revoke_o_auth2_consent_sessions**](OAuth2Api.md#revoke_o_auth2_consent_sessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject | +| [**revoke_o_auth2_login_sessions**](OAuth2Api.md#revoke_o_auth2_login_sessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject | +| [**revoke_o_auth2_token**](OAuth2Api.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token | +| [**set_o_auth2_client**](OAuth2Api.md#set_o_auth2_client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client | +| [**set_o_auth2_client_lifespans**](OAuth2Api.md#set_o_auth2_client_lifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans | +| [**trust_o_auth2_jwt_grant_issuer**](OAuth2Api.md#trust_o_auth2_jwt_grant_issuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer | + + +## accept_o_auth2_consent_request + +> accept_o_auth2_consent_request(consent_challenge, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +consent_challenge = 'consent_challenge_example' # String | OAuth 2.0 Consent Request Challenge +opts = { + accept_o_auth2_consent_request: OryHydraClient::AcceptOAuth2ConsentRequest.new # AcceptOAuth2ConsentRequest | +} + +begin + # Accept OAuth 2.0 Consent Request + result = api_instance.accept_o_auth2_consent_request(consent_challenge, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->accept_o_auth2_consent_request: #{e}" +end +``` + +#### Using the accept_o_auth2_consent_request_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> accept_o_auth2_consent_request_with_http_info(consent_challenge, opts) + +```ruby +begin + # Accept OAuth 2.0 Consent Request + data, status_code, headers = api_instance.accept_o_auth2_consent_request_with_http_info(consent_challenge, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->accept_o_auth2_consent_request_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **consent_challenge** | **String** | OAuth 2.0 Consent Request Challenge | | +| **accept_o_auth2_consent_request** | [**AcceptOAuth2ConsentRequest**](AcceptOAuth2ConsentRequest.md) | | [optional] | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## accept_o_auth2_login_request + +> accept_o_auth2_login_request(login_challenge, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +login_challenge = 'login_challenge_example' # String | OAuth 2.0 Login Request Challenge +opts = { + accept_o_auth2_login_request: OryHydraClient::AcceptOAuth2LoginRequest.new({subject: 'subject_example'}) # AcceptOAuth2LoginRequest | +} + +begin + # Accept OAuth 2.0 Login Request + result = api_instance.accept_o_auth2_login_request(login_challenge, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->accept_o_auth2_login_request: #{e}" +end +``` + +#### Using the accept_o_auth2_login_request_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> accept_o_auth2_login_request_with_http_info(login_challenge, opts) + +```ruby +begin + # Accept OAuth 2.0 Login Request + data, status_code, headers = api_instance.accept_o_auth2_login_request_with_http_info(login_challenge, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->accept_o_auth2_login_request_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **login_challenge** | **String** | OAuth 2.0 Login Request Challenge | | +| **accept_o_auth2_login_request** | [**AcceptOAuth2LoginRequest**](AcceptOAuth2LoginRequest.md) | | [optional] | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## accept_o_auth2_logout_request + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +logout_challenge = 'logout_challenge_example' # String | OAuth 2.0 Logout Request Challenge + +begin + # Accept OAuth 2.0 Session Logout Request + result = api_instance.accept_o_auth2_logout_request(logout_challenge) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->accept_o_auth2_logout_request: #{e}" +end +``` + +#### Using the accept_o_auth2_logout_request_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> accept_o_auth2_logout_request_with_http_info(logout_challenge) + +```ruby +begin + # Accept OAuth 2.0 Session Logout Request + data, status_code, headers = api_instance.accept_o_auth2_logout_request_with_http_info(logout_challenge) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->accept_o_auth2_logout_request_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **logout_challenge** | **String** | OAuth 2.0 Logout Request Challenge | | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## create_o_auth2_client + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +o_auth2_client = OryHydraClient::OAuth2Client.new # OAuth2Client | OAuth 2.0 Client Request Body + +begin + # Create OAuth 2.0 Client + result = api_instance.create_o_auth2_client(o_auth2_client) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->create_o_auth2_client: #{e}" +end +``` + +#### Using the create_o_auth2_client_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_o_auth2_client_with_http_info(o_auth2_client) + +```ruby +begin + # Create OAuth 2.0 Client + data, status_code, headers = api_instance.create_o_auth2_client_with_http_info(o_auth2_client) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->create_o_auth2_client_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | OAuth 2.0 Client Request Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## delete_o_auth2_client + +> delete_o_auth2_client(id) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +id = 'id_example' # String | The id of the OAuth 2.0 Client. + +begin + # Delete OAuth 2.0 Client + api_instance.delete_o_auth2_client(id) +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->delete_o_auth2_client: #{e}" +end +``` + +#### Using the delete_o_auth2_client_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_o_auth2_client_with_http_info(id) + +```ruby +begin + # Delete OAuth 2.0 Client + data, status_code, headers = api_instance.delete_o_auth2_client_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->delete_o_auth2_client_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The id of the OAuth 2.0 Client. | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_o_auth2_token + +> delete_o_auth2_token(client_id) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +client_id = 'client_id_example' # String | OAuth 2.0 Client ID + +begin + # Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + api_instance.delete_o_auth2_token(client_id) +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->delete_o_auth2_token: #{e}" +end +``` + +#### Using the delete_o_auth2_token_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_o_auth2_token_with_http_info(client_id) + +```ruby +begin + # Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + data, status_code, headers = api_instance.delete_o_auth2_token_with_http_info(client_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->delete_o_auth2_token_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **client_id** | **String** | OAuth 2.0 Client ID | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_trusted_o_auth2_jwt_grant_issuer + +> delete_trusted_o_auth2_jwt_grant_issuer(id) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +id = 'id_example' # String | The id of the desired grant + +begin + # Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + api_instance.delete_trusted_o_auth2_jwt_grant_issuer(id) +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->delete_trusted_o_auth2_jwt_grant_issuer: #{e}" +end +``` + +#### Using the delete_trusted_o_auth2_jwt_grant_issuer_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id) + +```ruby +begin + # Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + data, status_code, headers = api_instance.delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->delete_trusted_o_auth2_jwt_grant_issuer_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The id of the desired grant | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_o_auth2_client + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +id = 'id_example' # String | The id of the OAuth 2.0 Client. + +begin + # Get an OAuth 2.0 Client + result = api_instance.get_o_auth2_client(id) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_o_auth2_client: #{e}" +end +``` + +#### Using the get_o_auth2_client_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_o_auth2_client_with_http_info(id) + +```ruby +begin + # Get an OAuth 2.0 Client + data, status_code, headers = api_instance.get_o_auth2_client_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_o_auth2_client_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The id of the OAuth 2.0 Client. | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_o_auth2_consent_request + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +consent_challenge = 'consent_challenge_example' # String | OAuth 2.0 Consent Request Challenge + +begin + # Get OAuth 2.0 Consent Request + result = api_instance.get_o_auth2_consent_request(consent_challenge) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_o_auth2_consent_request: #{e}" +end +``` + +#### Using the get_o_auth2_consent_request_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_o_auth2_consent_request_with_http_info(consent_challenge) + +```ruby +begin + # Get OAuth 2.0 Consent Request + data, status_code, headers = api_instance.get_o_auth2_consent_request_with_http_info(consent_challenge) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_o_auth2_consent_request_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **consent_challenge** | **String** | OAuth 2.0 Consent Request Challenge | | + +### Return type + +[**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_o_auth2_login_request + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +login_challenge = 'login_challenge_example' # String | OAuth 2.0 Login Request Challenge + +begin + # Get OAuth 2.0 Login Request + result = api_instance.get_o_auth2_login_request(login_challenge) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_o_auth2_login_request: #{e}" +end +``` + +#### Using the get_o_auth2_login_request_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_o_auth2_login_request_with_http_info(login_challenge) + +```ruby +begin + # Get OAuth 2.0 Login Request + data, status_code, headers = api_instance.get_o_auth2_login_request_with_http_info(login_challenge) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_o_auth2_login_request_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **login_challenge** | **String** | OAuth 2.0 Login Request Challenge | | + +### Return type + +[**OAuth2LoginRequest**](OAuth2LoginRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_o_auth2_logout_request + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +logout_challenge = 'logout_challenge_example' # String | + +begin + # Get OAuth 2.0 Session Logout Request + result = api_instance.get_o_auth2_logout_request(logout_challenge) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_o_auth2_logout_request: #{e}" +end +``` + +#### Using the get_o_auth2_logout_request_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_o_auth2_logout_request_with_http_info(logout_challenge) + +```ruby +begin + # Get OAuth 2.0 Session Logout Request + data, status_code, headers = api_instance.get_o_auth2_logout_request_with_http_info(logout_challenge) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_o_auth2_logout_request_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **logout_challenge** | **String** | | | + +### Return type + +[**OAuth2LogoutRequest**](OAuth2LogoutRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_trusted_o_auth2_jwt_grant_issuer + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +id = 'id_example' # String | The id of the desired grant + +begin + # Get Trusted OAuth2 JWT Bearer Grant Type Issuer + result = api_instance.get_trusted_o_auth2_jwt_grant_issuer(id) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_trusted_o_auth2_jwt_grant_issuer: #{e}" +end +``` + +#### Using the get_trusted_o_auth2_jwt_grant_issuer_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id) + +```ruby +begin + # Get Trusted OAuth2 JWT Bearer Grant Type Issuer + data, status_code, headers = api_instance.get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->get_trusted_o_auth2_jwt_grant_issuer_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The id of the desired grant | | + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## introspect_o_auth2_token + +> introspect_o_auth2_token(token, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +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. +opts = { + 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. +} + +begin + # Introspect OAuth2 Access and Refresh Tokens + result = api_instance.introspect_o_auth2_token(token, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->introspect_o_auth2_token: #{e}" +end +``` + +#### Using the introspect_o_auth2_token_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> introspect_o_auth2_token_with_http_info(token, opts) + +```ruby +begin + # Introspect OAuth2 Access and Refresh Tokens + data, status_code, headers = api_instance.introspect_o_auth2_token_with_http_info(token, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->introspect_o_auth2_token_with_http_info: #{e}" +end +``` + +### 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] | + +### Return type + +[**IntrospectedOAuth2Token**](IntrospectedOAuth2Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + + +## list_o_auth2_clients + +> > list_o_auth2_clients(opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +opts = { + page_size: 789, # Integer | 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: 'page_token_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). + client_name: 'client_name_example', # String | The name of the clients to filter by. + owner: 'owner_example' # String | The owner of the clients to filter by. +} + +begin + # List OAuth 2.0 Clients + result = api_instance.list_o_auth2_clients(opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->list_o_auth2_clients: #{e}" +end +``` + +#### Using the list_o_auth2_clients_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_o_auth2_clients_with_http_info(opts) + +```ruby +begin + # List OAuth 2.0 Clients + data, status_code, headers = api_instance.list_o_auth2_clients_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->list_o_auth2_clients_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **page_size** | **Integer** | 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** | **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'] | +| **client_name** | **String** | The name of the clients to filter by. | [optional] | +| **owner** | **String** | The owner of the clients to filter by. | [optional] | + +### Return type + +[**Array<OAuth2Client>**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_o_auth2_consent_sessions + +> > list_o_auth2_consent_sessions(subject, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +subject = 'subject_example' # String | The subject to list the consent sessions for. +opts = { + page_size: 789, # Integer | 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: 'page_token_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). +} + +begin + # List OAuth 2.0 Consent Sessions of a Subject + result = api_instance.list_o_auth2_consent_sessions(subject, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->list_o_auth2_consent_sessions: #{e}" +end +``` + +#### Using the list_o_auth2_consent_sessions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_o_auth2_consent_sessions_with_http_info(subject, opts) + +```ruby +begin + # List OAuth 2.0 Consent Sessions of a Subject + data, status_code, headers = api_instance.list_o_auth2_consent_sessions_with_http_info(subject, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->list_o_auth2_consent_sessions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **subject** | **String** | The subject to list the consent sessions for. | | +| **page_size** | **Integer** | 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** | **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'] | + +### Return type + +[**Array<OAuth2ConsentSession>**](OAuth2ConsentSession.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_trusted_o_auth2_jwt_grant_issuers + +> > list_trusted_o_auth2_jwt_grant_issuers(opts) + +List Trusted OAuth2 JWT Bearer Grant Type Issuers + +Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +opts = { + max_items: 789, # Integer | + default_items: 789, # Integer | + issuer: 'issuer_example' # String | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. +} + +begin + # List Trusted OAuth2 JWT Bearer Grant Type Issuers + result = api_instance.list_trusted_o_auth2_jwt_grant_issuers(opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->list_trusted_o_auth2_jwt_grant_issuers: #{e}" +end +``` + +#### Using the list_trusted_o_auth2_jwt_grant_issuers_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> >, Integer, Hash)> list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts) + +```ruby +begin + # List Trusted OAuth2 JWT Bearer Grant Type Issuers + data, status_code, headers = api_instance.list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => > +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->list_trusted_o_auth2_jwt_grant_issuers_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **max_items** | **Integer** | | [optional] | +| **default_items** | **Integer** | | [optional] | +| **issuer** | **String** | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | [optional] | + +### Return type + +[**Array<TrustedOAuth2JwtGrantIssuer>**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## o_auth2_authorize + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new + +begin + # OAuth 2.0 Authorize Endpoint + result = api_instance.o_auth2_authorize + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->o_auth2_authorize: #{e}" +end +``` + +#### Using the o_auth2_authorize_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> o_auth2_authorize_with_http_info + +```ruby +begin + # OAuth 2.0 Authorize Endpoint + data, status_code, headers = api_instance.o_auth2_authorize_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->o_auth2_authorize_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ErrorOAuth2**](ErrorOAuth2.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## oauth2_token_exchange + +> oauth2_token_exchange(grant_type, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' +# setup authorization +OryHydraClient.configure do |config| + # Configure HTTP basic authorization: basic + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' + + # Configure OAuth2 access token for authorization: oauth2 + config.access_token = 'YOUR ACCESS TOKEN' +end + +api_instance = OryHydraClient::OAuth2Api.new +grant_type = 'grant_type_example' # String | +opts = { + client_id: 'client_id_example', # String | + code: 'code_example', # String | + redirect_uri: 'redirect_uri_example', # String | + refresh_token: 'refresh_token_example' # String | +} + +begin + # The OAuth 2.0 Token Endpoint + result = api_instance.oauth2_token_exchange(grant_type, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->oauth2_token_exchange: #{e}" +end +``` + +#### Using the oauth2_token_exchange_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> oauth2_token_exchange_with_http_info(grant_type, opts) + +```ruby +begin + # The OAuth 2.0 Token Endpoint + data, status_code, headers = api_instance.oauth2_token_exchange_with_http_info(grant_type, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->oauth2_token_exchange_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **grant_type** | **String** | | | +| **client_id** | **String** | | [optional] | +| **code** | **String** | | [optional] | +| **redirect_uri** | **String** | | [optional] | +| **refresh_token** | **String** | | [optional] | + +### Return type + +[**OAuth2TokenExchange**](OAuth2TokenExchange.md) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + + +## patch_o_auth2_client + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +id = 'id_example' # String | The id of the OAuth 2.0 Client. +json_patch = [OryHydraClient::JsonPatch.new({op: 'replace', path: '/name'})] # Array | OAuth 2.0 Client JSON Patch Body + +begin + # Patch OAuth 2.0 Client + result = api_instance.patch_o_auth2_client(id, json_patch) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->patch_o_auth2_client: #{e}" +end +``` + +#### Using the patch_o_auth2_client_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> patch_o_auth2_client_with_http_info(id, json_patch) + +```ruby +begin + # Patch OAuth 2.0 Client + data, status_code, headers = api_instance.patch_o_auth2_client_with_http_info(id, json_patch) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->patch_o_auth2_client_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The id of the OAuth 2.0 Client. | | +| **json_patch** | [**Array<JsonPatch>**](JsonPatch.md) | OAuth 2.0 Client JSON Patch Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## reject_o_auth2_consent_request + +> reject_o_auth2_consent_request(consent_challenge, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +consent_challenge = 'consent_challenge_example' # String | OAuth 2.0 Consent Request Challenge +opts = { + reject_o_auth2_request: OryHydraClient::RejectOAuth2Request.new # RejectOAuth2Request | +} + +begin + # Reject OAuth 2.0 Consent Request + result = api_instance.reject_o_auth2_consent_request(consent_challenge, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->reject_o_auth2_consent_request: #{e}" +end +``` + +#### Using the reject_o_auth2_consent_request_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> reject_o_auth2_consent_request_with_http_info(consent_challenge, opts) + +```ruby +begin + # Reject OAuth 2.0 Consent Request + data, status_code, headers = api_instance.reject_o_auth2_consent_request_with_http_info(consent_challenge, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->reject_o_auth2_consent_request_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **consent_challenge** | **String** | OAuth 2.0 Consent Request Challenge | | +| **reject_o_auth2_request** | [**RejectOAuth2Request**](RejectOAuth2Request.md) | | [optional] | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## reject_o_auth2_login_request + +> reject_o_auth2_login_request(login_challenge, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +login_challenge = 'login_challenge_example' # String | OAuth 2.0 Login Request Challenge +opts = { + reject_o_auth2_request: OryHydraClient::RejectOAuth2Request.new # RejectOAuth2Request | +} + +begin + # Reject OAuth 2.0 Login Request + result = api_instance.reject_o_auth2_login_request(login_challenge, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->reject_o_auth2_login_request: #{e}" +end +``` + +#### Using the reject_o_auth2_login_request_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> reject_o_auth2_login_request_with_http_info(login_challenge, opts) + +```ruby +begin + # Reject OAuth 2.0 Login Request + data, status_code, headers = api_instance.reject_o_auth2_login_request_with_http_info(login_challenge, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->reject_o_auth2_login_request_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **login_challenge** | **String** | OAuth 2.0 Login Request Challenge | | +| **reject_o_auth2_request** | [**RejectOAuth2Request**](RejectOAuth2Request.md) | | [optional] | + +### Return type + +[**OAuth2RedirectTo**](OAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## reject_o_auth2_logout_request + +> reject_o_auth2_logout_request(logout_challenge) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +logout_challenge = 'logout_challenge_example' # String | + +begin + # Reject OAuth 2.0 Session Logout Request + api_instance.reject_o_auth2_logout_request(logout_challenge) +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->reject_o_auth2_logout_request: #{e}" +end +``` + +#### Using the reject_o_auth2_logout_request_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> reject_o_auth2_logout_request_with_http_info(logout_challenge) + +```ruby +begin + # Reject OAuth 2.0 Session Logout Request + data, status_code, headers = api_instance.reject_o_auth2_logout_request_with_http_info(logout_challenge) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->reject_o_auth2_logout_request_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **logout_challenge** | **String** | | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## revoke_o_auth2_consent_sessions + +> revoke_o_auth2_consent_sessions(subject, opts) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +subject = 'subject_example' # String | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. +opts = { + 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. + all: true # Boolean | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. +} + +begin + # Revoke OAuth 2.0 Consent Sessions of a Subject + api_instance.revoke_o_auth2_consent_sessions(subject, opts) +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->revoke_o_auth2_consent_sessions: #{e}" +end +``` + +#### Using the revoke_o_auth2_consent_sessions_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> revoke_o_auth2_consent_sessions_with_http_info(subject, opts) + +```ruby +begin + # Revoke OAuth 2.0 Consent Sessions of a Subject + data, status_code, headers = api_instance.revoke_o_auth2_consent_sessions_with_http_info(subject, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->revoke_o_auth2_consent_sessions_with_http_info: #{e}" +end +``` + +### 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** | **Boolean** | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | [optional] | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## revoke_o_auth2_login_sessions + +> revoke_o_auth2_login_sessions(subject) + +Revokes All OAuth 2.0 Login Sessions of a Subject + +This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +subject = 'subject_example' # String | OAuth 2.0 Subject The subject to revoke authentication sessions for. + +begin + # Revokes All OAuth 2.0 Login Sessions of a Subject + api_instance.revoke_o_auth2_login_sessions(subject) +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->revoke_o_auth2_login_sessions: #{e}" +end +``` + +#### Using the revoke_o_auth2_login_sessions_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> revoke_o_auth2_login_sessions_with_http_info(subject) + +```ruby +begin + # Revokes All OAuth 2.0 Login Sessions of a Subject + data, status_code, headers = api_instance.revoke_o_auth2_login_sessions_with_http_info(subject) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->revoke_o_auth2_login_sessions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **subject** | **String** | OAuth 2.0 Subject The subject to revoke authentication sessions for. | | + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## revoke_o_auth2_token + +> revoke_o_auth2_token(token) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' +# setup authorization +OryHydraClient.configure do |config| + # Configure HTTP basic authorization: basic + config.username = 'YOUR USERNAME' + config.password = 'YOUR PASSWORD' + + # Configure OAuth2 access token for authorization: oauth2 + config.access_token = 'YOUR ACCESS TOKEN' +end + +api_instance = OryHydraClient::OAuth2Api.new +token = 'token_example' # String | + +begin + # Revoke OAuth 2.0 Access or Refresh Token + api_instance.revoke_o_auth2_token(token) +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->revoke_o_auth2_token: #{e}" +end +``` + +#### Using the revoke_o_auth2_token_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> revoke_o_auth2_token_with_http_info(token) + +```ruby +begin + # Revoke OAuth 2.0 Access or Refresh Token + data, status_code, headers = api_instance.revoke_o_auth2_token_with_http_info(token) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->revoke_o_auth2_token_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **token** | **String** | | | + +### Return type + +nil (empty response body) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + + +## set_o_auth2_client + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +id = 'id_example' # String | OAuth 2.0 Client ID +o_auth2_client = OryHydraClient::OAuth2Client.new # OAuth2Client | OAuth 2.0 Client Request Body + +begin + # Set OAuth 2.0 Client + result = api_instance.set_o_auth2_client(id, o_auth2_client) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->set_o_auth2_client: #{e}" +end +``` + +#### Using the set_o_auth2_client_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> set_o_auth2_client_with_http_info(id, o_auth2_client) + +```ruby +begin + # Set OAuth 2.0 Client + data, status_code, headers = api_instance.set_o_auth2_client_with_http_info(id, o_auth2_client) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->set_o_auth2_client_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | OAuth 2.0 Client ID | | +| **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | OAuth 2.0 Client Request Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## set_o_auth2_client_lifespans + +> set_o_auth2_client_lifespans(id, opts) + +Set OAuth2 Client Token Lifespans + +Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +id = 'id_example' # String | OAuth 2.0 Client ID +opts = { + o_auth2_client_token_lifespans: OryHydraClient::OAuth2ClientTokenLifespans.new # OAuth2ClientTokenLifespans | +} + +begin + # Set OAuth2 Client Token Lifespans + result = api_instance.set_o_auth2_client_lifespans(id, opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->set_o_auth2_client_lifespans: #{e}" +end +``` + +#### Using the set_o_auth2_client_lifespans_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> set_o_auth2_client_lifespans_with_http_info(id, opts) + +```ruby +begin + # Set OAuth2 Client Token Lifespans + data, status_code, headers = api_instance.set_o_auth2_client_lifespans_with_http_info(id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->set_o_auth2_client_lifespans_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | OAuth 2.0 Client ID | | +| **o_auth2_client_token_lifespans** | [**OAuth2ClientTokenLifespans**](OAuth2ClientTokenLifespans.md) | | [optional] | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## trust_o_auth2_jwt_grant_issuer + +> trust_o_auth2_jwt_grant_issuer(opts) + +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). + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OAuth2Api.new +opts = { + trust_o_auth2_jwt_grant_issuer: OryHydraClient::TrustOAuth2JwtGrantIssuer.new({expires_at: Time.now, issuer: 'https://jwt-idp.example.com', jwk: OryHydraClient::JsonWebKey.new({alg: 'RS256', kid: '1603dfe0af8f4596', kty: 'RSA', use: 'sig'}), scope: ["openid", "offline"]}) # TrustOAuth2JwtGrantIssuer | +} + +begin + # Trust OAuth2 JWT Bearer Grant Type Issuer + result = api_instance.trust_o_auth2_jwt_grant_issuer(opts) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->trust_o_auth2_jwt_grant_issuer: #{e}" +end +``` + +#### Using the trust_o_auth2_jwt_grant_issuer_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> trust_o_auth2_jwt_grant_issuer_with_http_info(opts) + +```ruby +begin + # Trust OAuth2 JWT Bearer Grant Type Issuer + data, status_code, headers = api_instance.trust_o_auth2_jwt_grant_issuer_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OAuth2Api->trust_o_auth2_jwt_grant_issuer_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **trust_o_auth2_jwt_grant_issuer** | [**TrustOAuth2JwtGrantIssuer**](TrustOAuth2JwtGrantIssuer.md) | | [optional] | + +### Return type + +[**TrustedOAuth2JwtGrantIssuer**](TrustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/clients/hydra/ruby/docs/OAuth2Client.md b/clients/hydra/ruby/docs/OAuth2Client.md index aa19406b2bd..98336962acf 100644 --- a/clients/hydra/ruby/docs/OAuth2Client.md +++ b/clients/hydra/ruby/docs/OAuth2Client.md @@ -6,39 +6,49 @@ | ---- | ---- | ----------- | ----- | | **allowed_cors_origins** | **Array<String>** | | [optional] | | **audience** | **Array<String>** | | [optional] | -| **backchannel_logout_session_required** | **Boolean** | 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** | **String** | RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. | [optional] | -| **client_id** | **String** | ID is the id for this client. | [optional] | -| **client_name** | **String** | Name is the human-readable string name of the client to be presented to the end-user during authorization. | [optional] | -| **client_secret** | **String** | Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. | [optional] | -| **client_secret_expires_at** | **Integer** | SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. | [optional] | -| **client_uri** | **String** | ClientURI is an 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] | +| **authorization_code_grant_access_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **authorization_code_grant_id_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **authorization_code_grant_refresh_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **backchannel_logout_session_required** | **Boolean** | 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** | **String** | 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** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **client_id** | **String** | OAuth 2.0 Client ID The ID is autogenerated and immutable. | [optional] | +| **client_name** | **String** | OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. | [optional] | +| **client_secret** | **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. | [optional] | +| **client_secret_expires_at** | **Integer** | OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. | [optional] | +| **client_uri** | **String** | 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** | **Array<String>** | | [optional] | -| **created_at** | **Time** | CreatedAt returns the timestamp of the client's creation. | [optional] | -| **frontchannel_logout_session_required** | **Boolean** | 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** | **String** | 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] | +| **created_at** | **Time** | OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. | [optional] | +| **frontchannel_logout_session_required** | **Boolean** | 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** | **String** | 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** | **Array<String>** | | [optional] | -| **jwks** | **Object** | | [optional] | -| **jwks_uri** | **String** | 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] | -| **logo_uri** | **String** | LogoURI is an URL string that references a logo for the client. | [optional] | +| **implicit_grant_access_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **implicit_grant_id_token_lifespan** | **String** | 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** | **String** | OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | [optional] | +| **jwt_bearer_grant_access_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **logo_uri** | **String** | OAuth 2.0 Client Logo URI A URL string referencing the client's logo. | [optional] | | **metadata** | **Object** | | [optional] | -| **owner** | **String** | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] | -| **policy_uri** | **String** | 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] | +| **owner** | **String** | OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] | +| **policy_uri** | **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. | [optional] | | **post_logout_redirect_uris** | **Array<String>** | | [optional] | | **redirect_uris** | **Array<String>** | | [optional] | -| **registration_access_token** | **String** | RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. | [optional] | -| **registration_client_uri** | **String** | RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] | -| **request_object_signing_alg** | **String** | 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] | +| **refresh_token_grant_access_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **refresh_token_grant_id_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **refresh_token_grant_refresh_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **registration_access_token** | **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. | [optional] | +| **registration_client_uri** | **String** | OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] | +| **request_object_signing_alg** | **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. | [optional] | | **request_uris** | **Array<String>** | | [optional] | | **response_types** | **Array<String>** | | [optional] | -| **scope** | **String** | 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** | **String** | 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] | -| **subject_type** | **String** | SubjectType requested for responses to this Client. 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** | **String** | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional] | -| **token_endpoint_auth_signing_alg** | **String** | Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] | -| **tos_uri** | **String** | TermsOfServiceURI is a URL string that points 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** | **Time** | UpdatedAt returns the timestamp of the last update. | [optional] | -| **userinfo_signed_response_alg** | **String** | 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] | +| **scope** | **String** | 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** | **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. | [optional] | +| **subject_type** | **String** | 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** | **String** | OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] | +| **token_endpoint_auth_signing_alg** | **String** | OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] | +| **tos_uri** | **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. | [optional] | +| **updated_at** | **Time** | OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. | [optional] | +| **userinfo_signed_response_alg** | **String** | 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] | ## Example @@ -48,8 +58,12 @@ require 'ory-hydra-client' instance = OryHydraClient::OAuth2Client.new( allowed_cors_origins: null, audience: null, + authorization_code_grant_access_token_lifespan: null, + authorization_code_grant_id_token_lifespan: null, + authorization_code_grant_refresh_token_lifespan: null, backchannel_logout_session_required: null, backchannel_logout_uri: null, + client_credentials_grant_access_token_lifespan: null, client_id: null, client_name: null, client_secret: null, @@ -60,20 +74,26 @@ instance = OryHydraClient::OAuth2Client.new( frontchannel_logout_session_required: null, frontchannel_logout_uri: null, grant_types: null, + implicit_grant_access_token_lifespan: null, + implicit_grant_id_token_lifespan: null, jwks: null, jwks_uri: null, + jwt_bearer_grant_access_token_lifespan: null, logo_uri: null, metadata: null, owner: null, policy_uri: null, post_logout_redirect_uris: null, redirect_uris: null, + refresh_token_grant_access_token_lifespan: null, + refresh_token_grant_id_token_lifespan: null, + refresh_token_grant_refresh_token_lifespan: null, registration_access_token: null, registration_client_uri: null, request_object_signing_alg: null, request_uris: null, response_types: null, - scope: null, + scope: scope1 scope-2 scope.3 scope:4, sector_identifier_uri: null, subject_type: null, token_endpoint_auth_method: null, diff --git a/clients/hydra/ruby/docs/OAuth2ClientTokenLifespans.md b/clients/hydra/ruby/docs/OAuth2ClientTokenLifespans.md new file mode 100644 index 00000000000..0cae2abca70 --- /dev/null +++ b/clients/hydra/ruby/docs/OAuth2ClientTokenLifespans.md @@ -0,0 +1,36 @@ +# OryHydraClient::OAuth2ClientTokenLifespans + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization_code_grant_access_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **authorization_code_grant_id_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **authorization_code_grant_refresh_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **client_credentials_grant_access_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **implicit_grant_access_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **implicit_grant_id_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **jwt_bearer_grant_access_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **refresh_token_grant_access_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **refresh_token_grant_id_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | +| **refresh_token_grant_refresh_token_lifespan** | **String** | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::OAuth2ClientTokenLifespans.new( + authorization_code_grant_access_token_lifespan: null, + authorization_code_grant_id_token_lifespan: null, + authorization_code_grant_refresh_token_lifespan: null, + client_credentials_grant_access_token_lifespan: null, + implicit_grant_access_token_lifespan: null, + implicit_grant_id_token_lifespan: null, + jwt_bearer_grant_access_token_lifespan: null, + refresh_token_grant_access_token_lifespan: null, + refresh_token_grant_id_token_lifespan: null, + refresh_token_grant_refresh_token_lifespan: null +) +``` + diff --git a/clients/hydra/ruby/docs/ConsentRequest.md b/clients/hydra/ruby/docs/OAuth2ConsentRequest.md similarity index 92% rename from clients/hydra/ruby/docs/ConsentRequest.md rename to clients/hydra/ruby/docs/OAuth2ConsentRequest.md index 85286b3afef..ee4cc25e6ca 100644 --- a/clients/hydra/ruby/docs/ConsentRequest.md +++ b/clients/hydra/ruby/docs/OAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# OryHydraClient::ConsentRequest +# OryHydraClient::OAuth2ConsentRequest ## Properties @@ -11,7 +11,7 @@ | **context** | **Object** | | [optional] | | **login_challenge** | **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** | **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** | [**OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] | +| **oidc_context** | [**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. | [optional] | | **requested_access_token_audience** | **Array<String>** | | [optional] | | **requested_scope** | **Array<String>** | | [optional] | @@ -23,7 +23,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::ConsentRequest.new( +instance = OryHydraClient::OAuth2ConsentRequest.new( acr: null, amr: null, challenge: null, diff --git a/clients/hydra/ruby/docs/OpenIDConnectContext.md b/clients/hydra/ruby/docs/OAuth2ConsentRequestOpenIDConnectContext.md similarity index 88% rename from clients/hydra/ruby/docs/OpenIDConnectContext.md rename to clients/hydra/ruby/docs/OAuth2ConsentRequestOpenIDConnectContext.md index dd73729d2ce..1a4e34a6d30 100644 --- a/clients/hydra/ruby/docs/OpenIDConnectContext.md +++ b/clients/hydra/ruby/docs/OAuth2ConsentRequestOpenIDConnectContext.md @@ -1,4 +1,4 @@ -# OryHydraClient::OpenIDConnectContext +# OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext ## Properties @@ -6,7 +6,7 @@ | ---- | ---- | ----------- | ----- | | **acr_values** | **Array<String>** | 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** | **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** | **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] | +| **id_token_hint_claims** | **Hash<String, 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** | **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** | **Array<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. | [optional] | @@ -15,7 +15,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::OpenIDConnectContext.new( +instance = OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext.new( acr_values: null, display: null, id_token_hint_claims: null, diff --git a/clients/hydra/ruby/docs/OAuth2ConsentSession.md b/clients/hydra/ruby/docs/OAuth2ConsentSession.md new file mode 100644 index 00000000000..e11e3d952e1 --- /dev/null +++ b/clients/hydra/ruby/docs/OAuth2ConsentSession.md @@ -0,0 +1,32 @@ +# OryHydraClient::OAuth2ConsentSession + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **consent_request** | [**OAuth2ConsentRequest**](OAuth2ConsentRequest.md) | | [optional] | +| **expires_at** | [**OAuth2ConsentSessionExpiresAt**](OAuth2ConsentSessionExpiresAt.md) | | [optional] | +| **grant_access_token_audience** | **Array<String>** | | [optional] | +| **grant_scope** | **Array<String>** | | [optional] | +| **handled_at** | **Time** | | [optional] | +| **remember** | **Boolean** | 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** | **Integer** | 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] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::OAuth2ConsentSession.new( + consent_request: null, + expires_at: null, + grant_access_token_audience: null, + grant_scope: null, + handled_at: null, + remember: null, + remember_for: null, + session: null +) +``` + diff --git a/clients/hydra/ruby/docs/OAuth2ConsentSessionExpiresAt.md b/clients/hydra/ruby/docs/OAuth2ConsentSessionExpiresAt.md new file mode 100644 index 00000000000..0fec2c4982f --- /dev/null +++ b/clients/hydra/ruby/docs/OAuth2ConsentSessionExpiresAt.md @@ -0,0 +1,26 @@ +# OryHydraClient::OAuth2ConsentSessionExpiresAt + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **access_token** | **Time** | | [optional] | +| **authorize_code** | **Time** | | [optional] | +| **id_token** | **Time** | | [optional] | +| **par_context** | **Time** | | [optional] | +| **refresh_token** | **Time** | | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::OAuth2ConsentSessionExpiresAt.new( + access_token: null, + authorize_code: null, + id_token: null, + par_context: null, + refresh_token: null +) +``` + diff --git a/clients/hydra/ruby/docs/LoginRequest.md b/clients/hydra/ruby/docs/OAuth2LoginRequest.md similarity index 90% rename from clients/hydra/ruby/docs/LoginRequest.md rename to clients/hydra/ruby/docs/OAuth2LoginRequest.md index 95367435bb0..0926eb16c19 100644 --- a/clients/hydra/ruby/docs/LoginRequest.md +++ b/clients/hydra/ruby/docs/OAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# OryHydraClient::LoginRequest +# OryHydraClient::OAuth2LoginRequest ## Properties @@ -6,7 +6,7 @@ | ---- | ---- | ----------- | ----- | | **challenge** | **String** | ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. | | | **client** | [**OAuth2Client**](OAuth2Client.md) | | | -| **oidc_context** | [**OpenIDConnectContext**](OpenIDConnectContext.md) | | [optional] | +| **oidc_context** | [**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** | **Array<String>** | | | | **requested_scope** | **Array<String>** | | | @@ -19,7 +19,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::LoginRequest.new( +instance = OryHydraClient::OAuth2LoginRequest.new( challenge: null, client: null, oidc_context: null, diff --git a/clients/hydra/ruby/docs/LogoutRequest.md b/clients/hydra/ruby/docs/OAuth2LogoutRequest.md similarity index 91% rename from clients/hydra/ruby/docs/LogoutRequest.md rename to clients/hydra/ruby/docs/OAuth2LogoutRequest.md index 6223e414112..13c8f635ef4 100644 --- a/clients/hydra/ruby/docs/LogoutRequest.md +++ b/clients/hydra/ruby/docs/OAuth2LogoutRequest.md @@ -1,4 +1,4 @@ -# OryHydraClient::LogoutRequest +# OryHydraClient::OAuth2LogoutRequest ## Properties @@ -16,7 +16,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::LogoutRequest.new( +instance = OryHydraClient::OAuth2LogoutRequest.new( challenge: null, client: null, request_url: null, diff --git a/clients/hydra/ruby/docs/CompletedRequest.md b/clients/hydra/ruby/docs/OAuth2RedirectTo.md similarity index 56% rename from clients/hydra/ruby/docs/CompletedRequest.md rename to clients/hydra/ruby/docs/OAuth2RedirectTo.md index a900ec23fc0..854f0b6c9ca 100644 --- a/clients/hydra/ruby/docs/CompletedRequest.md +++ b/clients/hydra/ruby/docs/OAuth2RedirectTo.md @@ -1,17 +1,17 @@ -# OryHydraClient::CompletedRequest +# OryHydraClient::OAuth2RedirectTo ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **redirect_to** | **String** | RedirectURL is the URL which you should redirect the user to once the authentication process is completed. | | +| **redirect_to** | **String** | RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. | | ## Example ```ruby require 'ory-hydra-client' -instance = OryHydraClient::CompletedRequest.new( +instance = OryHydraClient::OAuth2RedirectTo.new( redirect_to: null ) ``` diff --git a/clients/hydra/ruby/docs/OAuth2TokenExchange.md b/clients/hydra/ruby/docs/OAuth2TokenExchange.md new file mode 100644 index 00000000000..ba79bcb5f8b --- /dev/null +++ b/clients/hydra/ruby/docs/OAuth2TokenExchange.md @@ -0,0 +1,28 @@ +# OryHydraClient::OAuth2TokenExchange + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **access_token** | **String** | The access token issued by the authorization server. | [optional] | +| **expires_in** | **Integer** | 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] | +| **id_token** | **Integer** | To retrieve a refresh token request the id_token scope. | [optional] | +| **refresh_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. | [optional] | +| **scope** | **Integer** | The scope of the access token | [optional] | +| **token_type** | **String** | The type of the token issued | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::OAuth2TokenExchange.new( + access_token: null, + expires_in: null, + id_token: null, + refresh_token: null, + scope: null, + token_type: null +) +``` + diff --git a/clients/hydra/ruby/docs/Oauth2TokenResponse.md b/clients/hydra/ruby/docs/Oauth2TokenResponse.md deleted file mode 100644 index d260d199df1..00000000000 --- a/clients/hydra/ruby/docs/Oauth2TokenResponse.md +++ /dev/null @@ -1,28 +0,0 @@ -# OryHydraClient::Oauth2TokenResponse - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **access_token** | **String** | | [optional] | -| **expires_in** | **Integer** | | [optional] | -| **id_token** | **String** | | [optional] | -| **refresh_token** | **String** | | [optional] | -| **scope** | **String** | | [optional] | -| **token_type** | **String** | | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::Oauth2TokenResponse.new( - access_token: null, - expires_in: null, - id_token: null, - refresh_token: null, - scope: null, - token_type: null -) -``` - diff --git a/clients/hydra/ruby/docs/OidcApi.md b/clients/hydra/ruby/docs/OidcApi.md new file mode 100644 index 00000000000..be6bbe8d329 --- /dev/null +++ b/clients/hydra/ruby/docs/OidcApi.md @@ -0,0 +1,473 @@ +# OryHydraClient::OidcApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_oidc_dynamic_client**](OidcApi.md#create_oidc_dynamic_client) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration | +| [**delete_oidc_dynamic_client**](OidcApi.md#delete_oidc_dynamic_client) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol | +| [**discover_oidc_configuration**](OidcApi.md#discover_oidc_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery | +| [**get_oidc_dynamic_client**](OidcApi.md#get_oidc_dynamic_client) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration | +| [**get_oidc_user_info**](OidcApi.md#get_oidc_user_info) | **GET** /userinfo | OpenID Connect Userinfo | +| [**revoke_oidc_session**](OidcApi.md#revoke_oidc_session) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout | +| [**set_oidc_dynamic_client**](OidcApi.md#set_oidc_dynamic_client) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration | + + +## create_oidc_dynamic_client + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OidcApi.new +o_auth2_client = OryHydraClient::OAuth2Client.new # OAuth2Client | Dynamic Client Registration Request Body + +begin + # Register OAuth2 Client using OpenID Dynamic Client Registration + result = api_instance.create_oidc_dynamic_client(o_auth2_client) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->create_oidc_dynamic_client: #{e}" +end +``` + +#### Using the create_oidc_dynamic_client_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_oidc_dynamic_client_with_http_info(o_auth2_client) + +```ruby +begin + # Register OAuth2 Client using OpenID Dynamic Client Registration + data, status_code, headers = api_instance.create_oidc_dynamic_client_with_http_info(o_auth2_client) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->create_oidc_dynamic_client_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | Dynamic Client Registration Request Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## delete_oidc_dynamic_client + +> delete_oidc_dynamic_client(id) + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' +# setup authorization +OryHydraClient.configure do |config| + # Configure Bearer authorization: bearer + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = OryHydraClient::OidcApi.new +id = 'id_example' # String | The id of the OAuth 2.0 Client. + +begin + # Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + api_instance.delete_oidc_dynamic_client(id) +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->delete_oidc_dynamic_client: #{e}" +end +``` + +#### Using the delete_oidc_dynamic_client_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_oidc_dynamic_client_with_http_info(id) + +```ruby +begin + # Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol + data, status_code, headers = api_instance.delete_oidc_dynamic_client_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->delete_oidc_dynamic_client_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The id of the OAuth 2.0 Client. | | + +### Return type + +nil (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## discover_oidc_configuration + +> 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/ + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OidcApi.new + +begin + # OpenID Connect Discovery + result = api_instance.discover_oidc_configuration + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->discover_oidc_configuration: #{e}" +end +``` + +#### Using the discover_oidc_configuration_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> discover_oidc_configuration_with_http_info + +```ruby +begin + # OpenID Connect Discovery + data, status_code, headers = api_instance.discover_oidc_configuration_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->discover_oidc_configuration_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**OidcConfiguration**](OidcConfiguration.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_oidc_dynamic_client + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' +# setup authorization +OryHydraClient.configure do |config| + # Configure Bearer authorization: bearer + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = OryHydraClient::OidcApi.new +id = 'id_example' # String | The id of the OAuth 2.0 Client. + +begin + # Get OAuth2 Client using OpenID Dynamic Client Registration + result = api_instance.get_oidc_dynamic_client(id) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->get_oidc_dynamic_client: #{e}" +end +``` + +#### Using the get_oidc_dynamic_client_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_oidc_dynamic_client_with_http_info(id) + +```ruby +begin + # Get OAuth2 Client using OpenID Dynamic Client Registration + data, status_code, headers = api_instance.get_oidc_dynamic_client_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->get_oidc_dynamic_client_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The id of the OAuth 2.0 Client. | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_oidc_user_info + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' +# setup authorization +OryHydraClient.configure do |config| + # Configure OAuth2 access token for authorization: oauth2 + config.access_token = 'YOUR ACCESS TOKEN' +end + +api_instance = OryHydraClient::OidcApi.new + +begin + # OpenID Connect Userinfo + result = api_instance.get_oidc_user_info + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->get_oidc_user_info: #{e}" +end +``` + +#### Using the get_oidc_user_info_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_oidc_user_info_with_http_info + +```ruby +begin + # OpenID Connect Userinfo + data, status_code, headers = api_instance.get_oidc_user_info_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->get_oidc_user_info_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**OidcUserInfo**](OidcUserInfo.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## revoke_oidc_session + +> revoke_oidc_session + +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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::OidcApi.new + +begin + # OpenID Connect Front- and Back-channel Enabled Logout + api_instance.revoke_oidc_session +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->revoke_oidc_session: #{e}" +end +``` + +#### Using the revoke_oidc_session_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> revoke_oidc_session_with_http_info + +```ruby +begin + # OpenID Connect Front- and Back-channel Enabled Logout + data, status_code, headers = api_instance.revoke_oidc_session_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->revoke_oidc_session_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +nil (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## set_oidc_dynamic_client + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' +# setup authorization +OryHydraClient.configure do |config| + # Configure Bearer authorization: bearer + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = OryHydraClient::OidcApi.new +id = 'id_example' # String | OAuth 2.0 Client ID +o_auth2_client = OryHydraClient::OAuth2Client.new # OAuth2Client | OAuth 2.0 Client Request Body + +begin + # Set OAuth2 Client using OpenID Dynamic Client Registration + result = api_instance.set_oidc_dynamic_client(id, o_auth2_client) + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->set_oidc_dynamic_client: #{e}" +end +``` + +#### Using the set_oidc_dynamic_client_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> set_oidc_dynamic_client_with_http_info(id, o_auth2_client) + +```ruby +begin + # Set OAuth2 Client using OpenID Dynamic Client Registration + data, status_code, headers = api_instance.set_oidc_dynamic_client_with_http_info(id, o_auth2_client) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling OidcApi->set_oidc_dynamic_client_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | OAuth 2.0 Client ID | | +| **o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | OAuth 2.0 Client Request Body | | + +### Return type + +[**OAuth2Client**](OAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/clients/hydra/ruby/docs/OidcConfiguration.md b/clients/hydra/ruby/docs/OidcConfiguration.md new file mode 100644 index 00000000000..3a77f5d011c --- /dev/null +++ b/clients/hydra/ruby/docs/OidcConfiguration.md @@ -0,0 +1,74 @@ +# OryHydraClient::OidcConfiguration + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization_endpoint** | **String** | OAuth 2.0 Authorization Endpoint URL | | +| **backchannel_logout_session_supported** | **Boolean** | 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** | **Boolean** | OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] | +| **claims_parameter_supported** | **Boolean** | 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** | **Array<String>** | 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** | **Array<String>** | 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] | +| **end_session_endpoint** | **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** | **Boolean** | 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** | **Boolean** | OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] | +| **grant_types_supported** | **Array<String>** | 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** | **Array<String>** | OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. | | +| **id_token_signing_alg_values_supported** | **Array<String>** | 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** | **String** | 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** | **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. | | +| **registration_endpoint** | **String** | OpenID Connect Dynamic Client Registration Endpoint URL | [optional] | +| **request_object_signing_alg_values_supported** | **Array<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). | [optional] | +| **request_parameter_supported** | **Boolean** | 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** | **Boolean** | 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** | **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. | [optional] | +| **response_modes_supported** | **Array<String>** | 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** | **Array<String>** | 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** | **String** | OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] | +| **scopes_supported** | **Array<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 | [optional] | +| **subject_types_supported** | **Array<String>** | 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** | **String** | OAuth 2.0 Token Endpoint URL | | +| **token_endpoint_auth_methods_supported** | **Array<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 | [optional] | +| **userinfo_endpoint** | **String** | OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. | [optional] | +| **userinfo_signed_response_alg** | **Array<String>** | OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. | | +| **userinfo_signing_alg_values_supported** | **Array<String>** | 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 + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::OidcConfiguration.new( + authorization_endpoint: https://playground.ory.sh/ory-hydra/public/oauth2/auth, + backchannel_logout_session_supported: null, + backchannel_logout_supported: null, + claims_parameter_supported: null, + claims_supported: null, + code_challenge_methods_supported: null, + end_session_endpoint: null, + frontchannel_logout_session_supported: null, + frontchannel_logout_supported: null, + grant_types_supported: null, + id_token_signed_response_alg: null, + id_token_signing_alg_values_supported: null, + 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: null, + request_parameter_supported: null, + request_uri_parameter_supported: null, + require_request_uri_registration: null, + response_modes_supported: null, + response_types_supported: null, + revocation_endpoint: null, + scopes_supported: null, + subject_types_supported: null, + token_endpoint: https://playground.ory.sh/ory-hydra/public/oauth2/token, + token_endpoint_auth_methods_supported: null, + userinfo_endpoint: null, + userinfo_signed_response_alg: null, + userinfo_signing_alg_values_supported: null +) +``` + diff --git a/clients/hydra/ruby/docs/UserinfoResponse.md b/clients/hydra/ruby/docs/OidcUserInfo.md similarity index 98% rename from clients/hydra/ruby/docs/UserinfoResponse.md rename to clients/hydra/ruby/docs/OidcUserInfo.md index 0409a5f64fe..fd1a1210f84 100644 --- a/clients/hydra/ruby/docs/UserinfoResponse.md +++ b/clients/hydra/ruby/docs/OidcUserInfo.md @@ -1,4 +1,4 @@ -# OryHydraClient::UserinfoResponse +# OryHydraClient::OidcUserInfo ## Properties @@ -29,7 +29,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::UserinfoResponse.new( +instance = OryHydraClient::OidcUserInfo.new( birthdate: null, email: null, email_verified: null, diff --git a/clients/hydra/ruby/docs/Pagination.md b/clients/hydra/ruby/docs/Pagination.md new file mode 100644 index 00000000000..74396f0ab6c --- /dev/null +++ b/clients/hydra/ruby/docs/Pagination.md @@ -0,0 +1,20 @@ +# OryHydraClient::Pagination + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **page_size** | **Integer** | 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** | **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'] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::Pagination.new( + page_size: null, + page_token: null +) +``` + diff --git a/clients/hydra/ruby/docs/PaginationHeaders.md b/clients/hydra/ruby/docs/PaginationHeaders.md new file mode 100644 index 00000000000..9c2822371d4 --- /dev/null +++ b/clients/hydra/ruby/docs/PaginationHeaders.md @@ -0,0 +1,20 @@ +# OryHydraClient::PaginationHeaders + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **link** | **String** | 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** | **String** | The total number of clients. in: header | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::PaginationHeaders.new( + link: null, + x_total_count: null +) +``` + diff --git a/clients/hydra/ruby/docs/PatchDocument.md b/clients/hydra/ruby/docs/PatchDocument.md deleted file mode 100644 index 62de0b120fd..00000000000 --- a/clients/hydra/ruby/docs/PatchDocument.md +++ /dev/null @@ -1,24 +0,0 @@ -# OryHydraClient::PatchDocument - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **from** | **String** | A JSON-pointer | [optional] | -| **op** | **String** | The operation to be performed | | -| **path** | **String** | A JSON-pointer | | -| **value** | **Object** | The value to be used within the operations | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PatchDocument.new( - from: null, - op: "replace", - path: "/name", - value: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginConfig.md b/clients/hydra/ruby/docs/PluginConfig.md deleted file mode 100644 index 7821c57c78f..00000000000 --- a/clients/hydra/ruby/docs/PluginConfig.md +++ /dev/null @@ -1,48 +0,0 @@ -# OryHydraClient::PluginConfig - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **args** | [**PluginConfigArgs**](PluginConfigArgs.md) | | | -| **description** | **String** | description | | -| **docker_version** | **String** | Docker Version used to create the plugin | [optional] | -| **documentation** | **String** | documentation | | -| **entrypoint** | **Array<String>** | entrypoint | | -| **env** | [**Array<PluginEnv>**](PluginEnv.md) | env | | -| **interface** | [**PluginConfigInterface**](PluginConfigInterface.md) | | | -| **ipc_host** | **Boolean** | ipc host | | -| **linux** | [**PluginConfigLinux**](PluginConfigLinux.md) | | | -| **mounts** | [**Array<PluginMount>**](PluginMount.md) | mounts | | -| **network** | [**PluginConfigNetwork**](PluginConfigNetwork.md) | | | -| **pid_host** | **Boolean** | pid host | | -| **propagated_mount** | **String** | propagated mount | | -| **user** | [**PluginConfigUser**](PluginConfigUser.md) | | [optional] | -| **work_dir** | **String** | work dir | | -| **rootfs** | [**PluginConfigRootfs**](PluginConfigRootfs.md) | | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginConfig.new( - args: null, - description: null, - docker_version: null, - documentation: null, - entrypoint: null, - env: null, - interface: null, - ipc_host: null, - linux: null, - mounts: null, - network: null, - pid_host: null, - propagated_mount: null, - user: null, - work_dir: null, - rootfs: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginConfigArgs.md b/clients/hydra/ruby/docs/PluginConfigArgs.md deleted file mode 100644 index 6942748381e..00000000000 --- a/clients/hydra/ruby/docs/PluginConfigArgs.md +++ /dev/null @@ -1,24 +0,0 @@ -# OryHydraClient::PluginConfigArgs - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **description** | **String** | description | | -| **name** | **String** | name | | -| **settable** | **Array<String>** | settable | | -| **value** | **Array<String>** | value | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginConfigArgs.new( - description: null, - name: null, - settable: null, - value: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginConfigInterface.md b/clients/hydra/ruby/docs/PluginConfigInterface.md deleted file mode 100644 index ff84bb3be6b..00000000000 --- a/clients/hydra/ruby/docs/PluginConfigInterface.md +++ /dev/null @@ -1,22 +0,0 @@ -# OryHydraClient::PluginConfigInterface - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **protocol_scheme** | **String** | Protocol to use for clients connecting to the plugin. | [optional] | -| **socket** | **String** | socket | | -| **types** | [**Array<PluginInterfaceType>**](PluginInterfaceType.md) | types | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginConfigInterface.new( - protocol_scheme: null, - socket: null, - types: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginConfigLinux.md b/clients/hydra/ruby/docs/PluginConfigLinux.md deleted file mode 100644 index 76801553be7..00000000000 --- a/clients/hydra/ruby/docs/PluginConfigLinux.md +++ /dev/null @@ -1,22 +0,0 @@ -# OryHydraClient::PluginConfigLinux - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **allow_all_devices** | **Boolean** | allow all devices | | -| **capabilities** | **Array<String>** | capabilities | | -| **devices** | [**Array<PluginDevice>**](PluginDevice.md) | devices | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginConfigLinux.new( - allow_all_devices: null, - capabilities: null, - devices: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginConfigNetwork.md b/clients/hydra/ruby/docs/PluginConfigNetwork.md deleted file mode 100644 index fb35cc28a56..00000000000 --- a/clients/hydra/ruby/docs/PluginConfigNetwork.md +++ /dev/null @@ -1,18 +0,0 @@ -# OryHydraClient::PluginConfigNetwork - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **type** | **String** | type | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginConfigNetwork.new( - type: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginConfigRootfs.md b/clients/hydra/ruby/docs/PluginConfigRootfs.md deleted file mode 100644 index a157a1c4b92..00000000000 --- a/clients/hydra/ruby/docs/PluginConfigRootfs.md +++ /dev/null @@ -1,20 +0,0 @@ -# OryHydraClient::PluginConfigRootfs - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **diff_ids** | **Array<String>** | diff ids | [optional] | -| **type** | **String** | type | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginConfigRootfs.new( - diff_ids: null, - type: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginConfigUser.md b/clients/hydra/ruby/docs/PluginConfigUser.md deleted file mode 100644 index 2eeec55032b..00000000000 --- a/clients/hydra/ruby/docs/PluginConfigUser.md +++ /dev/null @@ -1,20 +0,0 @@ -# OryHydraClient::PluginConfigUser - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **gid** | **Integer** | g ID | [optional] | -| **uid** | **Integer** | UID | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginConfigUser.new( - gid: null, - uid: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginDevice.md b/clients/hydra/ruby/docs/PluginDevice.md deleted file mode 100644 index 6e9d18077fe..00000000000 --- a/clients/hydra/ruby/docs/PluginDevice.md +++ /dev/null @@ -1,24 +0,0 @@ -# OryHydraClient::PluginDevice - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **description** | **String** | description | | -| **name** | **String** | name | | -| **path** | **String** | path | | -| **settable** | **Array<String>** | settable | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginDevice.new( - description: null, - name: null, - path: null, - settable: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginEnv.md b/clients/hydra/ruby/docs/PluginEnv.md deleted file mode 100644 index 594c9ad5230..00000000000 --- a/clients/hydra/ruby/docs/PluginEnv.md +++ /dev/null @@ -1,24 +0,0 @@ -# OryHydraClient::PluginEnv - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **description** | **String** | description | | -| **name** | **String** | name | | -| **settable** | **Array<String>** | settable | | -| **value** | **String** | value | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginEnv.new( - description: null, - name: null, - settable: null, - value: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginInterfaceType.md b/clients/hydra/ruby/docs/PluginInterfaceType.md deleted file mode 100644 index 3dca6bcca97..00000000000 --- a/clients/hydra/ruby/docs/PluginInterfaceType.md +++ /dev/null @@ -1,22 +0,0 @@ -# OryHydraClient::PluginInterfaceType - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **capability** | **String** | capability | | -| **prefix** | **String** | prefix | | -| **version** | **String** | version | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginInterfaceType.new( - capability: null, - prefix: null, - version: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginMount.md b/clients/hydra/ruby/docs/PluginMount.md deleted file mode 100644 index 88483c2dfb8..00000000000 --- a/clients/hydra/ruby/docs/PluginMount.md +++ /dev/null @@ -1,30 +0,0 @@ -# OryHydraClient::PluginMount - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **description** | **String** | description | | -| **destination** | **String** | destination | | -| **name** | **String** | name | | -| **options** | **Array<String>** | options | | -| **settable** | **Array<String>** | settable | | -| **source** | **String** | source | | -| **type** | **String** | type | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginMount.new( - description: null, - destination: null, - name: null, - options: null, - settable: null, - source: null, - type: null -) -``` - diff --git a/clients/hydra/ruby/docs/PluginSettings.md b/clients/hydra/ruby/docs/PluginSettings.md deleted file mode 100644 index 80fffe6690e..00000000000 --- a/clients/hydra/ruby/docs/PluginSettings.md +++ /dev/null @@ -1,24 +0,0 @@ -# OryHydraClient::PluginSettings - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **args** | **Array<String>** | args | | -| **devices** | [**Array<PluginDevice>**](PluginDevice.md) | devices | | -| **env** | **Array<String>** | env | | -| **mounts** | [**Array<PluginMount>**](PluginMount.md) | mounts | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PluginSettings.new( - args: null, - devices: null, - env: null, - mounts: null -) -``` - diff --git a/clients/hydra/ruby/docs/PreviousConsentSession.md b/clients/hydra/ruby/docs/PreviousConsentSession.md deleted file mode 100644 index 75dd3790eaf..00000000000 --- a/clients/hydra/ruby/docs/PreviousConsentSession.md +++ /dev/null @@ -1,30 +0,0 @@ -# OryHydraClient::PreviousConsentSession - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **consent_request** | [**ConsentRequest**](ConsentRequest.md) | | [optional] | -| **grant_access_token_audience** | **Array<String>** | | [optional] | -| **grant_scope** | **Array<String>** | | [optional] | -| **handled_at** | **Time** | | [optional] | -| **remember** | **Boolean** | 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** | **Integer** | 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** | [**ConsentRequestSession**](ConsentRequestSession.md) | | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::PreviousConsentSession.new( - consent_request: null, - grant_access_token_audience: null, - grant_scope: null, - handled_at: null, - remember: null, - remember_for: null, - session: null -) -``` - diff --git a/clients/hydra/ruby/docs/PublicApi.md b/clients/hydra/ruby/docs/PublicApi.md deleted file mode 100644 index ac7b1776306..00000000000 --- a/clients/hydra/ruby/docs/PublicApi.md +++ /dev/null @@ -1,800 +0,0 @@ -# OryHydraClient::PublicApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -| ------ | ------------ | ----------- | -| [**disconnect_user**](PublicApi.md#disconnect_user) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout | -| [**discover_open_id_configuration**](PublicApi.md#discover_open_id_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery | -| [**dynamic_client_registration_create_o_auth2_client**](PublicApi.md#dynamic_client_registration_create_o_auth2_client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| [**dynamic_client_registration_delete_o_auth2_client**](PublicApi.md#dynamic_client_registration_delete_o_auth2_client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| [**dynamic_client_registration_get_o_auth2_client**](PublicApi.md#dynamic_client_registration_get_o_auth2_client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| [**dynamic_client_registration_update_o_auth2_client**](PublicApi.md#dynamic_client_registration_update_o_auth2_client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol | -| [**is_instance_ready**](PublicApi.md#is_instance_ready) | **GET** /health/ready | Check Readiness Status | -| [**oauth2_token**](PublicApi.md#oauth2_token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint | -| [**oauth_auth**](PublicApi.md#oauth_auth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint | -| [**revoke_o_auth2_token**](PublicApi.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens | -| [**userinfo**](PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo | -| [**well_known**](PublicApi.md#well_known) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery | - - -## disconnect_user - -> disconnect_user - -OpenID Connect Front-Backchannel Enabled Logout - -This endpoint initiates and completes user logout at Ory Hydra 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 - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::PublicApi.new - -begin - # OpenID Connect Front-Backchannel Enabled Logout - api_instance.disconnect_user -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->disconnect_user: #{e}" -end -``` - -#### Using the disconnect_user_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> disconnect_user_with_http_info - -```ruby -begin - # OpenID Connect Front-Backchannel Enabled Logout - data, status_code, headers = api_instance.disconnect_user_with_http_info - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->disconnect_user_with_http_info: #{e}" -end -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -## discover_open_id_configuration - -> discover_open_id_configuration - -OpenID Connect Discovery - -The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::PublicApi.new - -begin - # OpenID Connect Discovery - result = api_instance.discover_open_id_configuration - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->discover_open_id_configuration: #{e}" -end -``` - -#### Using the discover_open_id_configuration_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> discover_open_id_configuration_with_http_info - -```ruby -begin - # OpenID Connect Discovery - data, status_code, headers = api_instance.discover_open_id_configuration_with_http_info - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->discover_open_id_configuration_with_http_info: #{e}" -end -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**WellKnown**](WellKnown.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## dynamic_client_registration_create_o_auth2_client - -> dynamic_client_registration_create_o_auth2_client(body) - -Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::PublicApi.new -body = OryHydraClient::OAuth2Client.new # OAuth2Client | - -begin - # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - result = api_instance.dynamic_client_registration_create_o_auth2_client(body) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->dynamic_client_registration_create_o_auth2_client: #{e}" -end -``` - -#### Using the dynamic_client_registration_create_o_auth2_client_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> dynamic_client_registration_create_o_auth2_client_with_http_info(body) - -```ruby -begin - # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - data, status_code, headers = api_instance.dynamic_client_registration_create_o_auth2_client_with_http_info(body) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->dynamic_client_registration_create_o_auth2_client_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **body** | [**OAuth2Client**](OAuth2Client.md) | | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## dynamic_client_registration_delete_o_auth2_client - -> dynamic_client_registration_delete_o_auth2_client(id) - -Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::PublicApi.new -id = 'id_example' # String | The id of the OAuth 2.0 Client. - -begin - # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - api_instance.dynamic_client_registration_delete_o_auth2_client(id) -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->dynamic_client_registration_delete_o_auth2_client: #{e}" -end -``` - -#### Using the dynamic_client_registration_delete_o_auth2_client_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> dynamic_client_registration_delete_o_auth2_client_with_http_info(id) - -```ruby -begin - # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - data, status_code, headers = api_instance.dynamic_client_registration_delete_o_auth2_client_with_http_info(id) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->dynamic_client_registration_delete_o_auth2_client_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **id** | **String** | The id of the OAuth 2.0 Client. | | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## dynamic_client_registration_get_o_auth2_client - -> dynamic_client_registration_get_o_auth2_client(id) - -Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::PublicApi.new -id = 'id_example' # String | The id of the OAuth 2.0 Client. - -begin - # Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - result = api_instance.dynamic_client_registration_get_o_auth2_client(id) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->dynamic_client_registration_get_o_auth2_client: #{e}" -end -``` - -#### Using the dynamic_client_registration_get_o_auth2_client_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> dynamic_client_registration_get_o_auth2_client_with_http_info(id) - -```ruby -begin - # Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - data, status_code, headers = api_instance.dynamic_client_registration_get_o_auth2_client_with_http_info(id) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->dynamic_client_registration_get_o_auth2_client_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **id** | **String** | The id of the OAuth 2.0 Client. | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## dynamic_client_registration_update_o_auth2_client - -> dynamic_client_registration_update_o_auth2_client(id, body) - -Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::PublicApi.new -id = 'id_example' # String | The id of the OAuth 2.0 Client. -body = OryHydraClient::OAuth2Client.new # OAuth2Client | - -begin - # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - result = api_instance.dynamic_client_registration_update_o_auth2_client(id, body) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->dynamic_client_registration_update_o_auth2_client: #{e}" -end -``` - -#### Using the dynamic_client_registration_update_o_auth2_client_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> dynamic_client_registration_update_o_auth2_client_with_http_info(id, body) - -```ruby -begin - # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - data, status_code, headers = api_instance.dynamic_client_registration_update_o_auth2_client_with_http_info(id, body) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->dynamic_client_registration_update_o_auth2_client_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **id** | **String** | The id of the OAuth 2.0 Client. | | -| **body** | [**OAuth2Client**](OAuth2Client.md) | | | - -### Return type - -[**OAuth2Client**](OAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## is_instance_ready - -> is_instance_ready - -Check Readiness Status - -This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::PublicApi.new - -begin - # Check Readiness Status - result = api_instance.is_instance_ready - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->is_instance_ready: #{e}" -end -``` - -#### Using the is_instance_ready_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> is_instance_ready_with_http_info - -```ruby -begin - # Check Readiness Status - data, status_code, headers = api_instance.is_instance_ready_with_http_info - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->is_instance_ready_with_http_info: #{e}" -end -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**HealthStatus**](HealthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## oauth2_token - -> oauth2_token(grant_type, opts) - -The OAuth 2.0 Token Endpoint - -The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' -# setup authorization -OryHydraClient.configure do |config| - # Configure HTTP basic authorization: basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - - # Configure OAuth2 access token for authorization: oauth2 - config.access_token = 'YOUR ACCESS TOKEN' -end - -api_instance = OryHydraClient::PublicApi.new -grant_type = 'grant_type_example' # String | -opts = { - code: 'code_example', # String | - refresh_token: 'refresh_token_example', # String | - redirect_uri: 'redirect_uri_example', # String | - client_id: 'client_id_example' # String | -} - -begin - # The OAuth 2.0 Token Endpoint - result = api_instance.oauth2_token(grant_type, opts) - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->oauth2_token: #{e}" -end -``` - -#### Using the oauth2_token_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> oauth2_token_with_http_info(grant_type, opts) - -```ruby -begin - # The OAuth 2.0 Token Endpoint - data, status_code, headers = api_instance.oauth2_token_with_http_info(grant_type, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->oauth2_token_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **grant_type** | **String** | | | -| **code** | **String** | | [optional] | -| **refresh_token** | **String** | | [optional] | -| **redirect_uri** | **String** | | [optional] | -| **client_id** | **String** | | [optional] | - -### Return type - -[**Oauth2TokenResponse**](Oauth2TokenResponse.md) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - - -## oauth_auth - -> oauth_auth - -The OAuth 2.0 Authorize Endpoint - -This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::PublicApi.new - -begin - # The OAuth 2.0 Authorize Endpoint - api_instance.oauth_auth -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->oauth_auth: #{e}" -end -``` - -#### Using the oauth_auth_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> oauth_auth_with_http_info - -```ruby -begin - # The OAuth 2.0 Authorize Endpoint - data, status_code, headers = api_instance.oauth_auth_with_http_info - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->oauth_auth_with_http_info: #{e}" -end -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## revoke_o_auth2_token - -> revoke_o_auth2_token(token) - -Revoke OAuth2 Tokens - -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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' -# setup authorization -OryHydraClient.configure do |config| - # Configure HTTP basic authorization: basic - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' - - # Configure OAuth2 access token for authorization: oauth2 - config.access_token = 'YOUR ACCESS TOKEN' -end - -api_instance = OryHydraClient::PublicApi.new -token = 'token_example' # String | - -begin - # Revoke OAuth2 Tokens - api_instance.revoke_o_auth2_token(token) -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->revoke_o_auth2_token: #{e}" -end -``` - -#### Using the revoke_o_auth2_token_with_http_info variant - -This returns an Array which contains the response data (`nil` in this case), status code and headers. - -> revoke_o_auth2_token_with_http_info(token) - -```ruby -begin - # Revoke OAuth2 Tokens - data, status_code, headers = api_instance.revoke_o_auth2_token_with_http_info(token) - p status_code # => 2xx - p headers # => { ... } - p data # => nil -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->revoke_o_auth2_token_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **token** | **String** | | | - -### Return type - -nil (empty response body) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - - -## userinfo - -> userinfo - -OpenID Connect Userinfo - -This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' -# setup authorization -OryHydraClient.configure do |config| - # Configure OAuth2 access token for authorization: oauth2 - config.access_token = 'YOUR ACCESS TOKEN' -end - -api_instance = OryHydraClient::PublicApi.new - -begin - # OpenID Connect Userinfo - result = api_instance.userinfo - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->userinfo: #{e}" -end -``` - -#### Using the userinfo_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> userinfo_with_http_info - -```ruby -begin - # OpenID Connect Userinfo - data, status_code, headers = api_instance.userinfo_with_http_info - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->userinfo_with_http_info: #{e}" -end -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**UserinfoResponse**](UserinfoResponse.md) - -### Authorization - -[oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## well_known - -> well_known - -JSON Web Keys Discovery - -This endpoint returns JSON Web Keys to be used as public keys for 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. - -### Examples - -```ruby -require 'time' -require 'ory-hydra-client' - -api_instance = OryHydraClient::PublicApi.new - -begin - # JSON Web Keys Discovery - result = api_instance.well_known - p result -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->well_known: #{e}" -end -``` - -#### Using the well_known_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> well_known_with_http_info - -```ruby -begin - # JSON Web Keys Discovery - data, status_code, headers = api_instance.well_known_with_http_info - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue OryHydraClient::ApiError => e - puts "Error when calling PublicApi->well_known_with_http_info: #{e}" -end -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**JSONWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - diff --git a/clients/hydra/ruby/docs/RejectRequest.md b/clients/hydra/ruby/docs/RejectOAuth2Request.md similarity index 91% rename from clients/hydra/ruby/docs/RejectRequest.md rename to clients/hydra/ruby/docs/RejectOAuth2Request.md index 9bd45b33c0f..4e71aa1ff84 100644 --- a/clients/hydra/ruby/docs/RejectRequest.md +++ b/clients/hydra/ruby/docs/RejectOAuth2Request.md @@ -1,4 +1,4 @@ -# OryHydraClient::RejectRequest +# OryHydraClient::RejectOAuth2Request ## Properties @@ -15,7 +15,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::RejectRequest.new( +instance = OryHydraClient::RejectOAuth2Request.new( error: null, error_debug: null, error_description: null, diff --git a/clients/hydra/ruby/docs/RequestWasHandledResponse.md b/clients/hydra/ruby/docs/RequestWasHandledResponse.md deleted file mode 100644 index b85071e00a0..00000000000 --- a/clients/hydra/ruby/docs/RequestWasHandledResponse.md +++ /dev/null @@ -1,18 +0,0 @@ -# OryHydraClient::RequestWasHandledResponse - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **redirect_to** | **String** | Original request URL to which you should redirect the user if request was already handled. | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::RequestWasHandledResponse.new( - redirect_to: null -) -``` - diff --git a/clients/hydra/ruby/docs/TokenPagination.md b/clients/hydra/ruby/docs/TokenPagination.md new file mode 100644 index 00000000000..d4d407d4a44 --- /dev/null +++ b/clients/hydra/ruby/docs/TokenPagination.md @@ -0,0 +1,20 @@ +# OryHydraClient::TokenPagination + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **page_size** | **Integer** | 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** | **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'] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::TokenPagination.new( + page_size: null, + page_token: null +) +``` + diff --git a/clients/hydra/ruby/docs/TokenPaginationHeaders.md b/clients/hydra/ruby/docs/TokenPaginationHeaders.md new file mode 100644 index 00000000000..358839e488f --- /dev/null +++ b/clients/hydra/ruby/docs/TokenPaginationHeaders.md @@ -0,0 +1,20 @@ +# OryHydraClient::TokenPaginationHeaders + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **link** | **String** | 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** | **String** | The total number of clients. in: header | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::TokenPaginationHeaders.new( + link: null, + x_total_count: null +) +``` + diff --git a/clients/hydra/ruby/docs/TokenPaginationRequestParameters.md b/clients/hydra/ruby/docs/TokenPaginationRequestParameters.md new file mode 100644 index 00000000000..1c0f58a1e23 --- /dev/null +++ b/clients/hydra/ruby/docs/TokenPaginationRequestParameters.md @@ -0,0 +1,20 @@ +# OryHydraClient::TokenPaginationRequestParameters + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **page_size** | **Integer** | 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** | **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'] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::TokenPaginationRequestParameters.new( + page_size: null, + page_token: null +) +``` + diff --git a/clients/hydra/ruby/docs/TokenPaginationResponseHeaders.md b/clients/hydra/ruby/docs/TokenPaginationResponseHeaders.md new file mode 100644 index 00000000000..25f74eefac1 --- /dev/null +++ b/clients/hydra/ruby/docs/TokenPaginationResponseHeaders.md @@ -0,0 +1,20 @@ +# OryHydraClient::TokenPaginationResponseHeaders + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **link** | **String** | 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?limit=5&offset=0>; rel=\"first\",</clients?limit=5&offset=15>; rel=\"next\",</clients?limit=5&offset=5>; rel=\"prev\",</clients?limit=5&offset=20>; rel=\"last\" | [optional] | +| **x_total_count** | **Integer** | The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. | [optional] | + +## Example + +```ruby +require 'ory-hydra-client' + +instance = OryHydraClient::TokenPaginationResponseHeaders.new( + link: null, + x_total_count: null +) +``` + diff --git a/clients/hydra/ruby/docs/TrustJwtGrantIssuerBody.md b/clients/hydra/ruby/docs/TrustOAuth2JwtGrantIssuer.md similarity index 63% rename from clients/hydra/ruby/docs/TrustJwtGrantIssuerBody.md rename to clients/hydra/ruby/docs/TrustOAuth2JwtGrantIssuer.md index a38333373a6..5276d61b047 100644 --- a/clients/hydra/ruby/docs/TrustJwtGrantIssuerBody.md +++ b/clients/hydra/ruby/docs/TrustOAuth2JwtGrantIssuer.md @@ -1,25 +1,27 @@ -# OryHydraClient::TrustJwtGrantIssuerBody +# OryHydraClient::TrustOAuth2JwtGrantIssuer ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **allow_any_subject** | **Boolean** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] | | **expires_at** | **Time** | 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** | [**JSONWebKey**](JSONWebKey.md) | | | +| **jwk** | [**JsonWebKey**](JsonWebKey.md) | | | | **scope** | **Array<String>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | | -| **subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | | +| **subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] | ## Example ```ruby require 'ory-hydra-client' -instance = OryHydraClient::TrustJwtGrantIssuerBody.new( +instance = OryHydraClient::TrustOAuth2JwtGrantIssuer.new( + allow_any_subject: null, expires_at: null, issuer: https://jwt-idp.example.com, jwk: null, - scope: [openid, offline], + scope: ["openid","offline"], subject: mike@example.com ) ``` diff --git a/clients/hydra/ruby/docs/TrustedJwtGrantIssuer.md b/clients/hydra/ruby/docs/TrustedOAuth2JwtGrantIssuer.md similarity index 70% rename from clients/hydra/ruby/docs/TrustedJwtGrantIssuer.md rename to clients/hydra/ruby/docs/TrustedOAuth2JwtGrantIssuer.md index 38a4958e7d0..20b31dcee72 100644 --- a/clients/hydra/ruby/docs/TrustedJwtGrantIssuer.md +++ b/clients/hydra/ruby/docs/TrustedOAuth2JwtGrantIssuer.md @@ -1,14 +1,15 @@ -# OryHydraClient::TrustedJwtGrantIssuer +# OryHydraClient::TrustedOAuth2JwtGrantIssuer ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **allow_any_subject** | **Boolean** | The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. | [optional] | | **created_at** | **Time** | The \"created_at\" indicates, when grant was created. | [optional] | | **expires_at** | **Time** | The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". | [optional] | | **id** | **String** | | [optional] | | **issuer** | **String** | The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). | [optional] | -| **public_key** | [**TrustedJsonWebKey**](TrustedJsonWebKey.md) | | [optional] | +| **public_key** | [**TrustedOAuth2JwtGrantJsonWebKey**](TrustedOAuth2JwtGrantJsonWebKey.md) | | [optional] | | **scope** | **Array<String>** | The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) | [optional] | | **subject** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | [optional] | @@ -17,13 +18,14 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::TrustedJwtGrantIssuer.new( +instance = OryHydraClient::TrustedOAuth2JwtGrantIssuer.new( + allow_any_subject: null, created_at: null, expires_at: null, id: 9edc811f-4e28-453c-9b46-4de65f00217f, issuer: https://jwt-idp.example.com, public_key: null, - scope: [openid, offline], + scope: ["openid","offline"], subject: mike@example.com ) ``` diff --git a/clients/hydra/ruby/docs/TrustedJsonWebKey.md b/clients/hydra/ruby/docs/TrustedOAuth2JwtGrantJsonWebKey.md similarity index 81% rename from clients/hydra/ruby/docs/TrustedJsonWebKey.md rename to clients/hydra/ruby/docs/TrustedOAuth2JwtGrantJsonWebKey.md index f1e35075f52..8003cceb8c0 100644 --- a/clients/hydra/ruby/docs/TrustedJsonWebKey.md +++ b/clients/hydra/ruby/docs/TrustedOAuth2JwtGrantJsonWebKey.md @@ -1,4 +1,4 @@ -# OryHydraClient::TrustedJsonWebKey +# OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey ## Properties @@ -12,7 +12,7 @@ ```ruby require 'ory-hydra-client' -instance = OryHydraClient::TrustedJsonWebKey.new( +instance = OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey.new( kid: 123e4567-e89b-12d3-a456-426655440000, set: https://jwt-idp.example.com ) diff --git a/clients/hydra/ruby/docs/Volume.md b/clients/hydra/ruby/docs/Volume.md deleted file mode 100644 index 374f574eea4..00000000000 --- a/clients/hydra/ruby/docs/Volume.md +++ /dev/null @@ -1,34 +0,0 @@ -# OryHydraClient::Volume - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **created_at** | **String** | Date/Time the volume was created. | [optional] | -| **driver** | **String** | Name of the volume driver used by the volume. | | -| **labels** | **Hash<String, String>** | User-defined key/value metadata. | | -| **mountpoint** | **String** | Mount path of the volume on the host. | | -| **name** | **String** | Name of the volume. | | -| **options** | **Hash<String, String>** | The driver specific options used when creating the volume. | | -| **scope** | **String** | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | | -| **status** | **Object** | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. | [optional] | -| **usage_data** | [**VolumeUsageData**](VolumeUsageData.md) | | [optional] | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::Volume.new( - created_at: null, - driver: null, - labels: null, - mountpoint: null, - name: null, - options: null, - scope: null, - status: null, - usage_data: null -) -``` - diff --git a/clients/hydra/ruby/docs/VolumeUsageData.md b/clients/hydra/ruby/docs/VolumeUsageData.md deleted file mode 100644 index 85b411c40bb..00000000000 --- a/clients/hydra/ruby/docs/VolumeUsageData.md +++ /dev/null @@ -1,20 +0,0 @@ -# OryHydraClient::VolumeUsageData - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **ref_count** | **Integer** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | | -| **size** | **Integer** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | | - -## Example - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::VolumeUsageData.new( - ref_count: null, - size: null -) -``` - diff --git a/clients/hydra/ruby/docs/WellKnown.md b/clients/hydra/ruby/docs/WellKnown.md deleted file mode 100644 index 6001d213669..00000000000 --- a/clients/hydra/ruby/docs/WellKnown.md +++ /dev/null @@ -1,70 +0,0 @@ -# OryHydraClient::WellKnown - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **authorization_endpoint** | **String** | URL of the OP's OAuth 2.0 Authorization Endpoint. | | -| **backchannel_logout_session_supported** | **Boolean** | 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** | **Boolean** | Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] | -| **claims_parameter_supported** | **Boolean** | Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] | -| **claims_supported** | **Array<String>** | 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** | **Array<String>** | JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] | -| **end_session_endpoint** | **String** | 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** | **Boolean** | 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** | **Boolean** | Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] | -| **grant_types_supported** | **Array<String>** | JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] | -| **id_token_signing_alg_values_supported** | **Array<String>** | 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** | **String** | 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** | **String** | 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** | **String** | URL of the OP's Dynamic Client Registration Endpoint. | [optional] | -| **request_object_signing_alg_values_supported** | **Array<String>** | 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** | **Boolean** | Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] | -| **request_uri_parameter_supported** | **Boolean** | Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] | -| **require_request_uri_registration** | **Boolean** | 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** | **Array<String>** | JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] | -| **response_types_supported** | **Array<String>** | 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** | **String** | URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] | -| **scopes_supported** | **Array<String>** | SON 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** | **Array<String>** | JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | | -| **token_endpoint** | **String** | URL of the OP's OAuth 2.0 Token Endpoint | | -| **token_endpoint_auth_methods_supported** | **Array<String>** | 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** | **String** | URL of the OP's UserInfo Endpoint. | [optional] | -| **userinfo_signing_alg_values_supported** | **Array<String>** | 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 - -```ruby -require 'ory-hydra-client' - -instance = OryHydraClient::WellKnown.new( - authorization_endpoint: https://playground.ory.sh/ory-hydra/public/oauth2/auth, - backchannel_logout_session_supported: null, - backchannel_logout_supported: null, - claims_parameter_supported: null, - claims_supported: null, - code_challenge_methods_supported: null, - end_session_endpoint: null, - frontchannel_logout_session_supported: null, - frontchannel_logout_supported: null, - grant_types_supported: null, - id_token_signing_alg_values_supported: null, - issuer: https://playground.ory.sh/ory-hydra/public/, - jwks_uri: https://playground.ory.sh/ory-hydra/public/.well-known/jwks.json, - registration_endpoint: https://playground.ory.sh/ory-hydra/admin/client, - request_object_signing_alg_values_supported: null, - request_parameter_supported: null, - request_uri_parameter_supported: null, - require_request_uri_registration: null, - response_modes_supported: null, - response_types_supported: null, - revocation_endpoint: null, - scopes_supported: null, - subject_types_supported: null, - token_endpoint: https://playground.ory.sh/ory-hydra/public/oauth2/token, - token_endpoint_auth_methods_supported: null, - userinfo_endpoint: null, - userinfo_signing_alg_values_supported: null -) -``` - diff --git a/clients/hydra/ruby/docs/WellknownApi.md b/clients/hydra/ruby/docs/WellknownApi.md new file mode 100644 index 00000000000..7782cd1233a --- /dev/null +++ b/clients/hydra/ruby/docs/WellknownApi.md @@ -0,0 +1,69 @@ +# OryHydraClient::WellknownApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**discover_json_web_keys**](WellknownApi.md#discover_json_web_keys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys | + + +## discover_json_web_keys + +> 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. + +### Examples + +```ruby +require 'time' +require 'ory-hydra-client' + +api_instance = OryHydraClient::WellknownApi.new + +begin + # Discover Well-Known JSON Web Keys + result = api_instance.discover_json_web_keys + p result +rescue OryHydraClient::ApiError => e + puts "Error when calling WellknownApi->discover_json_web_keys: #{e}" +end +``` + +#### Using the discover_json_web_keys_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> discover_json_web_keys_with_http_info + +```ruby +begin + # Discover Well-Known JSON Web Keys + data, status_code, headers = api_instance.discover_json_web_keys_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue OryHydraClient::ApiError => e + puts "Error when calling WellknownApi->discover_json_web_keys_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**JsonWebKeySet**](JsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/clients/hydra/ruby/lib/ory-hydra-client.rb b/clients/hydra/ruby/lib/ory-hydra-client.rb index c97a226a054..3790e3a977a 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -17,55 +17,51 @@ require 'ory-hydra-client/configuration' # Models -require 'ory-hydra-client/models/accept_consent_request' -require 'ory-hydra-client/models/accept_login_request' -require 'ory-hydra-client/models/completed_request' -require 'ory-hydra-client/models/consent_request' -require 'ory-hydra-client/models/consent_request_session' -require 'ory-hydra-client/models/container_wait_ok_body_error' -require 'ory-hydra-client/models/flush_inactive_o_auth2_tokens_request' +require 'ory-hydra-client/models/accept_o_auth2_consent_request' +require 'ory-hydra-client/models/accept_o_auth2_consent_request_session' +require 'ory-hydra-client/models/accept_o_auth2_login_request' +require 'ory-hydra-client/models/create_json_web_key_set' +require 'ory-hydra-client/models/error_o_auth2' require 'ory-hydra-client/models/generic_error' +require 'ory-hydra-client/models/get_version200_response' require 'ory-hydra-client/models/health_not_ready_status' require 'ory-hydra-client/models/health_status' +require 'ory-hydra-client/models/introspected_o_auth2_token' +require 'ory-hydra-client/models/is_ready200_response' +require 'ory-hydra-client/models/is_ready503_response' +require 'ory-hydra-client/models/json_patch' require 'ory-hydra-client/models/json_web_key' require 'ory-hydra-client/models/json_web_key_set' -require 'ory-hydra-client/models/json_error' -require 'ory-hydra-client/models/json_web_key_set_generator_request' -require 'ory-hydra-client/models/login_request' -require 'ory-hydra-client/models/logout_request' require 'ory-hydra-client/models/o_auth2_client' -require 'ory-hydra-client/models/o_auth2_token_introspection' -require 'ory-hydra-client/models/oauth2_token_response' -require 'ory-hydra-client/models/open_id_connect_context' -require 'ory-hydra-client/models/patch_document' -require 'ory-hydra-client/models/plugin_config' -require 'ory-hydra-client/models/plugin_config_args' -require 'ory-hydra-client/models/plugin_config_interface' -require 'ory-hydra-client/models/plugin_config_linux' -require 'ory-hydra-client/models/plugin_config_network' -require 'ory-hydra-client/models/plugin_config_rootfs' -require 'ory-hydra-client/models/plugin_config_user' -require 'ory-hydra-client/models/plugin_device' -require 'ory-hydra-client/models/plugin_env' -require 'ory-hydra-client/models/plugin_interface_type' -require 'ory-hydra-client/models/plugin_mount' -require 'ory-hydra-client/models/plugin_settings' -require 'ory-hydra-client/models/previous_consent_session' -require 'ory-hydra-client/models/reject_request' -require 'ory-hydra-client/models/request_was_handled_response' -require 'ory-hydra-client/models/trust_jwt_grant_issuer_body' -require 'ory-hydra-client/models/trusted_json_web_key' -require 'ory-hydra-client/models/trusted_jwt_grant_issuer' -require 'ory-hydra-client/models/userinfo_response' +require 'ory-hydra-client/models/o_auth2_client_token_lifespans' +require 'ory-hydra-client/models/o_auth2_consent_request' +require 'ory-hydra-client/models/o_auth2_consent_request_open_id_connect_context' +require 'ory-hydra-client/models/o_auth2_consent_session' +require 'ory-hydra-client/models/o_auth2_consent_session_expires_at' +require 'ory-hydra-client/models/o_auth2_login_request' +require 'ory-hydra-client/models/o_auth2_logout_request' +require 'ory-hydra-client/models/o_auth2_redirect_to' +require 'ory-hydra-client/models/o_auth2_token_exchange' +require 'ory-hydra-client/models/oidc_configuration' +require 'ory-hydra-client/models/oidc_user_info' +require 'ory-hydra-client/models/pagination' +require 'ory-hydra-client/models/pagination_headers' +require 'ory-hydra-client/models/reject_o_auth2_request' +require 'ory-hydra-client/models/token_pagination' +require 'ory-hydra-client/models/token_pagination_headers' +require 'ory-hydra-client/models/token_pagination_request_parameters' +require 'ory-hydra-client/models/token_pagination_response_headers' +require 'ory-hydra-client/models/trust_o_auth2_jwt_grant_issuer' +require 'ory-hydra-client/models/trusted_o_auth2_jwt_grant_issuer' +require 'ory-hydra-client/models/trusted_o_auth2_jwt_grant_json_web_key' require 'ory-hydra-client/models/version' -require 'ory-hydra-client/models/volume' -require 'ory-hydra-client/models/volume_usage_data' -require 'ory-hydra-client/models/well_known' # APIs -require 'ory-hydra-client/api/admin_api' +require 'ory-hydra-client/api/jwk_api' require 'ory-hydra-client/api/metadata_api' -require 'ory-hydra-client/api/public_api' +require 'ory-hydra-client/api/o_auth2_api' +require 'ory-hydra-client/api/oidc_api' +require 'ory-hydra-client/api/wellknown_api' module OryHydraClient class << self diff --git a/clients/hydra/ruby/lib/ory-hydra-client/api/admin_api.rb b/clients/hydra/ruby/lib/ory-hydra-client/api/admin_api.rb deleted file mode 100644 index 97eb4d25f0c..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/api/admin_api.rb +++ /dev/null @@ -1,2292 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'cgi' - -module OryHydraClient - class AdminApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # Accept a Consent Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - # @param consent_challenge [String] - # @param [Hash] opts the optional parameters - # @option opts [AcceptConsentRequest] :body - # @return [CompletedRequest] - def accept_consent_request(consent_challenge, opts = {}) - data, _status_code, _headers = accept_consent_request_with_http_info(consent_challenge, opts) - data - end - - # Accept a Consent Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - # @param consent_challenge [String] - # @param [Hash] opts the optional parameters - # @option opts [AcceptConsentRequest] :body - # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers - def accept_consent_request_with_http_info(consent_challenge, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.accept_consent_request ...' - end - # verify the required parameter 'consent_challenge' is set - if @api_client.config.client_side_validation && consent_challenge.nil? - fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling AdminApi.accept_consent_request" - end - # resource path - local_var_path = '/oauth2/auth/requests/consent/accept' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'consent_challenge'] = consent_challenge - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] || 'CompletedRequest' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.accept_consent_request", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#accept_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Accept a Login Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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 [String] - # @param [Hash] opts the optional parameters - # @option opts [AcceptLoginRequest] :body - # @return [CompletedRequest] - def accept_login_request(login_challenge, opts = {}) - data, _status_code, _headers = accept_login_request_with_http_info(login_challenge, opts) - data - end - - # Accept a Login Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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 [String] - # @param [Hash] opts the optional parameters - # @option opts [AcceptLoginRequest] :body - # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers - def accept_login_request_with_http_info(login_challenge, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.accept_login_request ...' - end - # verify the required parameter 'login_challenge' is set - if @api_client.config.client_side_validation && login_challenge.nil? - fail ArgumentError, "Missing the required parameter 'login_challenge' when calling AdminApi.accept_login_request" - end - # resource path - local_var_path = '/oauth2/auth/requests/login/accept' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'login_challenge'] = login_challenge - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] || 'CompletedRequest' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.accept_login_request", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#accept_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Accept a Logout Request - # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - # @param logout_challenge [String] - # @param [Hash] opts the optional parameters - # @return [CompletedRequest] - def accept_logout_request(logout_challenge, opts = {}) - data, _status_code, _headers = accept_logout_request_with_http_info(logout_challenge, opts) - data - end - - # Accept a Logout Request - # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - # @param logout_challenge [String] - # @param [Hash] opts the optional parameters - # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers - def accept_logout_request_with_http_info(logout_challenge, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.accept_logout_request ...' - end - # verify the required parameter 'logout_challenge' is set - if @api_client.config.client_side_validation && logout_challenge.nil? - fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling AdminApi.accept_logout_request" - end - # resource path - local_var_path = '/oauth2/auth/requests/logout/accept' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'logout_challenge'] = logout_challenge - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CompletedRequest' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.accept_logout_request", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#accept_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Generate a New 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 [String] The set - # @param [Hash] opts the optional parameters - # @option opts [JsonWebKeySetGeneratorRequest] :body - # @return [JSONWebKeySet] - def create_json_web_key_set(set, opts = {}) - data, _status_code, _headers = create_json_web_key_set_with_http_info(set, opts) - data - end - - # Generate a New 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 [String] The set - # @param [Hash] opts the optional parameters - # @option opts [JsonWebKeySetGeneratorRequest] :body - # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers - def create_json_web_key_set_with_http_info(set, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.create_json_web_key_set ...' - end - # verify the required parameter 'set' is set - if @api_client.config.client_side_validation && set.nil? - fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.create_json_web_key_set" - end - # resource path - local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] || 'JSONWebKeySet' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.create_json_web_key_set", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#create_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Create an OAuth 2.0 Client - # Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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 body [OAuth2Client] - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - def create_o_auth2_client(body, opts = {}) - data, _status_code, _headers = create_o_auth2_client_with_http_info(body, opts) - data - end - - # Create an OAuth 2.0 Client - # Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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 body [OAuth2Client] - # @param [Hash] opts the optional parameters - # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers - def create_o_auth2_client_with_http_info(body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.create_o_auth2_client ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.create_o_auth2_client" - end - # resource path - local_var_path = '/clients' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'OAuth2Client' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.create_o_auth2_client", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a 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 kid [String] The kid of the desired key - # @param set [String] The set - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_json_web_key(kid, set, opts = {}) - delete_json_web_key_with_http_info(kid, set, opts) - nil - end - - # Delete a 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 kid [String] The kid of the desired key - # @param set [String] The set - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_json_web_key_with_http_info(kid, set, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.delete_json_web_key ...' - end - # verify the required parameter 'kid' is set - if @api_client.config.client_side_validation && kid.nil? - fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.delete_json_web_key" - end - # verify the required parameter 'set' is set - if @api_client.config.client_side_validation && set.nil? - fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.delete_json_web_key" - end - # resource path - local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.delete_json_web_key", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#delete_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a 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 [String] The set - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_json_web_key_set(set, opts = {}) - delete_json_web_key_set_with_http_info(set, opts) - nil - end - - # Delete a 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 [String] The set - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_json_web_key_set_with_http_info(set, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.delete_json_web_key_set ...' - end - # verify the required parameter 'set' is set - if @api_client.config.client_side_validation && set.nil? - fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.delete_json_web_key_set" - end - # resource path - local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.delete_json_web_key_set", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#delete_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Deletes an 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 [String] The id of the OAuth 2.0 Client. - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_o_auth2_client(id, opts = {}) - delete_o_auth2_client_with_http_info(id, opts) - nil - end - - # Deletes an 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 [String] The id of the OAuth 2.0 Client. - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_o_auth2_client_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.delete_o_auth2_client ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.delete_o_auth2_client" - end - # resource path - local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.delete_o_auth2_client", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete OAuth2 Access Tokens from a Client - # This endpoint deletes OAuth2 access tokens issued for a client from the database - # @param client_id [String] - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_o_auth2_token(client_id, opts = {}) - delete_o_auth2_token_with_http_info(client_id, opts) - nil - end - - # Delete OAuth2 Access Tokens from a Client - # This endpoint deletes OAuth2 access tokens issued for a client from the database - # @param client_id [String] - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_o_auth2_token_with_http_info(client_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.delete_o_auth2_token ...' - end - # verify the required parameter 'client_id' is set - if @api_client.config.client_side_validation && client_id.nil? - fail ArgumentError, "Missing the required parameter 'client_id' when calling AdminApi.delete_o_auth2_token" - end - # resource path - local_var_path = '/oauth2/tokens' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'client_id'] = client_id - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.delete_o_auth2_token", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#delete_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a 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 [String] The id of the desired grant - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_trusted_jwt_grant_issuer(id, opts = {}) - delete_trusted_jwt_grant_issuer_with_http_info(id, opts) - nil - end - - # Delete a 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 [String] The id of the desired grant - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_trusted_jwt_grant_issuer_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.delete_trusted_jwt_grant_issuer ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.delete_trusted_jwt_grant_issuer" - end - # resource path - local_var_path = '/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.delete_trusted_jwt_grant_issuer", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#delete_trusted_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Flush Expired OAuth2 Access Tokens - # This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - # @param [Hash] opts the optional parameters - # @option opts [FlushInactiveOAuth2TokensRequest] :body - # @return [nil] - def flush_inactive_o_auth2_tokens(opts = {}) - flush_inactive_o_auth2_tokens_with_http_info(opts) - nil - end - - # Flush Expired OAuth2 Access Tokens - # This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - # @param [Hash] opts the optional parameters - # @option opts [FlushInactiveOAuth2TokensRequest] :body - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def flush_inactive_o_auth2_tokens_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.flush_inactive_o_auth2_tokens ...' - end - # resource path - local_var_path = '/oauth2/flush' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.flush_inactive_o_auth2_tokens", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#flush_inactive_o_auth2_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get Consent Request Information - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - # @param consent_challenge [String] - # @param [Hash] opts the optional parameters - # @return [ConsentRequest] - def get_consent_request(consent_challenge, opts = {}) - data, _status_code, _headers = get_consent_request_with_http_info(consent_challenge, opts) - data - end - - # Get Consent Request Information - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - # @param consent_challenge [String] - # @param [Hash] opts the optional parameters - # @return [Array<(ConsentRequest, Integer, Hash)>] ConsentRequest data, response status code and response headers - def get_consent_request_with_http_info(consent_challenge, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.get_consent_request ...' - end - # verify the required parameter 'consent_challenge' is set - if @api_client.config.client_side_validation && consent_challenge.nil? - fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling AdminApi.get_consent_request" - end - # resource path - local_var_path = '/oauth2/auth/requests/consent' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'consent_challenge'] = consent_challenge - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'ConsentRequest' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.get_consent_request", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#get_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Fetch a JSON Web Key - # This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - # @param kid [String] The kid of the desired key - # @param set [String] The set - # @param [Hash] opts the optional parameters - # @return [JSONWebKeySet] - def get_json_web_key(kid, set, opts = {}) - data, _status_code, _headers = get_json_web_key_with_http_info(kid, set, opts) - data - end - - # Fetch a JSON Web Key - # This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - # @param kid [String] The kid of the desired key - # @param set [String] The set - # @param [Hash] opts the optional parameters - # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers - def get_json_web_key_with_http_info(kid, set, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.get_json_web_key ...' - end - # verify the required parameter 'kid' is set - if @api_client.config.client_side_validation && kid.nil? - fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.get_json_web_key" - end - # verify the required parameter 'set' is set - if @api_client.config.client_side_validation && set.nil? - fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.get_json_web_key" - end - # resource path - local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'JSONWebKeySet' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.get_json_web_key", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#get_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # 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 [String] The set - # @param [Hash] opts the optional parameters - # @return [JSONWebKeySet] - def get_json_web_key_set(set, opts = {}) - data, _status_code, _headers = get_json_web_key_set_with_http_info(set, opts) - data - end - - # 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 [String] The set - # @param [Hash] opts the optional parameters - # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers - def get_json_web_key_set_with_http_info(set, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.get_json_web_key_set ...' - end - # verify the required parameter 'set' is set - if @api_client.config.client_side_validation && set.nil? - fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.get_json_web_key_set" - end - # resource path - local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'JSONWebKeySet' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.get_json_web_key_set", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#get_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a Login Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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 [String] - # @param [Hash] opts the optional parameters - # @return [LoginRequest] - def get_login_request(login_challenge, opts = {}) - data, _status_code, _headers = get_login_request_with_http_info(login_challenge, opts) - data - end - - # Get a Login Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(LoginRequest, Integer, Hash)>] LoginRequest data, response status code and response headers - def get_login_request_with_http_info(login_challenge, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.get_login_request ...' - end - # verify the required parameter 'login_challenge' is set - if @api_client.config.client_side_validation && login_challenge.nil? - fail ArgumentError, "Missing the required parameter 'login_challenge' when calling AdminApi.get_login_request" - end - # resource path - local_var_path = '/oauth2/auth/requests/login' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'login_challenge'] = login_challenge - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'LoginRequest' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.get_login_request", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#get_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a Logout Request - # Use this endpoint to fetch a logout request. - # @param logout_challenge [String] - # @param [Hash] opts the optional parameters - # @return [LogoutRequest] - def get_logout_request(logout_challenge, opts = {}) - data, _status_code, _headers = get_logout_request_with_http_info(logout_challenge, opts) - data - end - - # Get a Logout Request - # Use this endpoint to fetch a logout request. - # @param logout_challenge [String] - # @param [Hash] opts the optional parameters - # @return [Array<(LogoutRequest, Integer, Hash)>] LogoutRequest data, response status code and response headers - def get_logout_request_with_http_info(logout_challenge, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.get_logout_request ...' - end - # verify the required parameter 'logout_challenge' is set - if @api_client.config.client_side_validation && logout_challenge.nil? - fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling AdminApi.get_logout_request" - end - # resource path - local_var_path = '/oauth2/auth/requests/logout' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'logout_challenge'] = logout_challenge - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'LogoutRequest' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.get_logout_request", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#get_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # 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 [String] The id of the OAuth 2.0 Client. - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - def get_o_auth2_client(id, opts = {}) - data, _status_code, _headers = get_o_auth2_client_with_http_info(id, opts) - data - end - - # 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 [String] The id of the OAuth 2.0 Client. - # @param [Hash] opts the optional parameters - # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers - def get_o_auth2_client_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.get_o_auth2_client ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.get_o_auth2_client" - end - # resource path - local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'OAuth2Client' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.get_o_auth2_client", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a 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 [String] The id of the desired grant - # @param [Hash] opts the optional parameters - # @return [TrustedJwtGrantIssuer] - def get_trusted_jwt_grant_issuer(id, opts = {}) - data, _status_code, _headers = get_trusted_jwt_grant_issuer_with_http_info(id, opts) - data - end - - # Get a 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 [String] The id of the desired grant - # @param [Hash] opts the optional parameters - # @return [Array<(TrustedJwtGrantIssuer, Integer, Hash)>] TrustedJwtGrantIssuer data, response status code and response headers - def get_trusted_jwt_grant_issuer_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.get_trusted_jwt_grant_issuer ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.get_trusted_jwt_grant_issuer" - end - # resource path - local_var_path = '/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'TrustedJwtGrantIssuer' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.get_trusted_jwt_grant_issuer", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#get_trusted_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get Service Version - # This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - # @param [Hash] opts the optional parameters - # @return [Version] - def get_version(opts = {}) - data, _status_code, _headers = get_version_with_http_info(opts) - data - end - - # Get Service Version - # This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - # @param [Hash] opts the optional parameters - # @return [Array<(Version, Integer, Hash)>] Version data, response status code and response headers - def get_version_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.get_version ...' - end - # resource path - local_var_path = '/version' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'Version' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.get_version", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#get_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - # @param 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. - # @param [Hash] opts the optional parameters - # @option opts [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. - # @return [OAuth2TokenIntrospection] - def introspect_o_auth2_token(token, opts = {}) - data, _status_code, _headers = introspect_o_auth2_token_with_http_info(token, opts) - data - end - - # Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - # @param 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. - # @param [Hash] opts the optional parameters - # @option opts [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. - # @return [Array<(OAuth2TokenIntrospection, Integer, Hash)>] OAuth2TokenIntrospection data, response status code and response headers - def introspect_o_auth2_token_with_http_info(token, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.introspect_o_auth2_token ...' - end - # verify the required parameter 'token' is set - if @api_client.config.client_side_validation && token.nil? - fail ArgumentError, "Missing the required parameter 'token' when calling AdminApi.introspect_o_auth2_token" - end - # resource path - local_var_path = '/oauth2/introspect' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - form_params['token'] = token - form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil? - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'OAuth2TokenIntrospection' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.introspect_o_auth2_token", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#introspect_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Check Alive Status - # This endpoint returns a 200 status code when the HTTP server is up running. 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 [Hash] opts the optional parameters - # @return [HealthStatus] - def is_instance_alive(opts = {}) - data, _status_code, _headers = is_instance_alive_with_http_info(opts) - data - end - - # Check Alive Status - # This endpoint returns a 200 status code when the HTTP server is up running. 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 [Hash] opts the optional parameters - # @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers - def is_instance_alive_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.is_instance_alive ...' - end - # resource path - local_var_path = '/health/alive' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'HealthStatus' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.is_instance_alive", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#is_instance_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit The maximum amount of clients to returned, upper bound is 500 clients. - # @option opts [Integer] :offset The offset from where to start looking. - # @option opts [String] :client_name The name of the clients to filter by. - # @option opts [String] :owner The owner of the clients to filter by. - # @return [Array] - def list_o_auth2_clients(opts = {}) - data, _status_code, _headers = list_o_auth2_clients_with_http_info(opts) - data - end - - # 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit The maximum amount of clients to returned, upper bound is 500 clients. - # @option opts [Integer] :offset The offset from where to start looking. - # @option opts [String] :client_name The name of the clients to filter by. - # @option opts [String] :owner The owner of the clients to filter by. - # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers - def list_o_auth2_clients_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.list_o_auth2_clients ...' - end - # resource path - local_var_path = '/clients' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'client_name'] = opts[:'client_name'] if !opts[:'client_name'].nil? - query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'Array' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.list_o_auth2_clients", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#list_o_auth2_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - # @param subject [String] - # @param [Hash] opts the optional parameters - # @return [Array] - def list_subject_consent_sessions(subject, opts = {}) - data, _status_code, _headers = list_subject_consent_sessions_with_http_info(subject, opts) - data - end - - # Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - # @param subject [String] - # @param [Hash] opts the optional parameters - # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers - def list_subject_consent_sessions_with_http_info(subject, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.list_subject_consent_sessions ...' - end - # verify the required parameter 'subject' is set - if @api_client.config.client_side_validation && subject.nil? - fail ArgumentError, "Missing the required parameter 'subject' when calling AdminApi.list_subject_consent_sessions" - end - # resource path - local_var_path = '/oauth2/auth/sessions/consent' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'subject'] = subject - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'Array' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.list_subject_consent_sessions", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#list_subject_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List Trusted OAuth2 JWT Bearer Grant Type Issuers - # Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - # @param [Hash] opts the optional parameters - # @option opts [String] :issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - # @option opts [Integer] :limit The maximum amount of policies returned, upper bound is 500 policies - # @option opts [Integer] :offset The offset from where to start looking. - # @return [Array] - def list_trusted_jwt_grant_issuers(opts = {}) - data, _status_code, _headers = list_trusted_jwt_grant_issuers_with_http_info(opts) - data - end - - # List Trusted OAuth2 JWT Bearer Grant Type Issuers - # Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - # @param [Hash] opts the optional parameters - # @option opts [String] :issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - # @option opts [Integer] :limit The maximum amount of policies returned, upper bound is 500 policies - # @option opts [Integer] :offset The offset from where to start looking. - # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers - def list_trusted_jwt_grant_issuers_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.list_trusted_jwt_grant_issuers ...' - end - # resource path - local_var_path = '/trust/grants/jwt-bearer/issuers' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'issuer'] = opts[:'issuer'] if !opts[:'issuer'].nil? - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'Array' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.list_trusted_jwt_grant_issuers", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#list_trusted_jwt_grant_issuers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Patch an OAuth 2.0 Client - # Patch an existing OAuth 2.0 Client. 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 [String] The id of the OAuth 2.0 Client. - # @param body [Array] - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - def patch_o_auth2_client(id, body, opts = {}) - data, _status_code, _headers = patch_o_auth2_client_with_http_info(id, body, opts) - data - end - - # Patch an OAuth 2.0 Client - # Patch an existing OAuth 2.0 Client. 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 [String] The id of the OAuth 2.0 Client. - # @param body [Array] - # @param [Hash] opts the optional parameters - # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers - def patch_o_auth2_client_with_http_info(id, body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.patch_o_auth2_client ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.patch_o_auth2_client" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.patch_o_auth2_client" - end - # resource path - local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'OAuth2Client' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.patch_o_auth2_client", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#patch_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Reject a Consent Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - # @param consent_challenge [String] - # @param [Hash] opts the optional parameters - # @option opts [RejectRequest] :body - # @return [CompletedRequest] - def reject_consent_request(consent_challenge, opts = {}) - data, _status_code, _headers = reject_consent_request_with_http_info(consent_challenge, opts) - data - end - - # Reject a Consent Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - # @param consent_challenge [String] - # @param [Hash] opts the optional parameters - # @option opts [RejectRequest] :body - # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers - def reject_consent_request_with_http_info(consent_challenge, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.reject_consent_request ...' - end - # verify the required parameter 'consent_challenge' is set - if @api_client.config.client_side_validation && consent_challenge.nil? - fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling AdminApi.reject_consent_request" - end - # resource path - local_var_path = '/oauth2/auth/requests/consent/reject' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'consent_challenge'] = consent_challenge - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] || 'CompletedRequest' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.reject_consent_request", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#reject_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Reject a Login Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - # @param login_challenge [String] - # @param [Hash] opts the optional parameters - # @option opts [RejectRequest] :body - # @return [CompletedRequest] - def reject_login_request(login_challenge, opts = {}) - data, _status_code, _headers = reject_login_request_with_http_info(login_challenge, opts) - data - end - - # Reject a Login Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - # @param login_challenge [String] - # @param [Hash] opts the optional parameters - # @option opts [RejectRequest] :body - # @return [Array<(CompletedRequest, Integer, Hash)>] CompletedRequest data, response status code and response headers - def reject_login_request_with_http_info(login_challenge, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.reject_login_request ...' - end - # verify the required parameter 'login_challenge' is set - if @api_client.config.client_side_validation && login_challenge.nil? - fail ArgumentError, "Missing the required parameter 'login_challenge' when calling AdminApi.reject_login_request" - end - # resource path - local_var_path = '/oauth2/auth/requests/login/reject' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'login_challenge'] = login_challenge - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] || 'CompletedRequest' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.reject_login_request", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#reject_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Reject a Logout Request - # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - # @param logout_challenge [String] - # @param [Hash] opts the optional parameters - # @option opts [RejectRequest] :body - # @return [nil] - def reject_logout_request(logout_challenge, opts = {}) - reject_logout_request_with_http_info(logout_challenge, opts) - nil - end - - # Reject a Logout Request - # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - # @param logout_challenge [String] - # @param [Hash] opts the optional parameters - # @option opts [RejectRequest] :body - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def reject_logout_request_with_http_info(logout_challenge, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.reject_logout_request ...' - end - # verify the required parameter 'logout_challenge' is set - if @api_client.config.client_side_validation && logout_challenge.nil? - fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling AdminApi.reject_logout_request" - end - # resource path - local_var_path = '/oauth2/auth/requests/logout/reject' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'logout_challenge'] = logout_challenge - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.reject_logout_request", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#reject_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - # This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - # @param subject [String] - # @param [Hash] opts the optional parameters - # @return [nil] - def revoke_authentication_session(subject, opts = {}) - revoke_authentication_session_with_http_info(subject, opts) - nil - end - - # Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - # This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - # @param subject [String] - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def revoke_authentication_session_with_http_info(subject, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.revoke_authentication_session ...' - end - # verify the required parameter 'subject' is set - if @api_client.config.client_side_validation && subject.nil? - fail ArgumentError, "Missing the required parameter 'subject' when calling AdminApi.revoke_authentication_session" - end - # resource path - local_var_path = '/oauth2/auth/sessions/login' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'subject'] = subject - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.revoke_authentication_session", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#revoke_authentication_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - # This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - # @param subject [String] The subject (Subject) who's consent sessions should be deleted. - # @param [Hash] opts the optional parameters - # @option opts [String] :client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - # @option opts [Boolean] :all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. - # @return [nil] - def revoke_consent_sessions(subject, opts = {}) - revoke_consent_sessions_with_http_info(subject, opts) - nil - end - - # Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - # This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - # @param subject [String] The subject (Subject) who's consent sessions should be deleted. - # @param [Hash] opts the optional parameters - # @option opts [String] :client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - # @option opts [Boolean] :all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def revoke_consent_sessions_with_http_info(subject, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.revoke_consent_sessions ...' - end - # verify the required parameter 'subject' is set - if @api_client.config.client_side_validation && subject.nil? - fail ArgumentError, "Missing the required parameter 'subject' when calling AdminApi.revoke_consent_sessions" - end - # resource path - local_var_path = '/oauth2/auth/sessions/consent' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'subject'] = subject - query_params[:'client'] = opts[:'client'] if !opts[:'client'].nil? - query_params[:'all'] = opts[:'all'] if !opts[:'all'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.revoke_consent_sessions", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#revoke_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Trust an 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 [Hash] opts the optional parameters - # @option opts [TrustJwtGrantIssuerBody] :body - # @return [TrustedJwtGrantIssuer] - def trust_jwt_grant_issuer(opts = {}) - data, _status_code, _headers = trust_jwt_grant_issuer_with_http_info(opts) - data - end - - # Trust an 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 [Hash] opts the optional parameters - # @option opts [TrustJwtGrantIssuerBody] :body - # @return [Array<(TrustedJwtGrantIssuer, Integer, Hash)>] TrustedJwtGrantIssuer data, response status code and response headers - def trust_jwt_grant_issuer_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.trust_jwt_grant_issuer ...' - end - # resource path - local_var_path = '/trust/grants/jwt-bearer/issuers' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] || 'TrustedJwtGrantIssuer' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.trust_jwt_grant_issuer", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#trust_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update a 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 kid [String] The kid of the desired key - # @param set [String] The set - # @param [Hash] opts the optional parameters - # @option opts [JSONWebKey] :body - # @return [JSONWebKey] - def update_json_web_key(kid, set, opts = {}) - data, _status_code, _headers = update_json_web_key_with_http_info(kid, set, opts) - data - end - - # Update a 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 kid [String] The kid of the desired key - # @param set [String] The set - # @param [Hash] opts the optional parameters - # @option opts [JSONWebKey] :body - # @return [Array<(JSONWebKey, Integer, Hash)>] JSONWebKey data, response status code and response headers - def update_json_web_key_with_http_info(kid, set, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.update_json_web_key ...' - end - # verify the required parameter 'kid' is set - if @api_client.config.client_side_validation && kid.nil? - fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.update_json_web_key" - end - # verify the required parameter 'set' is set - if @api_client.config.client_side_validation && set.nil? - fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.update_json_web_key" - end - # resource path - local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] || 'JSONWebKey' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.update_json_web_key", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#update_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # 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 [String] The set - # @param [Hash] opts the optional parameters - # @option opts [JSONWebKeySet] :body - # @return [JSONWebKeySet] - def update_json_web_key_set(set, opts = {}) - data, _status_code, _headers = update_json_web_key_set_with_http_info(set, opts) - data - end - - # 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 [String] The set - # @param [Hash] opts the optional parameters - # @option opts [JSONWebKeySet] :body - # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers - def update_json_web_key_set_with_http_info(set, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.update_json_web_key_set ...' - end - # verify the required parameter 'set' is set - if @api_client.config.client_side_validation && set.nil? - fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.update_json_web_key_set" - end - # resource path - local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] || 'JSONWebKeySet' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.update_json_web_key_set", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#update_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update an OAuth 2.0 Client - # Update an existing OAuth 2.0 Client. 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 [String] The id of the OAuth 2.0 Client. - # @param body [OAuth2Client] - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - def update_o_auth2_client(id, body, opts = {}) - data, _status_code, _headers = update_o_auth2_client_with_http_info(id, body, opts) - data - end - - # Update an OAuth 2.0 Client - # Update an existing OAuth 2.0 Client. 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 [String] The id of the OAuth 2.0 Client. - # @param body [OAuth2Client] - # @param [Hash] opts the optional parameters - # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers - def update_o_auth2_client_with_http_info(id, body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: AdminApi.update_o_auth2_client ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.update_o_auth2_client" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.update_o_auth2_client" - end - # resource path - local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'OAuth2Client' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"AdminApi.update_o_auth2_client", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AdminApi#update_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -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 new file mode 100644 index 00000000000..a8feddbbf90 --- /dev/null +++ b/clients/hydra/ruby/lib/ory-hydra-client/api/jwk_api.rb @@ -0,0 +1,506 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'cgi' + +module OryHydraClient + class JwkApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # 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 [String] The JSON Web Key Set ID + # @param create_json_web_key_set [CreateJsonWebKeySet] + # @param [Hash] opts the optional parameters + # @return [JsonWebKeySet] + def create_json_web_key_set(set, create_json_web_key_set, opts = {}) + data, _status_code, _headers = create_json_web_key_set_with_http_info(set, create_json_web_key_set, opts) + data + end + + # 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 [String] The JSON Web Key Set ID + # @param create_json_web_key_set [CreateJsonWebKeySet] + # @param [Hash] opts the optional parameters + # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers + def create_json_web_key_set_with_http_info(set, create_json_web_key_set, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JwkApi.create_json_web_key_set ...' + end + # verify the required parameter 'set' is set + if @api_client.config.client_side_validation && set.nil? + fail ArgumentError, "Missing the required parameter 'set' when calling JwkApi.create_json_web_key_set" + end + # verify the required parameter 'create_json_web_key_set' is set + if @api_client.config.client_side_validation && create_json_web_key_set.nil? + fail ArgumentError, "Missing the required parameter 'create_json_web_key_set' when calling JwkApi.create_json_web_key_set" + end + # resource path + local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(create_json_web_key_set) + + # return_type + return_type = opts[:debug_return_type] || 'JsonWebKeySet' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"JwkApi.create_json_web_key_set", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JwkApi#create_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The JSON Web Key Set + # @param kid [String] The JSON Web Key ID (kid) + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_json_web_key(set, kid, opts = {}) + delete_json_web_key_with_http_info(set, kid, opts) + nil + end + + # 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 [String] The JSON Web Key Set + # @param kid [String] The JSON Web Key ID (kid) + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_json_web_key_with_http_info(set, kid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JwkApi.delete_json_web_key ...' + end + # verify the required parameter 'set' is set + if @api_client.config.client_side_validation && set.nil? + fail ArgumentError, "Missing the required parameter 'set' when calling JwkApi.delete_json_web_key" + end + # verify the required parameter 'kid' is set + if @api_client.config.client_side_validation && kid.nil? + fail ArgumentError, "Missing the required parameter 'kid' when calling JwkApi.delete_json_web_key" + end + # resource path + local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"JwkApi.delete_json_web_key", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JwkApi#delete_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The JSON Web Key Set + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_json_web_key_set(set, opts = {}) + delete_json_web_key_set_with_http_info(set, opts) + nil + end + + # 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 [String] The JSON Web Key Set + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_json_web_key_set_with_http_info(set, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JwkApi.delete_json_web_key_set ...' + end + # verify the required parameter 'set' is set + if @api_client.config.client_side_validation && set.nil? + fail ArgumentError, "Missing the required parameter 'set' when calling JwkApi.delete_json_web_key_set" + end + # resource path + local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"JwkApi.delete_json_web_key_set", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JwkApi#delete_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] JSON Web Key Set ID + # @param kid [String] JSON Web Key ID + # @param [Hash] opts the optional parameters + # @return [JsonWebKeySet] + def get_json_web_key(set, kid, opts = {}) + data, _status_code, _headers = get_json_web_key_with_http_info(set, kid, opts) + data + end + + # 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 [String] JSON Web Key Set ID + # @param kid [String] JSON Web Key ID + # @param [Hash] opts the optional parameters + # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers + def get_json_web_key_with_http_info(set, kid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JwkApi.get_json_web_key ...' + end + # verify the required parameter 'set' is set + if @api_client.config.client_side_validation && set.nil? + fail ArgumentError, "Missing the required parameter 'set' when calling JwkApi.get_json_web_key" + end + # verify the required parameter 'kid' is set + if @api_client.config.client_side_validation && kid.nil? + fail ArgumentError, "Missing the required parameter 'kid' when calling JwkApi.get_json_web_key" + end + # resource path + local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'JsonWebKeySet' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"JwkApi.get_json_web_key", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JwkApi#get_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] JSON Web Key Set ID + # @param [Hash] opts the optional parameters + # @return [JsonWebKeySet] + def get_json_web_key_set(set, opts = {}) + data, _status_code, _headers = get_json_web_key_set_with_http_info(set, opts) + data + end + + # 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 [String] JSON Web Key Set ID + # @param [Hash] opts the optional parameters + # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers + def get_json_web_key_set_with_http_info(set, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JwkApi.get_json_web_key_set ...' + end + # verify the required parameter 'set' is set + if @api_client.config.client_side_validation && set.nil? + fail ArgumentError, "Missing the required parameter 'set' when calling JwkApi.get_json_web_key_set" + end + # resource path + local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'JsonWebKeySet' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"JwkApi.get_json_web_key_set", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JwkApi#get_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The JSON Web Key Set ID + # @param kid [String] JSON Web Key ID + # @param [Hash] opts the optional parameters + # @option opts [JsonWebKey] :json_web_key + # @return [JsonWebKey] + def set_json_web_key(set, kid, opts = {}) + data, _status_code, _headers = set_json_web_key_with_http_info(set, kid, opts) + data + end + + # 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 [String] The JSON Web Key Set ID + # @param kid [String] JSON Web Key ID + # @param [Hash] opts the optional parameters + # @option opts [JsonWebKey] :json_web_key + # @return [Array<(JsonWebKey, Integer, Hash)>] JsonWebKey data, response status code and response headers + def set_json_web_key_with_http_info(set, kid, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JwkApi.set_json_web_key ...' + end + # verify the required parameter 'set' is set + if @api_client.config.client_side_validation && set.nil? + fail ArgumentError, "Missing the required parameter 'set' when calling JwkApi.set_json_web_key" + end + # verify the required parameter 'kid' is set + if @api_client.config.client_side_validation && kid.nil? + fail ArgumentError, "Missing the required parameter 'kid' when calling JwkApi.set_json_web_key" + end + # resource path + local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'json_web_key']) + + # return_type + return_type = opts[:debug_return_type] || 'JsonWebKey' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"JwkApi.set_json_web_key", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JwkApi#set_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The JSON Web Key Set ID + # @param [Hash] opts the optional parameters + # @option opts [JsonWebKeySet] :json_web_key_set + # @return [JsonWebKeySet] + def set_json_web_key_set(set, opts = {}) + data, _status_code, _headers = set_json_web_key_set_with_http_info(set, opts) + data + end + + # 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 [String] The JSON Web Key Set ID + # @param [Hash] opts the optional parameters + # @option opts [JsonWebKeySet] :json_web_key_set + # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers + def set_json_web_key_set_with_http_info(set, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: JwkApi.set_json_web_key_set ...' + end + # verify the required parameter 'set' is set + if @api_client.config.client_side_validation && set.nil? + fail ArgumentError, "Missing the required parameter 'set' when calling JwkApi.set_json_web_key_set" + end + # resource path + local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'json_web_key_set']) + + # return_type + return_type = opts[:debug_return_type] || 'JsonWebKeySet' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"JwkApi.set_json_web_key_set", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: JwkApi#set_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +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 55c0d25bc39..8ce9f0889b9 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 @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -19,31 +19,147 @@ class MetadataApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - # ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + # 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 [Hash] opts the optional parameters + # @return [GetVersion200Response] + def get_version(opts = {}) + data, _status_code, _headers = get_version_with_http_info(opts) + data + end + + # 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 [Hash] opts the optional parameters + # @return [Array<(GetVersion200Response, Integer, Hash)>] GetVersion200Response data, response status code and response headers + def get_version_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MetadataApi.get_version ...' + end + # resource path + local_var_path = '/version' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetVersion200Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"MetadataApi.get_version", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MetadataApi#get_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [Hash] opts the optional parameters + # @return [HealthStatus] + def is_alive(opts = {}) + data, _status_code, _headers = is_alive_with_http_info(opts) + data + end + + # 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 [Hash] opts the optional parameters + # @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers + def is_alive_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: MetadataApi.is_alive ...' + end + # resource path + local_var_path = '/health/alive' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'HealthStatus' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"MetadataApi.is_alive", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: MetadataApi#is_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [Hash] opts the optional parameters - # @return [nil] - def prometheus(opts = {}) - prometheus_with_http_info(opts) - nil + # @return [IsReady200Response] + def is_ready(opts = {}) + data, _status_code, _headers = is_ready_with_http_info(opts) + data end - # Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - # ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + # 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 [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def prometheus_with_http_info(opts = {}) + # @return [Array<(IsReady200Response, Integer, Hash)>] IsReady200Response data, response status code and response headers + def is_ready_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MetadataApi.prometheus ...' + @api_client.config.logger.debug 'Calling API: MetadataApi.is_ready ...' end # resource path - local_var_path = '/metrics/prometheus' + local_var_path = '/health/ready' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} @@ -52,13 +168,13 @@ def prometheus_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'IsReady200Response' # auth_names auth_names = opts[:debug_auth_names] || [] new_options = opts.merge( - :operation => :"MetadataApi.prometheus", + :operation => :"MetadataApi.is_ready", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -69,7 +185,7 @@ def prometheus_with_http_info(opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: MetadataApi#prometheus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: MetadataApi#is_ready\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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 new file mode 100644 index 00000000000..2a6804beec1 --- /dev/null +++ b/clients/hydra/ruby/lib/ory-hydra-client/api/o_auth2_api.rb @@ -0,0 +1,1926 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'cgi' + +module OryHydraClient + class OAuth2Api + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # 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 [String] OAuth 2.0 Consent Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [AcceptOAuth2ConsentRequest] :accept_o_auth2_consent_request + # @return [OAuth2RedirectTo] + def accept_o_auth2_consent_request(consent_challenge, opts = {}) + data, _status_code, _headers = accept_o_auth2_consent_request_with_http_info(consent_challenge, opts) + data + end + + # 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 [String] OAuth 2.0 Consent Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [AcceptOAuth2ConsentRequest] :accept_o_auth2_consent_request + # @return [Array<(OAuth2RedirectTo, Integer, Hash)>] OAuth2RedirectTo data, response status code and response headers + def accept_o_auth2_consent_request_with_http_info(consent_challenge, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.accept_o_auth2_consent_request ...' + end + # verify the required parameter 'consent_challenge' is set + if @api_client.config.client_side_validation && consent_challenge.nil? + fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling OAuth2Api.accept_o_auth2_consent_request" + end + # resource path + local_var_path = '/admin/oauth2/auth/requests/consent/accept' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'consent_challenge'] = consent_challenge + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'accept_o_auth2_consent_request']) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2RedirectTo' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.accept_o_auth2_consent_request", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#accept_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Login Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [AcceptOAuth2LoginRequest] :accept_o_auth2_login_request + # @return [OAuth2RedirectTo] + def accept_o_auth2_login_request(login_challenge, opts = {}) + data, _status_code, _headers = accept_o_auth2_login_request_with_http_info(login_challenge, opts) + data + end + + # 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 [String] OAuth 2.0 Login Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [AcceptOAuth2LoginRequest] :accept_o_auth2_login_request + # @return [Array<(OAuth2RedirectTo, Integer, Hash)>] OAuth2RedirectTo data, response status code and response headers + def accept_o_auth2_login_request_with_http_info(login_challenge, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.accept_o_auth2_login_request ...' + end + # verify the required parameter 'login_challenge' is set + if @api_client.config.client_side_validation && login_challenge.nil? + fail ArgumentError, "Missing the required parameter 'login_challenge' when calling OAuth2Api.accept_o_auth2_login_request" + end + # resource path + local_var_path = '/admin/oauth2/auth/requests/login/accept' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'login_challenge'] = login_challenge + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'accept_o_auth2_login_request']) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2RedirectTo' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.accept_o_auth2_login_request", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#accept_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Logout Request Challenge + # @param [Hash] opts the optional parameters + # @return [OAuth2RedirectTo] + def accept_o_auth2_logout_request(logout_challenge, opts = {}) + data, _status_code, _headers = accept_o_auth2_logout_request_with_http_info(logout_challenge, opts) + data + end + + # 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 [String] OAuth 2.0 Logout Request Challenge + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2RedirectTo, Integer, Hash)>] OAuth2RedirectTo data, response status code and response headers + def accept_o_auth2_logout_request_with_http_info(logout_challenge, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.accept_o_auth2_logout_request ...' + end + # verify the required parameter 'logout_challenge' is set + if @api_client.config.client_side_validation && logout_challenge.nil? + fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling OAuth2Api.accept_o_auth2_logout_request" + end + # resource path + local_var_path = '/admin/oauth2/auth/requests/logout/accept' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'logout_challenge'] = logout_challenge + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2RedirectTo' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.accept_o_auth2_logout_request", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#accept_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [OAuth2Client] OAuth 2.0 Client Request Body + # @param [Hash] opts the optional parameters + # @return [OAuth2Client] + def create_o_auth2_client(o_auth2_client, opts = {}) + data, _status_code, _headers = create_o_auth2_client_with_http_info(o_auth2_client, opts) + data + end + + # 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 [OAuth2Client] OAuth 2.0 Client Request Body + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers + def create_o_auth2_client_with_http_info(o_auth2_client, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.create_o_auth2_client ...' + end + # verify the required parameter 'o_auth2_client' is set + if @api_client.config.client_side_validation && o_auth2_client.nil? + fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling OAuth2Api.create_o_auth2_client" + end + # resource path + local_var_path = '/admin/clients' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2Client' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.create_o_auth2_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_o_auth2_client(id, opts = {}) + delete_o_auth2_client_with_http_info(id, opts) + nil + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_o_auth2_client_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.delete_o_auth2_client ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.delete_o_auth2_client" + end + # resource path + local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.delete_o_auth2_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Client ID + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_o_auth2_token(client_id, opts = {}) + delete_o_auth2_token_with_http_info(client_id, opts) + nil + end + + # 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 [String] OAuth 2.0 Client ID + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_o_auth2_token_with_http_info(client_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.delete_o_auth2_token ...' + end + # verify the required parameter 'client_id' is set + if @api_client.config.client_side_validation && client_id.nil? + fail ArgumentError, "Missing the required parameter 'client_id' when calling OAuth2Api.delete_o_auth2_token" + end + # resource path + local_var_path = '/admin/oauth2/tokens' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'client_id'] = client_id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.delete_o_auth2_token", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#delete_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The id of the desired grant + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_trusted_o_auth2_jwt_grant_issuer(id, opts = {}) + delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts) + nil + end + + # 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 [String] The id of the desired grant + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.delete_trusted_o_auth2_jwt_grant_issuer ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.delete_trusted_o_auth2_jwt_grant_issuer" + end + # resource path + local_var_path = '/admin/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.delete_trusted_o_auth2_jwt_grant_issuer", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#delete_trusted_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param [Hash] opts the optional parameters + # @return [OAuth2Client] + def get_o_auth2_client(id, opts = {}) + data, _status_code, _headers = get_o_auth2_client_with_http_info(id, opts) + data + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers + def get_o_auth2_client_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.get_o_auth2_client ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.get_o_auth2_client" + end + # resource path + local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2Client' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.get_o_auth2_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Consent Request Challenge + # @param [Hash] opts the optional parameters + # @return [OAuth2ConsentRequest] + def get_o_auth2_consent_request(consent_challenge, opts = {}) + data, _status_code, _headers = get_o_auth2_consent_request_with_http_info(consent_challenge, opts) + data + end + + # 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 [String] OAuth 2.0 Consent Request Challenge + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2ConsentRequest, Integer, Hash)>] OAuth2ConsentRequest data, response status code and response headers + def get_o_auth2_consent_request_with_http_info(consent_challenge, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.get_o_auth2_consent_request ...' + end + # verify the required parameter 'consent_challenge' is set + if @api_client.config.client_side_validation && consent_challenge.nil? + fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling OAuth2Api.get_o_auth2_consent_request" + end + # resource path + local_var_path = '/admin/oauth2/auth/requests/consent' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'consent_challenge'] = consent_challenge + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2ConsentRequest' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.get_o_auth2_consent_request", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#get_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Login Request Challenge + # @param [Hash] opts the optional parameters + # @return [OAuth2LoginRequest] + def get_o_auth2_login_request(login_challenge, opts = {}) + data, _status_code, _headers = get_o_auth2_login_request_with_http_info(login_challenge, opts) + data + end + + # 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 [String] OAuth 2.0 Login Request Challenge + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2LoginRequest, Integer, Hash)>] OAuth2LoginRequest data, response status code and response headers + def get_o_auth2_login_request_with_http_info(login_challenge, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.get_o_auth2_login_request ...' + end + # verify the required parameter 'login_challenge' is set + if @api_client.config.client_side_validation && login_challenge.nil? + fail ArgumentError, "Missing the required parameter 'login_challenge' when calling OAuth2Api.get_o_auth2_login_request" + end + # resource path + local_var_path = '/admin/oauth2/auth/requests/login' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'login_challenge'] = login_challenge + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2LoginRequest' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.get_o_auth2_login_request", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#get_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get OAuth 2.0 Session Logout Request + # Use this endpoint to fetch an Ory OAuth 2.0 logout request. + # @param logout_challenge [String] + # @param [Hash] opts the optional parameters + # @return [OAuth2LogoutRequest] + def get_o_auth2_logout_request(logout_challenge, opts = {}) + data, _status_code, _headers = get_o_auth2_logout_request_with_http_info(logout_challenge, opts) + data + end + + # Get OAuth 2.0 Session Logout Request + # Use this endpoint to fetch an Ory OAuth 2.0 logout request. + # @param logout_challenge [String] + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2LogoutRequest, Integer, Hash)>] OAuth2LogoutRequest data, response status code and response headers + def get_o_auth2_logout_request_with_http_info(logout_challenge, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.get_o_auth2_logout_request ...' + end + # verify the required parameter 'logout_challenge' is set + if @api_client.config.client_side_validation && logout_challenge.nil? + fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling OAuth2Api.get_o_auth2_logout_request" + end + # resource path + local_var_path = '/admin/oauth2/auth/requests/logout' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'logout_challenge'] = logout_challenge + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2LogoutRequest' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.get_o_auth2_logout_request", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#get_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The id of the desired grant + # @param [Hash] opts the optional parameters + # @return [TrustedOAuth2JwtGrantIssuer] + def get_trusted_o_auth2_jwt_grant_issuer(id, opts = {}) + data, _status_code, _headers = get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts) + data + end + + # 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 [String] The id of the desired grant + # @param [Hash] opts the optional parameters + # @return [Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>] TrustedOAuth2JwtGrantIssuer data, response status code and response headers + def get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.get_trusted_o_auth2_jwt_grant_issuer ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.get_trusted_o_auth2_jwt_grant_issuer" + end + # resource path + local_var_path = '/admin/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TrustedOAuth2JwtGrantIssuer' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.get_trusted_o_auth2_jwt_grant_issuer", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#get_trusted_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [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. + # @param [Hash] opts the optional parameters + # @option opts [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. + # @return [IntrospectedOAuth2Token] + def introspect_o_auth2_token(token, opts = {}) + data, _status_code, _headers = introspect_o_auth2_token_with_http_info(token, opts) + data + end + + # 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 [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. + # @param [Hash] opts the optional parameters + # @option opts [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. + # @return [Array<(IntrospectedOAuth2Token, Integer, Hash)>] IntrospectedOAuth2Token data, response status code and response headers + def introspect_o_auth2_token_with_http_info(token, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.introspect_o_auth2_token ...' + end + # verify the required parameter 'token' is set + if @api_client.config.client_side_validation && token.nil? + fail ArgumentError, "Missing the required parameter 'token' when calling OAuth2Api.introspect_o_auth2_token" + end + # resource path + local_var_path = '/admin/oauth2/introspect' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['token'] = token + form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'IntrospectedOAuth2Token' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.introspect_o_auth2_token", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#introspect_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [Hash] opts the optional parameters + # @option opts [Integer] :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). (default to 250) + # @option opts [String] :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). (default to '1') + # @option opts [String] :client_name The name of the clients to filter by. + # @option opts [String] :owner The owner of the clients to filter by. + # @return [Array] + def list_o_auth2_clients(opts = {}) + data, _status_code, _headers = list_o_auth2_clients_with_http_info(opts) + data + end + + # 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 [Hash] opts the optional parameters + # @option opts [Integer] :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). (default to 250) + # @option opts [String] :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). (default to '1') + # @option opts [String] :client_name The name of the clients to filter by. + # @option opts [String] :owner The owner of the clients to filter by. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_o_auth2_clients_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.list_o_auth2_clients ...' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_o_auth2_clients, must be smaller than or equal to 500.' + end + + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_o_auth2_clients, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/admin/clients' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? + query_params[:'client_name'] = opts[:'client_name'] if !opts[:'client_name'].nil? + query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.list_o_auth2_clients", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#list_o_auth2_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The subject to list the consent sessions for. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :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). (default to 250) + # @option opts [String] :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). (default to '1') + # @return [Array] + def list_o_auth2_consent_sessions(subject, opts = {}) + data, _status_code, _headers = list_o_auth2_consent_sessions_with_http_info(subject, opts) + data + end + + # 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 [String] The subject to list the consent sessions for. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :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). (default to 250) + # @option opts [String] :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). (default to '1') + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_o_auth2_consent_sessions_with_http_info(subject, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.list_o_auth2_consent_sessions ...' + end + # verify the required parameter 'subject' is set + if @api_client.config.client_side_validation && subject.nil? + fail ArgumentError, "Missing the required parameter 'subject' when calling OAuth2Api.list_o_auth2_consent_sessions" + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_o_auth2_consent_sessions, must be smaller than or equal to 500.' + end + + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_o_auth2_consent_sessions, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/admin/oauth2/auth/sessions/consent' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'subject'] = subject + query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.list_o_auth2_consent_sessions", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#list_o_auth2_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Trusted OAuth2 JWT Bearer Grant Type Issuers + # Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :max_items + # @option opts [Integer] :default_items + # @option opts [String] :issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + # @return [Array] + def list_trusted_o_auth2_jwt_grant_issuers(opts = {}) + data, _status_code, _headers = list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts) + data + end + + # List Trusted OAuth2 JWT Bearer Grant Type Issuers + # Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :max_items + # @option opts [Integer] :default_items + # @option opts [String] :issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.list_trusted_o_auth2_jwt_grant_issuers ...' + end + # resource path + local_var_path = '/admin/trust/grants/jwt-bearer/issuers' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'MaxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? + query_params[:'DefaultItems'] = opts[:'default_items'] if !opts[:'default_items'].nil? + query_params[:'issuer'] = opts[:'issuer'] if !opts[:'issuer'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.list_trusted_o_auth2_jwt_grant_issuers", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#list_trusted_o_auth2_jwt_grant_issuers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [Hash] opts the optional parameters + # @return [ErrorOAuth2] + def o_auth2_authorize(opts = {}) + data, _status_code, _headers = o_auth2_authorize_with_http_info(opts) + data + end + + # 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 [Hash] opts the optional parameters + # @return [Array<(ErrorOAuth2, Integer, Hash)>] ErrorOAuth2 data, response status code and response headers + def o_auth2_authorize_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.o_auth2_authorize ...' + end + # resource path + local_var_path = '/oauth2/auth' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ErrorOAuth2' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.o_auth2_authorize", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#o_auth2_authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :client_id + # @option opts [String] :code + # @option opts [String] :redirect_uri + # @option opts [String] :refresh_token + # @return [OAuth2TokenExchange] + def oauth2_token_exchange(grant_type, opts = {}) + data, _status_code, _headers = oauth2_token_exchange_with_http_info(grant_type, opts) + data + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @option opts [String] :client_id + # @option opts [String] :code + # @option opts [String] :redirect_uri + # @option opts [String] :refresh_token + # @return [Array<(OAuth2TokenExchange, Integer, Hash)>] OAuth2TokenExchange data, response status code and response headers + def oauth2_token_exchange_with_http_info(grant_type, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.oauth2_token_exchange ...' + end + # verify the required parameter 'grant_type' is set + if @api_client.config.client_side_validation && grant_type.nil? + fail ArgumentError, "Missing the required parameter 'grant_type' when calling OAuth2Api.oauth2_token_exchange" + end + # resource path + local_var_path = '/oauth2/token' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['grant_type'] = grant_type + form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil? + form_params['code'] = opts[:'code'] if !opts[:'code'].nil? + form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil? + form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2TokenExchange' + + # auth_names + auth_names = opts[:debug_auth_names] || ['basic', 'oauth2'] + + new_options = opts.merge( + :operation => :"OAuth2Api.oauth2_token_exchange", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#oauth2_token_exchange\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param json_patch [Array] OAuth 2.0 Client JSON Patch Body + # @param [Hash] opts the optional parameters + # @return [OAuth2Client] + def patch_o_auth2_client(id, json_patch, opts = {}) + data, _status_code, _headers = patch_o_auth2_client_with_http_info(id, json_patch, opts) + data + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param json_patch [Array] OAuth 2.0 Client JSON Patch Body + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers + def patch_o_auth2_client_with_http_info(id, json_patch, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.patch_o_auth2_client ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.patch_o_auth2_client" + end + # verify the required parameter 'json_patch' is set + if @api_client.config.client_side_validation && json_patch.nil? + fail ArgumentError, "Missing the required parameter 'json_patch' when calling OAuth2Api.patch_o_auth2_client" + end + # resource path + local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(json_patch) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2Client' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.patch_o_auth2_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#patch_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Consent Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [RejectOAuth2Request] :reject_o_auth2_request + # @return [OAuth2RedirectTo] + def reject_o_auth2_consent_request(consent_challenge, opts = {}) + data, _status_code, _headers = reject_o_auth2_consent_request_with_http_info(consent_challenge, opts) + data + end + + # 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 [String] OAuth 2.0 Consent Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [RejectOAuth2Request] :reject_o_auth2_request + # @return [Array<(OAuth2RedirectTo, Integer, Hash)>] OAuth2RedirectTo data, response status code and response headers + def reject_o_auth2_consent_request_with_http_info(consent_challenge, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.reject_o_auth2_consent_request ...' + end + # verify the required parameter 'consent_challenge' is set + if @api_client.config.client_side_validation && consent_challenge.nil? + fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling OAuth2Api.reject_o_auth2_consent_request" + end + # resource path + local_var_path = '/admin/oauth2/auth/requests/consent/reject' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'consent_challenge'] = consent_challenge + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'reject_o_auth2_request']) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2RedirectTo' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.reject_o_auth2_consent_request", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#reject_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Login Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [RejectOAuth2Request] :reject_o_auth2_request + # @return [OAuth2RedirectTo] + def reject_o_auth2_login_request(login_challenge, opts = {}) + data, _status_code, _headers = reject_o_auth2_login_request_with_http_info(login_challenge, opts) + data + end + + # 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 [String] OAuth 2.0 Login Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [RejectOAuth2Request] :reject_o_auth2_request + # @return [Array<(OAuth2RedirectTo, Integer, Hash)>] OAuth2RedirectTo data, response status code and response headers + def reject_o_auth2_login_request_with_http_info(login_challenge, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.reject_o_auth2_login_request ...' + end + # verify the required parameter 'login_challenge' is set + if @api_client.config.client_side_validation && login_challenge.nil? + fail ArgumentError, "Missing the required parameter 'login_challenge' when calling OAuth2Api.reject_o_auth2_login_request" + end + # resource path + local_var_path = '/admin/oauth2/auth/requests/login/reject' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'login_challenge'] = login_challenge + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'reject_o_auth2_request']) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2RedirectTo' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.reject_o_auth2_login_request", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#reject_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [nil] + def reject_o_auth2_logout_request(logout_challenge, opts = {}) + reject_o_auth2_logout_request_with_http_info(logout_challenge, opts) + nil + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def reject_o_auth2_logout_request_with_http_info(logout_challenge, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.reject_o_auth2_logout_request ...' + end + # verify the required parameter 'logout_challenge' is set + if @api_client.config.client_side_validation && logout_challenge.nil? + fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling OAuth2Api.reject_o_auth2_logout_request" + end + # resource path + local_var_path = '/admin/oauth2/auth/requests/logout/reject' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'logout_challenge'] = logout_challenge + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.reject_o_auth2_logout_request", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#reject_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + # @param [Hash] opts the optional parameters + # @option opts [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. + # @option opts [Boolean] :all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + # @return [nil] + def revoke_o_auth2_consent_sessions(subject, opts = {}) + revoke_o_auth2_consent_sessions_with_http_info(subject, opts) + nil + end + + # 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 [String] OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + # @param [Hash] opts the optional parameters + # @option opts [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. + # @option opts [Boolean] :all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def revoke_o_auth2_consent_sessions_with_http_info(subject, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.revoke_o_auth2_consent_sessions ...' + end + # verify the required parameter 'subject' is set + if @api_client.config.client_side_validation && subject.nil? + fail ArgumentError, "Missing the required parameter 'subject' when calling OAuth2Api.revoke_o_auth2_consent_sessions" + end + # resource path + local_var_path = '/admin/oauth2/auth/sessions/consent' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'subject'] = subject + query_params[:'client'] = opts[:'client'] if !opts[:'client'].nil? + query_params[:'all'] = opts[:'all'] if !opts[:'all'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.revoke_o_auth2_consent_sessions", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#revoke_o_auth2_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Revokes All OAuth 2.0 Login Sessions of a Subject + # This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + # @param subject [String] OAuth 2.0 Subject The subject to revoke authentication sessions for. + # @param [Hash] opts the optional parameters + # @return [nil] + def revoke_o_auth2_login_sessions(subject, opts = {}) + revoke_o_auth2_login_sessions_with_http_info(subject, opts) + nil + end + + # Revokes All OAuth 2.0 Login Sessions of a Subject + # This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + # @param subject [String] OAuth 2.0 Subject The subject to revoke authentication sessions for. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def revoke_o_auth2_login_sessions_with_http_info(subject, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.revoke_o_auth2_login_sessions ...' + end + # verify the required parameter 'subject' is set + if @api_client.config.client_side_validation && subject.nil? + fail ArgumentError, "Missing the required parameter 'subject' when calling OAuth2Api.revoke_o_auth2_login_sessions" + end + # resource path + local_var_path = '/admin/oauth2/auth/sessions/login' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'subject'] = subject + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.revoke_o_auth2_login_sessions", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#revoke_o_auth2_login_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [nil] + def revoke_o_auth2_token(token, opts = {}) + revoke_o_auth2_token_with_http_info(token, opts) + nil + end + + # 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 [String] + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def revoke_o_auth2_token_with_http_info(token, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.revoke_o_auth2_token ...' + end + # verify the required parameter 'token' is set + if @api_client.config.client_side_validation && token.nil? + fail ArgumentError, "Missing the required parameter 'token' when calling OAuth2Api.revoke_o_auth2_token" + end + # resource path + local_var_path = '/oauth2/revoke' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['token'] = token + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['basic', 'oauth2'] + + new_options = opts.merge( + :operation => :"OAuth2Api.revoke_o_auth2_token", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#revoke_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Client ID + # @param o_auth2_client [OAuth2Client] OAuth 2.0 Client Request Body + # @param [Hash] opts the optional parameters + # @return [OAuth2Client] + def set_o_auth2_client(id, o_auth2_client, opts = {}) + data, _status_code, _headers = set_o_auth2_client_with_http_info(id, o_auth2_client, opts) + data + end + + # 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 [String] OAuth 2.0 Client ID + # @param o_auth2_client [OAuth2Client] OAuth 2.0 Client Request Body + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers + def set_o_auth2_client_with_http_info(id, o_auth2_client, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.set_o_auth2_client ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.set_o_auth2_client" + end + # verify the required parameter 'o_auth2_client' is set + if @api_client.config.client_side_validation && o_auth2_client.nil? + fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling OAuth2Api.set_o_auth2_client" + end + # resource path + local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2Client' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.set_o_auth2_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#set_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] OAuth 2.0 Client ID + # @param [Hash] opts the optional parameters + # @option opts [OAuth2ClientTokenLifespans] :o_auth2_client_token_lifespans + # @return [OAuth2Client] + def set_o_auth2_client_lifespans(id, opts = {}) + data, _status_code, _headers = set_o_auth2_client_lifespans_with_http_info(id, opts) + data + end + + # 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 [String] OAuth 2.0 Client ID + # @param [Hash] opts the optional parameters + # @option opts [OAuth2ClientTokenLifespans] :o_auth2_client_token_lifespans + # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers + def set_o_auth2_client_lifespans_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.set_o_auth2_client_lifespans ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.set_o_auth2_client_lifespans" + end + # resource path + local_var_path = '/admin/clients/{id}/lifespans'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'o_auth2_client_token_lifespans']) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2Client' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.set_o_auth2_client_lifespans", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#set_o_auth2_client_lifespans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [Hash] opts the optional parameters + # @option opts [TrustOAuth2JwtGrantIssuer] :trust_o_auth2_jwt_grant_issuer + # @return [TrustedOAuth2JwtGrantIssuer] + def trust_o_auth2_jwt_grant_issuer(opts = {}) + data, _status_code, _headers = trust_o_auth2_jwt_grant_issuer_with_http_info(opts) + data + end + + # 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 [Hash] opts the optional parameters + # @option opts [TrustOAuth2JwtGrantIssuer] :trust_o_auth2_jwt_grant_issuer + # @return [Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>] TrustedOAuth2JwtGrantIssuer data, response status code and response headers + def trust_o_auth2_jwt_grant_issuer_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OAuth2Api.trust_o_auth2_jwt_grant_issuer ...' + end + # resource path + local_var_path = '/admin/trust/grants/jwt-bearer/issuers' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'trust_o_auth2_jwt_grant_issuer']) + + # return_type + return_type = opts[:debug_return_type] || 'TrustedOAuth2JwtGrantIssuer' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OAuth2Api.trust_o_auth2_jwt_grant_issuer", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OAuth2Api#trust_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +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 new file mode 100644 index 00000000000..9d458b67d8f --- /dev/null +++ b/clients/hydra/ruby/lib/ory-hydra-client/api/oidc_api.rb @@ -0,0 +1,459 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'cgi' + +module OryHydraClient + class OidcApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # 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 [OAuth2Client] Dynamic Client Registration Request Body + # @param [Hash] opts the optional parameters + # @return [OAuth2Client] + def create_oidc_dynamic_client(o_auth2_client, opts = {}) + data, _status_code, _headers = create_oidc_dynamic_client_with_http_info(o_auth2_client, opts) + data + end + + # 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 [OAuth2Client] Dynamic Client Registration Request Body + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers + def create_oidc_dynamic_client_with_http_info(o_auth2_client, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OidcApi.create_oidc_dynamic_client ...' + end + # verify the required parameter 'o_auth2_client' is set + if @api_client.config.client_side_validation && o_auth2_client.nil? + fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling OidcApi.create_oidc_dynamic_client" + end + # resource path + local_var_path = '/oauth2/register' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2Client' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OidcApi.create_oidc_dynamic_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OidcApi#create_oidc_dynamic_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_oidc_dynamic_client(id, opts = {}) + delete_oidc_dynamic_client_with_http_info(id, opts) + nil + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_oidc_dynamic_client_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OidcApi.delete_oidc_dynamic_client ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OidcApi.delete_oidc_dynamic_client" + end + # resource path + local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearer'] + + new_options = opts.merge( + :operation => :"OidcApi.delete_oidc_dynamic_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OidcApi#delete_oidc_dynamic_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [Hash] opts the optional parameters + # @return [OidcConfiguration] + def discover_oidc_configuration(opts = {}) + data, _status_code, _headers = discover_oidc_configuration_with_http_info(opts) + data + end + + # 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 [Hash] opts the optional parameters + # @return [Array<(OidcConfiguration, Integer, Hash)>] OidcConfiguration data, response status code and response headers + def discover_oidc_configuration_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OidcApi.discover_oidc_configuration ...' + end + # resource path + local_var_path = '/.well-known/openid-configuration' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OidcConfiguration' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OidcApi.discover_oidc_configuration", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OidcApi#discover_oidc_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param [Hash] opts the optional parameters + # @return [OAuth2Client] + def get_oidc_dynamic_client(id, opts = {}) + data, _status_code, _headers = get_oidc_dynamic_client_with_http_info(id, opts) + data + end + + # 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 [String] The id of the OAuth 2.0 Client. + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers + def get_oidc_dynamic_client_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OidcApi.get_oidc_dynamic_client ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OidcApi.get_oidc_dynamic_client" + end + # resource path + local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2Client' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearer'] + + new_options = opts.merge( + :operation => :"OidcApi.get_oidc_dynamic_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OidcApi#get_oidc_dynamic_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [Hash] opts the optional parameters + # @return [OidcUserInfo] + def get_oidc_user_info(opts = {}) + data, _status_code, _headers = get_oidc_user_info_with_http_info(opts) + data + end + + # 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 [Hash] opts the optional parameters + # @return [Array<(OidcUserInfo, Integer, Hash)>] OidcUserInfo data, response status code and response headers + def get_oidc_user_info_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OidcApi.get_oidc_user_info ...' + end + # resource path + local_var_path = '/userinfo' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OidcUserInfo' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"OidcApi.get_oidc_user_info", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OidcApi#get_oidc_user_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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. + # @param [Hash] opts the optional parameters + # @return [nil] + def revoke_oidc_session(opts = {}) + revoke_oidc_session_with_http_info(opts) + nil + end + + # 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. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def revoke_oidc_session_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OidcApi.revoke_oidc_session ...' + end + # resource path + local_var_path = '/oauth2/sessions/logout' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"OidcApi.revoke_oidc_session", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OidcApi#revoke_oidc_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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. + # @param id [String] OAuth 2.0 Client ID + # @param o_auth2_client [OAuth2Client] OAuth 2.0 Client Request Body + # @param [Hash] opts the optional parameters + # @return [OAuth2Client] + def set_oidc_dynamic_client(id, o_auth2_client, opts = {}) + data, _status_code, _headers = set_oidc_dynamic_client_with_http_info(id, o_auth2_client, opts) + data + end + + # 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. + # @param id [String] OAuth 2.0 Client ID + # @param o_auth2_client [OAuth2Client] OAuth 2.0 Client Request Body + # @param [Hash] opts the optional parameters + # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers + def set_oidc_dynamic_client_with_http_info(id, o_auth2_client, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OidcApi.set_oidc_dynamic_client ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling OidcApi.set_oidc_dynamic_client" + end + # verify the required parameter 'o_auth2_client' is set + if @api_client.config.client_side_validation && o_auth2_client.nil? + fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling OidcApi.set_oidc_dynamic_client" + end + # resource path + local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client) + + # return_type + return_type = opts[:debug_return_type] || 'OAuth2Client' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearer'] + + new_options = opts.merge( + :operation => :"OidcApi.set_oidc_dynamic_client", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OidcApi#set_oidc_dynamic_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/api/public_api.rb b/clients/hydra/ruby/lib/ory-hydra-client/api/public_api.rb deleted file mode 100644 index 6512bdbde79..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/api/public_api.rb +++ /dev/null @@ -1,780 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'cgi' - -module OryHydraClient - class PublicApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - # OpenID Connect Front-Backchannel Enabled Logout - # This endpoint initiates and completes user logout at Ory Hydra 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 - # @param [Hash] opts the optional parameters - # @return [nil] - def disconnect_user(opts = {}) - disconnect_user_with_http_info(opts) - nil - end - - # OpenID Connect Front-Backchannel Enabled Logout - # This endpoint initiates and completes user logout at Ory Hydra 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 - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def disconnect_user_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.disconnect_user ...' - end - # resource path - local_var_path = '/oauth2/sessions/logout' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"PublicApi.disconnect_user", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#disconnect_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # OpenID Connect Discovery - # The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 [Hash] opts the optional parameters - # @return [WellKnown] - def discover_open_id_configuration(opts = {}) - data, _status_code, _headers = discover_open_id_configuration_with_http_info(opts) - data - end - - # OpenID Connect Discovery - # The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 [Hash] opts the optional parameters - # @return [Array<(WellKnown, Integer, Hash)>] WellKnown data, response status code and response headers - def discover_open_id_configuration_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.discover_open_id_configuration ...' - end - # resource path - local_var_path = '/.well-known/openid-configuration' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'WellKnown' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"PublicApi.discover_open_id_configuration", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#discover_open_id_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - # 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 body [OAuth2Client] - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - def dynamic_client_registration_create_o_auth2_client(body, opts = {}) - data, _status_code, _headers = dynamic_client_registration_create_o_auth2_client_with_http_info(body, opts) - data - end - - # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - # 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 body [OAuth2Client] - # @param [Hash] opts the optional parameters - # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers - def dynamic_client_registration_create_o_auth2_client_with_http_info(body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.dynamic_client_registration_create_o_auth2_client ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling PublicApi.dynamic_client_registration_create_o_auth2_client" - end - # resource path - local_var_path = '/connect/register' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'OAuth2Client' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"PublicApi.dynamic_client_registration_create_o_auth2_client", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#dynamic_client_registration_create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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 [String] The id of the OAuth 2.0 Client. - # @param [Hash] opts the optional parameters - # @return [nil] - def dynamic_client_registration_delete_o_auth2_client(id, opts = {}) - dynamic_client_registration_delete_o_auth2_client_with_http_info(id, opts) - nil - end - - # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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 [String] The id of the OAuth 2.0 Client. - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def dynamic_client_registration_delete_o_auth2_client_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.dynamic_client_registration_delete_o_auth2_client ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.dynamic_client_registration_delete_o_auth2_client" - end - # resource path - local_var_path = '/connect/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"PublicApi.dynamic_client_registration_delete_o_auth2_client", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#dynamic_client_registration_delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - # 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. 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 [String] The id of the OAuth 2.0 Client. - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - def dynamic_client_registration_get_o_auth2_client(id, opts = {}) - data, _status_code, _headers = dynamic_client_registration_get_o_auth2_client_with_http_info(id, opts) - data - end - - # Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - # 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. 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 [String] The id of the OAuth 2.0 Client. - # @param [Hash] opts the optional parameters - # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers - def dynamic_client_registration_get_o_auth2_client_with_http_info(id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.dynamic_client_registration_get_o_auth2_client ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.dynamic_client_registration_get_o_auth2_client" - end - # resource path - local_var_path = '/connect/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'OAuth2Client' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"PublicApi.dynamic_client_registration_get_o_auth2_client", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#dynamic_client_registration_get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - # This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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 [String] The id of the OAuth 2.0 Client. - # @param body [OAuth2Client] - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - def dynamic_client_registration_update_o_auth2_client(id, body, opts = {}) - data, _status_code, _headers = dynamic_client_registration_update_o_auth2_client_with_http_info(id, body, opts) - data - end - - # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - # This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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 [String] The id of the OAuth 2.0 Client. - # @param body [OAuth2Client] - # @param [Hash] opts the optional parameters - # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers - def dynamic_client_registration_update_o_auth2_client_with_http_info(id, body, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.dynamic_client_registration_update_o_auth2_client ...' - end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling PublicApi.dynamic_client_registration_update_o_auth2_client" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling PublicApi.dynamic_client_registration_update_o_auth2_client" - end - # resource path - local_var_path = '/connect/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/json']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'OAuth2Client' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"PublicApi.dynamic_client_registration_update_o_auth2_client", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#dynamic_client_registration_update_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Check Readiness Status - # This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - # @param [Hash] opts the optional parameters - # @return [HealthStatus] - def is_instance_ready(opts = {}) - data, _status_code, _headers = is_instance_ready_with_http_info(opts) - data - end - - # Check Readiness Status - # This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - # @param [Hash] opts the optional parameters - # @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers - def is_instance_ready_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.is_instance_ready ...' - end - # resource path - local_var_path = '/health/ready' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'HealthStatus' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"PublicApi.is_instance_ready", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#is_instance_ready\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # The OAuth 2.0 Token Endpoint - # The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - # @param grant_type [String] - # @param [Hash] opts the optional parameters - # @option opts [String] :code - # @option opts [String] :refresh_token - # @option opts [String] :redirect_uri - # @option opts [String] :client_id - # @return [Oauth2TokenResponse] - def oauth2_token(grant_type, opts = {}) - data, _status_code, _headers = oauth2_token_with_http_info(grant_type, opts) - data - end - - # The OAuth 2.0 Token Endpoint - # The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - # @param grant_type [String] - # @param [Hash] opts the optional parameters - # @option opts [String] :code - # @option opts [String] :refresh_token - # @option opts [String] :redirect_uri - # @option opts [String] :client_id - # @return [Array<(Oauth2TokenResponse, Integer, Hash)>] Oauth2TokenResponse data, response status code and response headers - def oauth2_token_with_http_info(grant_type, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.oauth2_token ...' - end - # verify the required parameter 'grant_type' is set - if @api_client.config.client_side_validation && grant_type.nil? - fail ArgumentError, "Missing the required parameter 'grant_type' when calling PublicApi.oauth2_token" - end - # resource path - local_var_path = '/oauth2/token' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - form_params['grant_type'] = grant_type - form_params['code'] = opts[:'code'] if !opts[:'code'].nil? - form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil? - form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil? - form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil? - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'Oauth2TokenResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['basic', 'oauth2'] - - new_options = opts.merge( - :operation => :"PublicApi.oauth2_token", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#oauth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # The OAuth 2.0 Authorize Endpoint - # This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - # @param [Hash] opts the optional parameters - # @return [nil] - def oauth_auth(opts = {}) - oauth_auth_with_http_info(opts) - nil - end - - # The OAuth 2.0 Authorize Endpoint - # This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def oauth_auth_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.oauth_auth ...' - end - # resource path - local_var_path = '/oauth2/auth' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"PublicApi.oauth_auth", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#oauth_auth\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Revoke OAuth2 Tokens - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [nil] - def revoke_o_auth2_token(token, opts = {}) - revoke_o_auth2_token_with_http_info(token, opts) - nil - end - - # Revoke OAuth2 Tokens - # 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 [String] - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def revoke_o_auth2_token_with_http_info(token, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.revoke_o_auth2_token ...' - end - # verify the required parameter 'token' is set - if @api_client.config.client_side_validation && token.nil? - fail ArgumentError, "Missing the required parameter 'token' when calling PublicApi.revoke_o_auth2_token" - end - # resource path - local_var_path = '/oauth2/revoke' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) - if !content_type.nil? - header_params['Content-Type'] = content_type - end - - # form parameters - form_params = opts[:form_params] || {} - form_params['token'] = token - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || ['basic', 'oauth2'] - - new_options = opts.merge( - :operation => :"PublicApi.revoke_o_auth2_token", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#revoke_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # OpenID Connect Userinfo - # This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 [Hash] opts the optional parameters - # @return [UserinfoResponse] - def userinfo(opts = {}) - data, _status_code, _headers = userinfo_with_http_info(opts) - data - end - - # OpenID Connect Userinfo - # This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 [Hash] opts the optional parameters - # @return [Array<(UserinfoResponse, Integer, Hash)>] UserinfoResponse data, response status code and response headers - def userinfo_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.userinfo ...' - end - # resource path - local_var_path = '/userinfo' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'UserinfoResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['oauth2'] - - new_options = opts.merge( - :operation => :"PublicApi.userinfo", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#userinfo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # JSON Web Keys Discovery - # This endpoint returns JSON Web Keys to be used as public keys for 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 [Hash] opts the optional parameters - # @return [JSONWebKeySet] - def well_known(opts = {}) - data, _status_code, _headers = well_known_with_http_info(opts) - data - end - - # JSON Web Keys Discovery - # This endpoint returns JSON Web Keys to be used as public keys for 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 [Hash] opts the optional parameters - # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers - def well_known_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: PublicApi.well_known ...' - end - # resource path - local_var_path = '/.well-known/jwks.json' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'JSONWebKeySet' - - # auth_names - auth_names = opts[:debug_auth_names] || [] - - new_options = opts.merge( - :operation => :"PublicApi.well_known", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: PublicApi#well_known\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -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 new file mode 100644 index 00000000000..1e48a49c2a9 --- /dev/null +++ b/clients/hydra/ruby/lib/ory-hydra-client/api/wellknown_api.rb @@ -0,0 +1,79 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'cgi' + +module OryHydraClient + class WellknownApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # 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 [Hash] opts the optional parameters + # @return [JsonWebKeySet] + def discover_json_web_keys(opts = {}) + data, _status_code, _headers = discover_json_web_keys_with_http_info(opts) + data + end + + # 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 [Hash] opts the optional parameters + # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers + def discover_json_web_keys_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WellknownApi.discover_json_web_keys ...' + end + # resource path + local_var_path = '/.well-known/jwks.json' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'JsonWebKeySet' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"WellknownApi.discover_json_web_keys", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WellknownApi#discover_json_web_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +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 fb4979675a7..8df6e29b453 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/api_client.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/api_client.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -93,6 +93,7 @@ def build_request(http_method, path, opts = {}) header_params = @default_headers.merge(opts[:header_params] || {}) query_params = opts[:query_params] || {} form_params = opts[:form_params] || {} + follow_location = opts[:follow_location] || true update_params_for_auth! header_params, query_params, opts[:auth_names] @@ -109,7 +110,8 @@ def build_request(http_method, path, opts = {}) :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging + :verbose => @config.debugging, + :followlocation => follow_location } # set custom cert, if provided 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 8f76afaf145..c7e80b20bc1 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/api_error.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/api_error.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/configuration.rb b/clients/hydra/ruby/lib/ory-hydra-client/configuration.rb index d8cbbdbaf8f..5c243e97f41 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/configuration.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/configuration.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -133,6 +133,7 @@ class Configuration # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96 attr_accessor :params_encoding + attr_accessor :inject_format attr_accessor :force_ending_format @@ -150,10 +151,10 @@ def initialize @client_side_validation = true @verify_ssl = true @verify_ssl_host = true - @params_encoding = nil @cert_file = nil @key_file = nil @timeout = 0 + @params_encoding = nil @debugging = false @inject_format = false @force_ending_format = false @@ -222,6 +223,13 @@ def auth_settings key: 'Authorization', value: basic_auth_token }, + 'bearer' => + { + type: 'bearer', + in: 'header', + key: 'Authorization', + value: "Bearer #{access_token}" + }, 'oauth2' => { type: 'oauth2', diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_consent_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request.rb similarity index 93% rename from clients/hydra/ruby/lib/ory-hydra-client/models/accept_consent_request.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request.rb index ee482116493..bd30e396767 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_consent_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,7 @@ require 'time' module OryHydraClient - class AcceptConsentRequest + class AcceptOAuth2ConsentRequest attr_accessor :grant_access_token_audience attr_accessor :grant_scope @@ -54,7 +54,7 @@ def self.openapi_types :'handled_at' => :'Time', :'remember' => :'Boolean', :'remember_for' => :'Integer', - :'session' => :'ConsentRequestSession' + :'session' => :'AcceptOAuth2ConsentRequestSession' } end @@ -68,13 +68,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::AcceptConsentRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::AcceptOAuth2ConsentRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::AcceptConsentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::AcceptOAuth2ConsentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -158,6 +158,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/consent_request_session.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request_session.rb similarity index 92% rename from clients/hydra/ruby/lib/ory-hydra-client/models/consent_request_session.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request_session.rb index 3b8582aa03e..90f1a6a7a2b 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/consent_request_session.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_consent_request_session.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,7 @@ require 'time' module OryHydraClient - class ConsentRequestSession + class 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! attr_accessor :access_token @@ -45,6 +45,8 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'access_token', + :'id_token' ]) end @@ -52,13 +54,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::ConsentRequestSession` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::AcceptOAuth2ConsentRequestSession` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::ConsentRequestSession`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::AcceptOAuth2ConsentRequestSession`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -118,6 +120,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_login_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_login_request.rb similarity index 95% rename from clients/hydra/ruby/lib/ory-hydra-client/models/accept_login_request.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_login_request.rb index fb709438fbc..a4f0bed1646 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/accept_login_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/accept_o_auth2_login_request.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,7 @@ require 'time' module OryHydraClient - class AcceptLoginRequest + class 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. attr_accessor :acr @@ -68,6 +68,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'context', ]) end @@ -75,13 +76,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::AcceptLoginRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::AcceptOAuth2LoginRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::AcceptLoginRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::AcceptOAuth2LoginRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -173,6 +174,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/create_json_web_key_set.rb similarity index 87% rename from clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/create_json_web_key_set.rb index 47edcdd6b43..7ce86090ab0 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/create_json_web_key_set.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,14 +14,15 @@ require 'time' module OryHydraClient - class JsonWebKeySetGeneratorRequest - # The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" + # Create JSON Web Key Set Request Body + class CreateJsonWebKeySet + # JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. attr_accessor :alg - # The kid of the key to be created + # JSON Web Key ID The Key ID of the key to be created. attr_accessor :kid - # 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\". attr_accessor :use # Attribute mapping from ruby-style variable name to JSON key. @@ -57,13 +58,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::JsonWebKeySetGeneratorRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::CreateJsonWebKeySet` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::JsonWebKeySetGeneratorRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::CreateJsonWebKeySet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -143,6 +144,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/json_error.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/error_o_auth2.rb similarity index 87% rename from clients/hydra/ruby/lib/ory-hydra-client/models/json_error.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/error_o_auth2.rb index 7591c3b0f4f..f6f60743d34 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/json_error.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/error_o_auth2.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,18 +14,21 @@ require 'time' module OryHydraClient - # Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. - class JsonError - # Name is the error name. + # Error + class ErrorOAuth2 + # Error attr_accessor :error - # Debug contains debug information. This is usually not available and has to be enabled. + # Error Debug Information Only available in dev mode. attr_accessor :error_debug - # Description contains further information on the nature of the error. + # Error Description attr_accessor :error_description - # Code represents the error status code (404, 403, 401, ...). + # Error Hint Helps the user identify the error cause. + attr_accessor :error_hint + + # HTTP Status Code attr_accessor :status_code # Attribute mapping from ruby-style variable name to JSON key. @@ -34,6 +37,7 @@ def self.attribute_map :'error' => :'error', :'error_debug' => :'error_debug', :'error_description' => :'error_description', + :'error_hint' => :'error_hint', :'status_code' => :'status_code' } end @@ -49,6 +53,7 @@ def self.openapi_types :'error' => :'String', :'error_debug' => :'String', :'error_description' => :'String', + :'error_hint' => :'String', :'status_code' => :'Integer' } end @@ -63,13 +68,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::JsonError` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::ErrorOAuth2` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::JsonError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::ErrorOAuth2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -86,6 +91,10 @@ def initialize(attributes = {}) self.error_description = attributes[:'error_description'] end + if attributes.key?(:'error_hint') + self.error_hint = attributes[:'error_hint'] + end + if attributes.key?(:'status_code') self.status_code = attributes[:'status_code'] end @@ -112,6 +121,7 @@ def ==(o) error == o.error && error_debug == o.error_debug && error_description == o.error_description && + error_hint == o.error_hint && status_code == o.status_code end @@ -124,7 +134,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [error, error_debug, error_description, status_code].hash + [error, error_debug, error_description, error_hint, status_code].hash end # Builds the object from hash @@ -139,6 +149,7 @@ def self.build_from_hash(attributes) # @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) 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 87d2a3e9f26..2e14cb36562 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 @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -75,6 +75,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'details', ]) end @@ -183,6 +184,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/container_wait_ok_body_error.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/get_version200_response.rb similarity index 88% rename from clients/hydra/ruby/lib/ory-hydra-client/models/container_wait_ok_body_error.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/get_version200_response.rb index e933b778ce8..ce6d8d1c2e4 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/container_wait_ok_body_error.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/get_version200_response.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,14 @@ require 'time' module OryHydraClient - # ContainerWaitOKBodyError container waiting error, if any - class ContainerWaitOKBodyError - # Details of an error - attr_accessor :message + class GetVersion200Response + # The version of Ory Hydra. + attr_accessor :version # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'message' => :'Message' + :'version' => :'version' } end @@ -34,7 +33,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'message' => :'String' + :'version' => :'String' } end @@ -48,19 +47,19 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::ContainerWaitOKBodyError` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::GetVersion200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::ContainerWaitOKBodyError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::GetVersion200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'message') - self.message = attributes[:'message'] + if attributes.key?(:'version') + self.version = attributes[:'version'] end end @@ -82,7 +81,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - message == o.message + version == o.version end # @see the `==` method @@ -94,7 +93,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [message].hash + [version].hash end # Builds the object from hash @@ -109,6 +108,7 @@ def self.build_from_hash(attributes) # @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) 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 63f76319b71..71090dd5ed8 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 @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -110,6 +110,7 @@ def self.build_from_hash(attributes) # @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) 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 7b4c088e2c7..94eafb8643e 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 @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -108,6 +108,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_introspection.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/introspected_o_auth2_token.rb similarity index 93% rename from clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_introspection.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/introspected_o_auth2_token.rb index e2f2f69ab7f..dba0562f8c1 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/introspected_o_auth2_token.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,8 +14,8 @@ require 'time' module OryHydraClient - # https://tools.ietf.org/html/rfc7662 - class OAuth2TokenIntrospection + # Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) + class 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). attr_accessor :active @@ -90,7 +90,7 @@ def self.openapi_types :'aud' => :'Array', :'client_id' => :'String', :'exp' => :'Integer', - :'ext' => :'Object', + :'ext' => :'Hash', :'iat' => :'Integer', :'iss' => :'String', :'nbf' => :'Integer', @@ -113,13 +113,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2TokenIntrospection` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::IntrospectedOAuth2Token` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2TokenIntrospection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::IntrospectedOAuth2Token`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -143,7 +143,9 @@ def initialize(attributes = {}) end if attributes.key?(:'ext') - self.ext = attributes[:'ext'] + if (value = attributes[:'ext']).is_a?(Hash) + self.ext = value + end end if attributes.key?(:'iat') @@ -246,6 +248,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_network.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready200_response.rb similarity index 87% rename from clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_network.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/is_ready200_response.rb index 5b5a2e89418..e4bb7efbabc 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_network.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready200_response.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,14 @@ require 'time' module OryHydraClient - # PluginConfigNetwork plugin config network - class PluginConfigNetwork - # type - attr_accessor :type + class IsReady200Response + # Always \"ok\". + attr_accessor :status # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'type' => :'Type' + :'status' => :'status' } end @@ -34,7 +33,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'type' => :'String' + :'status' => :'String' } end @@ -48,19 +47,19 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfigNetwork` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::IsReady200Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfigNetwork`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::IsReady200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'status') + self.status = attributes[:'status'] end end @@ -68,17 +67,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @type.nil? - invalid_properties.push('invalid value for "type", type cannot be nil.') - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @type.nil? true end @@ -87,7 +81,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - type == o.type + status == o.status end # @see the `==` method @@ -99,7 +93,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type].hash + [status].hash end # Builds the object from hash @@ -114,6 +108,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_user.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready503_response.rb similarity index 86% rename from clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_user.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/is_ready503_response.rb index b06a794d3d4..bd69e977e4b 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_user.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/is_ready503_response.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,19 +14,14 @@ require 'time' module OryHydraClient - # PluginConfigUser plugin config user - class PluginConfigUser - # g ID - attr_accessor :gid - - # UID - attr_accessor :uid + class IsReady503Response + # Errors contains a list of errors that caused the not ready status. + attr_accessor :errors # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'gid' => :'GID', - :'uid' => :'UID' + :'errors' => :'errors' } end @@ -38,8 +33,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'gid' => :'Integer', - :'uid' => :'Integer' + :'errors' => :'Hash' } end @@ -53,23 +47,21 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfigUser` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::IsReady503Response` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfigUser`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::IsReady503Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'gid') - self.gid = attributes[:'gid'] - end - - if attributes.key?(:'uid') - self.uid = attributes[:'uid'] + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Hash) + self.errors = value + end end end @@ -91,8 +83,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - gid == o.gid && - uid == o.uid + errors == o.errors end # @see the `==` method @@ -104,7 +95,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [gid, uid].hash + [errors].hash end # Builds the object from hash @@ -119,6 +110,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/patch_document.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/json_patch.rb similarity index 86% rename from clients/hydra/ruby/lib/ory-hydra-client/models/patch_document.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/json_patch.rb index 43bd92501a8..e4681d883bf 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/patch_document.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/json_patch.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -15,17 +15,17 @@ module OryHydraClient # A JSONPatch document as defined by RFC 6902 - class PatchDocument - # A JSON-pointer + class 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). attr_accessor :from - # The operation to be performed + # The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". attr_accessor :op - # A JSON-pointer + # The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). attr_accessor :path - # The value to be used within the operations + # The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). attr_accessor :value # Attribute mapping from ruby-style variable name to JSON key. @@ -56,6 +56,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'value' ]) end @@ -63,13 +64,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PatchDocument` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::JsonPatch` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PatchDocument`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::JsonPatch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -149,6 +150,7 @@ def self.build_from_hash(attributes) # @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) 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 936ae3007b5..e29c76b9399 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 @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,8 +14,7 @@ require 'time' module OryHydraClient - # It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. - class JSONWebKey + class 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. attr_accessor :alg @@ -116,13 +115,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::JSONWebKey` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::JsonWebKey` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::JSONWebKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::JsonWebKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -279,6 +278,7 @@ def self.build_from_hash(attributes) # @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) 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 0cc2fec3d51..6cc14b613c1 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 @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,9 +14,9 @@ require 'time' module OryHydraClient - # It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. - class JSONWebKeySet - # The value of the \"keys\" parameter is an array of 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. + # JSON Web Key Set + class 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. attr_accessor :keys # Attribute mapping from ruby-style variable name to JSON key. @@ -34,7 +34,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'keys' => :'Array' + :'keys' => :'Array' } end @@ -48,13 +48,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::JSONWebKeySet` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::JsonWebKeySet` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::JSONWebKeySet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::JsonWebKeySet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -111,6 +111,7 @@ def self.build_from_hash(attributes) # @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) 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 8f9ba230bf8..ecf78a6ceb2 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 @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,100 +14,132 @@ require 'time' module OryHydraClient + # 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. class OAuth2Client attr_accessor :allowed_cors_origins attr_accessor :audience - # 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. + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :authorization_code_grant_access_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :authorization_code_grant_id_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :authorization_code_grant_refresh_token_lifespan + + # 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. attr_accessor :backchannel_logout_session_required - # RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + # 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. attr_accessor :backchannel_logout_uri - # ID is the id for this client. + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :client_credentials_grant_access_token_lifespan + + # OAuth 2.0 Client ID The ID is autogenerated and immutable. attr_accessor :client_id - # Name is the human-readable string name of the client to be presented to the end-user during authorization. + # OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. attr_accessor :client_name - # Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. + # 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. attr_accessor :client_secret - # SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. + # OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. attr_accessor :client_secret_expires_at - # ClientURI is an 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. + # 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. attr_accessor :client_uri attr_accessor :contacts - # CreatedAt returns the timestamp of the client's creation. + # OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. attr_accessor :created_at - # 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. + # 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. attr_accessor :frontchannel_logout_session_required - # 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. + # 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. attr_accessor :frontchannel_logout_uri attr_accessor :grant_types + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :implicit_grant_access_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :implicit_grant_id_token_lifespan + + # 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. attr_accessor :jwks - # 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. + # 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. attr_accessor :jwks_uri - # LogoURI is an URL string that references a logo for the client. + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :jwt_bearer_grant_access_token_lifespan + + # OAuth 2.0 Client Logo URI A URL string referencing the client's logo. attr_accessor :logo_uri attr_accessor :metadata - # Owner is a string identifying the owner of the OAuth 2.0 Client. + # OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. attr_accessor :owner - # 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. + # 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. attr_accessor :policy_uri attr_accessor :post_logout_redirect_uris attr_accessor :redirect_uris - # RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :refresh_token_grant_access_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :refresh_token_grant_id_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :refresh_token_grant_refresh_token_lifespan + + # 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. attr_accessor :registration_access_token - # RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + # OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. attr_accessor :registration_client_uri - # 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. + # 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. attr_accessor :request_object_signing_alg attr_accessor :request_uris attr_accessor :response_types - # 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. attr_accessor :scope - # 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. + # 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. attr_accessor :sector_identifier_uri - # SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + # 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`. attr_accessor :subject_type - # Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. + # OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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. attr_accessor :token_endpoint_auth_method - # Requested Client Authentication signing algorithm for the Token Endpoint. + # OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. attr_accessor :token_endpoint_auth_signing_alg - # TermsOfServiceURI is a URL string that points 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 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. attr_accessor :tos_uri - # UpdatedAt returns the timestamp of the last update. + # OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. attr_accessor :updated_at - # 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. + # 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. attr_accessor :userinfo_signed_response_alg # Attribute mapping from ruby-style variable name to JSON key. @@ -115,8 +147,12 @@ def self.attribute_map { :'allowed_cors_origins' => :'allowed_cors_origins', :'audience' => :'audience', + :'authorization_code_grant_access_token_lifespan' => :'authorization_code_grant_access_token_lifespan', + :'authorization_code_grant_id_token_lifespan' => :'authorization_code_grant_id_token_lifespan', + :'authorization_code_grant_refresh_token_lifespan' => :'authorization_code_grant_refresh_token_lifespan', :'backchannel_logout_session_required' => :'backchannel_logout_session_required', :'backchannel_logout_uri' => :'backchannel_logout_uri', + :'client_credentials_grant_access_token_lifespan' => :'client_credentials_grant_access_token_lifespan', :'client_id' => :'client_id', :'client_name' => :'client_name', :'client_secret' => :'client_secret', @@ -127,14 +163,20 @@ def self.attribute_map :'frontchannel_logout_session_required' => :'frontchannel_logout_session_required', :'frontchannel_logout_uri' => :'frontchannel_logout_uri', :'grant_types' => :'grant_types', + :'implicit_grant_access_token_lifespan' => :'implicit_grant_access_token_lifespan', + :'implicit_grant_id_token_lifespan' => :'implicit_grant_id_token_lifespan', :'jwks' => :'jwks', :'jwks_uri' => :'jwks_uri', + :'jwt_bearer_grant_access_token_lifespan' => :'jwt_bearer_grant_access_token_lifespan', :'logo_uri' => :'logo_uri', :'metadata' => :'metadata', :'owner' => :'owner', :'policy_uri' => :'policy_uri', :'post_logout_redirect_uris' => :'post_logout_redirect_uris', :'redirect_uris' => :'redirect_uris', + :'refresh_token_grant_access_token_lifespan' => :'refresh_token_grant_access_token_lifespan', + :'refresh_token_grant_id_token_lifespan' => :'refresh_token_grant_id_token_lifespan', + :'refresh_token_grant_refresh_token_lifespan' => :'refresh_token_grant_refresh_token_lifespan', :'registration_access_token' => :'registration_access_token', :'registration_client_uri' => :'registration_client_uri', :'request_object_signing_alg' => :'request_object_signing_alg', @@ -161,8 +203,12 @@ def self.openapi_types { :'allowed_cors_origins' => :'Array', :'audience' => :'Array', + :'authorization_code_grant_access_token_lifespan' => :'String', + :'authorization_code_grant_id_token_lifespan' => :'String', + :'authorization_code_grant_refresh_token_lifespan' => :'String', :'backchannel_logout_session_required' => :'Boolean', :'backchannel_logout_uri' => :'String', + :'client_credentials_grant_access_token_lifespan' => :'String', :'client_id' => :'String', :'client_name' => :'String', :'client_secret' => :'String', @@ -173,14 +219,20 @@ def self.openapi_types :'frontchannel_logout_session_required' => :'Boolean', :'frontchannel_logout_uri' => :'String', :'grant_types' => :'Array', + :'implicit_grant_access_token_lifespan' => :'String', + :'implicit_grant_id_token_lifespan' => :'String', :'jwks' => :'Object', :'jwks_uri' => :'String', + :'jwt_bearer_grant_access_token_lifespan' => :'String', :'logo_uri' => :'String', :'metadata' => :'Object', :'owner' => :'String', :'policy_uri' => :'String', :'post_logout_redirect_uris' => :'Array', :'redirect_uris' => :'Array', + :'refresh_token_grant_access_token_lifespan' => :'String', + :'refresh_token_grant_id_token_lifespan' => :'String', + :'refresh_token_grant_refresh_token_lifespan' => :'String', :'registration_access_token' => :'String', :'registration_client_uri' => :'String', :'request_object_signing_alg' => :'String', @@ -200,6 +252,8 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'jwks', + :'metadata', ]) end @@ -230,6 +284,18 @@ def initialize(attributes = {}) end end + if attributes.key?(:'authorization_code_grant_access_token_lifespan') + self.authorization_code_grant_access_token_lifespan = attributes[:'authorization_code_grant_access_token_lifespan'] + end + + if attributes.key?(:'authorization_code_grant_id_token_lifespan') + self.authorization_code_grant_id_token_lifespan = attributes[:'authorization_code_grant_id_token_lifespan'] + end + + if attributes.key?(:'authorization_code_grant_refresh_token_lifespan') + self.authorization_code_grant_refresh_token_lifespan = attributes[:'authorization_code_grant_refresh_token_lifespan'] + end + if attributes.key?(:'backchannel_logout_session_required') self.backchannel_logout_session_required = attributes[:'backchannel_logout_session_required'] end @@ -238,6 +304,10 @@ def initialize(attributes = {}) self.backchannel_logout_uri = attributes[:'backchannel_logout_uri'] end + if attributes.key?(:'client_credentials_grant_access_token_lifespan') + self.client_credentials_grant_access_token_lifespan = attributes[:'client_credentials_grant_access_token_lifespan'] + end + if attributes.key?(:'client_id') self.client_id = attributes[:'client_id'] end @@ -282,6 +352,14 @@ def initialize(attributes = {}) end end + if attributes.key?(:'implicit_grant_access_token_lifespan') + self.implicit_grant_access_token_lifespan = attributes[:'implicit_grant_access_token_lifespan'] + end + + if attributes.key?(:'implicit_grant_id_token_lifespan') + self.implicit_grant_id_token_lifespan = attributes[:'implicit_grant_id_token_lifespan'] + end + if attributes.key?(:'jwks') self.jwks = attributes[:'jwks'] end @@ -290,6 +368,10 @@ def initialize(attributes = {}) self.jwks_uri = attributes[:'jwks_uri'] end + if attributes.key?(:'jwt_bearer_grant_access_token_lifespan') + self.jwt_bearer_grant_access_token_lifespan = attributes[:'jwt_bearer_grant_access_token_lifespan'] + end + if attributes.key?(:'logo_uri') self.logo_uri = attributes[:'logo_uri'] end @@ -318,6 +400,18 @@ def initialize(attributes = {}) end end + if attributes.key?(:'refresh_token_grant_access_token_lifespan') + self.refresh_token_grant_access_token_lifespan = attributes[:'refresh_token_grant_access_token_lifespan'] + end + + if attributes.key?(:'refresh_token_grant_id_token_lifespan') + self.refresh_token_grant_id_token_lifespan = attributes[:'refresh_token_grant_id_token_lifespan'] + end + + if attributes.key?(:'refresh_token_grant_refresh_token_lifespan') + self.refresh_token_grant_refresh_token_lifespan = attributes[:'refresh_token_grant_refresh_token_lifespan'] + end + if attributes.key?(:'registration_access_token') self.registration_access_token = attributes[:'registration_access_token'] end @@ -379,9 +473,54 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - pattern = Regexp.new(/([a-zA-Z0-9\.\*]+\s?)+/) - if !@scope.nil? && @scope !~ pattern - invalid_properties.push("invalid value for \"scope\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"authorization_code_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"authorization_code_grant_id_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"authorization_code_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"client_credentials_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"implicit_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"implicit_grant_id_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"jwt_bearer_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"refresh_token_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"refresh_token_grant_id_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"refresh_token_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}.") end invalid_properties @@ -390,19 +529,127 @@ 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? - return false if !@scope.nil? && @scope !~ Regexp.new(/([a-zA-Z0-9\.\*]+\s?)+/) + 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))*$/) + return false if !@client_credentials_grant_access_token_lifespan.nil? && @client_credentials_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@implicit_grant_access_token_lifespan.nil? && @implicit_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@implicit_grant_id_token_lifespan.nil? && @implicit_grant_id_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@jwt_bearer_grant_access_token_lifespan.nil? && @jwt_bearer_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@refresh_token_grant_access_token_lifespan.nil? && @refresh_token_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@refresh_token_grant_id_token_lifespan.nil? && @refresh_token_grant_id_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@refresh_token_grant_refresh_token_lifespan.nil? && @refresh_token_grant_refresh_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) true end # Custom attribute writer method with validation - # @param [Object] scope Value to be assigned - def scope=(scope) - pattern = Regexp.new(/([a-zA-Z0-9\.\*]+\s?)+/) - if !scope.nil? && scope !~ pattern - fail ArgumentError, "invalid value for \"scope\", must conform to the pattern #{pattern}." + # @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) + 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 + fail ArgumentError, "invalid value for \"authorization_code_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @authorization_code_grant_access_token_lifespan = authorization_code_grant_access_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"authorization_code_grant_id_token_lifespan\", must conform to the pattern #{pattern}." + end + + @authorization_code_grant_id_token_lifespan = authorization_code_grant_id_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"authorization_code_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}." + end + + @authorization_code_grant_refresh_token_lifespan = authorization_code_grant_refresh_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"client_credentials_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @client_credentials_grant_access_token_lifespan = client_credentials_grant_access_token_lifespan + end + + # 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) + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + if !implicit_grant_access_token_lifespan.nil? && implicit_grant_access_token_lifespan !~ pattern + fail ArgumentError, "invalid value for \"implicit_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @implicit_grant_access_token_lifespan = implicit_grant_access_token_lifespan + end + + # 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) + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + if !implicit_grant_id_token_lifespan.nil? && implicit_grant_id_token_lifespan !~ pattern + fail ArgumentError, "invalid value for \"implicit_grant_id_token_lifespan\", must conform to the pattern #{pattern}." + end + + @implicit_grant_id_token_lifespan = implicit_grant_id_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"jwt_bearer_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @jwt_bearer_grant_access_token_lifespan = jwt_bearer_grant_access_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"refresh_token_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @refresh_token_grant_access_token_lifespan = refresh_token_grant_access_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"refresh_token_grant_id_token_lifespan\", must conform to the pattern #{pattern}." + end + + @refresh_token_grant_id_token_lifespan = refresh_token_grant_id_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"refresh_token_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}." end - @scope = scope + @refresh_token_grant_refresh_token_lifespan = refresh_token_grant_refresh_token_lifespan end # Checks equality by comparing each attribute. @@ -412,8 +659,12 @@ def ==(o) self.class == o.class && allowed_cors_origins == o.allowed_cors_origins && audience == o.audience && + authorization_code_grant_access_token_lifespan == o.authorization_code_grant_access_token_lifespan && + authorization_code_grant_id_token_lifespan == o.authorization_code_grant_id_token_lifespan && + authorization_code_grant_refresh_token_lifespan == o.authorization_code_grant_refresh_token_lifespan && backchannel_logout_session_required == o.backchannel_logout_session_required && backchannel_logout_uri == o.backchannel_logout_uri && + client_credentials_grant_access_token_lifespan == o.client_credentials_grant_access_token_lifespan && client_id == o.client_id && client_name == o.client_name && client_secret == o.client_secret && @@ -424,14 +675,20 @@ def ==(o) frontchannel_logout_session_required == o.frontchannel_logout_session_required && frontchannel_logout_uri == o.frontchannel_logout_uri && grant_types == o.grant_types && + implicit_grant_access_token_lifespan == o.implicit_grant_access_token_lifespan && + implicit_grant_id_token_lifespan == o.implicit_grant_id_token_lifespan && jwks == o.jwks && jwks_uri == o.jwks_uri && + jwt_bearer_grant_access_token_lifespan == o.jwt_bearer_grant_access_token_lifespan && logo_uri == o.logo_uri && metadata == o.metadata && owner == o.owner && policy_uri == o.policy_uri && post_logout_redirect_uris == o.post_logout_redirect_uris && redirect_uris == o.redirect_uris && + refresh_token_grant_access_token_lifespan == o.refresh_token_grant_access_token_lifespan && + refresh_token_grant_id_token_lifespan == o.refresh_token_grant_id_token_lifespan && + refresh_token_grant_refresh_token_lifespan == o.refresh_token_grant_refresh_token_lifespan && registration_access_token == o.registration_access_token && registration_client_uri == o.registration_client_uri && request_object_signing_alg == o.request_object_signing_alg && @@ -456,7 +713,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [allowed_cors_origins, audience, backchannel_logout_session_required, backchannel_logout_uri, client_id, client_name, client_secret, client_secret_expires_at, client_uri, contacts, created_at, frontchannel_logout_session_required, frontchannel_logout_uri, grant_types, jwks, jwks_uri, logo_uri, metadata, owner, policy_uri, post_logout_redirect_uris, redirect_uris, registration_access_token, registration_client_uri, request_object_signing_alg, request_uris, response_types, scope, sector_identifier_uri, subject_type, token_endpoint_auth_method, token_endpoint_auth_signing_alg, tos_uri, updated_at, userinfo_signed_response_alg].hash + [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, subject_type, token_endpoint_auth_method, token_endpoint_auth_signing_alg, tos_uri, updated_at, userinfo_signed_response_alg].hash end # Builds the object from hash @@ -471,6 +728,7 @@ def self.build_from_hash(attributes) # @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) 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 new file mode 100644 index 00000000000..9dae4d4e175 --- /dev/null +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_client_token_lifespans.rb @@ -0,0 +1,481 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OryHydraClient + # Lifespans of different token types issued for this OAuth 2.0 Client. + class OAuth2ClientTokenLifespans + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :authorization_code_grant_access_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :authorization_code_grant_id_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :authorization_code_grant_refresh_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :client_credentials_grant_access_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :implicit_grant_access_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :implicit_grant_id_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :jwt_bearer_grant_access_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :refresh_token_grant_access_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :refresh_token_grant_id_token_lifespan + + # Specify a time duration in milliseconds, seconds, minutes, hours. + attr_accessor :refresh_token_grant_refresh_token_lifespan + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'authorization_code_grant_access_token_lifespan' => :'authorization_code_grant_access_token_lifespan', + :'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', + :'implicit_grant_access_token_lifespan' => :'implicit_grant_access_token_lifespan', + :'implicit_grant_id_token_lifespan' => :'implicit_grant_id_token_lifespan', + :'jwt_bearer_grant_access_token_lifespan' => :'jwt_bearer_grant_access_token_lifespan', + :'refresh_token_grant_access_token_lifespan' => :'refresh_token_grant_access_token_lifespan', + :'refresh_token_grant_id_token_lifespan' => :'refresh_token_grant_id_token_lifespan', + :'refresh_token_grant_refresh_token_lifespan' => :'refresh_token_grant_refresh_token_lifespan' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'authorization_code_grant_access_token_lifespan' => :'String', + :'authorization_code_grant_id_token_lifespan' => :'String', + :'authorization_code_grant_refresh_token_lifespan' => :'String', + :'client_credentials_grant_access_token_lifespan' => :'String', + :'implicit_grant_access_token_lifespan' => :'String', + :'implicit_grant_id_token_lifespan' => :'String', + :'jwt_bearer_grant_access_token_lifespan' => :'String', + :'refresh_token_grant_access_token_lifespan' => :'String', + :'refresh_token_grant_id_token_lifespan' => :'String', + :'refresh_token_grant_refresh_token_lifespan' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2ClientTokenLifespans` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2ClientTokenLifespans`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'authorization_code_grant_access_token_lifespan') + self.authorization_code_grant_access_token_lifespan = attributes[:'authorization_code_grant_access_token_lifespan'] + end + + if attributes.key?(:'authorization_code_grant_id_token_lifespan') + self.authorization_code_grant_id_token_lifespan = attributes[:'authorization_code_grant_id_token_lifespan'] + end + + if attributes.key?(:'authorization_code_grant_refresh_token_lifespan') + self.authorization_code_grant_refresh_token_lifespan = attributes[:'authorization_code_grant_refresh_token_lifespan'] + end + + if attributes.key?(:'client_credentials_grant_access_token_lifespan') + self.client_credentials_grant_access_token_lifespan = attributes[:'client_credentials_grant_access_token_lifespan'] + end + + if attributes.key?(:'implicit_grant_access_token_lifespan') + self.implicit_grant_access_token_lifespan = attributes[:'implicit_grant_access_token_lifespan'] + end + + if attributes.key?(:'implicit_grant_id_token_lifespan') + self.implicit_grant_id_token_lifespan = attributes[:'implicit_grant_id_token_lifespan'] + end + + if attributes.key?(:'jwt_bearer_grant_access_token_lifespan') + self.jwt_bearer_grant_access_token_lifespan = attributes[:'jwt_bearer_grant_access_token_lifespan'] + end + + if attributes.key?(:'refresh_token_grant_access_token_lifespan') + self.refresh_token_grant_access_token_lifespan = attributes[:'refresh_token_grant_access_token_lifespan'] + end + + if attributes.key?(:'refresh_token_grant_id_token_lifespan') + self.refresh_token_grant_id_token_lifespan = attributes[:'refresh_token_grant_id_token_lifespan'] + end + + if attributes.key?(:'refresh_token_grant_refresh_token_lifespan') + self.refresh_token_grant_refresh_token_lifespan = attributes[:'refresh_token_grant_refresh_token_lifespan'] + 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 + 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 + invalid_properties.push("invalid value for \"authorization_code_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"authorization_code_grant_id_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"authorization_code_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"client_credentials_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"implicit_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"implicit_grant_id_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"jwt_bearer_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"refresh_token_grant_access_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"refresh_token_grant_id_token_lifespan\", must conform to the pattern #{pattern}.") + 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 + invalid_properties.push("invalid value for \"refresh_token_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}.") + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + 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))*$/) + return false if !@client_credentials_grant_access_token_lifespan.nil? && @client_credentials_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@implicit_grant_access_token_lifespan.nil? && @implicit_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@implicit_grant_id_token_lifespan.nil? && @implicit_grant_id_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@jwt_bearer_grant_access_token_lifespan.nil? && @jwt_bearer_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@refresh_token_grant_access_token_lifespan.nil? && @refresh_token_grant_access_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@refresh_token_grant_id_token_lifespan.nil? && @refresh_token_grant_id_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + return false if !@refresh_token_grant_refresh_token_lifespan.nil? && @refresh_token_grant_refresh_token_lifespan !~ Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + true + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"authorization_code_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @authorization_code_grant_access_token_lifespan = authorization_code_grant_access_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"authorization_code_grant_id_token_lifespan\", must conform to the pattern #{pattern}." + end + + @authorization_code_grant_id_token_lifespan = authorization_code_grant_id_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"authorization_code_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}." + end + + @authorization_code_grant_refresh_token_lifespan = authorization_code_grant_refresh_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"client_credentials_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @client_credentials_grant_access_token_lifespan = client_credentials_grant_access_token_lifespan + end + + # 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) + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + if !implicit_grant_access_token_lifespan.nil? && implicit_grant_access_token_lifespan !~ pattern + fail ArgumentError, "invalid value for \"implicit_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @implicit_grant_access_token_lifespan = implicit_grant_access_token_lifespan + end + + # 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) + pattern = Regexp.new(/^([0-9]+(ns|us|ms|s|m|h))*$/) + if !implicit_grant_id_token_lifespan.nil? && implicit_grant_id_token_lifespan !~ pattern + fail ArgumentError, "invalid value for \"implicit_grant_id_token_lifespan\", must conform to the pattern #{pattern}." + end + + @implicit_grant_id_token_lifespan = implicit_grant_id_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"jwt_bearer_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @jwt_bearer_grant_access_token_lifespan = jwt_bearer_grant_access_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"refresh_token_grant_access_token_lifespan\", must conform to the pattern #{pattern}." + end + + @refresh_token_grant_access_token_lifespan = refresh_token_grant_access_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"refresh_token_grant_id_token_lifespan\", must conform to the pattern #{pattern}." + end + + @refresh_token_grant_id_token_lifespan = refresh_token_grant_id_token_lifespan + end + + # 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) + 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 + fail ArgumentError, "invalid value for \"refresh_token_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}." + end + + @refresh_token_grant_refresh_token_lifespan = refresh_token_grant_refresh_token_lifespan + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authorization_code_grant_access_token_lifespan == o.authorization_code_grant_access_token_lifespan && + authorization_code_grant_id_token_lifespan == o.authorization_code_grant_id_token_lifespan && + authorization_code_grant_refresh_token_lifespan == o.authorization_code_grant_refresh_token_lifespan && + client_credentials_grant_access_token_lifespan == o.client_credentials_grant_access_token_lifespan && + implicit_grant_access_token_lifespan == o.implicit_grant_access_token_lifespan && + implicit_grant_id_token_lifespan == o.implicit_grant_id_token_lifespan && + jwt_bearer_grant_access_token_lifespan == o.jwt_bearer_grant_access_token_lifespan && + refresh_token_grant_access_token_lifespan == o.refresh_token_grant_access_token_lifespan && + refresh_token_grant_id_token_lifespan == o.refresh_token_grant_id_token_lifespan && + refresh_token_grant_refresh_token_lifespan == o.refresh_token_grant_refresh_token_lifespan + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [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].hash + end + + # Builds the object from 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) + 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) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + 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) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + 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) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/consent_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request.rb similarity index 95% rename from clients/hydra/ruby/lib/ory-hydra-client/models/consent_request.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request.rb index 3230a5173f6..6df1fc7e041 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/consent_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,7 @@ require 'time' module OryHydraClient - class ConsentRequest + class 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. attr_accessor :acr @@ -82,7 +82,7 @@ def self.openapi_types :'context' => :'Object', :'login_challenge' => :'String', :'login_session_id' => :'String', - :'oidc_context' => :'OpenIDConnectContext', + :'oidc_context' => :'OAuth2ConsentRequestOpenIDConnectContext', :'request_url' => :'String', :'requested_access_token_audience' => :'Array', :'requested_scope' => :'Array', @@ -94,6 +94,7 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'context', ]) end @@ -101,13 +102,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::ConsentRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2ConsentRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::ConsentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2ConsentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -233,6 +234,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/open_id_connect_context.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request_open_id_connect_context.rb similarity index 93% rename from clients/hydra/ruby/lib/ory-hydra-client/models/open_id_connect_context.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request_open_id_connect_context.rb index c21db7399d2..67dc2aeb2f6 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/open_id_connect_context.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_request_open_id_connect_context.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,7 @@ require 'time' module OryHydraClient - class OpenIDConnectContext + class 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. attr_accessor :acr_values @@ -51,7 +51,7 @@ def self.openapi_types { :'acr_values' => :'Array', :'display' => :'String', - :'id_token_hint_claims' => :'Object', + :'id_token_hint_claims' => :'Hash', :'login_hint' => :'String', :'ui_locales' => :'Array' } @@ -67,13 +67,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OpenIDConnectContext` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OpenIDConnectContext`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -89,7 +89,9 @@ def initialize(attributes = {}) end if attributes.key?(:'id_token_hint_claims') - self.id_token_hint_claims = attributes[:'id_token_hint_claims'] + if (value = attributes[:'id_token_hint_claims']).is_a?(Hash) + self.id_token_hint_claims = value + end end if attributes.key?(:'login_hint') @@ -152,6 +154,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/previous_consent_session.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session.rb similarity index 84% rename from clients/hydra/ruby/lib/ory-hydra-client/models/previous_consent_session.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session.rb index 1a8b3cf24e3..c5f2a414010 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/previous_consent_session.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,20 +14,22 @@ require 'time' module OryHydraClient - # The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - class PreviousConsentSession + # A completed OAuth 2.0 Consent Session. + class OAuth2ConsentSession attr_accessor :consent_request + attr_accessor :expires_at + attr_accessor :grant_access_token_audience attr_accessor :grant_scope attr_accessor :handled_at - # 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 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. attr_accessor :remember - # RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. + # 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. attr_accessor :remember_for attr_accessor :session @@ -36,6 +38,7 @@ class PreviousConsentSession def self.attribute_map { :'consent_request' => :'consent_request', + :'expires_at' => :'expires_at', :'grant_access_token_audience' => :'grant_access_token_audience', :'grant_scope' => :'grant_scope', :'handled_at' => :'handled_at', @@ -53,13 +56,14 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'consent_request' => :'ConsentRequest', + :'consent_request' => :'OAuth2ConsentRequest', + :'expires_at' => :'OAuth2ConsentSessionExpiresAt', :'grant_access_token_audience' => :'Array', :'grant_scope' => :'Array', :'handled_at' => :'Time', :'remember' => :'Boolean', :'remember_for' => :'Integer', - :'session' => :'ConsentRequestSession' + :'session' => :'AcceptOAuth2ConsentRequestSession' } end @@ -73,13 +77,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PreviousConsentSession` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2ConsentSession` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PreviousConsentSession`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2ConsentSession`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -88,6 +92,10 @@ def initialize(attributes = {}) self.consent_request = attributes[:'consent_request'] end + if attributes.key?(:'expires_at') + self.expires_at = attributes[:'expires_at'] + end + if attributes.key?(:'grant_access_token_audience') if (value = attributes[:'grant_access_token_audience']).is_a?(Array) self.grant_access_token_audience = value @@ -136,6 +144,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && consent_request == o.consent_request && + expires_at == o.expires_at && grant_access_token_audience == o.grant_access_token_audience && grant_scope == o.grant_scope && handled_at == o.handled_at && @@ -153,7 +162,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [consent_request, grant_access_token_audience, grant_scope, handled_at, remember, remember_for, session].hash + [consent_request, expires_at, grant_access_token_audience, grant_scope, handled_at, remember, remember_for, session].hash end # Builds the object from hash @@ -168,6 +177,7 @@ def self.build_from_hash(attributes) # @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) 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 new file mode 100644 index 00000000000..89438635e79 --- /dev/null +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_consent_session_expires_at.rb @@ -0,0 +1,255 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OryHydraClient + class OAuth2ConsentSessionExpiresAt + attr_accessor :access_token + + attr_accessor :authorize_code + + attr_accessor :id_token + + attr_accessor :par_context + + attr_accessor :refresh_token + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'access_token' => :'access_token', + :'authorize_code' => :'authorize_code', + :'id_token' => :'id_token', + :'par_context' => :'par_context', + :'refresh_token' => :'refresh_token' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'access_token' => :'Time', + :'authorize_code' => :'Time', + :'id_token' => :'Time', + :'par_context' => :'Time', + :'refresh_token' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2ConsentSessionExpiresAt` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2ConsentSessionExpiresAt`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'access_token') + self.access_token = attributes[:'access_token'] + end + + if attributes.key?(:'authorize_code') + self.authorize_code = attributes[:'authorize_code'] + end + + if attributes.key?(:'id_token') + self.id_token = attributes[:'id_token'] + end + + if attributes.key?(:'par_context') + self.par_context = attributes[:'par_context'] + end + + if attributes.key?(:'refresh_token') + self.refresh_token = attributes[:'refresh_token'] + 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 + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + access_token == o.access_token && + authorize_code == o.authorize_code && + id_token == o.id_token && + par_context == o.par_context && + refresh_token == o.refresh_token + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [access_token, authorize_code, id_token, par_context, refresh_token].hash + end + + # Builds the object from 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) + 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) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + 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) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + 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) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/login_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_login_request.rb similarity index 95% rename from clients/hydra/ruby/lib/ory-hydra-client/models/login_request.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_login_request.rb index 3d418dbf923..85384e976c1 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/login_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_login_request.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,7 @@ require 'time' module OryHydraClient - class LoginRequest + class OAuth2LoginRequest # ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. attr_accessor :challenge @@ -63,7 +63,7 @@ def self.openapi_types { :'challenge' => :'String', :'client' => :'OAuth2Client', - :'oidc_context' => :'OpenIDConnectContext', + :'oidc_context' => :'OAuth2ConsentRequestOpenIDConnectContext', :'request_url' => :'String', :'requested_access_token_audience' => :'Array', :'requested_scope' => :'Array', @@ -83,13 +83,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::LoginRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2LoginRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::LoginRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2LoginRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -223,6 +223,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/logout_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_logout_request.rb similarity index 94% rename from clients/hydra/ruby/lib/ory-hydra-client/models/logout_request.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_logout_request.rb index b2eacf259b1..9410f8e68c9 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/logout_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_logout_request.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,7 @@ require 'time' module OryHydraClient - class LogoutRequest + class OAuth2LogoutRequest # Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. attr_accessor :challenge @@ -71,13 +71,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::LogoutRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2LogoutRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::LogoutRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2LogoutRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -157,6 +157,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/completed_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_redirect_to.rb similarity index 91% rename from clients/hydra/ruby/lib/ory-hydra-client/models/completed_request.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_redirect_to.rb index 45cb7d1cf4f..8049da172dc 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/completed_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_redirect_to.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,8 +14,9 @@ require 'time' module OryHydraClient - class CompletedRequest - # RedirectURL is the URL which you should redirect the user to once the authentication process is completed. + # Contains a redirect URL used to complete a login, consent, or logout request. + class OAuth2RedirectTo + # RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. attr_accessor :redirect_to # Attribute mapping from ruby-style variable name to JSON key. @@ -47,13 +48,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::CompletedRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2RedirectTo` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::CompletedRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2RedirectTo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -113,6 +114,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/oauth2_token_response.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_exchange.rb similarity index 88% rename from clients/hydra/ruby/lib/ory-hydra-client/models/oauth2_token_response.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_exchange.rb index 59c79cdc3aa..ca0390be454 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/oauth2_token_response.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/o_auth2_token_exchange.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,18 +14,24 @@ require 'time' module OryHydraClient - # The Access Token Response - class Oauth2TokenResponse + # OAuth2 Token Exchange Result + class OAuth2TokenExchange + # The access token issued by the authorization server. attr_accessor :access_token + # 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. attr_accessor :expires_in + # To retrieve a refresh token request the id_token scope. attr_accessor :id_token + # The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. attr_accessor :refresh_token + # The scope of the access token attr_accessor :scope + # The type of the token issued attr_accessor :token_type # Attribute mapping from ruby-style variable name to JSON key. @@ -50,9 +56,9 @@ def self.openapi_types { :'access_token' => :'String', :'expires_in' => :'Integer', - :'id_token' => :'String', + :'id_token' => :'Integer', :'refresh_token' => :'String', - :'scope' => :'String', + :'scope' => :'Integer', :'token_type' => :'String' } end @@ -67,13 +73,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::Oauth2TokenResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OAuth2TokenExchange` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::Oauth2TokenResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OAuth2TokenExchange`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -153,6 +159,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/well_known.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_configuration.rb similarity index 68% rename from clients/hydra/ruby/lib/ory-hydra-client/models/well_known.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/oidc_configuration.rb index 6c6282ce5ff..7592dfe8e20 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/well_known.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_configuration.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,87 +14,93 @@ require 'time' module OryHydraClient - # It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. - class WellKnown - # URL of the OP's OAuth 2.0 Authorization Endpoint. + # Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. + class OidcConfiguration + # OAuth 2.0 Authorization Endpoint URL attr_accessor :authorization_endpoint - # 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 + # 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 attr_accessor :backchannel_logout_session_supported - # Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + # OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. attr_accessor :backchannel_logout_supported - # Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + # OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. attr_accessor :claims_parameter_supported - # 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. + # 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. attr_accessor :claims_supported - # JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. + # 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. attr_accessor :code_challenge_methods_supported - # URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + # 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. attr_accessor :end_session_endpoint - # 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. + # 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. attr_accessor :frontchannel_logout_session_supported - # Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + # OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. attr_accessor :frontchannel_logout_supported - # JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + # OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. attr_accessor :grant_types_supported - # 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 Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. + attr_accessor :id_token_signed_response_alg + + # 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. attr_accessor :id_token_signing_alg_values_supported - # 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. attr_accessor :issuer - # 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. attr_accessor :jwks_uri - # URL of the OP's Dynamic Client Registration Endpoint. + # OpenID Connect Dynamic Client Registration Endpoint URL attr_accessor :registration_endpoint - # 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). + # 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). attr_accessor :request_object_signing_alg_values_supported - # Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + # OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. attr_accessor :request_parameter_supported - # Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + # OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. attr_accessor :request_uri_parameter_supported - # Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. + # 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. attr_accessor :require_request_uri_registration - # JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + # OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. attr_accessor :response_modes_supported - # 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. attr_accessor :response_types_supported - # URL of the authorization server's OAuth 2.0 revocation endpoint. + # OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. attr_accessor :revocation_endpoint - # SON 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 + # 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 attr_accessor :scopes_supported - # 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. attr_accessor :subject_types_supported - # URL of the OP's OAuth 2.0 Token Endpoint + # OAuth 2.0 Token Endpoint URL attr_accessor :token_endpoint - # 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 + # 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 attr_accessor :token_endpoint_auth_methods_supported - # URL of the OP's UserInfo Endpoint. + # OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. attr_accessor :userinfo_endpoint - # 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]. + # OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. + attr_accessor :userinfo_signed_response_alg + + # 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]. attr_accessor :userinfo_signing_alg_values_supported # Attribute mapping from ruby-style variable name to JSON key. @@ -110,6 +116,7 @@ def self.attribute_map :'frontchannel_logout_session_supported' => :'frontchannel_logout_session_supported', :'frontchannel_logout_supported' => :'frontchannel_logout_supported', :'grant_types_supported' => :'grant_types_supported', + :'id_token_signed_response_alg' => :'id_token_signed_response_alg', :'id_token_signing_alg_values_supported' => :'id_token_signing_alg_values_supported', :'issuer' => :'issuer', :'jwks_uri' => :'jwks_uri', @@ -126,6 +133,7 @@ def self.attribute_map :'token_endpoint' => :'token_endpoint', :'token_endpoint_auth_methods_supported' => :'token_endpoint_auth_methods_supported', :'userinfo_endpoint' => :'userinfo_endpoint', + :'userinfo_signed_response_alg' => :'userinfo_signed_response_alg', :'userinfo_signing_alg_values_supported' => :'userinfo_signing_alg_values_supported' } end @@ -148,6 +156,7 @@ def self.openapi_types :'frontchannel_logout_session_supported' => :'Boolean', :'frontchannel_logout_supported' => :'Boolean', :'grant_types_supported' => :'Array', + :'id_token_signed_response_alg' => :'Array', :'id_token_signing_alg_values_supported' => :'Array', :'issuer' => :'String', :'jwks_uri' => :'String', @@ -164,6 +173,7 @@ def self.openapi_types :'token_endpoint' => :'String', :'token_endpoint_auth_methods_supported' => :'Array', :'userinfo_endpoint' => :'String', + :'userinfo_signed_response_alg' => :'Array', :'userinfo_signing_alg_values_supported' => :'Array' } end @@ -178,13 +188,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::WellKnown` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OidcConfiguration` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::WellKnown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OidcConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -235,6 +245,12 @@ def initialize(attributes = {}) end end + if attributes.key?(:'id_token_signed_response_alg') + if (value = attributes[:'id_token_signed_response_alg']).is_a?(Array) + self.id_token_signed_response_alg = value + end + 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 @@ -313,6 +329,12 @@ def initialize(attributes = {}) self.userinfo_endpoint = attributes[:'userinfo_endpoint'] end + if attributes.key?(:'userinfo_signed_response_alg') + if (value = attributes[:'userinfo_signed_response_alg']).is_a?(Array) + self.userinfo_signed_response_alg = value + end + end + if attributes.key?(:'userinfo_signing_alg_values_supported') if (value = attributes[:'userinfo_signing_alg_values_supported']).is_a?(Array) self.userinfo_signing_alg_values_supported = value @@ -328,6 +350,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "authorization_endpoint", authorization_endpoint cannot be nil.') end + if @id_token_signed_response_alg.nil? + invalid_properties.push('invalid value for "id_token_signed_response_alg", id_token_signed_response_alg cannot be nil.') + end + if @id_token_signing_alg_values_supported.nil? invalid_properties.push('invalid value for "id_token_signing_alg_values_supported", id_token_signing_alg_values_supported cannot be nil.') end @@ -352,6 +378,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "token_endpoint", token_endpoint cannot be nil.') end + if @userinfo_signed_response_alg.nil? + invalid_properties.push('invalid value for "userinfo_signed_response_alg", userinfo_signed_response_alg cannot be nil.') + end + invalid_properties end @@ -359,12 +389,14 @@ def list_invalid_properties # @return true if the model is valid def valid? 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? return false if @issuer.nil? return false if @jwks_uri.nil? return false if @response_types_supported.nil? return false if @subject_types_supported.nil? return false if @token_endpoint.nil? + return false if @userinfo_signed_response_alg.nil? true end @@ -383,6 +415,7 @@ def ==(o) frontchannel_logout_session_supported == o.frontchannel_logout_session_supported && frontchannel_logout_supported == o.frontchannel_logout_supported && grant_types_supported == o.grant_types_supported && + id_token_signed_response_alg == o.id_token_signed_response_alg && id_token_signing_alg_values_supported == o.id_token_signing_alg_values_supported && issuer == o.issuer && jwks_uri == o.jwks_uri && @@ -399,6 +432,7 @@ def ==(o) token_endpoint == o.token_endpoint && token_endpoint_auth_methods_supported == o.token_endpoint_auth_methods_supported && userinfo_endpoint == o.userinfo_endpoint && + userinfo_signed_response_alg == o.userinfo_signed_response_alg && userinfo_signing_alg_values_supported == o.userinfo_signing_alg_values_supported end @@ -411,7 +445,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [authorization_endpoint, backchannel_logout_session_supported, backchannel_logout_supported, claims_parameter_supported, claims_supported, code_challenge_methods_supported, end_session_endpoint, frontchannel_logout_session_supported, frontchannel_logout_supported, grant_types_supported, 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_signing_alg_values_supported].hash + [authorization_endpoint, backchannel_logout_session_supported, backchannel_logout_supported, claims_parameter_supported, claims_supported, code_challenge_methods_supported, 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].hash end # Builds the object from hash @@ -426,6 +460,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/userinfo_response.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_user_info.rb similarity index 97% rename from clients/hydra/ruby/lib/ory-hydra-client/models/userinfo_response.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/oidc_user_info.rb index a8ae2f6f06c..8d4c9bc3487 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/userinfo_response.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/oidc_user_info.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,8 +14,8 @@ require 'time' module OryHydraClient - # The userinfo response - class UserinfoResponse + # OpenID Connect Userinfo + class 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. attr_accessor :birthdate @@ -138,13 +138,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::UserinfoResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::OidcUserInfo` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::UserinfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::OidcUserInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -289,6 +289,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_settings.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/pagination.rb similarity index 70% rename from clients/hydra/ruby/lib/ory-hydra-client/models/plugin_settings.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/pagination.rb index b99dc2e9025..e97fe3d3d99 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_settings.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/pagination.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,26 +14,18 @@ require 'time' module OryHydraClient - class PluginSettings - # args - attr_accessor :args - - # devices - attr_accessor :devices + class 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). + attr_accessor :page_size - # env - attr_accessor :env - - # mounts - attr_accessor :mounts + # 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). + attr_accessor :page_token # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'args' => :'Args', - :'devices' => :'Devices', - :'env' => :'Env', - :'mounts' => :'Mounts' + :'page_size' => :'page_size', + :'page_token' => :'page_token' } end @@ -45,10 +37,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'args' => :'Array', - :'devices' => :'Array', - :'env' => :'Array', - :'mounts' => :'Array' + :'page_size' => :'Integer', + :'page_token' => :'String' } end @@ -62,39 +52,27 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginSettings` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::Pagination` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginSettings`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::Pagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'args') - if (value = attributes[:'args']).is_a?(Array) - self.args = value - end - end - - if attributes.key?(:'devices') - if (value = attributes[:'devices']).is_a?(Array) - self.devices = value - end - end - - if attributes.key?(:'env') - if (value = attributes[:'env']).is_a?(Array) - self.env = value - end + if attributes.key?(:'page_size') + self.page_size = attributes[:'page_size'] + else + self.page_size = 250 end - if attributes.key?(:'mounts') - if (value = attributes[:'mounts']).is_a?(Array) - self.mounts = value - end + if attributes.key?(:'page_token') + self.page_token = attributes[:'page_token'] + else + self.page_token = '1' end end @@ -102,20 +80,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @args.nil? - invalid_properties.push('invalid value for "args", args cannot be nil.') + if !@page_size.nil? && @page_size > 1000 + invalid_properties.push('invalid value for "page_size", must be smaller than or equal to 1000.') end - if @devices.nil? - invalid_properties.push('invalid value for "devices", devices cannot be nil.') - end - - if @env.nil? - invalid_properties.push('invalid value for "env", env cannot be nil.') - end - - if @mounts.nil? - invalid_properties.push('invalid value for "mounts", mounts cannot be nil.') + if !@page_size.nil? && @page_size < 1 + invalid_properties.push('invalid value for "page_size", must be greater than or equal to 1.') end invalid_properties @@ -124,22 +94,38 @@ 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? - return false if @args.nil? - return false if @devices.nil? - return false if @env.nil? - return false if @mounts.nil? + return false if !@page_size.nil? && @page_size > 1000 + return false if !@page_size.nil? && @page_size < 1 true end + # 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 + fail ArgumentError, 'invalid value for "page_size", must be smaller than or equal to 1000.' + end + + if !page_size.nil? && page_size < 1 + fail ArgumentError, 'invalid value for "page_size", must be greater than or equal to 1.' + end + + @page_size = page_size + end + + # Custom attribute writer method with validation + # @param [Object] page_token Value to be assigned + def page_token=(page_token) + @page_token = page_token + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - args == o.args && - devices == o.devices && - env == o.env && - mounts == o.mounts + page_size == o.page_size && + page_token == o.page_token end # @see the `==` method @@ -151,7 +137,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [args, devices, env, mounts].hash + [page_size, page_token].hash end # Builds the object from hash @@ -166,6 +152,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_rootfs.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/pagination_headers.rb similarity index 83% rename from clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_rootfs.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/pagination_headers.rb index 45dca32a0d9..d93547f0645 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_rootfs.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/pagination_headers.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,19 +14,18 @@ require 'time' module OryHydraClient - # PluginConfigRootfs plugin config rootfs - class PluginConfigRootfs - # diff ids - attr_accessor :diff_ids + class 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 + attr_accessor :link - # type - attr_accessor :type + # The total number of clients. in: header + attr_accessor :x_total_count # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'diff_ids' => :'diff_ids', - :'type' => :'type' + :'link' => :'link', + :'x_total_count' => :'x-total-count' } end @@ -38,8 +37,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'diff_ids' => :'Array', - :'type' => :'String' + :'link' => :'String', + :'x_total_count' => :'String' } end @@ -53,25 +52,23 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfigRootfs` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PaginationHeaders` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfigRootfs`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PaginationHeaders`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'diff_ids') - if (value = attributes[:'diff_ids']).is_a?(Array) - self.diff_ids = value - end + if attributes.key?(:'link') + self.link = attributes[:'link'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'x_total_count') + self.x_total_count = attributes[:'x_total_count'] end end @@ -93,8 +90,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - diff_ids == o.diff_ids && - type == o.type + link == o.link && + x_total_count == o.x_total_count end # @see the `==` method @@ -106,7 +103,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [diff_ids, type].hash + [link, x_total_count].hash end # Builds the object from hash @@ -121,6 +118,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config.rb deleted file mode 100644 index 67d4d155c07..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config.rb +++ /dev/null @@ -1,434 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - class PluginConfig - attr_accessor :args - - # description - attr_accessor :description - - # Docker Version used to create the plugin - attr_accessor :docker_version - - # documentation - attr_accessor :documentation - - # entrypoint - attr_accessor :entrypoint - - # env - attr_accessor :env - - attr_accessor :interface - - # ipc host - attr_accessor :ipc_host - - attr_accessor :linux - - # mounts - attr_accessor :mounts - - attr_accessor :network - - # pid host - attr_accessor :pid_host - - # propagated mount - attr_accessor :propagated_mount - - attr_accessor :user - - # work dir - attr_accessor :work_dir - - attr_accessor :rootfs - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'args' => :'Args', - :'description' => :'Description', - :'docker_version' => :'DockerVersion', - :'documentation' => :'Documentation', - :'entrypoint' => :'Entrypoint', - :'env' => :'Env', - :'interface' => :'Interface', - :'ipc_host' => :'IpcHost', - :'linux' => :'Linux', - :'mounts' => :'Mounts', - :'network' => :'Network', - :'pid_host' => :'PidHost', - :'propagated_mount' => :'PropagatedMount', - :'user' => :'User', - :'work_dir' => :'WorkDir', - :'rootfs' => :'rootfs' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'args' => :'PluginConfigArgs', - :'description' => :'String', - :'docker_version' => :'String', - :'documentation' => :'String', - :'entrypoint' => :'Array', - :'env' => :'Array', - :'interface' => :'PluginConfigInterface', - :'ipc_host' => :'Boolean', - :'linux' => :'PluginConfigLinux', - :'mounts' => :'Array', - :'network' => :'PluginConfigNetwork', - :'pid_host' => :'Boolean', - :'propagated_mount' => :'String', - :'user' => :'PluginConfigUser', - :'work_dir' => :'String', - :'rootfs' => :'PluginConfigRootfs' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfig` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'args') - self.args = attributes[:'args'] - end - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'docker_version') - self.docker_version = attributes[:'docker_version'] - end - - if attributes.key?(:'documentation') - self.documentation = attributes[:'documentation'] - end - - if attributes.key?(:'entrypoint') - if (value = attributes[:'entrypoint']).is_a?(Array) - self.entrypoint = value - end - end - - if attributes.key?(:'env') - if (value = attributes[:'env']).is_a?(Array) - self.env = value - end - end - - if attributes.key?(:'interface') - self.interface = attributes[:'interface'] - end - - if attributes.key?(:'ipc_host') - self.ipc_host = attributes[:'ipc_host'] - end - - if attributes.key?(:'linux') - self.linux = attributes[:'linux'] - end - - if attributes.key?(:'mounts') - if (value = attributes[:'mounts']).is_a?(Array) - self.mounts = value - end - end - - if attributes.key?(:'network') - self.network = attributes[:'network'] - end - - if attributes.key?(:'pid_host') - self.pid_host = attributes[:'pid_host'] - end - - if attributes.key?(:'propagated_mount') - self.propagated_mount = attributes[:'propagated_mount'] - end - - if attributes.key?(:'user') - self.user = attributes[:'user'] - end - - if attributes.key?(:'work_dir') - self.work_dir = attributes[:'work_dir'] - end - - if attributes.key?(:'rootfs') - self.rootfs = attributes[:'rootfs'] - 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 - invalid_properties = Array.new - if @args.nil? - invalid_properties.push('invalid value for "args", args cannot be nil.') - end - - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @documentation.nil? - invalid_properties.push('invalid value for "documentation", documentation cannot be nil.') - end - - if @entrypoint.nil? - invalid_properties.push('invalid value for "entrypoint", entrypoint cannot be nil.') - end - - if @env.nil? - invalid_properties.push('invalid value for "env", env cannot be nil.') - end - - if @interface.nil? - invalid_properties.push('invalid value for "interface", interface cannot be nil.') - end - - if @ipc_host.nil? - invalid_properties.push('invalid value for "ipc_host", ipc_host cannot be nil.') - end - - if @linux.nil? - invalid_properties.push('invalid value for "linux", linux cannot be nil.') - end - - if @mounts.nil? - invalid_properties.push('invalid value for "mounts", mounts cannot be nil.') - end - - if @network.nil? - invalid_properties.push('invalid value for "network", network cannot be nil.') - end - - if @pid_host.nil? - invalid_properties.push('invalid value for "pid_host", pid_host cannot be nil.') - end - - if @propagated_mount.nil? - invalid_properties.push('invalid value for "propagated_mount", propagated_mount cannot be nil.') - end - - if @work_dir.nil? - invalid_properties.push('invalid value for "work_dir", work_dir cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @args.nil? - return false if @description.nil? - return false if @documentation.nil? - return false if @entrypoint.nil? - return false if @env.nil? - return false if @interface.nil? - return false if @ipc_host.nil? - return false if @linux.nil? - return false if @mounts.nil? - return false if @network.nil? - return false if @pid_host.nil? - return false if @propagated_mount.nil? - return false if @work_dir.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - args == o.args && - description == o.description && - docker_version == o.docker_version && - documentation == o.documentation && - entrypoint == o.entrypoint && - env == o.env && - interface == o.interface && - ipc_host == o.ipc_host && - linux == o.linux && - mounts == o.mounts && - network == o.network && - pid_host == o.pid_host && - propagated_mount == o.propagated_mount && - user == o.user && - work_dir == o.work_dir && - rootfs == o.rootfs - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [args, description, docker_version, documentation, entrypoint, env, interface, ipc_host, linux, mounts, network, pid_host, propagated_mount, user, work_dir, rootfs].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_args.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_args.rb deleted file mode 100644 index 4f3d0755a3a..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_args.rb +++ /dev/null @@ -1,274 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - # PluginConfigArgs plugin config args - class PluginConfigArgs - # description - attr_accessor :description - - # name - attr_accessor :name - - # settable - attr_accessor :settable - - # value - attr_accessor :value - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'description' => :'Description', - :'name' => :'Name', - :'settable' => :'Settable', - :'value' => :'Value' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'description' => :'String', - :'name' => :'String', - :'settable' => :'Array', - :'value' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfigArgs` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfigArgs`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'settable') - if (value = attributes[:'settable']).is_a?(Array) - self.settable = value - end - end - - if attributes.key?(:'value') - if (value = attributes[:'value']).is_a?(Array) - self.value = value - end - 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 - invalid_properties = Array.new - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - if @settable.nil? - invalid_properties.push('invalid value for "settable", settable cannot be nil.') - end - - if @value.nil? - invalid_properties.push('invalid value for "value", value cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @description.nil? - return false if @name.nil? - return false if @settable.nil? - return false if @value.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - description == o.description && - name == o.name && - settable == o.settable && - value == o.value - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [description, name, settable, value].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_interface.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_interface.rb deleted file mode 100644 index 587f80460ac..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_interface.rb +++ /dev/null @@ -1,252 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - # PluginConfigInterface The interface between Docker and the plugin - class PluginConfigInterface - # Protocol to use for clients connecting to the plugin. - attr_accessor :protocol_scheme - - # socket - attr_accessor :socket - - # types - attr_accessor :types - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'protocol_scheme' => :'ProtocolScheme', - :'socket' => :'Socket', - :'types' => :'Types' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'protocol_scheme' => :'String', - :'socket' => :'String', - :'types' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfigInterface` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfigInterface`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'protocol_scheme') - self.protocol_scheme = attributes[:'protocol_scheme'] - end - - if attributes.key?(:'socket') - self.socket = attributes[:'socket'] - end - - if attributes.key?(:'types') - if (value = attributes[:'types']).is_a?(Array) - self.types = value - end - 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 - invalid_properties = Array.new - if @socket.nil? - invalid_properties.push('invalid value for "socket", socket cannot be nil.') - end - - if @types.nil? - invalid_properties.push('invalid value for "types", types cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @socket.nil? - return false if @types.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - protocol_scheme == o.protocol_scheme && - socket == o.socket && - types == o.types - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [protocol_scheme, socket, types].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_linux.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_linux.rb deleted file mode 100644 index 5012225a04d..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_config_linux.rb +++ /dev/null @@ -1,259 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - # PluginConfigLinux plugin config linux - class PluginConfigLinux - # allow all devices - attr_accessor :allow_all_devices - - # capabilities - attr_accessor :capabilities - - # devices - attr_accessor :devices - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'allow_all_devices' => :'AllowAllDevices', - :'capabilities' => :'Capabilities', - :'devices' => :'Devices' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'allow_all_devices' => :'Boolean', - :'capabilities' => :'Array', - :'devices' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginConfigLinux` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginConfigLinux`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'allow_all_devices') - self.allow_all_devices = attributes[:'allow_all_devices'] - end - - if attributes.key?(:'capabilities') - if (value = attributes[:'capabilities']).is_a?(Array) - self.capabilities = value - end - end - - if attributes.key?(:'devices') - if (value = attributes[:'devices']).is_a?(Array) - self.devices = value - end - 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 - invalid_properties = Array.new - if @allow_all_devices.nil? - invalid_properties.push('invalid value for "allow_all_devices", allow_all_devices cannot be nil.') - end - - if @capabilities.nil? - invalid_properties.push('invalid value for "capabilities", capabilities cannot be nil.') - end - - if @devices.nil? - invalid_properties.push('invalid value for "devices", devices cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @allow_all_devices.nil? - return false if @capabilities.nil? - return false if @devices.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - allow_all_devices == o.allow_all_devices && - capabilities == o.capabilities && - devices == o.devices - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [allow_all_devices, capabilities, devices].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_device.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_device.rb deleted file mode 100644 index 765ddb934f4..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_device.rb +++ /dev/null @@ -1,272 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - # PluginDevice plugin device - class PluginDevice - # description - attr_accessor :description - - # name - attr_accessor :name - - # path - attr_accessor :path - - # settable - attr_accessor :settable - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'description' => :'Description', - :'name' => :'Name', - :'path' => :'Path', - :'settable' => :'Settable' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'description' => :'String', - :'name' => :'String', - :'path' => :'String', - :'settable' => :'Array' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginDevice` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginDevice`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'path') - self.path = attributes[:'path'] - end - - if attributes.key?(:'settable') - if (value = attributes[:'settable']).is_a?(Array) - self.settable = value - end - 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 - invalid_properties = Array.new - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - if @path.nil? - invalid_properties.push('invalid value for "path", path cannot be nil.') - end - - if @settable.nil? - invalid_properties.push('invalid value for "settable", settable cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @description.nil? - return false if @name.nil? - return false if @path.nil? - return false if @settable.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - description == o.description && - name == o.name && - path == o.path && - settable == o.settable - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [description, name, path, settable].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_env.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_env.rb deleted file mode 100644 index c78ee78ae85..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_env.rb +++ /dev/null @@ -1,272 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - # PluginEnv plugin env - class PluginEnv - # description - attr_accessor :description - - # name - attr_accessor :name - - # settable - attr_accessor :settable - - # value - attr_accessor :value - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'description' => :'Description', - :'name' => :'Name', - :'settable' => :'Settable', - :'value' => :'Value' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'description' => :'String', - :'name' => :'String', - :'settable' => :'Array', - :'value' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginEnv` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginEnv`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'settable') - if (value = attributes[:'settable']).is_a?(Array) - self.settable = value - end - end - - if attributes.key?(:'value') - self.value = attributes[:'value'] - 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 - invalid_properties = Array.new - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - if @settable.nil? - invalid_properties.push('invalid value for "settable", settable cannot be nil.') - end - - if @value.nil? - invalid_properties.push('invalid value for "value", value cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @description.nil? - return false if @name.nil? - return false if @settable.nil? - return false if @value.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - description == o.description && - name == o.name && - settable == o.settable && - value == o.value - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [description, name, settable, value].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_interface_type.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_interface_type.rb deleted file mode 100644 index 332b2ded728..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_interface_type.rb +++ /dev/null @@ -1,255 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - # PluginInterfaceType plugin interface type - class PluginInterfaceType - # capability - attr_accessor :capability - - # prefix - attr_accessor :prefix - - # version - attr_accessor :version - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'capability' => :'Capability', - :'prefix' => :'Prefix', - :'version' => :'Version' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'capability' => :'String', - :'prefix' => :'String', - :'version' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginInterfaceType` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginInterfaceType`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'capability') - self.capability = attributes[:'capability'] - end - - if attributes.key?(:'prefix') - self.prefix = attributes[:'prefix'] - end - - if attributes.key?(:'version') - self.version = attributes[:'version'] - 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 - invalid_properties = Array.new - if @capability.nil? - invalid_properties.push('invalid value for "capability", capability cannot be nil.') - end - - if @prefix.nil? - invalid_properties.push('invalid value for "prefix", prefix cannot be nil.') - end - - if @version.nil? - invalid_properties.push('invalid value for "version", version cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @capability.nil? - return false if @prefix.nil? - return false if @version.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - capability == o.capability && - prefix == o.prefix && - version == o.version - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [capability, prefix, version].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_mount.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_mount.rb deleted file mode 100644 index 6883bf666e1..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/plugin_mount.rb +++ /dev/null @@ -1,319 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - # PluginMount plugin mount - class PluginMount - # description - attr_accessor :description - - # destination - attr_accessor :destination - - # name - attr_accessor :name - - # options - attr_accessor :options - - # settable - attr_accessor :settable - - # source - attr_accessor :source - - # type - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'description' => :'Description', - :'destination' => :'Destination', - :'name' => :'Name', - :'options' => :'Options', - :'settable' => :'Settable', - :'source' => :'Source', - :'type' => :'Type' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'description' => :'String', - :'destination' => :'String', - :'name' => :'String', - :'options' => :'Array', - :'settable' => :'Array', - :'source' => :'String', - :'type' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::PluginMount` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::PluginMount`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'destination') - self.destination = attributes[:'destination'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'options') - if (value = attributes[:'options']).is_a?(Array) - self.options = value - end - end - - if attributes.key?(:'settable') - if (value = attributes[:'settable']).is_a?(Array) - self.settable = value - end - end - - if attributes.key?(:'source') - self.source = attributes[:'source'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - 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 - invalid_properties = Array.new - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @destination.nil? - invalid_properties.push('invalid value for "destination", destination cannot be nil.') - end - - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - if @options.nil? - invalid_properties.push('invalid value for "options", options cannot be nil.') - end - - if @settable.nil? - invalid_properties.push('invalid value for "settable", settable cannot be nil.') - end - - if @source.nil? - invalid_properties.push('invalid value for "source", source cannot be nil.') - end - - if @type.nil? - invalid_properties.push('invalid value for "type", type cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @description.nil? - return false if @destination.nil? - return false if @name.nil? - return false if @options.nil? - return false if @settable.nil? - return false if @source.nil? - return false if @type.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - description == o.description && - destination == o.destination && - name == o.name && - options == o.options && - settable == o.settable && - source == o.source && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [description, destination, name, options, settable, source, type].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/reject_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/reject_o_auth2_request.rb similarity index 94% rename from clients/hydra/ruby/lib/ory-hydra-client/models/reject_request.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/reject_o_auth2_request.rb index 1cb564e1b96..7327c5c1063 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/reject_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/reject_o_auth2_request.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,7 @@ require 'time' module OryHydraClient - class RejectRequest + class RejectOAuth2Request # The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. attr_accessor :error @@ -67,13 +67,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::RejectRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::RejectOAuth2Request` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::RejectRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::RejectOAuth2Request`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -148,6 +148,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/request_was_handled_response.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/request_was_handled_response.rb deleted file mode 100644 index a962980ebfe..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/request_was_handled_response.rb +++ /dev/null @@ -1,224 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - class RequestWasHandledResponse - # Original request URL to which you should redirect the user if request was already handled. - attr_accessor :redirect_to - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'redirect_to' => :'redirect_to' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'redirect_to' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::RequestWasHandledResponse` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::RequestWasHandledResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'redirect_to') - self.redirect_to = attributes[:'redirect_to'] - 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 - invalid_properties = Array.new - if @redirect_to.nil? - invalid_properties.push('invalid value for "redirect_to", redirect_to cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @redirect_to.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - redirect_to == o.redirect_to - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [redirect_to].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/volume_usage_data.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination.rb similarity index 71% rename from clients/hydra/ruby/lib/ory-hydra-client/models/volume_usage_data.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination.rb index 8c684085af1..3fed2fceef6 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/volume_usage_data.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,19 +14,18 @@ require 'time' module OryHydraClient - # VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - class VolumeUsageData - # The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - attr_accessor :ref_count + class 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). + attr_accessor :page_size - # Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - attr_accessor :size + # 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). + attr_accessor :page_token # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'ref_count' => :'RefCount', - :'size' => :'Size' + :'page_size' => :'page_size', + :'page_token' => :'page_token' } end @@ -38,8 +37,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'ref_count' => :'Integer', - :'size' => :'Integer' + :'page_size' => :'Integer', + :'page_token' => :'String' } end @@ -53,23 +52,27 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::VolumeUsageData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TokenPagination` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::VolumeUsageData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TokenPagination`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'ref_count') - self.ref_count = attributes[:'ref_count'] + if attributes.key?(:'page_size') + self.page_size = attributes[:'page_size'] + else + self.page_size = 250 end - if attributes.key?(:'size') - self.size = attributes[:'size'] + if attributes.key?(:'page_token') + self.page_token = attributes[:'page_token'] + else + self.page_token = '1' end end @@ -77,12 +80,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @ref_count.nil? - invalid_properties.push('invalid value for "ref_count", ref_count cannot be nil.') + if !@page_size.nil? && @page_size > 1000 + invalid_properties.push('invalid value for "page_size", must be smaller than or equal to 1000.') end - if @size.nil? - invalid_properties.push('invalid value for "size", size cannot be nil.') + if !@page_size.nil? && @page_size < 1 + invalid_properties.push('invalid value for "page_size", must be greater than or equal to 1.') end invalid_properties @@ -91,18 +94,38 @@ 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? - return false if @ref_count.nil? - return false if @size.nil? + return false if !@page_size.nil? && @page_size > 1000 + return false if !@page_size.nil? && @page_size < 1 true end + # 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 + fail ArgumentError, 'invalid value for "page_size", must be smaller than or equal to 1000.' + end + + if !page_size.nil? && page_size < 1 + fail ArgumentError, 'invalid value for "page_size", must be greater than or equal to 1.' + end + + @page_size = page_size + end + + # Custom attribute writer method with validation + # @param [Object] page_token Value to be assigned + def page_token=(page_token) + @page_token = page_token + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - ref_count == o.ref_count && - size == o.size + page_size == o.page_size && + page_token == o.page_token end # @see the `==` method @@ -114,7 +137,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [ref_count, size].hash + [page_size, page_token].hash end # Builds the object from hash @@ -129,6 +152,7 @@ def self.build_from_hash(attributes) # @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) 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 new file mode 100644 index 00000000000..d0fed00e712 --- /dev/null +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_headers.rb @@ -0,0 +1,230 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OryHydraClient + class 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 + attr_accessor :link + + # The total number of clients. in: header + attr_accessor :x_total_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'link' => :'link', + :'x_total_count' => :'x-total-count' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'link' => :'String', + :'x_total_count' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TokenPaginationHeaders` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TokenPaginationHeaders`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'link') + self.link = attributes[:'link'] + end + + if attributes.key?(:'x_total_count') + self.x_total_count = attributes[:'x_total_count'] + 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 + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + link == o.link && + x_total_count == o.x_total_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [link, x_total_count].hash + end + + # Builds the object from 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) + 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) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + 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) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + 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) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_request_parameters.rb similarity index 67% rename from clients/hydra/ruby/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_request_parameters.rb index 050ca314213..296e4380e07 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_request_parameters.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,14 +14,19 @@ require 'time' module OryHydraClient - class FlushInactiveOAuth2TokensRequest - # NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. - attr_accessor :not_after + # 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). + class 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). + attr_accessor :page_size + + # 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). + attr_accessor :page_token # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'not_after' => :'notAfter' + :'page_size' => :'page_size', + :'page_token' => :'page_token' } end @@ -33,7 +38,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'not_after' => :'Time' + :'page_size' => :'Integer', + :'page_token' => :'String' } end @@ -47,19 +53,27 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::FlushInactiveOAuth2TokensRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TokenPaginationRequestParameters` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::FlushInactiveOAuth2TokensRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TokenPaginationRequestParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'not_after') - self.not_after = attributes[:'not_after'] + if attributes.key?(:'page_size') + self.page_size = attributes[:'page_size'] + else + self.page_size = 250 + end + + if attributes.key?(:'page_token') + self.page_token = attributes[:'page_token'] + else + self.page_token = '1' end end @@ -67,21 +81,52 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties 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.') + end + + if !@page_size.nil? && @page_size < 1 + invalid_properties.push('invalid value for "page_size", must be greater than or equal to 1.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if !@page_size.nil? && @page_size > 500 + return false if !@page_size.nil? && @page_size < 1 true end + # 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 + fail ArgumentError, 'invalid value for "page_size", must be smaller than or equal to 500.' + end + + if !page_size.nil? && page_size < 1 + fail ArgumentError, 'invalid value for "page_size", must be greater than or equal to 1.' + end + + @page_size = page_size + end + + # Custom attribute writer method with validation + # @param [Object] page_token Value to be assigned + def page_token=(page_token) + @page_token = page_token + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && - not_after == o.not_after + page_size == o.page_size && + page_token == o.page_token end # @see the `==` method @@ -93,7 +138,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [not_after].hash + [page_size, page_token].hash end # Builds the object from hash @@ -108,6 +153,7 @@ def self.build_from_hash(attributes) # @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) 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 new file mode 100644 index 00000000000..c84cee1c966 --- /dev/null +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/token_pagination_response_headers.rb @@ -0,0 +1,231 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'date' +require 'time' + +module OryHydraClient + # 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). + class 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\" + attr_accessor :link + + # The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + attr_accessor :x_total_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'link' => :'link', + :'x_total_count' => :'x-total-count' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'link' => :'String', + :'x_total_count' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TokenPaginationResponseHeaders` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TokenPaginationResponseHeaders`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'link') + self.link = attributes[:'link'] + end + + if attributes.key?(:'x_total_count') + self.x_total_count = attributes[:'x_total_count'] + 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 + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + link == o.link && + x_total_count == o.x_total_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [link, x_total_count].hash + end + + # Builds the object from 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) + 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) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + 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) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + 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) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/trust_jwt_grant_issuer_body.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/trust_o_auth2_jwt_grant_issuer.rb similarity index 88% rename from clients/hydra/ruby/lib/ory-hydra-client/models/trust_jwt_grant_issuer_body.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/trust_o_auth2_jwt_grant_issuer.rb index 440673a9b6c..1602bf0c355 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/trust_jwt_grant_issuer_body.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/trust_o_auth2_jwt_grant_issuer.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,11 @@ require 'time' module OryHydraClient - class TrustJwtGrantIssuerBody + # Trust OAuth2 JWT Bearer Grant Type Issuer Request Body + class TrustOAuth2JwtGrantIssuer + # The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + attr_accessor :allow_any_subject + # The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". attr_accessor :expires_at @@ -32,6 +36,7 @@ class TrustJwtGrantIssuerBody # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'allow_any_subject' => :'allow_any_subject', :'expires_at' => :'expires_at', :'issuer' => :'issuer', :'jwk' => :'jwk', @@ -48,9 +53,10 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'allow_any_subject' => :'Boolean', :'expires_at' => :'Time', :'issuer' => :'String', - :'jwk' => :'JSONWebKey', + :'jwk' => :'JsonWebKey', :'scope' => :'Array', :'subject' => :'String' } @@ -66,17 +72,21 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TrustJwtGrantIssuerBody` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TrustOAuth2JwtGrantIssuer` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TrustJwtGrantIssuerBody`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TrustOAuth2JwtGrantIssuer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } + if attributes.key?(:'allow_any_subject') + self.allow_any_subject = attributes[:'allow_any_subject'] + end + if attributes.key?(:'expires_at') self.expires_at = attributes[:'expires_at'] end @@ -120,10 +130,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "scope", scope cannot be nil.') end - if @subject.nil? - invalid_properties.push('invalid value for "subject", subject cannot be nil.') - end - invalid_properties end @@ -134,7 +140,6 @@ def valid? return false if @issuer.nil? return false if @jwk.nil? return false if @scope.nil? - return false if @subject.nil? true end @@ -143,6 +148,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + allow_any_subject == o.allow_any_subject && expires_at == o.expires_at && issuer == o.issuer && jwk == o.jwk && @@ -159,7 +165,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [expires_at, issuer, jwk, scope, subject].hash + [allow_any_subject, expires_at, issuer, jwk, scope, subject].hash end # Builds the object from hash @@ -174,6 +180,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_jwt_grant_issuer.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_issuer.rb similarity index 87% rename from clients/hydra/ruby/lib/ory-hydra-client/models/trusted_jwt_grant_issuer.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_issuer.rb index 063f6abd1a8..4bd21fff0bb 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_jwt_grant_issuer.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_issuer.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,11 @@ require 'time' module OryHydraClient - class TrustedJwtGrantIssuer + # OAuth2 JWT Bearer Grant Type Issuer Trust Relationship + class TrustedOAuth2JwtGrantIssuer + # The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. + attr_accessor :allow_any_subject + # The \"created_at\" indicates, when grant was created. attr_accessor :created_at @@ -37,6 +41,7 @@ class TrustedJwtGrantIssuer # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'allow_any_subject' => :'allow_any_subject', :'created_at' => :'created_at', :'expires_at' => :'expires_at', :'id' => :'id', @@ -55,11 +60,12 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'allow_any_subject' => :'Boolean', :'created_at' => :'Time', :'expires_at' => :'Time', :'id' => :'String', :'issuer' => :'String', - :'public_key' => :'TrustedJsonWebKey', + :'public_key' => :'TrustedOAuth2JwtGrantJsonWebKey', :'scope' => :'Array', :'subject' => :'String' } @@ -75,17 +81,21 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TrustedJwtGrantIssuer` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TrustedOAuth2JwtGrantIssuer` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TrustedJwtGrantIssuer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TrustedOAuth2JwtGrantIssuer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } + if attributes.key?(:'allow_any_subject') + self.allow_any_subject = attributes[:'allow_any_subject'] + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end @@ -135,6 +145,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + allow_any_subject == o.allow_any_subject && created_at == o.created_at && expires_at == o.expires_at && id == o.id && @@ -153,7 +164,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, expires_at, id, issuer, public_key, scope, subject].hash + [allow_any_subject, created_at, expires_at, id, issuer, public_key, scope, subject].hash end # Builds the object from hash @@ -168,6 +179,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_json_web_key.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb similarity index 91% rename from clients/hydra/ruby/lib/ory-hydra-client/models/trusted_json_web_key.rb rename to clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb index 772e04d3e55..a665f3d874e 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_json_web_key.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,7 +14,8 @@ require 'time' module OryHydraClient - class TrustedJsonWebKey + # OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key + class TrustedOAuth2JwtGrantJsonWebKey # The \"key_id\" is key unique identifier (same as kid header in jws/jwt). attr_accessor :kid @@ -52,13 +53,13 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TrustedJsonWebKey` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TrustedJsonWebKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } @@ -118,6 +119,7 @@ def self.build_from_hash(attributes) # @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) 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 d250a997691..55e6e794c58 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/version.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/models/version.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -108,6 +108,7 @@ def self.build_from_hash(attributes) # @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) diff --git a/clients/hydra/ruby/lib/ory-hydra-client/models/volume.rb b/clients/hydra/ruby/lib/ory-hydra-client/models/volume.rb deleted file mode 100644 index 9fcb467d63f..00000000000 --- a/clients/hydra/ruby/lib/ory-hydra-client/models/volume.rb +++ /dev/null @@ -1,333 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'date' -require 'time' - -module OryHydraClient - # Volume volume - class Volume - # Date/Time the volume was created. - attr_accessor :created_at - - # Name of the volume driver used by the volume. - attr_accessor :driver - - # User-defined key/value metadata. - attr_accessor :labels - - # Mount path of the volume on the host. - attr_accessor :mountpoint - - # Name of the volume. - attr_accessor :name - - # The driver specific options used when creating the volume. - attr_accessor :options - - # The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - attr_accessor :scope - - # Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - attr_accessor :status - - attr_accessor :usage_data - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'created_at' => :'CreatedAt', - :'driver' => :'Driver', - :'labels' => :'Labels', - :'mountpoint' => :'Mountpoint', - :'name' => :'Name', - :'options' => :'Options', - :'scope' => :'Scope', - :'status' => :'Status', - :'usage_data' => :'UsageData' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'created_at' => :'String', - :'driver' => :'String', - :'labels' => :'Hash', - :'mountpoint' => :'String', - :'name' => :'String', - :'options' => :'Hash', - :'scope' => :'String', - :'status' => :'Object', - :'usage_data' => :'VolumeUsageData' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::Volume` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::Volume`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'driver') - self.driver = attributes[:'driver'] - end - - if attributes.key?(:'labels') - if (value = attributes[:'labels']).is_a?(Hash) - self.labels = value - end - end - - if attributes.key?(:'mountpoint') - self.mountpoint = attributes[:'mountpoint'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'options') - if (value = attributes[:'options']).is_a?(Hash) - self.options = value - end - end - - if attributes.key?(:'scope') - self.scope = attributes[:'scope'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'usage_data') - self.usage_data = attributes[:'usage_data'] - 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 - invalid_properties = Array.new - if @driver.nil? - invalid_properties.push('invalid value for "driver", driver cannot be nil.') - end - - if @labels.nil? - invalid_properties.push('invalid value for "labels", labels cannot be nil.') - end - - if @mountpoint.nil? - invalid_properties.push('invalid value for "mountpoint", mountpoint cannot be nil.') - end - - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - if @options.nil? - invalid_properties.push('invalid value for "options", options cannot be nil.') - end - - if @scope.nil? - invalid_properties.push('invalid value for "scope", scope cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @driver.nil? - return false if @labels.nil? - return false if @mountpoint.nil? - return false if @name.nil? - return false if @options.nil? - return false if @scope.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_at == o.created_at && - driver == o.driver && - labels == o.labels && - mountpoint == o.mountpoint && - name == o.name && - options == o.options && - scope == o.scope && - status == o.status && - usage_data == o.usage_data - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [created_at, driver, labels, mountpoint, name, options, scope, status, usage_data].hash - end - - # Builds the object from 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) - 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) - 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) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - 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) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - 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) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - 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 1c1d25f9200..6d9c0b8a409 100644 --- a/clients/hydra/ruby/lib/ory-hydra-client/version.rb +++ b/clients/hydra/ruby/lib/ory-hydra-client/version.rb @@ -1,15 +1,15 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: 1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: 2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end module OryHydraClient - VERSION = '1.11.0' + VERSION = '2.0.1' end diff --git a/clients/hydra/ruby/ory-hydra-client.gemspec b/clients/hydra/ruby/ory-hydra-client.gemspec index 577aef60c9f..cb862691f27 100644 --- a/clients/hydra/ruby/ory-hydra-client.gemspec +++ b/clients/hydra/ruby/ory-hydra-client.gemspec @@ -1,14 +1,14 @@ # -*- encoding: utf-8 -*- =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -22,8 +22,8 @@ Gem::Specification.new do |s| s.authors = ["ORY GmbH"] s.email = ["opensource@ory.sh"] s.homepage = "https://www.ory.sh" - s.summary = "ORY Hydra Ruby Gem" - s.description = "Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here." + 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" diff --git a/clients/hydra/ruby/spec/api/admin_api_spec.rb b/clients/hydra/ruby/spec/api/admin_api_spec.rb deleted file mode 100644 index a2998a30750..00000000000 --- a/clients/hydra/ruby/spec/api/admin_api_spec.rb +++ /dev/null @@ -1,462 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' - -# Unit tests for OryHydraClient::AdminApi -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'AdminApi' do - before do - # run before each test - @api_instance = OryHydraClient::AdminApi.new - end - - after do - # run after each test - end - - describe 'test an instance of AdminApi' do - it 'should create an instance of AdminApi' do - expect(@api_instance).to be_instance_of(OryHydraClient::AdminApi) - end - end - - # unit tests for accept_consent_request - # Accept a Consent Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - # @param consent_challenge - # @param [Hash] opts the optional parameters - # @option opts [AcceptConsentRequest] :body - # @return [CompletedRequest] - describe 'accept_consent_request test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for accept_login_request - # Accept a Login Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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 - # @param [Hash] opts the optional parameters - # @option opts [AcceptLoginRequest] :body - # @return [CompletedRequest] - describe 'accept_login_request test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for accept_logout_request - # Accept a Logout Request - # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - # @param logout_challenge - # @param [Hash] opts the optional parameters - # @return [CompletedRequest] - describe 'accept_logout_request test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for create_json_web_key_set - # Generate a New 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 set - # @param [Hash] opts the optional parameters - # @option opts [JsonWebKeySetGeneratorRequest] :body - # @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 - end - end - - # unit tests for create_o_auth2_client - # Create an OAuth 2.0 Client - # Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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 body - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for delete_json_web_key - # Delete a 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 kid The kid of the desired key - # @param set The set - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for delete_json_web_key_set - # Delete a 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 set - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for delete_o_auth2_client - # Deletes an 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. - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for delete_o_auth2_token - # Delete OAuth2 Access Tokens from a Client - # This endpoint deletes OAuth2 access tokens issued for a client from the database - # @param client_id - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for delete_trusted_jwt_grant_issuer - # Delete a 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 - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'delete_trusted_jwt_grant_issuer test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for flush_inactive_o_auth2_tokens - # Flush Expired OAuth2 Access Tokens - # This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - # @param [Hash] opts the optional parameters - # @option opts [FlushInactiveOAuth2TokensRequest] :body - # @return [nil] - describe 'flush_inactive_o_auth2_tokens test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_consent_request - # Get Consent Request Information - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - # @param consent_challenge - # @param [Hash] opts the optional parameters - # @return [ConsentRequest] - describe 'get_consent_request test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_json_web_key - # Fetch a JSON Web Key - # This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - # @param kid The kid of the desired key - # @param set The set - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for get_json_web_key_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. - # @param set The set - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for get_login_request - # Get a Login Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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 - # @param [Hash] opts the optional parameters - # @return [LoginRequest] - describe 'get_login_request test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_logout_request - # Get a Logout Request - # Use this endpoint to fetch a logout request. - # @param logout_challenge - # @param [Hash] opts the optional parameters - # @return [LogoutRequest] - describe 'get_logout_request test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_o_auth2_client - # 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. - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for get_trusted_jwt_grant_issuer - # Get a 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 - # @param [Hash] opts the optional parameters - # @return [TrustedJwtGrantIssuer] - describe 'get_trusted_jwt_grant_issuer test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_version - # Get Service Version - # This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - # @param [Hash] opts the optional parameters - # @return [Version] - describe 'get_version test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for introspect_o_auth2_token - # Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - # @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. - # @param [Hash] opts the optional parameters - # @option opts [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. - # @return [OAuth2TokenIntrospection] - 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 - end - end - - # unit tests for is_instance_alive - # Check Alive Status - # This endpoint returns a 200 status code when the HTTP server is up running. 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 [Hash] opts the optional parameters - # @return [HealthStatus] - describe 'is_instance_alive test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for list_o_auth2_clients - # 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit The maximum amount of clients to returned, upper bound is 500 clients. - # @option opts [Integer] :offset The offset from where to start looking. - # @option opts [String] :client_name The name of the clients to filter by. - # @option opts [String] :owner The owner of the clients to filter by. - # @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 - end - end - - # unit tests for list_subject_consent_sessions - # Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - # @param subject - # @param [Hash] opts the optional parameters - # @return [Array] - describe 'list_subject_consent_sessions test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for list_trusted_jwt_grant_issuers - # List Trusted OAuth2 JWT Bearer Grant Type Issuers - # Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - # @param [Hash] opts the optional parameters - # @option opts [String] :issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - # @option opts [Integer] :limit The maximum amount of policies returned, upper bound is 500 policies - # @option opts [Integer] :offset The offset from where to start looking. - # @return [Array] - describe 'list_trusted_jwt_grant_issuers test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for patch_o_auth2_client - # Patch an OAuth 2.0 Client - # Patch an existing OAuth 2.0 Client. 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. - # @param body - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for reject_consent_request - # Reject a Consent Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - # @param consent_challenge - # @param [Hash] opts the optional parameters - # @option opts [RejectRequest] :body - # @return [CompletedRequest] - describe 'reject_consent_request test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for reject_login_request - # Reject a Login Request - # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - # @param login_challenge - # @param [Hash] opts the optional parameters - # @option opts [RejectRequest] :body - # @return [CompletedRequest] - describe 'reject_login_request test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for reject_logout_request - # Reject a Logout Request - # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - # @param logout_challenge - # @param [Hash] opts the optional parameters - # @option opts [RejectRequest] :body - # @return [nil] - describe 'reject_logout_request test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for revoke_authentication_session - # Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - # This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - # @param subject - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'revoke_authentication_session test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for revoke_consent_sessions - # Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - # This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - # @param subject The subject (Subject) who's consent sessions should be deleted. - # @param [Hash] opts the optional parameters - # @option opts [String] :client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - # @option opts [Boolean] :all If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. - # @return [nil] - describe 'revoke_consent_sessions test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for trust_jwt_grant_issuer - # Trust an 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 [Hash] opts the optional parameters - # @option opts [TrustJwtGrantIssuerBody] :body - # @return [TrustedJwtGrantIssuer] - describe 'trust_jwt_grant_issuer test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_json_web_key - # Update a 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 kid The kid of the desired key - # @param set The set - # @param [Hash] opts the optional parameters - # @option opts [JSONWebKey] :body - # @return [JSONWebKey] - describe 'update_json_web_key test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_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. - # @param set The set - # @param [Hash] opts the optional parameters - # @option opts [JSONWebKeySet] :body - # @return [JSONWebKeySet] - describe 'update_json_web_key_set test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_o_auth2_client - # Update an OAuth 2.0 Client - # Update an existing OAuth 2.0 Client. 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. - # @param body - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - describe 'update_o_auth2_client test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/api/jwk_api_spec.rb b/clients/hydra/ruby/spec/api/jwk_api_spec.rb new file mode 100644 index 00000000000..d307e562079 --- /dev/null +++ b/clients/hydra/ruby/spec/api/jwk_api_spec.rb @@ -0,0 +1,125 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for OryHydraClient::JwkApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'JwkApi' do + before do + # run before each test + @api_instance = OryHydraClient::JwkApi.new + end + + after do + # run after each test + end + + describe 'test an instance of JwkApi' do + it 'should create an instance of JwkApi' do + expect(@api_instance).to be_instance_of(OryHydraClient::JwkApi) + end + end + + # unit tests for 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. + # @param set The JSON Web Key Set ID + # @param create_json_web_key_set + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for delete_json_web_key + # 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 + # @param kid The JSON Web Key ID (kid) + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for delete_json_web_key_set + # 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 + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for get_json_web_key + # 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 + # @param kid JSON Web Key ID + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for get_json_web_key_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. + # @param set JSON Web Key Set ID + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for set_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. + # @param set The JSON Web Key Set ID + # @param kid JSON Web Key ID + # @param [Hash] opts the optional parameters + # @option opts [JsonWebKey] :json_web_key + # @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 + end + end + + # unit tests for 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. + # @param set The JSON Web Key Set ID + # @param [Hash] opts the optional parameters + # @option opts [JsonWebKeySet] :json_web_key_set + # @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 + end + 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 3686b2abfa5..cd7817ba980 100644 --- a/clients/hydra/ruby/spec/api/metadata_api_spec.rb +++ b/clients/hydra/ruby/spec/api/metadata_api_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -32,12 +32,34 @@ end end - # unit tests for prometheus - # Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: - # ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` + # unit tests for 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for 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. # @param [Hash] opts the optional parameters - # @return [nil] - describe 'prometheus test' do + # @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 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 new file mode 100644 index 00000000000..6d89c3e665b --- /dev/null +++ b/clients/hydra/ruby/spec/api/o_auth2_api_spec.rb @@ -0,0 +1,391 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for OryHydraClient::OAuth2Api +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'OAuth2Api' do + before do + # run before each test + @api_instance = OryHydraClient::OAuth2Api.new + end + + after do + # run after each test + end + + describe 'test an instance of OAuth2Api' do + it 'should create an instance of OAuth2Api' do + expect(@api_instance).to be_instance_of(OryHydraClient::OAuth2Api) + end + end + + # unit tests for 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. + # @param consent_challenge OAuth 2.0 Consent Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [AcceptOAuth2ConsentRequest] :accept_o_auth2_consent_request + # @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 + end + end + + # unit tests for 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. + # @param login_challenge OAuth 2.0 Login Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [AcceptOAuth2LoginRequest] :accept_o_auth2_login_request + # @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 + end + end + + # unit tests for accept_o_auth2_logout_request + # 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 + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for create_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. + # @param o_auth2_client OAuth 2.0 Client Request Body + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for delete_o_auth2_client + # 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for delete_o_auth2_token + # 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 + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for delete_trusted_o_auth2_jwt_grant_issuer + # 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 + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for get_o_auth2_client + # 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for get_o_auth2_consent_request + # 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 + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for get_o_auth2_login_request + # 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 + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for get_o_auth2_logout_request + # Get OAuth 2.0 Session Logout Request + # Use this endpoint to fetch an Ory OAuth 2.0 logout request. + # @param logout_challenge + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for get_trusted_o_auth2_jwt_grant_issuer + # 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 + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for introspect_o_auth2_token + # 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. + # @param [Hash] opts the optional parameters + # @option opts [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. + # @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 + end + end + + # unit tests for list_o_auth2_clients + # 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 [Hash] opts the optional parameters + # @option opts [Integer] :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). + # @option opts [String] :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). + # @option opts [String] :client_name The name of the clients to filter by. + # @option opts [String] :owner The owner of the clients to filter by. + # @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 + end + end + + # unit tests for list_o_auth2_consent_sessions + # 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. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :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). + # @option opts [String] :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). + # @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 + end + end + + # unit tests for list_trusted_o_auth2_jwt_grant_issuers + # List Trusted OAuth2 JWT Bearer Grant Type Issuers + # Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :max_items + # @option opts [Integer] :default_items + # @option opts [String] :issuer If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. + # @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 + end + end + + # unit tests for 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for oauth2_token_exchange + # 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 + # @param [Hash] opts the optional parameters + # @option opts [String] :client_id + # @option opts [String] :code + # @option opts [String] :redirect_uri + # @option opts [String] :refresh_token + # @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 + end + end + + # unit tests for patch_o_auth2_client + # 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. + # @param json_patch OAuth 2.0 Client JSON Patch Body + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for reject_o_auth2_consent_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. + # @param consent_challenge OAuth 2.0 Consent Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [RejectOAuth2Request] :reject_o_auth2_request + # @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 + end + end + + # unit tests for reject_o_auth2_login_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. + # @param login_challenge OAuth 2.0 Login Request Challenge + # @param [Hash] opts the optional parameters + # @option opts [RejectOAuth2Request] :reject_o_auth2_request + # @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 + end + end + + # unit tests for reject_o_auth2_logout_request + # 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 + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for revoke_o_auth2_consent_sessions + # 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. + # @param [Hash] opts the optional parameters + # @option opts [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. + # @option opts [Boolean] :all Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. + # @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 + end + end + + # unit tests for revoke_o_auth2_login_sessions + # Revokes All OAuth 2.0 Login Sessions of a Subject + # This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + # @param subject OAuth 2.0 Subject The subject to revoke authentication sessions for. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for revoke_o_auth2_token + # 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 + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for set_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. + # @param id OAuth 2.0 Client ID + # @param o_auth2_client OAuth 2.0 Client Request Body + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for set_o_auth2_client_lifespans + # 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 + # @param [Hash] opts the optional parameters + # @option opts [OAuth2ClientTokenLifespans] :o_auth2_client_token_lifespans + # @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 + end + end + + # unit tests for 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). + # @param [Hash] opts the optional parameters + # @option opts [TrustOAuth2JwtGrantIssuer] :trust_o_auth2_jwt_grant_issuer + # @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 + end + end + +end diff --git a/clients/hydra/ruby/spec/api/oidc_api_spec.rb b/clients/hydra/ruby/spec/api/oidc_api_spec.rb new file mode 100644 index 00000000000..15b54479fd6 --- /dev/null +++ b/clients/hydra/ruby/spec/api/oidc_api_spec.rb @@ -0,0 +1,117 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for OryHydraClient::OidcApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'OidcApi' do + before do + # run before each test + @api_instance = OryHydraClient::OidcApi.new + end + + after do + # run after each test + end + + describe 'test an instance of OidcApi' do + it 'should create an instance of OidcApi' do + expect(@api_instance).to be_instance_of(OryHydraClient::OidcApi) + end + end + + # unit tests for create_oidc_dynamic_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. + # @param o_auth2_client Dynamic Client Registration Request Body + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for delete_oidc_dynamic_client + # 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for 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/ + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for get_oidc_dynamic_client + # 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for revoke_oidc_session + # 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + + # unit tests for set_oidc_dynamic_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. + # @param id OAuth 2.0 Client ID + # @param o_auth2_client OAuth 2.0 Client Request Body + # @param [Hash] opts the optional parameters + # @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 + end + end + +end diff --git a/clients/hydra/ruby/spec/api/public_api_spec.rb b/clients/hydra/ruby/spec/api/public_api_spec.rb deleted file mode 100644 index 06de8e1f0cb..00000000000 --- a/clients/hydra/ruby/spec/api/public_api_spec.rb +++ /dev/null @@ -1,178 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' - -# Unit tests for OryHydraClient::PublicApi -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'PublicApi' do - before do - # run before each test - @api_instance = OryHydraClient::PublicApi.new - end - - after do - # run after each test - end - - describe 'test an instance of PublicApi' do - it 'should create an instance of PublicApi' do - expect(@api_instance).to be_instance_of(OryHydraClient::PublicApi) - end - end - - # unit tests for disconnect_user - # OpenID Connect Front-Backchannel Enabled Logout - # This endpoint initiates and completes user logout at Ory Hydra 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 - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'disconnect_user test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for discover_open_id_configuration - # OpenID Connect Discovery - # The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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 [Hash] opts the optional parameters - # @return [WellKnown] - describe 'discover_open_id_configuration test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for dynamic_client_registration_create_o_auth2_client - # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - # 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 body - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - describe 'dynamic_client_registration_create_o_auth2_client test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for dynamic_client_registration_delete_o_auth2_client - # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'dynamic_client_registration_delete_o_auth2_client test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for dynamic_client_registration_get_o_auth2_client - # Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - # 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. 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. - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - describe 'dynamic_client_registration_get_o_auth2_client test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for dynamic_client_registration_update_o_auth2_client - # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - # This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - # @param body - # @param [Hash] opts the optional parameters - # @return [OAuth2Client] - describe 'dynamic_client_registration_update_o_auth2_client test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for is_instance_ready - # Check Readiness Status - # This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - # @param [Hash] opts the optional parameters - # @return [HealthStatus] - describe 'is_instance_ready test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for oauth2_token - # The OAuth 2.0 Token Endpoint - # The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - # @param grant_type - # @param [Hash] opts the optional parameters - # @option opts [String] :code - # @option opts [String] :refresh_token - # @option opts [String] :redirect_uri - # @option opts [String] :client_id - # @return [Oauth2TokenResponse] - describe 'oauth2_token test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for oauth_auth - # The OAuth 2.0 Authorize Endpoint - # This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'oauth_auth test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for revoke_o_auth2_token - # Revoke OAuth2 Tokens - # 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 - # @param [Hash] opts the optional parameters - # @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 - end - end - - # unit tests for userinfo - # OpenID Connect Userinfo - # This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 [Hash] opts the optional parameters - # @return [UserinfoResponse] - describe 'userinfo test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for well_known - # JSON Web Keys Discovery - # This endpoint returns JSON Web Keys to be used as public keys for 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 [Hash] opts the optional parameters - # @return [JSONWebKeySet] - describe 'well_known test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/api/wellknown_api_spec.rb b/clients/hydra/ruby/spec/api/wellknown_api_spec.rb new file mode 100644 index 00000000000..04b4d07c24e --- /dev/null +++ b/clients/hydra/ruby/spec/api/wellknown_api_spec.rb @@ -0,0 +1,46 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for OryHydraClient::WellknownApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'WellknownApi' do + before do + # run before each test + @api_instance = OryHydraClient::WellknownApi.new + end + + after do + # run after each test + end + + describe 'test an instance of WellknownApi' do + it 'should create an instance of WellknownApi' do + expect(@api_instance).to be_instance_of(OryHydraClient::WellknownApi) + end + end + + # unit tests for 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. + # @param [Hash] opts the optional parameters + # @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 + end + end + +end diff --git a/clients/hydra/ruby/spec/api_client_spec.rb b/clients/hydra/ruby/spec/api_client_spec.rb index c3469bf9748..713fb30b720 100644 --- a/clients/hydra/ruby/spec/api_client_spec.rb +++ b/clients/hydra/ruby/spec/api_client_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end diff --git a/clients/hydra/ruby/spec/configuration_spec.rb b/clients/hydra/ruby/spec/configuration_spec.rb index 0893c2caf75..ed0b5f0c4ac 100644 --- a/clients/hydra/ruby/spec/configuration_spec.rb +++ b/clients/hydra/ruby/spec/configuration_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end diff --git a/clients/hydra/ruby/spec/models/consent_request_session_spec.rb b/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_session_spec.rb similarity index 51% rename from clients/hydra/ruby/spec/models/consent_request_session_spec.rb rename to clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_session_spec.rb index 5c7f26b270f..91e4f96f9ed 100644 --- a/clients/hydra/ruby/spec/models/consent_request_session_spec.rb +++ b/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_session_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::ConsentRequestSession +# Unit tests for OryHydraClient::AcceptOAuth2ConsentRequestSession # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::ConsentRequestSession do - let(:instance) { OryHydraClient::ConsentRequestSession.new } +describe OryHydraClient::AcceptOAuth2ConsentRequestSession do + let(:instance) { OryHydraClient::AcceptOAuth2ConsentRequestSession.new } - describe 'test an instance of ConsentRequestSession' do - it 'should create an instance of ConsentRequestSession' do - expect(instance).to be_instance_of(OryHydraClient::ConsentRequestSession) + describe 'test an instance of AcceptOAuth2ConsentRequestSession' do + it 'should create an instance of AcceptOAuth2ConsentRequestSession' do + expect(instance).to be_instance_of(OryHydraClient::AcceptOAuth2ConsentRequestSession) end end describe 'test attribute "access_token"' do diff --git a/clients/hydra/ruby/spec/models/accept_consent_request_spec.rb b/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_spec.rb similarity index 71% rename from clients/hydra/ruby/spec/models/accept_consent_request_spec.rb rename to clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_spec.rb index 4a38f65d5ec..fc53435b83b 100644 --- a/clients/hydra/ruby/spec/models/accept_consent_request_spec.rb +++ b/clients/hydra/ruby/spec/models/accept_o_auth2_consent_request_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::AcceptConsentRequest +# Unit tests for OryHydraClient::AcceptOAuth2ConsentRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::AcceptConsentRequest do - let(:instance) { OryHydraClient::AcceptConsentRequest.new } +describe OryHydraClient::AcceptOAuth2ConsentRequest do + let(:instance) { OryHydraClient::AcceptOAuth2ConsentRequest.new } - describe 'test an instance of AcceptConsentRequest' do - it 'should create an instance of AcceptConsentRequest' do - expect(instance).to be_instance_of(OryHydraClient::AcceptConsentRequest) + describe 'test an instance of AcceptOAuth2ConsentRequest' do + it 'should create an instance of AcceptOAuth2ConsentRequest' do + expect(instance).to be_instance_of(OryHydraClient::AcceptOAuth2ConsentRequest) end end describe 'test attribute "grant_access_token_audience"' do diff --git a/clients/hydra/ruby/spec/models/accept_login_request_spec.rb b/clients/hydra/ruby/spec/models/accept_o_auth2_login_request_spec.rb similarity index 74% rename from clients/hydra/ruby/spec/models/accept_login_request_spec.rb rename to clients/hydra/ruby/spec/models/accept_o_auth2_login_request_spec.rb index 2ba8ef52890..56b91404de3 100644 --- a/clients/hydra/ruby/spec/models/accept_login_request_spec.rb +++ b/clients/hydra/ruby/spec/models/accept_o_auth2_login_request_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::AcceptLoginRequest +# Unit tests for OryHydraClient::AcceptOAuth2LoginRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::AcceptLoginRequest do - let(:instance) { OryHydraClient::AcceptLoginRequest.new } +describe OryHydraClient::AcceptOAuth2LoginRequest do + let(:instance) { OryHydraClient::AcceptOAuth2LoginRequest.new } - describe 'test an instance of AcceptLoginRequest' do - it 'should create an instance of AcceptLoginRequest' do - expect(instance).to be_instance_of(OryHydraClient::AcceptLoginRequest) + describe 'test an instance of AcceptOAuth2LoginRequest' do + it 'should create an instance of AcceptOAuth2LoginRequest' do + expect(instance).to be_instance_of(OryHydraClient::AcceptOAuth2LoginRequest) end end describe 'test attribute "acr"' do diff --git a/clients/hydra/ruby/spec/models/completed_request_spec.rb b/clients/hydra/ruby/spec/models/completed_request_spec.rb deleted file mode 100644 index 7c5f6b764e3..00000000000 --- a/clients/hydra/ruby/spec/models/completed_request_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::CompletedRequest -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::CompletedRequest do - let(:instance) { OryHydraClient::CompletedRequest.new } - - describe 'test an instance of CompletedRequest' do - it 'should create an instance of CompletedRequest' do - expect(instance).to be_instance_of(OryHydraClient::CompletedRequest) - 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 - end - end - -end diff --git a/clients/hydra/ruby/spec/models/container_wait_ok_body_error_spec.rb b/clients/hydra/ruby/spec/models/container_wait_ok_body_error_spec.rb deleted file mode 100644 index d4270447aa1..00000000000 --- a/clients/hydra/ruby/spec/models/container_wait_ok_body_error_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::ContainerWaitOKBodyError -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::ContainerWaitOKBodyError do - let(:instance) { OryHydraClient::ContainerWaitOKBodyError.new } - - describe 'test an instance of ContainerWaitOKBodyError' do - it 'should create an instance of ContainerWaitOKBodyError' do - expect(instance).to be_instance_of(OryHydraClient::ContainerWaitOKBodyError) - 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 - end - end - -end diff --git a/clients/hydra/ruby/spec/models/json_web_key_set_generator_request_spec.rb b/clients/hydra/ruby/spec/models/create_json_web_key_set_spec.rb similarity index 56% rename from clients/hydra/ruby/spec/models/json_web_key_set_generator_request_spec.rb rename to clients/hydra/ruby/spec/models/create_json_web_key_set_spec.rb index 6c60f078b65..64e1f380c7f 100644 --- a/clients/hydra/ruby/spec/models/json_web_key_set_generator_request_spec.rb +++ b/clients/hydra/ruby/spec/models/create_json_web_key_set_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::JsonWebKeySetGeneratorRequest +# Unit tests for OryHydraClient::CreateJsonWebKeySet # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::JsonWebKeySetGeneratorRequest do - let(:instance) { OryHydraClient::JsonWebKeySetGeneratorRequest.new } +describe OryHydraClient::CreateJsonWebKeySet do + let(:instance) { OryHydraClient::CreateJsonWebKeySet.new } - describe 'test an instance of JsonWebKeySetGeneratorRequest' do - it 'should create an instance of JsonWebKeySetGeneratorRequest' do - expect(instance).to be_instance_of(OryHydraClient::JsonWebKeySetGeneratorRequest) + describe 'test an instance of CreateJsonWebKeySet' do + it 'should create an instance of CreateJsonWebKeySet' do + expect(instance).to be_instance_of(OryHydraClient::CreateJsonWebKeySet) end end describe 'test attribute "alg"' do diff --git a/clients/hydra/ruby/spec/models/reject_request_spec.rb b/clients/hydra/ruby/spec/models/error_o_auth2_spec.rb similarity index 69% rename from clients/hydra/ruby/spec/models/reject_request_spec.rb rename to clients/hydra/ruby/spec/models/error_o_auth2_spec.rb index 6b91705fe0e..84b76f5d017 100644 --- a/clients/hydra/ruby/spec/models/reject_request_spec.rb +++ b/clients/hydra/ruby/spec/models/error_o_auth2_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::RejectRequest +# Unit tests for OryHydraClient::ErrorOAuth2 # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::RejectRequest do - let(:instance) { OryHydraClient::RejectRequest.new } +describe OryHydraClient::ErrorOAuth2 do + let(:instance) { OryHydraClient::ErrorOAuth2.new } - describe 'test an instance of RejectRequest' do - it 'should create an instance of RejectRequest' do - expect(instance).to be_instance_of(OryHydraClient::RejectRequest) + describe 'test an instance of ErrorOAuth2' do + it 'should create an instance of ErrorOAuth2' do + expect(instance).to be_instance_of(OryHydraClient::ErrorOAuth2) end end describe 'test attribute "error"' do diff --git a/clients/hydra/ruby/spec/models/flush_inactive_o_auth2_tokens_request_spec.rb b/clients/hydra/ruby/spec/models/flush_inactive_o_auth2_tokens_request_spec.rb deleted file mode 100644 index 3802cf928a9..00000000000 --- a/clients/hydra/ruby/spec/models/flush_inactive_o_auth2_tokens_request_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::FlushInactiveOAuth2TokensRequest -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::FlushInactiveOAuth2TokensRequest do - let(:instance) { OryHydraClient::FlushInactiveOAuth2TokensRequest.new } - - describe 'test an instance of FlushInactiveOAuth2TokensRequest' do - it 'should create an instance of FlushInactiveOAuth2TokensRequest' do - expect(instance).to be_instance_of(OryHydraClient::FlushInactiveOAuth2TokensRequest) - end - end - describe 'test attribute "not_after"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - 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 74f6a0b4dde..1bd50b8c573 100644 --- a/clients/hydra/ruby/spec/models/generic_error_spec.rb +++ b/clients/hydra/ruby/spec/models/generic_error_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =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 new file mode 100644 index 00000000000..3660eaf576a --- /dev/null +++ b/clients/hydra/ruby/spec/models/get_version200_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::GetVersion200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::GetVersion200Response do + let(:instance) { OryHydraClient::GetVersion200Response.new } + + describe 'test an instance of GetVersion200Response' do + it 'should create an instance of GetVersion200Response' do + 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 + end + 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 7338667f3ea..a96fcb4fbd1 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 @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end diff --git a/clients/hydra/ruby/spec/models/health_status_spec.rb b/clients/hydra/ruby/spec/models/health_status_spec.rb index cb6da74bcf3..3fcd036a4d3 100644 --- a/clients/hydra/ruby/spec/models/health_status_spec.rb +++ b/clients/hydra/ruby/spec/models/health_status_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end diff --git a/clients/hydra/ruby/spec/models/o_auth2_token_introspection_spec.rb b/clients/hydra/ruby/spec/models/introspected_o_auth2_token_spec.rb similarity index 82% rename from clients/hydra/ruby/spec/models/o_auth2_token_introspection_spec.rb rename to clients/hydra/ruby/spec/models/introspected_o_auth2_token_spec.rb index 612cd317651..3407b799fb8 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_token_introspection_spec.rb +++ b/clients/hydra/ruby/spec/models/introspected_o_auth2_token_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::OAuth2TokenIntrospection +# Unit tests for OryHydraClient::IntrospectedOAuth2Token # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::OAuth2TokenIntrospection do - let(:instance) { OryHydraClient::OAuth2TokenIntrospection.new } +describe OryHydraClient::IntrospectedOAuth2Token do + let(:instance) { OryHydraClient::IntrospectedOAuth2Token.new } - describe 'test an instance of OAuth2TokenIntrospection' do - it 'should create an instance of OAuth2TokenIntrospection' do - expect(instance).to be_instance_of(OryHydraClient::OAuth2TokenIntrospection) + describe 'test an instance of IntrospectedOAuth2Token' do + it 'should create an instance of IntrospectedOAuth2Token' do + expect(instance).to be_instance_of(OryHydraClient::IntrospectedOAuth2Token) end end describe 'test attribute "active"' do diff --git a/clients/hydra/ruby/spec/models/is_ready200_response_spec.rb b/clients/hydra/ruby/spec/models/is_ready200_response_spec.rb new file mode 100644 index 00000000000..67d07f9c965 --- /dev/null +++ b/clients/hydra/ruby/spec/models/is_ready200_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::IsReady200Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::IsReady200Response do + let(:instance) { OryHydraClient::IsReady200Response.new } + + describe 'test an instance of IsReady200Response' do + it 'should create an instance of IsReady200Response' do + 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 + end + 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 new file mode 100644 index 00000000000..5c7a5503c84 --- /dev/null +++ b/clients/hydra/ruby/spec/models/is_ready503_response_spec.rb @@ -0,0 +1,34 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::IsReady503Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::IsReady503Response do + let(:instance) { OryHydraClient::IsReady503Response.new } + + describe 'test an instance of IsReady503Response' do + it 'should create an instance of IsReady503Response' do + 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 + end + end + +end diff --git a/clients/hydra/ruby/spec/models/patch_document_spec.rb b/clients/hydra/ruby/spec/models/json_patch_spec.rb similarity index 65% rename from clients/hydra/ruby/spec/models/patch_document_spec.rb rename to clients/hydra/ruby/spec/models/json_patch_spec.rb index 8ccfc6c2c80..d7f84c6afd7 100644 --- a/clients/hydra/ruby/spec/models/patch_document_spec.rb +++ b/clients/hydra/ruby/spec/models/json_patch_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::PatchDocument +# Unit tests for OryHydraClient::JsonPatch # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::PatchDocument do - let(:instance) { OryHydraClient::PatchDocument.new } +describe OryHydraClient::JsonPatch do + let(:instance) { OryHydraClient::JsonPatch.new } - describe 'test an instance of PatchDocument' do - it 'should create an instance of PatchDocument' do - expect(instance).to be_instance_of(OryHydraClient::PatchDocument) + describe 'test an instance of JsonPatch' do + it 'should create an instance of JsonPatch' do + expect(instance).to be_instance_of(OryHydraClient::JsonPatch) end end describe 'test attribute "from"' do 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 6d847eda670..1517afb2bc9 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 @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::JSONWebKeySet +# Unit tests for OryHydraClient::JsonWebKeySet # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::JSONWebKeySet do - let(:instance) { OryHydraClient::JSONWebKeySet.new } +describe OryHydraClient::JsonWebKeySet do + let(:instance) { OryHydraClient::JsonWebKeySet.new } - describe 'test an instance of JSONWebKeySet' do - it 'should create an instance of JSONWebKeySet' do - expect(instance).to be_instance_of(OryHydraClient::JSONWebKeySet) + describe 'test an instance of JsonWebKeySet' do + it 'should create an instance of JsonWebKeySet' do + expect(instance).to be_instance_of(OryHydraClient::JsonWebKeySet) end end describe 'test attribute "keys"' do 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 b977f262bd3..9ffb4634d09 100644 --- a/clients/hydra/ruby/spec/models/json_web_key_spec.rb +++ b/clients/hydra/ruby/spec/models/json_web_key_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::JSONWebKey +# Unit tests for OryHydraClient::JsonWebKey # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::JSONWebKey do - let(:instance) { OryHydraClient::JSONWebKey.new } +describe OryHydraClient::JsonWebKey do + let(:instance) { OryHydraClient::JsonWebKey.new } - describe 'test an instance of JSONWebKey' do - it 'should create an instance of JSONWebKey' do - expect(instance).to be_instance_of(OryHydraClient::JSONWebKey) + describe 'test an instance of JsonWebKey' do + it 'should create an instance of JsonWebKey' do + expect(instance).to be_instance_of(OryHydraClient::JsonWebKey) end end describe 'test attribute "alg"' do 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 17b4cd55f36..cf61ed2e2e8 100644 --- a/clients/hydra/ruby/spec/models/o_auth2_client_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_client_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -37,6 +37,24 @@ 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 + 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 + 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 + 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 @@ -49,6 +67,12 @@ 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 + 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 @@ -109,6 +133,18 @@ 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 + 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 + 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 @@ -121,6 +157,12 @@ 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 + 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 @@ -157,6 +199,24 @@ 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 + 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 + 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 + 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 diff --git a/clients/hydra/ruby/spec/models/volume_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_client_token_lifespans_spec.rb similarity index 51% rename from clients/hydra/ruby/spec/models/volume_spec.rb rename to clients/hydra/ruby/spec/models/o_auth2_client_token_lifespans_spec.rb index cecf59c2342..1680796803f 100644 --- a/clients/hydra/ruby/spec/models/volume_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_client_token_lifespans_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,66 +14,72 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::Volume +# Unit tests for OryHydraClient::OAuth2ClientTokenLifespans # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::Volume do - let(:instance) { OryHydraClient::Volume.new } +describe OryHydraClient::OAuth2ClientTokenLifespans do + let(:instance) { OryHydraClient::OAuth2ClientTokenLifespans.new } - describe 'test an instance of Volume' do - it 'should create an instance of Volume' do - expect(instance).to be_instance_of(OryHydraClient::Volume) + describe 'test an instance of OAuth2ClientTokenLifespans' do + it 'should create an instance of OAuth2ClientTokenLifespans' do + 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 end end - describe 'test attribute "created_at"' do + + 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 end end - describe 'test attribute "driver"' do + 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 end end - describe 'test attribute "labels"' do + 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 end end - describe 'test attribute "mountpoint"' do + 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 end end - describe 'test attribute "name"' do + 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 end end - describe 'test attribute "options"' do + 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 end end - describe 'test attribute "scope"' do + 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 end end - describe 'test attribute "status"' do + 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 end end - describe 'test attribute "usage_data"' do + 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 end diff --git a/clients/hydra/ruby/spec/models/open_id_connect_context_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb similarity index 65% rename from clients/hydra/ruby/spec/models/open_id_connect_context_spec.rb rename to clients/hydra/ruby/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb index fdc961ad1f8..8c24baa1a7e 100644 --- a/clients/hydra/ruby/spec/models/open_id_connect_context_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::OpenIDConnectContext +# Unit tests for OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::OpenIDConnectContext do - let(:instance) { OryHydraClient::OpenIDConnectContext.new } +describe OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext do + let(:instance) { OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext.new } - describe 'test an instance of OpenIDConnectContext' do - it 'should create an instance of OpenIDConnectContext' do - expect(instance).to be_instance_of(OryHydraClient::OpenIDConnectContext) + describe 'test an instance of OAuth2ConsentRequestOpenIDConnectContext' do + it 'should create an instance of OAuth2ConsentRequestOpenIDConnectContext' do + expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentRequestOpenIDConnectContext) end end describe 'test attribute "acr_values"' do diff --git a/clients/hydra/ruby/spec/models/consent_request_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_consent_request_spec.rb similarity index 83% rename from clients/hydra/ruby/spec/models/consent_request_spec.rb rename to clients/hydra/ruby/spec/models/o_auth2_consent_request_spec.rb index 87dbb49d1cf..b324a95260d 100644 --- a/clients/hydra/ruby/spec/models/consent_request_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_consent_request_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::ConsentRequest +# Unit tests for OryHydraClient::OAuth2ConsentRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::ConsentRequest do - let(:instance) { OryHydraClient::ConsentRequest.new } +describe OryHydraClient::OAuth2ConsentRequest do + let(:instance) { OryHydraClient::OAuth2ConsentRequest.new } - describe 'test an instance of ConsentRequest' do - it 'should create an instance of ConsentRequest' do - expect(instance).to be_instance_of(OryHydraClient::ConsentRequest) + describe 'test an instance of OAuth2ConsentRequest' do + it 'should create an instance of OAuth2ConsentRequest' do + expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentRequest) end end describe 'test attribute "acr"' do 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 new file mode 100644 index 00000000000..016968c2d7c --- /dev/null +++ b/clients/hydra/ruby/spec/models/o_auth2_consent_session_expires_at_spec.rb @@ -0,0 +1,58 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::OAuth2ConsentSessionExpiresAt +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::OAuth2ConsentSessionExpiresAt do + let(:instance) { OryHydraClient::OAuth2ConsentSessionExpiresAt.new } + + describe 'test an instance of OAuth2ConsentSessionExpiresAt' do + it 'should create an instance of OAuth2ConsentSessionExpiresAt' do + 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 + 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 + 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 + 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 + 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 + end + end + +end diff --git a/clients/hydra/ruby/spec/models/previous_consent_session_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_consent_session_spec.rb similarity index 69% rename from clients/hydra/ruby/spec/models/previous_consent_session_spec.rb rename to clients/hydra/ruby/spec/models/o_auth2_consent_session_spec.rb index 8d2b9c74019..979ea8eef5e 100644 --- a/clients/hydra/ruby/spec/models/previous_consent_session_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_consent_session_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::PreviousConsentSession +# Unit tests for OryHydraClient::OAuth2ConsentSession # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::PreviousConsentSession do - let(:instance) { OryHydraClient::PreviousConsentSession.new } +describe OryHydraClient::OAuth2ConsentSession do + let(:instance) { OryHydraClient::OAuth2ConsentSession.new } - describe 'test an instance of PreviousConsentSession' do - it 'should create an instance of PreviousConsentSession' do - expect(instance).to be_instance_of(OryHydraClient::PreviousConsentSession) + describe 'test an instance of OAuth2ConsentSession' do + it 'should create an instance of OAuth2ConsentSession' do + expect(instance).to be_instance_of(OryHydraClient::OAuth2ConsentSession) end end describe 'test attribute "consent_request"' do @@ -31,6 +31,12 @@ 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 + 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 diff --git a/clients/hydra/ruby/spec/models/login_request_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_login_request_spec.rb similarity index 79% rename from clients/hydra/ruby/spec/models/login_request_spec.rb rename to clients/hydra/ruby/spec/models/o_auth2_login_request_spec.rb index 94af5942c10..dd2206f7e87 100644 --- a/clients/hydra/ruby/spec/models/login_request_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_login_request_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::LoginRequest +# Unit tests for OryHydraClient::OAuth2LoginRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::LoginRequest do - let(:instance) { OryHydraClient::LoginRequest.new } +describe OryHydraClient::OAuth2LoginRequest do + let(:instance) { OryHydraClient::OAuth2LoginRequest.new } - describe 'test an instance of LoginRequest' do - it 'should create an instance of LoginRequest' do - expect(instance).to be_instance_of(OryHydraClient::LoginRequest) + describe 'test an instance of OAuth2LoginRequest' do + it 'should create an instance of OAuth2LoginRequest' do + expect(instance).to be_instance_of(OryHydraClient::OAuth2LoginRequest) end end describe 'test attribute "challenge"' do diff --git a/clients/hydra/ruby/spec/models/logout_request_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_logout_request_spec.rb similarity index 72% rename from clients/hydra/ruby/spec/models/logout_request_spec.rb rename to clients/hydra/ruby/spec/models/o_auth2_logout_request_spec.rb index 33abef88ca8..587f3353206 100644 --- a/clients/hydra/ruby/spec/models/logout_request_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_logout_request_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::LogoutRequest +# Unit tests for OryHydraClient::OAuth2LogoutRequest # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::LogoutRequest do - let(:instance) { OryHydraClient::LogoutRequest.new } +describe OryHydraClient::OAuth2LogoutRequest do + let(:instance) { OryHydraClient::OAuth2LogoutRequest.new } - describe 'test an instance of LogoutRequest' do - it 'should create an instance of LogoutRequest' do - expect(instance).to be_instance_of(OryHydraClient::LogoutRequest) + describe 'test an instance of OAuth2LogoutRequest' do + it 'should create an instance of OAuth2LogoutRequest' do + expect(instance).to be_instance_of(OryHydraClient::OAuth2LogoutRequest) end end describe 'test attribute "challenge"' do 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 new file mode 100644 index 00000000000..c88f98ede66 --- /dev/null +++ b/clients/hydra/ruby/spec/models/o_auth2_redirect_to_spec.rb @@ -0,0 +1,34 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::OAuth2RedirectTo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::OAuth2RedirectTo do + let(:instance) { OryHydraClient::OAuth2RedirectTo.new } + + describe 'test an instance of OAuth2RedirectTo' do + it 'should create an instance of OAuth2RedirectTo' do + 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 + end + end + +end diff --git a/clients/hydra/ruby/spec/models/oauth2_token_response_spec.rb b/clients/hydra/ruby/spec/models/o_auth2_token_exchange_spec.rb similarity index 71% rename from clients/hydra/ruby/spec/models/oauth2_token_response_spec.rb rename to clients/hydra/ruby/spec/models/o_auth2_token_exchange_spec.rb index ab00914772d..31d800b4423 100644 --- a/clients/hydra/ruby/spec/models/oauth2_token_response_spec.rb +++ b/clients/hydra/ruby/spec/models/o_auth2_token_exchange_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::Oauth2TokenResponse +# Unit tests for OryHydraClient::OAuth2TokenExchange # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::Oauth2TokenResponse do - let(:instance) { OryHydraClient::Oauth2TokenResponse.new } +describe OryHydraClient::OAuth2TokenExchange do + let(:instance) { OryHydraClient::OAuth2TokenExchange.new } - describe 'test an instance of Oauth2TokenResponse' do - it 'should create an instance of Oauth2TokenResponse' do - expect(instance).to be_instance_of(OryHydraClient::Oauth2TokenResponse) + describe 'test an instance of OAuth2TokenExchange' do + it 'should create an instance of OAuth2TokenExchange' do + expect(instance).to be_instance_of(OryHydraClient::OAuth2TokenExchange) end end describe 'test attribute "access_token"' do diff --git a/clients/hydra/ruby/spec/models/well_known_spec.rb b/clients/hydra/ruby/spec/models/oidc_configuration_spec.rb similarity index 86% rename from clients/hydra/ruby/spec/models/well_known_spec.rb rename to clients/hydra/ruby/spec/models/oidc_configuration_spec.rb index aa2cc924bce..0a33afce3b3 100644 --- a/clients/hydra/ruby/spec/models/well_known_spec.rb +++ b/clients/hydra/ruby/spec/models/oidc_configuration_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::WellKnown +# Unit tests for OryHydraClient::OidcConfiguration # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::WellKnown do - let(:instance) { OryHydraClient::WellKnown.new } +describe OryHydraClient::OidcConfiguration do + let(:instance) { OryHydraClient::OidcConfiguration.new } - describe 'test an instance of WellKnown' do - it 'should create an instance of WellKnown' do - expect(instance).to be_instance_of(OryHydraClient::WellKnown) + describe 'test an instance of OidcConfiguration' do + it 'should create an instance of OidcConfiguration' do + expect(instance).to be_instance_of(OryHydraClient::OidcConfiguration) end end describe 'test attribute "authorization_endpoint"' do @@ -85,6 +85,12 @@ 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 + 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 @@ -181,6 +187,12 @@ 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 + 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 diff --git a/clients/hydra/ruby/spec/models/userinfo_response_spec.rb b/clients/hydra/ruby/spec/models/oidc_user_info_spec.rb similarity index 87% rename from clients/hydra/ruby/spec/models/userinfo_response_spec.rb rename to clients/hydra/ruby/spec/models/oidc_user_info_spec.rb index dfd21233957..96939a34789 100644 --- a/clients/hydra/ruby/spec/models/userinfo_response_spec.rb +++ b/clients/hydra/ruby/spec/models/oidc_user_info_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::UserinfoResponse +# Unit tests for OryHydraClient::OidcUserInfo # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::UserinfoResponse do - let(:instance) { OryHydraClient::UserinfoResponse.new } +describe OryHydraClient::OidcUserInfo do + let(:instance) { OryHydraClient::OidcUserInfo.new } - describe 'test an instance of UserinfoResponse' do - it 'should create an instance of UserinfoResponse' do - expect(instance).to be_instance_of(OryHydraClient::UserinfoResponse) + describe 'test an instance of OidcUserInfo' do + it 'should create an instance of OidcUserInfo' do + expect(instance).to be_instance_of(OryHydraClient::OidcUserInfo) end end describe 'test attribute "birthdate"' do diff --git a/clients/hydra/ruby/spec/models/pagination_headers_spec.rb b/clients/hydra/ruby/spec/models/pagination_headers_spec.rb new file mode 100644 index 00000000000..c0c76411084 --- /dev/null +++ b/clients/hydra/ruby/spec/models/pagination_headers_spec.rb @@ -0,0 +1,40 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::PaginationHeaders +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::PaginationHeaders do + let(:instance) { OryHydraClient::PaginationHeaders.new } + + describe 'test an instance of PaginationHeaders' do + it 'should create an instance of PaginationHeaders' do + 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 + 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 + end + end + +end diff --git a/clients/hydra/ruby/spec/models/pagination_spec.rb b/clients/hydra/ruby/spec/models/pagination_spec.rb new file mode 100644 index 00000000000..fd575d18975 --- /dev/null +++ b/clients/hydra/ruby/spec/models/pagination_spec.rb @@ -0,0 +1,40 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::Pagination +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::Pagination do + let(:instance) { OryHydraClient::Pagination.new } + + describe 'test an instance of Pagination' do + it 'should create an instance of Pagination' do + 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 + 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 + end + end + +end diff --git a/clients/hydra/ruby/spec/models/plugin_config_args_spec.rb b/clients/hydra/ruby/spec/models/plugin_config_args_spec.rb deleted file mode 100644 index 6c1e34420b2..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_config_args_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginConfigArgs -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginConfigArgs do - let(:instance) { OryHydraClient::PluginConfigArgs.new } - - describe 'test an instance of PluginConfigArgs' do - it 'should create an instance of PluginConfigArgs' do - expect(instance).to be_instance_of(OryHydraClient::PluginConfigArgs) - end - end - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/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 - end - end - - describe 'test attribute "settable"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/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 - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_config_interface_spec.rb b/clients/hydra/ruby/spec/models/plugin_config_interface_spec.rb deleted file mode 100644 index 6f051ffe0a3..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_config_interface_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginConfigInterface -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginConfigInterface do - let(:instance) { OryHydraClient::PluginConfigInterface.new } - - describe 'test an instance of PluginConfigInterface' do - it 'should create an instance of PluginConfigInterface' do - expect(instance).to be_instance_of(OryHydraClient::PluginConfigInterface) - end - end - describe 'test attribute "protocol_scheme"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "socket"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/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 - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_config_linux_spec.rb b/clients/hydra/ruby/spec/models/plugin_config_linux_spec.rb deleted file mode 100644 index 6b4869a304e..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_config_linux_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginConfigLinux -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginConfigLinux do - let(:instance) { OryHydraClient::PluginConfigLinux.new } - - describe 'test an instance of PluginConfigLinux' do - it 'should create an instance of PluginConfigLinux' do - expect(instance).to be_instance_of(OryHydraClient::PluginConfigLinux) - end - end - describe 'test attribute "allow_all_devices"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "capabilities"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "devices"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_config_network_spec.rb b/clients/hydra/ruby/spec/models/plugin_config_network_spec.rb deleted file mode 100644 index d8b3c88ed96..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_config_network_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginConfigNetwork -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginConfigNetwork do - let(:instance) { OryHydraClient::PluginConfigNetwork.new } - - describe 'test an instance of PluginConfigNetwork' do - it 'should create an instance of PluginConfigNetwork' do - expect(instance).to be_instance_of(OryHydraClient::PluginConfigNetwork) - end - end - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_config_rootfs_spec.rb b/clients/hydra/ruby/spec/models/plugin_config_rootfs_spec.rb deleted file mode 100644 index 235164aef9f..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_config_rootfs_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginConfigRootfs -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginConfigRootfs do - let(:instance) { OryHydraClient::PluginConfigRootfs.new } - - describe 'test an instance of PluginConfigRootfs' do - it 'should create an instance of PluginConfigRootfs' do - expect(instance).to be_instance_of(OryHydraClient::PluginConfigRootfs) - end - end - describe 'test attribute "diff_ids"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_config_spec.rb b/clients/hydra/ruby/spec/models/plugin_config_spec.rb deleted file mode 100644 index ee9e02ce95e..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_config_spec.rb +++ /dev/null @@ -1,124 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginConfig -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginConfig do - let(:instance) { OryHydraClient::PluginConfig.new } - - describe 'test an instance of PluginConfig' do - it 'should create an instance of PluginConfig' do - expect(instance).to be_instance_of(OryHydraClient::PluginConfig) - end - end - describe 'test attribute "args"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "docker_version"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "documentation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "entrypoint"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "env"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "interface"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "ipc_host"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "linux"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mounts"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "network"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "pid_host"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "propagated_mount"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "user"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "work_dir"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "rootfs"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_config_user_spec.rb b/clients/hydra/ruby/spec/models/plugin_config_user_spec.rb deleted file mode 100644 index a211ef0d35c..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_config_user_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginConfigUser -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginConfigUser do - let(:instance) { OryHydraClient::PluginConfigUser.new } - - describe 'test an instance of PluginConfigUser' do - it 'should create an instance of PluginConfigUser' do - expect(instance).to be_instance_of(OryHydraClient::PluginConfigUser) - end - end - describe 'test attribute "gid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "uid"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_device_spec.rb b/clients/hydra/ruby/spec/models/plugin_device_spec.rb deleted file mode 100644 index b46c6a41429..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_device_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginDevice -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginDevice do - let(:instance) { OryHydraClient::PluginDevice.new } - - describe 'test an instance of PluginDevice' do - it 'should create an instance of PluginDevice' do - expect(instance).to be_instance_of(OryHydraClient::PluginDevice) - end - end - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/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 - 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 - end - end - - describe 'test attribute "settable"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_env_spec.rb b/clients/hydra/ruby/spec/models/plugin_env_spec.rb deleted file mode 100644 index 036ee8b3947..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_env_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginEnv -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginEnv do - let(:instance) { OryHydraClient::PluginEnv.new } - - describe 'test an instance of PluginEnv' do - it 'should create an instance of PluginEnv' do - expect(instance).to be_instance_of(OryHydraClient::PluginEnv) - end - end - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/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 - end - end - - describe 'test attribute "settable"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/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 - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_interface_type_spec.rb b/clients/hydra/ruby/spec/models/plugin_interface_type_spec.rb deleted file mode 100644 index 5b9791687b0..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_interface_type_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginInterfaceType -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginInterfaceType do - let(:instance) { OryHydraClient::PluginInterfaceType.new } - - describe 'test an instance of PluginInterfaceType' do - it 'should create an instance of PluginInterfaceType' do - expect(instance).to be_instance_of(OryHydraClient::PluginInterfaceType) - end - end - describe 'test attribute "capability"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "prefix"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - 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 - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_mount_spec.rb b/clients/hydra/ruby/spec/models/plugin_mount_spec.rb deleted file mode 100644 index b29adb35a11..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_mount_spec.rb +++ /dev/null @@ -1,70 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginMount -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginMount do - let(:instance) { OryHydraClient::PluginMount.new } - - describe 'test an instance of PluginMount' do - it 'should create an instance of PluginMount' do - expect(instance).to be_instance_of(OryHydraClient::PluginMount) - end - end - describe 'test attribute "description"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "destination"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/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 - end - end - - describe 'test attribute "options"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "settable"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "source"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/models/plugin_settings_spec.rb b/clients/hydra/ruby/spec/models/plugin_settings_spec.rb deleted file mode 100644 index be0d159868f..00000000000 --- a/clients/hydra/ruby/spec/models/plugin_settings_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::PluginSettings -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::PluginSettings do - let(:instance) { OryHydraClient::PluginSettings.new } - - describe 'test an instance of PluginSettings' do - it 'should create an instance of PluginSettings' do - expect(instance).to be_instance_of(OryHydraClient::PluginSettings) - end - end - describe 'test attribute "args"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "devices"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "env"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "mounts"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/models/json_error_spec.rb b/clients/hydra/ruby/spec/models/reject_o_auth2_request_spec.rb similarity index 58% rename from clients/hydra/ruby/spec/models/json_error_spec.rb rename to clients/hydra/ruby/spec/models/reject_o_auth2_request_spec.rb index da55e9cda09..a6a18c0bcdb 100644 --- a/clients/hydra/ruby/spec/models/json_error_spec.rb +++ b/clients/hydra/ruby/spec/models/reject_o_auth2_request_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::JsonError +# Unit tests for OryHydraClient::RejectOAuth2Request # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::JsonError do - let(:instance) { OryHydraClient::JsonError.new } +describe OryHydraClient::RejectOAuth2Request do + let(:instance) { OryHydraClient::RejectOAuth2Request.new } - describe 'test an instance of JsonError' do - it 'should create an instance of JsonError' do - expect(instance).to be_instance_of(OryHydraClient::JsonError) + describe 'test an instance of RejectOAuth2Request' do + it 'should create an instance of RejectOAuth2Request' do + expect(instance).to be_instance_of(OryHydraClient::RejectOAuth2Request) end end describe 'test attribute "error"' do @@ -43,6 +43,12 @@ 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 + 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 diff --git a/clients/hydra/ruby/spec/models/request_was_handled_response_spec.rb b/clients/hydra/ruby/spec/models/request_was_handled_response_spec.rb deleted file mode 100644 index 66643f2bed1..00000000000 --- a/clients/hydra/ruby/spec/models/request_was_handled_response_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::RequestWasHandledResponse -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::RequestWasHandledResponse do - let(:instance) { OryHydraClient::RequestWasHandledResponse.new } - - describe 'test an instance of RequestWasHandledResponse' do - it 'should create an instance of RequestWasHandledResponse' do - expect(instance).to be_instance_of(OryHydraClient::RequestWasHandledResponse) - 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 - end - 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 new file mode 100644 index 00000000000..acf969f75bd --- /dev/null +++ b/clients/hydra/ruby/spec/models/token_pagination_headers_spec.rb @@ -0,0 +1,40 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::TokenPaginationHeaders +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::TokenPaginationHeaders do + let(:instance) { OryHydraClient::TokenPaginationHeaders.new } + + describe 'test an instance of TokenPaginationHeaders' do + it 'should create an instance of TokenPaginationHeaders' do + 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 + 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 + end + 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 new file mode 100644 index 00000000000..dc27f439d05 --- /dev/null +++ b/clients/hydra/ruby/spec/models/token_pagination_request_parameters_spec.rb @@ -0,0 +1,40 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::TokenPaginationRequestParameters +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::TokenPaginationRequestParameters do + let(:instance) { OryHydraClient::TokenPaginationRequestParameters.new } + + describe 'test an instance of TokenPaginationRequestParameters' do + it 'should create an instance of TokenPaginationRequestParameters' do + 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 + 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 + end + 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 new file mode 100644 index 00000000000..74fd134c1cb --- /dev/null +++ b/clients/hydra/ruby/spec/models/token_pagination_response_headers_spec.rb @@ -0,0 +1,40 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::TokenPaginationResponseHeaders +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::TokenPaginationResponseHeaders do + let(:instance) { OryHydraClient::TokenPaginationResponseHeaders.new } + + describe 'test an instance of TokenPaginationResponseHeaders' do + it 'should create an instance of TokenPaginationResponseHeaders' do + 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 + 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 + end + end + +end diff --git a/clients/hydra/ruby/spec/models/token_pagination_spec.rb b/clients/hydra/ruby/spec/models/token_pagination_spec.rb new file mode 100644 index 00000000000..2e123bc455c --- /dev/null +++ b/clients/hydra/ruby/spec/models/token_pagination_spec.rb @@ -0,0 +1,40 @@ +=begin +#Ory Hydra API + +#Documentation for all of Ory Hydra's APIs. + +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 6.0.1 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for OryHydraClient::TokenPagination +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe OryHydraClient::TokenPagination do + let(:instance) { OryHydraClient::TokenPagination.new } + + describe 'test an instance of TokenPagination' do + it 'should create an instance of TokenPagination' do + 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 + 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 + end + end + +end diff --git a/clients/hydra/ruby/spec/models/trust_jwt_grant_issuer_body_spec.rb b/clients/hydra/ruby/spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb similarity index 61% rename from clients/hydra/ruby/spec/models/trust_jwt_grant_issuer_body_spec.rb rename to clients/hydra/ruby/spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb index 0bb3fbd5fa5..14b0360d259 100644 --- a/clients/hydra/ruby/spec/models/trust_jwt_grant_issuer_body_spec.rb +++ b/clients/hydra/ruby/spec/models/trust_o_auth2_jwt_grant_issuer_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,17 +14,23 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::TrustJwtGrantIssuerBody +# Unit tests for OryHydraClient::TrustOAuth2JwtGrantIssuer # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::TrustJwtGrantIssuerBody do - let(:instance) { OryHydraClient::TrustJwtGrantIssuerBody.new } +describe OryHydraClient::TrustOAuth2JwtGrantIssuer do + let(:instance) { OryHydraClient::TrustOAuth2JwtGrantIssuer.new } - describe 'test an instance of TrustJwtGrantIssuerBody' do - it 'should create an instance of TrustJwtGrantIssuerBody' do - expect(instance).to be_instance_of(OryHydraClient::TrustJwtGrantIssuerBody) + describe 'test an instance of TrustOAuth2JwtGrantIssuer' do + it 'should create an instance of TrustOAuth2JwtGrantIssuer' do + 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 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 diff --git a/clients/hydra/ruby/spec/models/trusted_jwt_grant_issuer_spec.rb b/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb similarity index 69% rename from clients/hydra/ruby/spec/models/trusted_jwt_grant_issuer_spec.rb rename to clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb index 14e0cae7d59..344adca002f 100644 --- a/clients/hydra/ruby/spec/models/trusted_jwt_grant_issuer_spec.rb +++ b/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,17 +14,23 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::TrustedJwtGrantIssuer +# Unit tests for OryHydraClient::TrustedOAuth2JwtGrantIssuer # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::TrustedJwtGrantIssuer do - let(:instance) { OryHydraClient::TrustedJwtGrantIssuer.new } +describe OryHydraClient::TrustedOAuth2JwtGrantIssuer do + let(:instance) { OryHydraClient::TrustedOAuth2JwtGrantIssuer.new } - describe 'test an instance of TrustedJwtGrantIssuer' do - it 'should create an instance of TrustedJwtGrantIssuer' do - expect(instance).to be_instance_of(OryHydraClient::TrustedJwtGrantIssuer) + describe 'test an instance of TrustedOAuth2JwtGrantIssuer' do + it 'should create an instance of TrustedOAuth2JwtGrantIssuer' do + 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 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 diff --git a/clients/hydra/ruby/spec/models/trusted_json_web_key_spec.rb b/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb similarity index 56% rename from clients/hydra/ruby/spec/models/trusted_json_web_key_spec.rb rename to clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb index 1ec94a1ea30..4b19c86672c 100644 --- a/clients/hydra/ruby/spec/models/trusted_json_web_key_spec.rb +++ b/clients/hydra/ruby/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end @@ -14,15 +14,15 @@ require 'json' require 'date' -# Unit tests for OryHydraClient::TrustedJsonWebKey +# Unit tests for OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe OryHydraClient::TrustedJsonWebKey do - let(:instance) { OryHydraClient::TrustedJsonWebKey.new } +describe OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey do + let(:instance) { OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey.new } - describe 'test an instance of TrustedJsonWebKey' do - it 'should create an instance of TrustedJsonWebKey' do - expect(instance).to be_instance_of(OryHydraClient::TrustedJsonWebKey) + describe 'test an instance of TrustedOAuth2JwtGrantJsonWebKey' do + it 'should create an instance of TrustedOAuth2JwtGrantJsonWebKey' do + expect(instance).to be_instance_of(OryHydraClient::TrustedOAuth2JwtGrantJsonWebKey) end end describe 'test attribute "kid"' do diff --git a/clients/hydra/ruby/spec/models/version_spec.rb b/clients/hydra/ruby/spec/models/version_spec.rb index 6a0c8a4a658..4e69174e785 100644 --- a/clients/hydra/ruby/spec/models/version_spec.rb +++ b/clients/hydra/ruby/spec/models/version_spec.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end diff --git a/clients/hydra/ruby/spec/models/volume_usage_data_spec.rb b/clients/hydra/ruby/spec/models/volume_usage_data_spec.rb deleted file mode 100644 index 1549fb7ef9d..00000000000 --- a/clients/hydra/ruby/spec/models/volume_usage_data_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#ORY Hydra - -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 - -Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 - -=end - -require 'spec_helper' -require 'json' -require 'date' - -# Unit tests for OryHydraClient::VolumeUsageData -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe OryHydraClient::VolumeUsageData do - let(:instance) { OryHydraClient::VolumeUsageData.new } - - describe 'test an instance of VolumeUsageData' do - it 'should create an instance of VolumeUsageData' do - expect(instance).to be_instance_of(OryHydraClient::VolumeUsageData) - end - end - describe 'test attribute "ref_count"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "size"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/clients/hydra/ruby/spec/spec_helper.rb b/clients/hydra/ruby/spec/spec_helper.rb index db595c032ee..e19b55d7f40 100644 --- a/clients/hydra/ruby/spec/spec_helper.rb +++ b/clients/hydra/ruby/spec/spec_helper.rb @@ -1,12 +1,12 @@ =begin -#ORY Hydra +#Ory Hydra API -#Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - -The version of the OpenAPI document: v1.11.0 +#Documentation for all of Ory Hydra's APIs. +The version of the OpenAPI document: v2.0.1 +Contact: hi@ory.sh Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.4.0 +OpenAPI Generator version: 6.0.1 =end diff --git a/clients/hydra/rust/.gitignore b/clients/hydra/rust/.gitignore index 6aa106405a4..43735cf136f 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/FILES b/clients/hydra/rust/.openapi-generator/FILES index 8569a6aad0f..09980828402 100644 --- a/clients/hydra/rust/.openapi-generator/FILES +++ b/clients/hydra/rust/.openapi-generator/FILES @@ -3,102 +3,94 @@ .travis.yml Cargo.toml README.md -docs/AcceptConsentRequest.md -docs/AcceptLoginRequest.md -docs/AdminApi.md -docs/CompletedRequest.md -docs/ConsentRequest.md -docs/ConsentRequestSession.md -docs/ContainerWaitOkBodyError.md -docs/FlushInactiveOAuth2TokensRequest.md +docs/AcceptOAuth2ConsentRequest.md +docs/AcceptOAuth2ConsentRequestSession.md +docs/AcceptOAuth2LoginRequest.md +docs/CreateJsonWebKeySet.md +docs/ErrorOAuth2.md docs/GenericError.md +docs/GetVersion200Response.md docs/HealthNotReadyStatus.md docs/HealthStatus.md -docs/JsonError.md +docs/IntrospectedOAuth2Token.md +docs/IsReady200Response.md +docs/IsReady503Response.md +docs/JsonPatch.md docs/JsonWebKey.md docs/JsonWebKeySet.md -docs/JsonWebKeySetGeneratorRequest.md -docs/LoginRequest.md -docs/LogoutRequest.md +docs/JwkApi.md docs/MetadataApi.md +docs/OAuth2Api.md docs/OAuth2Client.md -docs/OAuth2TokenIntrospection.md -docs/Oauth2TokenResponse.md -docs/OpenIdConnectContext.md -docs/PatchDocument.md -docs/PluginConfig.md -docs/PluginConfigArgs.md -docs/PluginConfigInterface.md -docs/PluginConfigLinux.md -docs/PluginConfigNetwork.md -docs/PluginConfigRootfs.md -docs/PluginConfigUser.md -docs/PluginDevice.md -docs/PluginEnv.md -docs/PluginInterfaceType.md -docs/PluginMount.md -docs/PluginSettings.md -docs/PreviousConsentSession.md -docs/PublicApi.md -docs/RejectRequest.md -docs/RequestWasHandledResponse.md -docs/TrustJwtGrantIssuerBody.md -docs/TrustedJsonWebKey.md -docs/TrustedJwtGrantIssuer.md -docs/UserinfoResponse.md +docs/OAuth2ClientTokenLifespans.md +docs/OAuth2ConsentRequest.md +docs/OAuth2ConsentRequestOpenIdConnectContext.md +docs/OAuth2ConsentSession.md +docs/OAuth2ConsentSessionExpiresAt.md +docs/OAuth2LoginRequest.md +docs/OAuth2LogoutRequest.md +docs/OAuth2RedirectTo.md +docs/OAuth2TokenExchange.md +docs/OidcApi.md +docs/OidcConfiguration.md +docs/OidcUserInfo.md +docs/Pagination.md +docs/PaginationHeaders.md +docs/RejectOAuth2Request.md +docs/TokenPagination.md +docs/TokenPaginationHeaders.md +docs/TokenPaginationRequestParameters.md +docs/TokenPaginationResponseHeaders.md +docs/TrustOAuth2JwtGrantIssuer.md +docs/TrustedOAuth2JwtGrantIssuer.md +docs/TrustedOAuth2JwtGrantJsonWebKey.md docs/Version.md -docs/Volume.md -docs/VolumeUsageData.md -docs/WellKnown.md +docs/WellknownApi.md git_push.sh -src/apis/admin_api.rs src/apis/configuration.rs +src/apis/jwk_api.rs src/apis/metadata_api.rs src/apis/mod.rs -src/apis/public_api.rs +src/apis/o_auth2_api.rs +src/apis/oidc_api.rs +src/apis/wellknown_api.rs src/lib.rs -src/models/accept_consent_request.rs -src/models/accept_login_request.rs -src/models/completed_request.rs -src/models/consent_request.rs -src/models/consent_request_session.rs -src/models/container_wait_ok_body_error.rs -src/models/flush_inactive_o_auth2_tokens_request.rs +src/models/accept_o_auth2_consent_request.rs +src/models/accept_o_auth2_consent_request_session.rs +src/models/accept_o_auth2_login_request.rs +src/models/create_json_web_key_set.rs +src/models/error_o_auth2.rs src/models/generic_error.rs +src/models/get_version_200_response.rs src/models/health_not_ready_status.rs src/models/health_status.rs -src/models/json_error.rs +src/models/introspected_o_auth2_token.rs +src/models/is_ready_200_response.rs +src/models/is_ready_503_response.rs +src/models/json_patch.rs src/models/json_web_key.rs src/models/json_web_key_set.rs -src/models/json_web_key_set_generator_request.rs -src/models/login_request.rs -src/models/logout_request.rs src/models/mod.rs src/models/o_auth2_client.rs -src/models/o_auth2_token_introspection.rs -src/models/oauth2_token_response.rs -src/models/open_id_connect_context.rs -src/models/patch_document.rs -src/models/plugin_config.rs -src/models/plugin_config_args.rs -src/models/plugin_config_interface.rs -src/models/plugin_config_linux.rs -src/models/plugin_config_network.rs -src/models/plugin_config_rootfs.rs -src/models/plugin_config_user.rs -src/models/plugin_device.rs -src/models/plugin_env.rs -src/models/plugin_interface_type.rs -src/models/plugin_mount.rs -src/models/plugin_settings.rs -src/models/previous_consent_session.rs -src/models/reject_request.rs -src/models/request_was_handled_response.rs -src/models/trust_jwt_grant_issuer_body.rs -src/models/trusted_json_web_key.rs -src/models/trusted_jwt_grant_issuer.rs -src/models/userinfo_response.rs +src/models/o_auth2_client_token_lifespans.rs +src/models/o_auth2_consent_request.rs +src/models/o_auth2_consent_request_open_id_connect_context.rs +src/models/o_auth2_consent_session.rs +src/models/o_auth2_consent_session_expires_at.rs +src/models/o_auth2_login_request.rs +src/models/o_auth2_logout_request.rs +src/models/o_auth2_redirect_to.rs +src/models/o_auth2_token_exchange.rs +src/models/oidc_configuration.rs +src/models/oidc_user_info.rs +src/models/pagination.rs +src/models/pagination_headers.rs +src/models/reject_o_auth2_request.rs +src/models/token_pagination.rs +src/models/token_pagination_headers.rs +src/models/token_pagination_request_parameters.rs +src/models/token_pagination_response_headers.rs +src/models/trust_o_auth2_jwt_grant_issuer.rs +src/models/trusted_o_auth2_jwt_grant_issuer.rs +src/models/trusted_o_auth2_jwt_grant_json_web_key.rs src/models/version.rs -src/models/volume.rs -src/models/volume_usage_data.rs -src/models/well_known.rs diff --git a/clients/hydra/rust/.openapi-generator/VERSION b/clients/hydra/rust/.openapi-generator/VERSION index 804440660c7..6d54bbd7751 100644 --- a/clients/hydra/rust/.openapi-generator/VERSION +++ b/clients/hydra/rust/.openapi-generator/VERSION @@ -1 +1 @@ -5.2.1 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/clients/hydra/rust/Cargo.lock b/clients/hydra/rust/Cargo.lock new file mode 100644 index 00000000000..cbb64620479 --- /dev/null +++ b/clients/hydra/rust/Cargo.lock @@ -0,0 +1,747 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "bumpalo" +version = "3.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" + +[[package]] +name = "bytes" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "encoding_rs" +version = "0.8.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" + +[[package]] +name = "futures-sink" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" + +[[package]] +name = "futures-task" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "h2" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "http" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "ipnet" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" + +[[package]] +name = "itoa" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.137" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "mime_guess" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" + +[[package]] +name = "ory-hydra-client" +version = "2.0.1" +dependencies = [ + "num-traits", + "reqwest", + "serde", + "serde_derive", + "serde_json", + "url", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "proc-macro2" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "reqwest" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "ipnet", + "js-sys", + "log", + "mime", + "mime_guess", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ryu" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + +[[package]] +name = "serde" +version = "1.0.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" + +[[package]] +name = "serde_derive" +version = "1.0.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "syn" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "tokio" +version = "1.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "pin-project-lite", + "socket2", + "winapi", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +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", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] diff --git a/clients/hydra/rust/Cargo.toml b/clients/hydra/rust/Cargo.toml index dc74479c876..4344569b8a0 100644 --- a/clients/hydra/rust/Cargo.toml +++ b/clients/hydra/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ory-hydra-client" -version = "1.11.0" +version = "2.0.1" description = "SDK Client for Ory Hydra" documentation = "https://www.ory.sh/hydra/docs/sdk" homepage = "https://www.ory.sh" @@ -9,6 +9,7 @@ authors = ["OpenAPI Generator team and contributors"] edition = "2018" [dependencies] +num-traits = { version = "^0.2", default-features = false } serde = "^1.0" serde_derive = "^1.0" serde_json = "^1.0" diff --git a/clients/hydra/rust/README.md b/clients/hydra/rust/README.md index e264a829246..e0c9f9e36d0 100644 --- a/clients/hydra/rust/README.md +++ b/clients/hydra/rust/README.md @@ -1,21 +1,23 @@ # Rust API client for ory-hydra-client -Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. +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://openapis.org) from a remote server, you can easily generate an API client. -- API version: v1.11.0 -- Package version: v1.11.0 -- Build package: org.openapitools.codegen.languages.RustClientCodegen +- API version: v2.0.1 +- Package version: v2.0.1 +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation -Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: +Put the package under your project folder in a directory named `ory-hydra-client` and add the following to `Cargo.toml` under `[dependencies]`: ``` - openapi = { path = "./generated" } +ory-hydra-client = { path = "./ory-hydra-client" } ``` ## Documentation for API Endpoints @@ -24,101 +26,94 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AdminApi* | [**accept_consent_request**](docs/AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -*AdminApi* | [**accept_login_request**](docs/AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -*AdminApi* | [**accept_logout_request**](docs/AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -*AdminApi* | [**create_json_web_key_set**](docs/AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a New JSON Web Key -*AdminApi* | [**create_o_auth2_client**](docs/AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 Client -*AdminApi* | [**delete_json_web_key**](docs/AdminApi.md#delete_json_web_key) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -*AdminApi* | [**delete_json_web_key_set**](docs/AdminApi.md#delete_json_web_key_set) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -*AdminApi* | [**delete_o_auth2_client**](docs/AdminApi.md#delete_o_auth2_client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -*AdminApi* | [**delete_o_auth2_token**](docs/AdminApi.md#delete_o_auth2_token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -*AdminApi* | [**delete_trusted_jwt_grant_issuer**](docs/AdminApi.md#delete_trusted_jwt_grant_issuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**flush_inactive_o_auth2_tokens**](docs/AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -*AdminApi* | [**get_consent_request**](docs/AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -*AdminApi* | [**get_json_web_key**](docs/AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -*AdminApi* | [**get_json_web_key_set**](docs/AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -*AdminApi* | [**get_login_request**](docs/AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a Login Request -*AdminApi* | [**get_logout_request**](docs/AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -*AdminApi* | [**get_o_auth2_client**](docs/AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -*AdminApi* | [**get_trusted_jwt_grant_issuer**](docs/AdminApi.md#get_trusted_jwt_grant_issuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**get_version**](docs/AdminApi.md#get_version) | **GET** /version | Get Service Version -*AdminApi* | [**introspect_o_auth2_token**](docs/AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -*AdminApi* | [**is_instance_alive**](docs/AdminApi.md#is_instance_alive) | **GET** /health/alive | Check Alive Status -*AdminApi* | [**list_o_auth2_clients**](docs/AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients -*AdminApi* | [**list_subject_consent_sessions**](docs/AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -*AdminApi* | [**list_trusted_jwt_grant_issuers**](docs/AdminApi.md#list_trusted_jwt_grant_issuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -*AdminApi* | [**patch_o_auth2_client**](docs/AdminApi.md#patch_o_auth2_client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -*AdminApi* | [**reject_consent_request**](docs/AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -*AdminApi* | [**reject_login_request**](docs/AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -*AdminApi* | [**reject_logout_request**](docs/AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -*AdminApi* | [**revoke_authentication_session**](docs/AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -*AdminApi* | [**revoke_consent_sessions**](docs/AdminApi.md#revoke_consent_sessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -*AdminApi* | [**trust_jwt_grant_issuer**](docs/AdminApi.md#trust_jwt_grant_issuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -*AdminApi* | [**update_json_web_key**](docs/AdminApi.md#update_json_web_key) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -*AdminApi* | [**update_json_web_key_set**](docs/AdminApi.md#update_json_web_key_set) | **PUT** /keys/{set} | Update a JSON Web Key Set -*AdminApi* | [**update_o_auth2_client**](docs/AdminApi.md#update_o_auth2_client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client -*MetadataApi* | [**prometheus**](docs/MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: -*PublicApi* | [**disconnect_user**](docs/PublicApi.md#disconnect_user) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -*PublicApi* | [**discover_open_id_configuration**](docs/PublicApi.md#discover_open_id_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -*PublicApi* | [**dynamic_client_registration_create_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_create_o_auth2_client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamic_client_registration_delete_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_delete_o_auth2_client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamic_client_registration_get_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_get_o_auth2_client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**dynamic_client_registration_update_o_auth2_client**](docs/PublicApi.md#dynamic_client_registration_update_o_auth2_client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -*PublicApi* | [**is_instance_ready**](docs/PublicApi.md#is_instance_ready) | **GET** /health/ready | Check Readiness Status -*PublicApi* | [**oauth2_token**](docs/PublicApi.md#oauth2_token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -*PublicApi* | [**oauth_auth**](docs/PublicApi.md#oauth_auth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -*PublicApi* | [**revoke_o_auth2_token**](docs/PublicApi.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -*PublicApi* | [**userinfo**](docs/PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -*PublicApi* | [**well_known**](docs/PublicApi.md#well_known) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery +*JwkApi* | [**create_json_web_key_set**](docs/JwkApi.md#create_json_web_key_set) | **POST** /admin/keys/{set} | Create JSON Web Key +*JwkApi* | [**delete_json_web_key**](docs/JwkApi.md#delete_json_web_key) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key +*JwkApi* | [**delete_json_web_key_set**](docs/JwkApi.md#delete_json_web_key_set) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set +*JwkApi* | [**get_json_web_key**](docs/JwkApi.md#get_json_web_key) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key +*JwkApi* | [**get_json_web_key_set**](docs/JwkApi.md#get_json_web_key_set) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set +*JwkApi* | [**set_json_web_key**](docs/JwkApi.md#set_json_web_key) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key +*JwkApi* | [**set_json_web_key_set**](docs/JwkApi.md#set_json_web_key_set) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set +*MetadataApi* | [**get_version**](docs/MetadataApi.md#get_version) | **GET** /version | Return Running Software Version. +*MetadataApi* | [**is_alive**](docs/MetadataApi.md#is_alive) | **GET** /health/alive | Check HTTP Server Status +*MetadataApi* | [**is_ready**](docs/MetadataApi.md#is_ready) | **GET** /health/ready | Check HTTP Server and Database Status +*OAuth2Api* | [**accept_o_auth2_consent_request**](docs/OAuth2Api.md#accept_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +*OAuth2Api* | [**accept_o_auth2_login_request**](docs/OAuth2Api.md#accept_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +*OAuth2Api* | [**accept_o_auth2_logout_request**](docs/OAuth2Api.md#accept_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +*OAuth2Api* | [**create_o_auth2_client**](docs/OAuth2Api.md#create_o_auth2_client) | **POST** /admin/clients | Create OAuth 2.0 Client +*OAuth2Api* | [**delete_o_auth2_client**](docs/OAuth2Api.md#delete_o_auth2_client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client +*OAuth2Api* | [**delete_o_auth2_token**](docs/OAuth2Api.md#delete_o_auth2_token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +*OAuth2Api* | [**delete_trusted_o_auth2_jwt_grant_issuer**](docs/OAuth2Api.md#delete_trusted_o_auth2_jwt_grant_issuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**get_o_auth2_client**](docs/OAuth2Api.md#get_o_auth2_client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client +*OAuth2Api* | [**get_o_auth2_consent_request**](docs/OAuth2Api.md#get_o_auth2_consent_request) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +*OAuth2Api* | [**get_o_auth2_login_request**](docs/OAuth2Api.md#get_o_auth2_login_request) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +*OAuth2Api* | [**get_o_auth2_logout_request**](docs/OAuth2Api.md#get_o_auth2_logout_request) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +*OAuth2Api* | [**get_trusted_o_auth2_jwt_grant_issuer**](docs/OAuth2Api.md#get_trusted_o_auth2_jwt_grant_issuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +*OAuth2Api* | [**introspect_o_auth2_token**](docs/OAuth2Api.md#introspect_o_auth2_token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +*OAuth2Api* | [**list_o_auth2_clients**](docs/OAuth2Api.md#list_o_auth2_clients) | **GET** /admin/clients | List OAuth 2.0 Clients +*OAuth2Api* | [**list_o_auth2_consent_sessions**](docs/OAuth2Api.md#list_o_auth2_consent_sessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**list_trusted_o_auth2_jwt_grant_issuers**](docs/OAuth2Api.md#list_trusted_o_auth2_jwt_grant_issuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +*OAuth2Api* | [**o_auth2_authorize**](docs/OAuth2Api.md#o_auth2_authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint +*OAuth2Api* | [**oauth2_token_exchange**](docs/OAuth2Api.md#oauth2_token_exchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint +*OAuth2Api* | [**patch_o_auth2_client**](docs/OAuth2Api.md#patch_o_auth2_client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client +*OAuth2Api* | [**reject_o_auth2_consent_request**](docs/OAuth2Api.md#reject_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +*OAuth2Api* | [**reject_o_auth2_login_request**](docs/OAuth2Api.md#reject_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +*OAuth2Api* | [**reject_o_auth2_logout_request**](docs/OAuth2Api.md#reject_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +*OAuth2Api* | [**revoke_o_auth2_consent_sessions**](docs/OAuth2Api.md#revoke_o_auth2_consent_sessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +*OAuth2Api* | [**revoke_o_auth2_login_sessions**](docs/OAuth2Api.md#revoke_o_auth2_login_sessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +*OAuth2Api* | [**revoke_o_auth2_token**](docs/OAuth2Api.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +*OAuth2Api* | [**set_o_auth2_client**](docs/OAuth2Api.md#set_o_auth2_client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client +*OAuth2Api* | [**set_o_auth2_client_lifespans**](docs/OAuth2Api.md#set_o_auth2_client_lifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +*OAuth2Api* | [**trust_o_auth2_jwt_grant_issuer**](docs/OAuth2Api.md#trust_o_auth2_jwt_grant_issuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer +*OidcApi* | [**create_oidc_dynamic_client**](docs/OidcApi.md#create_oidc_dynamic_client) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**delete_oidc_dynamic_client**](docs/OidcApi.md#delete_oidc_dynamic_client) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +*OidcApi* | [**discover_oidc_configuration**](docs/OidcApi.md#discover_oidc_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery +*OidcApi* | [**get_oidc_dynamic_client**](docs/OidcApi.md#get_oidc_dynamic_client) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +*OidcApi* | [**get_oidc_user_info**](docs/OidcApi.md#get_oidc_user_info) | **GET** /userinfo | OpenID Connect Userinfo +*OidcApi* | [**revoke_oidc_session**](docs/OidcApi.md#revoke_oidc_session) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +*OidcApi* | [**set_oidc_dynamic_client**](docs/OidcApi.md#set_oidc_dynamic_client) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration +*WellknownApi* | [**discover_json_web_keys**](docs/WellknownApi.md#discover_json_web_keys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys ## Documentation For Models - - [AcceptConsentRequest](docs/AcceptConsentRequest.md) - - [AcceptLoginRequest](docs/AcceptLoginRequest.md) - - [CompletedRequest](docs/CompletedRequest.md) - - [ConsentRequest](docs/ConsentRequest.md) - - [ConsentRequestSession](docs/ConsentRequestSession.md) - - [ContainerWaitOkBodyError](docs/ContainerWaitOkBodyError.md) - - [FlushInactiveOAuth2TokensRequest](docs/FlushInactiveOAuth2TokensRequest.md) + - [AcceptOAuth2ConsentRequest](docs/AcceptOAuth2ConsentRequest.md) + - [AcceptOAuth2ConsentRequestSession](docs/AcceptOAuth2ConsentRequestSession.md) + - [AcceptOAuth2LoginRequest](docs/AcceptOAuth2LoginRequest.md) + - [CreateJsonWebKeySet](docs/CreateJsonWebKeySet.md) + - [ErrorOAuth2](docs/ErrorOAuth2.md) - [GenericError](docs/GenericError.md) + - [GetVersion200Response](docs/GetVersion200Response.md) - [HealthNotReadyStatus](docs/HealthNotReadyStatus.md) - [HealthStatus](docs/HealthStatus.md) - - [JsonError](docs/JsonError.md) + - [IntrospectedOAuth2Token](docs/IntrospectedOAuth2Token.md) + - [IsReady200Response](docs/IsReady200Response.md) + - [IsReady503Response](docs/IsReady503Response.md) + - [JsonPatch](docs/JsonPatch.md) - [JsonWebKey](docs/JsonWebKey.md) - [JsonWebKeySet](docs/JsonWebKeySet.md) - - [JsonWebKeySetGeneratorRequest](docs/JsonWebKeySetGeneratorRequest.md) - - [LoginRequest](docs/LoginRequest.md) - - [LogoutRequest](docs/LogoutRequest.md) - [OAuth2Client](docs/OAuth2Client.md) - - [OAuth2TokenIntrospection](docs/OAuth2TokenIntrospection.md) - - [Oauth2TokenResponse](docs/Oauth2TokenResponse.md) - - [OpenIdConnectContext](docs/OpenIdConnectContext.md) - - [PatchDocument](docs/PatchDocument.md) - - [PluginConfig](docs/PluginConfig.md) - - [PluginConfigArgs](docs/PluginConfigArgs.md) - - [PluginConfigInterface](docs/PluginConfigInterface.md) - - [PluginConfigLinux](docs/PluginConfigLinux.md) - - [PluginConfigNetwork](docs/PluginConfigNetwork.md) - - [PluginConfigRootfs](docs/PluginConfigRootfs.md) - - [PluginConfigUser](docs/PluginConfigUser.md) - - [PluginDevice](docs/PluginDevice.md) - - [PluginEnv](docs/PluginEnv.md) - - [PluginInterfaceType](docs/PluginInterfaceType.md) - - [PluginMount](docs/PluginMount.md) - - [PluginSettings](docs/PluginSettings.md) - - [PreviousConsentSession](docs/PreviousConsentSession.md) - - [RejectRequest](docs/RejectRequest.md) - - [RequestWasHandledResponse](docs/RequestWasHandledResponse.md) - - [TrustJwtGrantIssuerBody](docs/TrustJwtGrantIssuerBody.md) - - [TrustedJsonWebKey](docs/TrustedJsonWebKey.md) - - [TrustedJwtGrantIssuer](docs/TrustedJwtGrantIssuer.md) - - [UserinfoResponse](docs/UserinfoResponse.md) + - [OAuth2ClientTokenLifespans](docs/OAuth2ClientTokenLifespans.md) + - [OAuth2ConsentRequest](docs/OAuth2ConsentRequest.md) + - [OAuth2ConsentRequestOpenIdConnectContext](docs/OAuth2ConsentRequestOpenIdConnectContext.md) + - [OAuth2ConsentSession](docs/OAuth2ConsentSession.md) + - [OAuth2ConsentSessionExpiresAt](docs/OAuth2ConsentSessionExpiresAt.md) + - [OAuth2LoginRequest](docs/OAuth2LoginRequest.md) + - [OAuth2LogoutRequest](docs/OAuth2LogoutRequest.md) + - [OAuth2RedirectTo](docs/OAuth2RedirectTo.md) + - [OAuth2TokenExchange](docs/OAuth2TokenExchange.md) + - [OidcConfiguration](docs/OidcConfiguration.md) + - [OidcUserInfo](docs/OidcUserInfo.md) + - [Pagination](docs/Pagination.md) + - [PaginationHeaders](docs/PaginationHeaders.md) + - [RejectOAuth2Request](docs/RejectOAuth2Request.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) + - [TrustedOAuth2JwtGrantJsonWebKey](docs/TrustedOAuth2JwtGrantJsonWebKey.md) - [Version](docs/Version.md) - - [Volume](docs/Volume.md) - - [VolumeUsageData](docs/VolumeUsageData.md) - - [WellKnown](docs/WellKnown.md) To get access to the crate's generated documentation, use: @@ -129,5 +124,5 @@ cargo doc --open ## Author - +hi@ory.sh diff --git a/clients/hydra/rust/docs/AcceptConsentRequest.md b/clients/hydra/rust/docs/AcceptOAuth2ConsentRequest.md similarity index 84% rename from clients/hydra/rust/docs/AcceptConsentRequest.md rename to clients/hydra/rust/docs/AcceptOAuth2ConsentRequest.md index f873bf0f42a..3a4c61ec078 100644 --- a/clients/hydra/rust/docs/AcceptConsentRequest.md +++ b/clients/hydra/rust/docs/AcceptOAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# AcceptConsentRequest +# AcceptOAuth2ConsentRequest ## Properties @@ -9,7 +9,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::ConsentRequestSession**](consentRequestSession.md)> | | [optional] +**session** | Option<[**crate::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/ConsentRequestSession.md b/clients/hydra/rust/docs/AcceptOAuth2ConsentRequestSession.md similarity index 96% rename from clients/hydra/rust/docs/ConsentRequestSession.md rename to clients/hydra/rust/docs/AcceptOAuth2ConsentRequestSession.md index 0823ad0974a..166c96e3aa3 100644 --- a/clients/hydra/rust/docs/ConsentRequestSession.md +++ b/clients/hydra/rust/docs/AcceptOAuth2ConsentRequestSession.md @@ -1,4 +1,4 @@ -# ConsentRequestSession +# AcceptOAuth2ConsentRequestSession ## Properties diff --git a/clients/hydra/rust/docs/AcceptLoginRequest.md b/clients/hydra/rust/docs/AcceptOAuth2LoginRequest.md similarity index 98% rename from clients/hydra/rust/docs/AcceptLoginRequest.md rename to clients/hydra/rust/docs/AcceptOAuth2LoginRequest.md index 88cc9050829..2d919a772fc 100644 --- a/clients/hydra/rust/docs/AcceptLoginRequest.md +++ b/clients/hydra/rust/docs/AcceptOAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# AcceptLoginRequest +# AcceptOAuth2LoginRequest ## Properties diff --git a/clients/hydra/rust/docs/AdminApi.md b/clients/hydra/rust/docs/AdminApi.md deleted file mode 100644 index e136157b472..00000000000 --- a/clients/hydra/rust/docs/AdminApi.md +++ /dev/null @@ -1,1077 +0,0 @@ -# \AdminApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**accept_consent_request**](AdminApi.md#accept_consent_request) | **PUT** /oauth2/auth/requests/consent/accept | Accept a Consent Request -[**accept_login_request**](AdminApi.md#accept_login_request) | **PUT** /oauth2/auth/requests/login/accept | Accept a Login Request -[**accept_logout_request**](AdminApi.md#accept_logout_request) | **PUT** /oauth2/auth/requests/logout/accept | Accept a Logout Request -[**create_json_web_key_set**](AdminApi.md#create_json_web_key_set) | **POST** /keys/{set} | Generate a New JSON Web Key -[**create_o_auth2_client**](AdminApi.md#create_o_auth2_client) | **POST** /clients | Create an OAuth 2.0 Client -[**delete_json_web_key**](AdminApi.md#delete_json_web_key) | **DELETE** /keys/{set}/{kid} | Delete a JSON Web Key -[**delete_json_web_key_set**](AdminApi.md#delete_json_web_key_set) | **DELETE** /keys/{set} | Delete a JSON Web Key Set -[**delete_o_auth2_client**](AdminApi.md#delete_o_auth2_client) | **DELETE** /clients/{id} | Deletes an OAuth 2.0 Client -[**delete_o_auth2_token**](AdminApi.md#delete_o_auth2_token) | **DELETE** /oauth2/tokens | Delete OAuth2 Access Tokens from a Client -[**delete_trusted_jwt_grant_issuer**](AdminApi.md#delete_trusted_jwt_grant_issuer) | **DELETE** /trust/grants/jwt-bearer/issuers/{id} | Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**flush_inactive_o_auth2_tokens**](AdminApi.md#flush_inactive_o_auth2_tokens) | **POST** /oauth2/flush | Flush Expired OAuth2 Access Tokens -[**get_consent_request**](AdminApi.md#get_consent_request) | **GET** /oauth2/auth/requests/consent | Get Consent Request Information -[**get_json_web_key**](AdminApi.md#get_json_web_key) | **GET** /keys/{set}/{kid} | Fetch a JSON Web Key -[**get_json_web_key_set**](AdminApi.md#get_json_web_key_set) | **GET** /keys/{set} | Retrieve a JSON Web Key Set -[**get_login_request**](AdminApi.md#get_login_request) | **GET** /oauth2/auth/requests/login | Get a Login Request -[**get_logout_request**](AdminApi.md#get_logout_request) | **GET** /oauth2/auth/requests/logout | Get a Logout Request -[**get_o_auth2_client**](AdminApi.md#get_o_auth2_client) | **GET** /clients/{id} | Get an OAuth 2.0 Client -[**get_trusted_jwt_grant_issuer**](AdminApi.md#get_trusted_jwt_grant_issuer) | **GET** /trust/grants/jwt-bearer/issuers/{id} | Get a Trusted OAuth2 JWT Bearer Grant Type Issuer -[**get_version**](AdminApi.md#get_version) | **GET** /version | Get Service Version -[**introspect_o_auth2_token**](AdminApi.md#introspect_o_auth2_token) | **POST** /oauth2/introspect | Introspect OAuth2 Tokens -[**is_instance_alive**](AdminApi.md#is_instance_alive) | **GET** /health/alive | Check Alive Status -[**list_o_auth2_clients**](AdminApi.md#list_o_auth2_clients) | **GET** /clients | List OAuth 2.0 Clients -[**list_subject_consent_sessions**](AdminApi.md#list_subject_consent_sessions) | **GET** /oauth2/auth/sessions/consent | Lists All Consent Sessions of a Subject -[**list_trusted_jwt_grant_issuers**](AdminApi.md#list_trusted_jwt_grant_issuers) | **GET** /trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers -[**patch_o_auth2_client**](AdminApi.md#patch_o_auth2_client) | **PATCH** /clients/{id} | Patch an OAuth 2.0 Client -[**reject_consent_request**](AdminApi.md#reject_consent_request) | **PUT** /oauth2/auth/requests/consent/reject | Reject a Consent Request -[**reject_login_request**](AdminApi.md#reject_login_request) | **PUT** /oauth2/auth/requests/login/reject | Reject a Login Request -[**reject_logout_request**](AdminApi.md#reject_logout_request) | **PUT** /oauth2/auth/requests/logout/reject | Reject a Logout Request -[**revoke_authentication_session**](AdminApi.md#revoke_authentication_session) | **DELETE** /oauth2/auth/sessions/login | Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session -[**revoke_consent_sessions**](AdminApi.md#revoke_consent_sessions) | **DELETE** /oauth2/auth/sessions/consent | Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client -[**trust_jwt_grant_issuer**](AdminApi.md#trust_jwt_grant_issuer) | **POST** /trust/grants/jwt-bearer/issuers | Trust an OAuth2 JWT Bearer Grant Type Issuer -[**update_json_web_key**](AdminApi.md#update_json_web_key) | **PUT** /keys/{set}/{kid} | Update a JSON Web Key -[**update_json_web_key_set**](AdminApi.md#update_json_web_key_set) | **PUT** /keys/{set} | Update a JSON Web Key Set -[**update_o_auth2_client**](AdminApi.md#update_o_auth2_client) | **PUT** /clients/{id} | Update an OAuth 2.0 Client - - - -## accept_consent_request - -> crate::models::CompletedRequest accept_consent_request(consent_challenge, body) -Accept a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**consent_challenge** | **String** | | [required] | -**body** | Option<[**AcceptConsentRequest**](AcceptConsentRequest.md)> | | | - -### Return type - -[**crate::models::CompletedRequest**](completedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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_login_request - -> crate::models::CompletedRequest accept_login_request(login_challenge, body) -Accept a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**login_challenge** | **String** | | [required] | -**body** | Option<[**AcceptLoginRequest**](AcceptLoginRequest.md)> | | | - -### Return type - -[**crate::models::CompletedRequest**](completedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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_logout_request - -> crate::models::CompletedRequest accept_logout_request(logout_challenge) -Accept a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**logout_challenge** | **String** | | [required] | - -### Return type - -[**crate::models::CompletedRequest**](completedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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_json_web_key_set - -> crate::models::JsonWebKeySet create_json_web_key_set(set, body) -Generate a New 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**set** | **String** | The set | [required] | -**body** | Option<[**JsonWebKeySetGeneratorRequest**](JsonWebKeySetGeneratorRequest.md)> | | | - -### Return type - -[**crate::models::JsonWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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_o_auth2_client - -> crate::models::OAuth2Client create_o_auth2_client(body) -Create an OAuth 2.0 Client - -Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**OAuth2Client**](OAuth2Client.md) | | [required] | - -### Return type - -[**crate::models::OAuth2Client**](oAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## delete_json_web_key - -> delete_json_web_key(kid, set) -Delete a 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**kid** | **String** | The kid of the desired key | [required] | -**set** | **String** | The set | [required] | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## delete_json_web_key_set - -> delete_json_web_key_set(set) -Delete a 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**set** | **String** | The set | [required] | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## delete_o_auth2_client - -> delete_o_auth2_client(id) -Deletes an 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **String** | The id of the OAuth 2.0 Client. | [required] | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## delete_o_auth2_token - -> delete_o_auth2_token(client_id) -Delete OAuth2 Access Tokens from a Client - -This endpoint deletes OAuth2 access tokens issued for a client from the database - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**client_id** | **String** | | [required] | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## delete_trusted_jwt_grant_issuer - -> delete_trusted_jwt_grant_issuer(id) -Delete a 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **String** | The id of the desired grant | [required] | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## flush_inactive_o_auth2_tokens - -> flush_inactive_o_auth2_tokens(body) -Flush Expired OAuth2 Access Tokens - -This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**FlushInactiveOAuth2TokensRequest**](FlushInactiveOAuth2TokensRequest.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## get_consent_request - -> crate::models::ConsentRequest get_consent_request(consent_challenge) -Get Consent Request Information - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**consent_challenge** | **String** | | [required] | - -### Return type - -[**crate::models::ConsentRequest**](consentRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## get_json_web_key - -> crate::models::JsonWebKeySet get_json_web_key(kid, set) -Fetch a JSON Web Key - -This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**kid** | **String** | The kid of the desired key | [required] | -**set** | **String** | The set | [required] | - -### Return type - -[**crate::models::JsonWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## get_json_web_key_set - -> crate::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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**set** | **String** | The set | [required] | - -### Return type - -[**crate::models::JsonWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## get_login_request - -> crate::models::LoginRequest get_login_request(login_challenge) -Get a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**login_challenge** | **String** | | [required] | - -### Return type - -[**crate::models::LoginRequest**](loginRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## get_logout_request - -> crate::models::LogoutRequest get_logout_request(logout_challenge) -Get a Logout Request - -Use this endpoint to fetch a logout request. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**logout_challenge** | **String** | | [required] | - -### Return type - -[**crate::models::LogoutRequest**](logoutRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## get_o_auth2_client - -> crate::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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **String** | The id of the OAuth 2.0 Client. | [required] | - -### Return type - -[**crate::models::OAuth2Client**](oAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## get_trusted_jwt_grant_issuer - -> crate::models::TrustedJwtGrantIssuer get_trusted_jwt_grant_issuer(id) -Get a 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **String** | The id of the desired grant | [required] | - -### Return type - -[**crate::models::TrustedJwtGrantIssuer**](trustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## get_version - -> crate::models::Version get_version() -Get Service Version - -This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**crate::models::Version**](version.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> crate::models::OAuth2TokenIntrospection introspect_o_auth2_token(token, scope) -Introspect OAuth2 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - -### Parameters - - -Name | Type | Description | Required | 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. | [required] | -**scope** | Option<**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. | | - -### Return type - -[**crate::models::OAuth2TokenIntrospection**](oAuth2TokenIntrospection.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[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) - - -## is_instance_alive - -> crate::models::HealthStatus is_instance_alive() -Check Alive Status - -This endpoint returns a 200 status code when the HTTP server is up running. 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. - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**crate::models::HealthStatus**](healthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> Vec list_o_auth2_clients(limit, offset, 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. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**limit** | Option<**i64**> | The maximum amount of clients to returned, upper bound is 500 clients. | | -**offset** | Option<**i64**> | The offset from where to start looking. | | -**client_name** | Option<**String**> | The name of the clients to filter by. | | -**owner** | Option<**String**> | The owner of the clients to filter by. | | - -### Return type - -[**Vec**](oAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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_subject_consent_sessions - -> Vec list_subject_consent_sessions(subject) -Lists All 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**subject** | **String** | | [required] | - -### Return type - -[**Vec**](PreviousConsentSession.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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_jwt_grant_issuers - -> Vec list_trusted_jwt_grant_issuers(issuer, limit, offset) -List Trusted OAuth2 JWT Bearer Grant Type Issuers - -Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**issuer** | Option<**String**> | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | | -**limit** | Option<**i64**> | The maximum amount of policies returned, upper bound is 500 policies | | -**offset** | Option<**i64**> | The offset from where to start looking. | | - -### Return type - -[**Vec**](trustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> crate::models::OAuth2Client patch_o_auth2_client(id, body) -Patch an OAuth 2.0 Client - -Patch an existing OAuth 2.0 Client. 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **String** | The id of the OAuth 2.0 Client. | [required] | -**body** | [**Vec**](patchDocument.md) | | [required] | - -### Return type - -[**crate::models::OAuth2Client**](oAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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_consent_request - -> crate::models::CompletedRequest reject_consent_request(consent_challenge, body) -Reject a Consent Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**consent_challenge** | **String** | | [required] | -**body** | Option<[**RejectRequest**](RejectRequest.md)> | | | - -### Return type - -[**crate::models::CompletedRequest**](completedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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_login_request - -> crate::models::CompletedRequest reject_login_request(login_challenge, body) -Reject a Login Request - -When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**login_challenge** | **String** | | [required] | -**body** | Option<[**RejectRequest**](RejectRequest.md)> | | | - -### Return type - -[**crate::models::CompletedRequest**](completedRequest.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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_logout_request - -> reject_logout_request(logout_challenge, body) -Reject a Logout Request - -When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**logout_challenge** | **String** | | [required] | -**body** | Option<[**RejectRequest**](RejectRequest.md)> | | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json, application/x-www-form-urlencoded -- **Accept**: application/json - -[[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_authentication_session - -> revoke_authentication_session(subject) -Invalidates All Login Sessions of a Certain User Invalidates a Subject's Authentication Session - -This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**subject** | **String** | | [required] | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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_consent_sessions - -> revoke_consent_sessions(subject, client, all) -Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - -This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**subject** | **String** | The subject (Subject) who's consent sessions should be deleted. | [required] | -**client** | Option<**String**> | If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID | | -**all** | Option<**bool**> | If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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_jwt_grant_issuer - -> crate::models::TrustedJwtGrantIssuer trust_jwt_grant_issuer(body) -Trust an 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). - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | Option<[**TrustJwtGrantIssuerBody**](TrustJwtGrantIssuerBody.md)> | | | - -### Return type - -[**crate::models::TrustedJwtGrantIssuer**](trustedJwtGrantIssuer.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## update_json_web_key - -> crate::models::JsonWebKey update_json_web_key(kid, set, body) -Update a 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**kid** | **String** | The kid of the desired key | [required] | -**set** | **String** | The set | [required] | -**body** | Option<[**JsonWebKey**](JsonWebKey.md)> | | | - -### Return type - -[**crate::models::JsonWebKey**](JSONWebKey.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## update_json_web_key_set - -> crate::models::JsonWebKeySet update_json_web_key_set(set, body) -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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**set** | **String** | The set | [required] | -**body** | Option<[**JsonWebKeySet**](JsonWebKeySet.md)> | | | - -### Return type - -[**crate::models::JsonWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## update_o_auth2_client - -> crate::models::OAuth2Client update_o_auth2_client(id, body) -Update an OAuth 2.0 Client - -Update an existing OAuth 2.0 Client. 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **String** | The id of the OAuth 2.0 Client. | [required] | -**body** | [**OAuth2Client**](OAuth2Client.md) | | [required] | - -### Return type - -[**crate::models::OAuth2Client**](oAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - diff --git a/clients/hydra/rust/docs/CreateJsonWebKeySet.md b/clients/hydra/rust/docs/CreateJsonWebKeySet.md new file mode 100644 index 00000000000..16a7c8c2d89 --- /dev/null +++ b/clients/hydra/rust/docs/CreateJsonWebKeySet.md @@ -0,0 +1,13 @@ +# CreateJsonWebKeySet + +## Properties + +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\". | + +[[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/ErrorOAuth2.md b/clients/hydra/rust/docs/ErrorOAuth2.md new file mode 100644 index 00000000000..61a747919d8 --- /dev/null +++ b/clients/hydra/rust/docs/ErrorOAuth2.md @@ -0,0 +1,15 @@ +# ErrorOAuth2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | Option<**String**> | Error | [optional] +**error_debug** | Option<**String**> | Error Debug Information Only available in dev mode. | [optional] +**error_description** | Option<**String**> | Error Description | [optional] +**error_hint** | Option<**String**> | Error Hint Helps the user identify the error cause. | [optional] +**status_code** | Option<**i64**> | HTTP Status Code | [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/FlushInactiveOAuth2TokensRequest.md b/clients/hydra/rust/docs/FlushInactiveOAuth2TokensRequest.md deleted file mode 100644 index 0977ec1f4a0..00000000000 --- a/clients/hydra/rust/docs/FlushInactiveOAuth2TokensRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# FlushInactiveOAuth2TokensRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**not_after** | Option<**String**> | NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. | [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/python/docs/TrustedJwtGrantIssuers.md b/clients/hydra/rust/docs/GetVersion200Response.md similarity index 73% rename from clients/hydra/python/docs/TrustedJwtGrantIssuers.md rename to clients/hydra/rust/docs/GetVersion200Response.md index 2d880ad70b3..2baa7096268 100644 --- a/clients/hydra/python/docs/TrustedJwtGrantIssuers.md +++ b/clients/hydra/rust/docs/GetVersion200Response.md @@ -1,10 +1,10 @@ -# TrustedJwtGrantIssuers - +# GetVersion200Response ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**value** | [**[TrustedJwtGrantIssuer]**](TrustedJwtGrantIssuer.md) | | +**version** | Option<**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/rust/docs/OAuth2TokenIntrospection.md b/clients/hydra/rust/docs/IntrospectedOAuth2Token.md similarity index 93% rename from clients/hydra/rust/docs/OAuth2TokenIntrospection.md rename to clients/hydra/rust/docs/IntrospectedOAuth2Token.md index 232e55cd2ab..babe0c1b6ae 100644 --- a/clients/hydra/rust/docs/OAuth2TokenIntrospection.md +++ b/clients/hydra/rust/docs/IntrospectedOAuth2Token.md @@ -1,4 +1,4 @@ -# OAuth2TokenIntrospection +# IntrospectedOAuth2Token ## Properties @@ -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<[**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/ContainerWaitOkBodyError.md b/clients/hydra/rust/docs/IsReady200Response.md similarity index 74% rename from clients/hydra/rust/docs/ContainerWaitOkBodyError.md rename to clients/hydra/rust/docs/IsReady200Response.md index 73314304248..569eca11ba0 100644 --- a/clients/hydra/rust/docs/ContainerWaitOkBodyError.md +++ b/clients/hydra/rust/docs/IsReady200Response.md @@ -1,10 +1,10 @@ -# ContainerWaitOkBodyError +# IsReady200Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | Option<**String**> | Details of an error | [optional] +**status** | Option<**String**> | Always \"ok\". | [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/IsReady503Response.md b/clients/hydra/rust/docs/IsReady503Response.md new file mode 100644 index 00000000000..141ea6c15c0 --- /dev/null +++ b/clients/hydra/rust/docs/IsReady503Response.md @@ -0,0 +1,11 @@ +# IsReady503Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/JsonError.md b/clients/hydra/rust/docs/JsonError.md deleted file mode 100644 index c934cb8927c..00000000000 --- a/clients/hydra/rust/docs/JsonError.md +++ /dev/null @@ -1,14 +0,0 @@ -# JsonError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | Option<**String**> | Name is the error name. | [optional] -**error_debug** | Option<**String**> | Debug contains debug information. This is usually not available and has to be enabled. | [optional] -**error_description** | Option<**String**> | Description contains further information on the nature of the error. | [optional] -**status_code** | Option<**i64**> | Code represents the error status code (404, 403, 401, ...). | [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/JsonPatch.md b/clients/hydra/rust/docs/JsonPatch.md new file mode 100644 index 00000000000..a5bcf1cd09c --- /dev/null +++ b/clients/hydra/rust/docs/JsonPatch.md @@ -0,0 +1,14 @@ +# JsonPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | Option<**String**> | 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** | **String** | The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". | +**path** | **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). | +**value** | Option<[**serde_json::Value**](.md)> | The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5). | [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/JsonWebKeySet.md b/clients/hydra/rust/docs/JsonWebKeySet.md index b83b1e86f6a..1a877109759 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)> | The value of the \"keys\" parameter is an array of 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/JsonWebKeySetGeneratorRequest.md b/clients/hydra/rust/docs/JsonWebKeySetGeneratorRequest.md deleted file mode 100644 index 1195d8e14c4..00000000000 --- a/clients/hydra/rust/docs/JsonWebKeySetGeneratorRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# JsonWebKeySetGeneratorRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alg** | **String** | The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" | -**kid** | **String** | The kid of the key to be created | -**_use** | **String** | 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/JwkApi.md b/clients/hydra/rust/docs/JwkApi.md new file mode 100644 index 00000000000..17b721f297b --- /dev/null +++ b/clients/hydra/rust/docs/JwkApi.md @@ -0,0 +1,231 @@ +# \JwkApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_json_web_key_set**](JwkApi.md#create_json_web_key_set) | **POST** /admin/keys/{set} | Create JSON Web Key +[**delete_json_web_key**](JwkApi.md#delete_json_web_key) | **DELETE** /admin/keys/{set}/{kid} | Delete JSON Web Key +[**delete_json_web_key_set**](JwkApi.md#delete_json_web_key_set) | **DELETE** /admin/keys/{set} | Delete JSON Web Key Set +[**get_json_web_key**](JwkApi.md#get_json_web_key) | **GET** /admin/keys/{set}/{kid} | Get JSON Web Key +[**get_json_web_key_set**](JwkApi.md#get_json_web_key_set) | **GET** /admin/keys/{set} | Retrieve a JSON Web Key Set +[**set_json_web_key**](JwkApi.md#set_json_web_key) | **PUT** /admin/keys/{set}/{kid} | Set JSON Web Key +[**set_json_web_key_set**](JwkApi.md#set_json_web_key_set) | **PUT** /admin/keys/{set} | Update a JSON Web Key Set + + + +## create_json_web_key_set + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**set** | **String** | The JSON Web Key Set ID | [required] | +**create_json_web_key_set** | [**CreateJsonWebKeySet**](CreateJsonWebKeySet.md) | | [required] | + +### Return type + +[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + + +## delete_json_web_key + +> delete_json_web_key(set, kid) +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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**set** | **String** | The JSON Web Key Set | [required] | +**kid** | **String** | The JSON Web Key ID (kid) | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## delete_json_web_key_set + +> delete_json_web_key_set(set) +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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**set** | **String** | The JSON Web Key Set | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## get_json_web_key + +> crate::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). + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**set** | **String** | JSON Web Key Set ID | [required] | +**kid** | **String** | JSON Web Key ID | [required] | + +### Return type + +[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## get_json_web_key_set + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**set** | **String** | JSON Web Key Set ID | [required] | + +### Return type + +[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**set** | **String** | The JSON Web Key Set ID | [required] | +**kid** | **String** | JSON Web Key ID | [required] | +**json_web_key** | Option<[**JsonWebKey**](JsonWebKey.md)> | | | + +### Return type + +[**crate::models::JsonWebKey**](jsonWebKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**set** | **String** | The JSON Web Key Set ID | [required] | +**json_web_key_set** | Option<[**JsonWebKeySet**](JsonWebKeySet.md)> | | | + +### Return type + +[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + diff --git a/clients/hydra/rust/docs/MetadataApi.md b/clients/hydra/rust/docs/MetadataApi.md index 3c1681ed998..95d87fc06db 100644 --- a/clients/hydra/rust/docs/MetadataApi.md +++ b/clients/hydra/rust/docs/MetadataApi.md @@ -4,16 +4,18 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**prometheus**](MetadataApi.md#prometheus) | **GET** /metrics/prometheus | Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +[**get_version**](MetadataApi.md#get_version) | **GET** /version | Return Running Software Version. +[**is_alive**](MetadataApi.md#is_alive) | **GET** /health/alive | Check HTTP Server Status +[**is_ready**](MetadataApi.md#is_ready) | **GET** /health/ready | Check HTTP Server and Database Status -## prometheus +## get_version -> prometheus() -Get snapshot metrics from the service. If you're using k8s, you can then add annotations to your deployment like so: +> crate::models::GetVersion200Response get_version() +Return Running Software Version. -``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` +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. ### Parameters @@ -21,7 +23,7 @@ This endpoint does not need any parameter. ### Return type - (empty response body) +[**crate::models::GetVersion200Response**](getVersion_200_response.md) ### Authorization @@ -30,7 +32,61 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json + +[[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) + + +## is_alive + +> crate::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. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**crate::models::HealthStatus**](healthStatus.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## is_ready + +> crate::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. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**crate::models::IsReady200Response**](isReady_200_response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json [[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) diff --git a/clients/hydra/rust/docs/OAuth2Api.md b/clients/hydra/rust/docs/OAuth2Api.md new file mode 100644 index 00000000000..1988a362bcd --- /dev/null +++ b/clients/hydra/rust/docs/OAuth2Api.md @@ -0,0 +1,894 @@ +# \OAuth2Api + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**accept_o_auth2_consent_request**](OAuth2Api.md#accept_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/accept | Accept OAuth 2.0 Consent Request +[**accept_o_auth2_login_request**](OAuth2Api.md#accept_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/accept | Accept OAuth 2.0 Login Request +[**accept_o_auth2_logout_request**](OAuth2Api.md#accept_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/accept | Accept OAuth 2.0 Session Logout Request +[**create_o_auth2_client**](OAuth2Api.md#create_o_auth2_client) | **POST** /admin/clients | Create OAuth 2.0 Client +[**delete_o_auth2_client**](OAuth2Api.md#delete_o_auth2_client) | **DELETE** /admin/clients/{id} | Delete OAuth 2.0 Client +[**delete_o_auth2_token**](OAuth2Api.md#delete_o_auth2_token) | **DELETE** /admin/oauth2/tokens | Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client +[**delete_trusted_o_auth2_jwt_grant_issuer**](OAuth2Api.md#delete_trusted_o_auth2_jwt_grant_issuer) | **DELETE** /admin/trust/grants/jwt-bearer/issuers/{id} | Delete Trusted OAuth2 JWT Bearer Grant Type Issuer +[**get_o_auth2_client**](OAuth2Api.md#get_o_auth2_client) | **GET** /admin/clients/{id} | Get an OAuth 2.0 Client +[**get_o_auth2_consent_request**](OAuth2Api.md#get_o_auth2_consent_request) | **GET** /admin/oauth2/auth/requests/consent | Get OAuth 2.0 Consent Request +[**get_o_auth2_login_request**](OAuth2Api.md#get_o_auth2_login_request) | **GET** /admin/oauth2/auth/requests/login | Get OAuth 2.0 Login Request +[**get_o_auth2_logout_request**](OAuth2Api.md#get_o_auth2_logout_request) | **GET** /admin/oauth2/auth/requests/logout | Get OAuth 2.0 Session Logout Request +[**get_trusted_o_auth2_jwt_grant_issuer**](OAuth2Api.md#get_trusted_o_auth2_jwt_grant_issuer) | **GET** /admin/trust/grants/jwt-bearer/issuers/{id} | Get Trusted OAuth2 JWT Bearer Grant Type Issuer +[**introspect_o_auth2_token**](OAuth2Api.md#introspect_o_auth2_token) | **POST** /admin/oauth2/introspect | Introspect OAuth2 Access and Refresh Tokens +[**list_o_auth2_clients**](OAuth2Api.md#list_o_auth2_clients) | **GET** /admin/clients | List OAuth 2.0 Clients +[**list_o_auth2_consent_sessions**](OAuth2Api.md#list_o_auth2_consent_sessions) | **GET** /admin/oauth2/auth/sessions/consent | List OAuth 2.0 Consent Sessions of a Subject +[**list_trusted_o_auth2_jwt_grant_issuers**](OAuth2Api.md#list_trusted_o_auth2_jwt_grant_issuers) | **GET** /admin/trust/grants/jwt-bearer/issuers | List Trusted OAuth2 JWT Bearer Grant Type Issuers +[**o_auth2_authorize**](OAuth2Api.md#o_auth2_authorize) | **GET** /oauth2/auth | OAuth 2.0 Authorize Endpoint +[**oauth2_token_exchange**](OAuth2Api.md#oauth2_token_exchange) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint +[**patch_o_auth2_client**](OAuth2Api.md#patch_o_auth2_client) | **PATCH** /admin/clients/{id} | Patch OAuth 2.0 Client +[**reject_o_auth2_consent_request**](OAuth2Api.md#reject_o_auth2_consent_request) | **PUT** /admin/oauth2/auth/requests/consent/reject | Reject OAuth 2.0 Consent Request +[**reject_o_auth2_login_request**](OAuth2Api.md#reject_o_auth2_login_request) | **PUT** /admin/oauth2/auth/requests/login/reject | Reject OAuth 2.0 Login Request +[**reject_o_auth2_logout_request**](OAuth2Api.md#reject_o_auth2_logout_request) | **PUT** /admin/oauth2/auth/requests/logout/reject | Reject OAuth 2.0 Session Logout Request +[**revoke_o_auth2_consent_sessions**](OAuth2Api.md#revoke_o_auth2_consent_sessions) | **DELETE** /admin/oauth2/auth/sessions/consent | Revoke OAuth 2.0 Consent Sessions of a Subject +[**revoke_o_auth2_login_sessions**](OAuth2Api.md#revoke_o_auth2_login_sessions) | **DELETE** /admin/oauth2/auth/sessions/login | Revokes All OAuth 2.0 Login Sessions of a Subject +[**revoke_o_auth2_token**](OAuth2Api.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth 2.0 Access or Refresh Token +[**set_o_auth2_client**](OAuth2Api.md#set_o_auth2_client) | **PUT** /admin/clients/{id} | Set OAuth 2.0 Client +[**set_o_auth2_client_lifespans**](OAuth2Api.md#set_o_auth2_client_lifespans) | **PUT** /admin/clients/{id}/lifespans | Set OAuth2 Client Token Lifespans +[**trust_o_auth2_jwt_grant_issuer**](OAuth2Api.md#trust_o_auth2_jwt_grant_issuer) | **POST** /admin/trust/grants/jwt-bearer/issuers | Trust OAuth2 JWT Bearer Grant Type Issuer + + + +## accept_o_auth2_consent_request + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**consent_challenge** | **String** | OAuth 2.0 Consent Request Challenge | [required] | +**accept_o_auth2_consent_request** | Option<[**AcceptOAuth2ConsentRequest**](AcceptOAuth2ConsentRequest.md)> | | | + +### Return type + +[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**login_challenge** | **String** | OAuth 2.0 Login Request Challenge | [required] | +**accept_o_auth2_login_request** | Option<[**AcceptOAuth2LoginRequest**](AcceptOAuth2LoginRequest.md)> | | | + +### Return type + +[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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_logout_request + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**logout_challenge** | **String** | OAuth 2.0 Logout Request Challenge | [required] | + +### Return type + +[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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_o_auth2_client + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | OAuth 2.0 Client Request Body | [required] | + +### Return type + +[**crate::models::OAuth2Client**](oAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + + +## delete_o_auth2_client + +> delete_o_auth2_client(id) +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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | The id of the OAuth 2.0 Client. | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## delete_o_auth2_token + +> delete_o_auth2_token(client_id) +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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**client_id** | **String** | OAuth 2.0 Client ID | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## delete_trusted_o_auth2_jwt_grant_issuer + +> delete_trusted_o_auth2_jwt_grant_issuer(id) +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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | The id of the desired grant | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## get_o_auth2_client + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | The id of the OAuth 2.0 Client. | [required] | + +### Return type + +[**crate::models::OAuth2Client**](oAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## get_o_auth2_consent_request + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**consent_challenge** | **String** | OAuth 2.0 Consent Request Challenge | [required] | + +### Return type + +[**crate::models::OAuth2ConsentRequest**](oAuth2ConsentRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## get_o_auth2_login_request + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**login_challenge** | **String** | OAuth 2.0 Login Request Challenge | [required] | + +### Return type + +[**crate::models::OAuth2LoginRequest**](oAuth2LoginRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## get_o_auth2_logout_request + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**logout_challenge** | **String** | | [required] | + +### Return type + +[**crate::models::OAuth2LogoutRequest**](oAuth2LogoutRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## get_trusted_o_auth2_jwt_grant_issuer + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | The id of the desired grant | [required] | + +### Return type + +[**crate::models::TrustedOAuth2JwtGrantIssuer**](trustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | 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. | [required] | +**scope** | Option<**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. | | + +### Return type + +[**crate::models::IntrospectedOAuth2Token**](introspectedOAuth2Token.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[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 + +> 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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**page_size** | Option<**i64**> | 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] +**page_token** | Option<**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). | |[default to 1] +**client_name** | Option<**String**> | The name of the clients to filter by. | | +**owner** | Option<**String**> | The owner of the clients to filter by. | | + +### Return type + +[**Vec**](oAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> Vec list_o_auth2_consent_sessions(subject, page_size, page_token) +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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**subject** | **String** | The subject to list the consent sessions for. | [required] | +**page_size** | Option<**i64**> | 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] +**page_token** | Option<**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). | |[default to 1] + +### Return type + +[**Vec**](oAuth2ConsentSession.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> 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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**max_items** | Option<**i64**> | | | +**default_items** | Option<**i64**> | | | +**issuer** | Option<**String**> | If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. | | + +### Return type + +[**Vec**](trustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## o_auth2_authorize + +> crate::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. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**crate::models::ErrorOAuth2**](errorOAuth2.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**grant_type** | **String** | | [required] | +**client_id** | Option<**String**> | | | +**code** | Option<**String**> | | | +**redirect_uri** | Option<**String**> | | | +**refresh_token** | Option<**String**> | | | + +### Return type + +[**crate::models::OAuth2TokenExchange**](oAuth2TokenExchange.md) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +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] | + +### Return type + +[**crate::models::OAuth2Client**](oAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**consent_challenge** | **String** | OAuth 2.0 Consent Request Challenge | [required] | +**reject_o_auth2_request** | Option<[**RejectOAuth2Request**](RejectOAuth2Request.md)> | | | + +### Return type + +[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**login_challenge** | **String** | OAuth 2.0 Login Request Challenge | [required] | +**reject_o_auth2_request** | Option<[**RejectOAuth2Request**](RejectOAuth2Request.md)> | | | + +### Return type + +[**crate::models::OAuth2RedirectTo**](oAuth2RedirectTo.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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_logout_request + +> reject_o_auth2_logout_request(logout_challenge) +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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**logout_challenge** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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, client, all) +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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**subject** | **String** | OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. | [required] | +**client** | Option<**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. | | +**all** | Option<**bool**> | Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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(subject) +Revokes All OAuth 2.0 Login Sessions of a Subject + +This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**subject** | **String** | OAuth 2.0 Subject The subject to revoke authentication sessions for. | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**token** | **String** | | [required] | + +### Return type + + (empty response body) + +### Authorization + +[basic](../README.md#basic), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | OAuth 2.0 Client ID | [required] | +**o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | OAuth 2.0 Client Request Body | [required] | + +### Return type + +[**crate::models::OAuth2Client**](oAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | OAuth 2.0 Client ID | [required] | +**o_auth2_client_token_lifespans** | Option<[**OAuth2ClientTokenLifespans**](OAuth2ClientTokenLifespans.md)> | | | + +### Return type + +[**crate::models::OAuth2Client**](oAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 + +> crate::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). + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**trust_o_auth2_jwt_grant_issuer** | Option<[**TrustOAuth2JwtGrantIssuer**](TrustOAuth2JwtGrantIssuer.md)> | | | + +### Return type + +[**crate::models::TrustedOAuth2JwtGrantIssuer**](trustedOAuth2JwtGrantIssuer.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + diff --git a/clients/hydra/rust/docs/OAuth2Client.md b/clients/hydra/rust/docs/OAuth2Client.md index 15d8f3fa320..d95885517e1 100644 --- a/clients/hydra/rust/docs/OAuth2Client.md +++ b/clients/hydra/rust/docs/OAuth2Client.md @@ -6,39 +6,49 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allowed_cors_origins** | Option<**Vec**> | | [optional] **audience** | Option<**Vec**> | | [optional] -**backchannel_logout_session_required** | Option<**bool**> | 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** | Option<**String**> | RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. | [optional] -**client_id** | Option<**String**> | ID is the id for this client. | [optional] -**client_name** | Option<**String**> | Name is the human-readable string name of the client to be presented to the end-user during authorization. | [optional] -**client_secret** | Option<**String**> | Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. | [optional] -**client_secret_expires_at** | Option<**i64**> | SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. | [optional] -**client_uri** | Option<**String**> | ClientURI is an 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] +**authorization_code_grant_access_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorization_code_grant_id_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorization_code_grant_refresh_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**backchannel_logout_session_required** | Option<**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** | Option<**String**> | 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** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**client_id** | Option<**String**> | OAuth 2.0 Client ID The ID is autogenerated and immutable. | [optional] +**client_name** | Option<**String**> | OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. | [optional] +**client_secret** | Option<**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. | [optional] +**client_secret_expires_at** | Option<**i64**> | OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. | [optional] +**client_uri** | Option<**String**> | 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** | Option<**Vec**> | | [optional] -**created_at** | Option<**String**> | CreatedAt returns the timestamp of the client's creation. | [optional] -**frontchannel_logout_session_required** | Option<**bool**> | 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** | Option<**String**> | 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] +**created_at** | Option<**String**> | OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. | [optional] +**frontchannel_logout_session_required** | Option<**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** | Option<**String**> | 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** | Option<**Vec**> | | [optional] -**jwks** | Option<[**serde_json::Value**](.md)> | | [optional] -**jwks_uri** | Option<**String**> | 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] -**logo_uri** | Option<**String**> | LogoURI is an URL string that references a logo for the client. | [optional] +**implicit_grant_access_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicit_grant_id_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**jwks** | Option<[**serde_json::Value**](.md)> | 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** | Option<**String**> | OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate. | [optional] +**jwt_bearer_grant_access_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**logo_uri** | Option<**String**> | OAuth 2.0 Client Logo URI A URL string referencing the client's logo. | [optional] **metadata** | Option<[**serde_json::Value**](.md)> | | [optional] -**owner** | Option<**String**> | Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] -**policy_uri** | Option<**String**> | 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] +**owner** | Option<**String**> | OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. | [optional] +**policy_uri** | Option<**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. | [optional] **post_logout_redirect_uris** | Option<**Vec**> | | [optional] **redirect_uris** | Option<**Vec**> | | [optional] -**registration_access_token** | Option<**String**> | RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. | [optional] -**registration_client_uri** | Option<**String**> | RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] -**request_object_signing_alg** | Option<**String**> | 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] +**refresh_token_grant_access_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_id_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_refresh_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**registration_access_token** | Option<**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. | [optional] +**registration_client_uri** | Option<**String**> | OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. | [optional] +**request_object_signing_alg** | Option<**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. | [optional] **request_uris** | Option<**Vec**> | | [optional] **response_types** | Option<**Vec**> | | [optional] -**scope** | Option<**String**> | 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** | Option<**String**> | 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] -**subject_type** | Option<**String**> | SubjectType requested for responses to this Client. 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** | Option<**String**> | Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. | [optional] -**token_endpoint_auth_signing_alg** | Option<**String**> | Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] -**tos_uri** | Option<**String**> | TermsOfServiceURI is a URL string that points 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** | Option<**String**> | UpdatedAt returns the timestamp of the last update. | [optional] -**userinfo_signed_response_alg** | Option<**String**> | 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] +**scope** | Option<**String**> | 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** | Option<**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. | [optional] +**subject_type** | Option<**String**> | 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** | Option<**String**> | OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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] +**token_endpoint_auth_signing_alg** | Option<**String**> | OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. | [optional] +**tos_uri** | Option<**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. | [optional] +**updated_at** | Option<**String**> | OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. | [optional] +**userinfo_signed_response_alg** | Option<**String**> | 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] [[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/OAuth2ClientTokenLifespans.md b/clients/hydra/rust/docs/OAuth2ClientTokenLifespans.md new file mode 100644 index 00000000000..6230d695214 --- /dev/null +++ b/clients/hydra/rust/docs/OAuth2ClientTokenLifespans.md @@ -0,0 +1,20 @@ +# OAuth2ClientTokenLifespans + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authorization_code_grant_access_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorization_code_grant_id_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**authorization_code_grant_refresh_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**client_credentials_grant_access_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicit_grant_access_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**implicit_grant_id_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**jwt_bearer_grant_access_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_access_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_id_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [optional] +**refresh_token_grant_refresh_token_lifespan** | Option<**String**> | Specify a time duration in milliseconds, seconds, minutes, hours. | [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/ConsentRequest.md b/clients/hydra/rust/docs/OAuth2ConsentRequest.md similarity index 93% rename from clients/hydra/rust/docs/ConsentRequest.md rename to clients/hydra/rust/docs/OAuth2ConsentRequest.md index 73b60382a94..c64cc5ff3e0 100644 --- a/clients/hydra/rust/docs/ConsentRequest.md +++ b/clients/hydra/rust/docs/OAuth2ConsentRequest.md @@ -1,4 +1,4 @@ -# ConsentRequest +# OAuth2ConsentRequest ## Properties @@ -11,7 +11,7 @@ Name | Type | Description | Notes **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::OpenIdConnectContext**](openIDConnectContext.md)> | | [optional] +**oidc_context** | Option<[**crate::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/OpenIdConnectContext.md b/clients/hydra/rust/docs/OAuth2ConsentRequestOpenIdConnectContext.md similarity index 89% rename from clients/hydra/rust/docs/OpenIdConnectContext.md rename to clients/hydra/rust/docs/OAuth2ConsentRequestOpenIdConnectContext.md index 1f60f98236e..f2deb5450ff 100644 --- a/clients/hydra/rust/docs/OpenIdConnectContext.md +++ b/clients/hydra/rust/docs/OAuth2ConsentRequestOpenIdConnectContext.md @@ -1,4 +1,4 @@ -# OpenIdConnectContext +# OAuth2ConsentRequestOpenIdConnectContext ## Properties @@ -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<[**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 new file mode 100644 index 00000000000..b39df0b6fb3 --- /dev/null +++ b/clients/hydra/rust/docs/OAuth2ConsentSession.md @@ -0,0 +1,18 @@ +# OAuth2ConsentSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**consent_request** | Option<[**crate::models::OAuth2ConsentRequest**](oAuth2ConsentRequest.md)> | | [optional] +**expires_at** | Option<[**crate::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] + +[[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/Oauth2TokenResponse.md b/clients/hydra/rust/docs/OAuth2ConsentSessionExpiresAt.md similarity index 71% rename from clients/hydra/rust/docs/Oauth2TokenResponse.md rename to clients/hydra/rust/docs/OAuth2ConsentSessionExpiresAt.md index 0f8d4e0ee26..0f54738cdb4 100644 --- a/clients/hydra/rust/docs/Oauth2TokenResponse.md +++ b/clients/hydra/rust/docs/OAuth2ConsentSessionExpiresAt.md @@ -1,15 +1,14 @@ -# Oauth2TokenResponse +# OAuth2ConsentSessionExpiresAt ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **access_token** | Option<**String**> | | [optional] -**expires_in** | Option<**i64**> | | [optional] +**authorize_code** | Option<**String**> | | [optional] **id_token** | Option<**String**> | | [optional] +**par_context** | Option<**String**> | | [optional] **refresh_token** | Option<**String**> | | [optional] -**scope** | Option<**String**> | | [optional] -**token_type** | Option<**String**> | | [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/LoginRequest.md b/clients/hydra/rust/docs/OAuth2LoginRequest.md similarity index 92% rename from clients/hydra/rust/docs/LoginRequest.md rename to clients/hydra/rust/docs/OAuth2LoginRequest.md index 7b9fc74a348..edaa133f359 100644 --- a/clients/hydra/rust/docs/LoginRequest.md +++ b/clients/hydra/rust/docs/OAuth2LoginRequest.md @@ -1,4 +1,4 @@ -# LoginRequest +# OAuth2LoginRequest ## Properties @@ -6,7 +6,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** | [**crate::models::OAuth2Client**](oAuth2Client.md) | | -**oidc_context** | Option<[**crate::models::OpenIdConnectContext**](openIDConnectContext.md)> | | [optional] +**oidc_context** | Option<[**crate::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** | **Vec** | | **requested_scope** | **Vec** | | diff --git a/clients/hydra/rust/docs/LogoutRequest.md b/clients/hydra/rust/docs/OAuth2LogoutRequest.md similarity index 97% rename from clients/hydra/rust/docs/LogoutRequest.md rename to clients/hydra/rust/docs/OAuth2LogoutRequest.md index f085aa19118..f38efe989d3 100644 --- a/clients/hydra/rust/docs/LogoutRequest.md +++ b/clients/hydra/rust/docs/OAuth2LogoutRequest.md @@ -1,4 +1,4 @@ -# LogoutRequest +# OAuth2LogoutRequest ## Properties diff --git a/clients/hydra/rust/docs/CompletedRequest.md b/clients/hydra/rust/docs/OAuth2RedirectTo.md similarity index 76% rename from clients/hydra/rust/docs/CompletedRequest.md rename to clients/hydra/rust/docs/OAuth2RedirectTo.md index 94ee63bc7e7..ca0431e709e 100644 --- a/clients/hydra/rust/docs/CompletedRequest.md +++ b/clients/hydra/rust/docs/OAuth2RedirectTo.md @@ -1,10 +1,10 @@ -# CompletedRequest +# OAuth2RedirectTo ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**redirect_to** | **String** | RedirectURL is the URL which you should redirect the user to once the authentication process is completed. | +**redirect_to** | **String** | RedirectURL is the URL which you should redirect the user's browser to once the authentication process is completed. | [[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/OAuth2TokenExchange.md b/clients/hydra/rust/docs/OAuth2TokenExchange.md new file mode 100644 index 00000000000..da7bb3ee915 --- /dev/null +++ b/clients/hydra/rust/docs/OAuth2TokenExchange.md @@ -0,0 +1,16 @@ +# OAuth2TokenExchange + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | Option<**String**> | The access token issued by the authorization server. | [optional] +**expires_in** | Option<**i64**> | 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] +**id_token** | Option<**i64**> | To retrieve a refresh token request the id_token scope. | [optional] +**refresh_token** | Option<**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. | [optional] +**scope** | Option<**i64**> | The scope of the access token | [optional] +**token_type** | Option<**String**> | The type of the token issued | [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/OidcApi.md b/clients/hydra/rust/docs/OidcApi.md new file mode 100644 index 00000000000..1be132c104c --- /dev/null +++ b/clients/hydra/rust/docs/OidcApi.md @@ -0,0 +1,217 @@ +# \OidcApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_oidc_dynamic_client**](OidcApi.md#create_oidc_dynamic_client) | **POST** /oauth2/register | Register OAuth2 Client using OpenID Dynamic Client Registration +[**delete_oidc_dynamic_client**](OidcApi.md#delete_oidc_dynamic_client) | **DELETE** /oauth2/register/{id} | Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol +[**discover_oidc_configuration**](OidcApi.md#discover_oidc_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery +[**get_oidc_dynamic_client**](OidcApi.md#get_oidc_dynamic_client) | **GET** /oauth2/register/{id} | Get OAuth2 Client using OpenID Dynamic Client Registration +[**get_oidc_user_info**](OidcApi.md#get_oidc_user_info) | **GET** /userinfo | OpenID Connect Userinfo +[**revoke_oidc_session**](OidcApi.md#revoke_oidc_session) | **GET** /oauth2/sessions/logout | OpenID Connect Front- and Back-channel Enabled Logout +[**set_oidc_dynamic_client**](OidcApi.md#set_oidc_dynamic_client) | **PUT** /oauth2/register/{id} | Set OAuth2 Client using OpenID Dynamic Client Registration + + + +## create_oidc_dynamic_client + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | Dynamic Client Registration Request Body | [required] | + +### Return type + +[**crate::models::OAuth2Client**](oAuth2Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + + +## delete_oidc_dynamic_client + +> delete_oidc_dynamic_client(id) +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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | The id of the OAuth 2.0 Client. | [required] | + +### Return type + + (empty response body) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## discover_oidc_configuration + +> crate::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/ + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**crate::models::OidcConfiguration**](oidcConfiguration.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## get_oidc_dynamic_client + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | The id of the OAuth 2.0 Client. | [required] | + +### Return type + +[**crate::models::OAuth2Client**](oAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + + +## get_oidc_user_info + +> crate::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. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**crate::models::OidcUserInfo**](oidcUserInfo.md) + +### Authorization + +[oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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_oidc_session + +> revoke_oidc_session() +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. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[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_oidc_dynamic_client + +> crate::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. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | OAuth 2.0 Client ID | [required] | +**o_auth2_client** | [**OAuth2Client**](OAuth2Client.md) | OAuth 2.0 Client Request Body | [required] | + +### Return type + +[**crate::models::OAuth2Client**](oAuth2Client.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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) + diff --git a/clients/hydra/rust/docs/OidcConfiguration.md b/clients/hydra/rust/docs/OidcConfiguration.md new file mode 100644 index 00000000000..bc312f6611e --- /dev/null +++ b/clients/hydra/rust/docs/OidcConfiguration.md @@ -0,0 +1,39 @@ +# OidcConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authorization_endpoint** | **String** | OAuth 2.0 Authorization Endpoint URL | +**backchannel_logout_session_supported** | Option<**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** | Option<**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** | Option<**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** | 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] +**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] +**grant_types_supported** | Option<**Vec**> | 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** | **Vec** | OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. | +**id_token_signing_alg_values_supported** | **Vec** | 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** | **String** | 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** | **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. | +**registration_endpoint** | Option<**String**> | OpenID Connect Dynamic Client Registration Endpoint URL | [optional] +**request_object_signing_alg_values_supported** | Option<**Vec**> | 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** | Option<**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** | Option<**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** | Option<**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** | Option<**Vec**> | 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** | **Vec** | 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** | Option<**String**> | OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] +**scopes_supported** | Option<**Vec**> | 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** | **Vec** | 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** | **String** | OAuth 2.0 Token Endpoint URL | +**token_endpoint_auth_methods_supported** | Option<**Vec**> | 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** | Option<**String**> | OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. | [optional] +**userinfo_signed_response_alg** | **Vec** | OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. | +**userinfo_signing_alg_values_supported** | Option<**Vec**> | 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] + +[[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/UserinfoResponse.md b/clients/hydra/rust/docs/OidcUserInfo.md similarity index 99% rename from clients/hydra/rust/docs/UserinfoResponse.md rename to clients/hydra/rust/docs/OidcUserInfo.md index 32730e84903..b0c45d2182a 100644 --- a/clients/hydra/rust/docs/UserinfoResponse.md +++ b/clients/hydra/rust/docs/OidcUserInfo.md @@ -1,4 +1,4 @@ -# UserinfoResponse +# OidcUserInfo ## Properties diff --git a/clients/hydra/rust/docs/Pagination.md b/clients/hydra/rust/docs/Pagination.md new file mode 100644 index 00000000000..3a7f733ac72 --- /dev/null +++ b/clients/hydra/rust/docs/Pagination.md @@ -0,0 +1,12 @@ +# Pagination + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page_size** | Option<**i64**> | 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** | Option<**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] + +[[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/PaginationHeaders.md b/clients/hydra/rust/docs/PaginationHeaders.md new file mode 100644 index 00000000000..ea5ea48fb2e --- /dev/null +++ b/clients/hydra/rust/docs/PaginationHeaders.md @@ -0,0 +1,12 @@ +# PaginationHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | Option<**String**> | 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** | Option<**String**> | The total number of clients. in: header | [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/PatchDocument.md b/clients/hydra/rust/docs/PatchDocument.md deleted file mode 100644 index 105c22cee1c..00000000000 --- a/clients/hydra/rust/docs/PatchDocument.md +++ /dev/null @@ -1,14 +0,0 @@ -# PatchDocument - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**from** | Option<**String**> | A JSON-pointer | [optional] -**op** | **String** | The operation to be performed | -**path** | **String** | A JSON-pointer | -**value** | Option<[**serde_json::Value**](.md)> | The value to be used within the operations | [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/PluginConfig.md b/clients/hydra/rust/docs/PluginConfig.md deleted file mode 100644 index f7c51d94568..00000000000 --- a/clients/hydra/rust/docs/PluginConfig.md +++ /dev/null @@ -1,26 +0,0 @@ -# PluginConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | [**crate::models::PluginConfigArgs**](PluginConfigArgs.md) | | -**description** | **String** | description | -**docker_version** | Option<**String**> | Docker Version used to create the plugin | [optional] -**documentation** | **String** | documentation | -**entrypoint** | **Vec** | entrypoint | -**env** | [**Vec**](PluginEnv.md) | env | -**interface** | [**crate::models::PluginConfigInterface**](PluginConfigInterface.md) | | -**ipc_host** | **bool** | ipc host | -**linux** | [**crate::models::PluginConfigLinux**](PluginConfigLinux.md) | | -**mounts** | [**Vec**](PluginMount.md) | mounts | -**network** | [**crate::models::PluginConfigNetwork**](PluginConfigNetwork.md) | | -**pid_host** | **bool** | pid host | -**propagated_mount** | **String** | propagated mount | -**user** | Option<[**crate::models::PluginConfigUser**](PluginConfigUser.md)> | | [optional] -**work_dir** | **String** | work dir | -**rootfs** | Option<[**crate::models::PluginConfigRootfs**](PluginConfigRootfs.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/PluginConfigArgs.md b/clients/hydra/rust/docs/PluginConfigArgs.md deleted file mode 100644 index 130c215ed76..00000000000 --- a/clients/hydra/rust/docs/PluginConfigArgs.md +++ /dev/null @@ -1,14 +0,0 @@ -# PluginConfigArgs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**name** | **String** | name | -**settable** | **Vec** | settable | -**value** | **Vec** | value | - -[[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/PluginConfigInterface.md b/clients/hydra/rust/docs/PluginConfigInterface.md deleted file mode 100644 index 7d869a1320e..00000000000 --- a/clients/hydra/rust/docs/PluginConfigInterface.md +++ /dev/null @@ -1,13 +0,0 @@ -# PluginConfigInterface - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**protocol_scheme** | Option<**String**> | Protocol to use for clients connecting to the plugin. | [optional] -**socket** | **String** | socket | -**types** | [**Vec**](PluginInterfaceType.md) | types | - -[[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/PluginConfigLinux.md b/clients/hydra/rust/docs/PluginConfigLinux.md deleted file mode 100644 index 16828f711fd..00000000000 --- a/clients/hydra/rust/docs/PluginConfigLinux.md +++ /dev/null @@ -1,13 +0,0 @@ -# PluginConfigLinux - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**allow_all_devices** | **bool** | allow all devices | -**capabilities** | **Vec** | capabilities | -**devices** | [**Vec**](PluginDevice.md) | devices | - -[[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/PluginConfigRootfs.md b/clients/hydra/rust/docs/PluginConfigRootfs.md deleted file mode 100644 index 1e507d0e4ec..00000000000 --- a/clients/hydra/rust/docs/PluginConfigRootfs.md +++ /dev/null @@ -1,12 +0,0 @@ -# PluginConfigRootfs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**diff_ids** | Option<**Vec**> | diff ids | [optional] -**_type** | Option<**String**> | type | [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/PluginConfigUser.md b/clients/hydra/rust/docs/PluginConfigUser.md deleted file mode 100644 index 5356394e61b..00000000000 --- a/clients/hydra/rust/docs/PluginConfigUser.md +++ /dev/null @@ -1,12 +0,0 @@ -# PluginConfigUser - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**GID** | Option<**i32**> | g ID | [optional] -**UID** | Option<**i32**> | UID | [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/PluginDevice.md b/clients/hydra/rust/docs/PluginDevice.md deleted file mode 100644 index e94ae32d84a..00000000000 --- a/clients/hydra/rust/docs/PluginDevice.md +++ /dev/null @@ -1,14 +0,0 @@ -# PluginDevice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**name** | **String** | name | -**path** | **String** | path | -**settable** | **Vec** | settable | - -[[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/PluginEnv.md b/clients/hydra/rust/docs/PluginEnv.md deleted file mode 100644 index b2ccb438807..00000000000 --- a/clients/hydra/rust/docs/PluginEnv.md +++ /dev/null @@ -1,14 +0,0 @@ -# PluginEnv - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**name** | **String** | name | -**settable** | **Vec** | settable | -**value** | **String** | value | - -[[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/PluginInterfaceType.md b/clients/hydra/rust/docs/PluginInterfaceType.md deleted file mode 100644 index 137ef301572..00000000000 --- a/clients/hydra/rust/docs/PluginInterfaceType.md +++ /dev/null @@ -1,13 +0,0 @@ -# PluginInterfaceType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**capability** | **String** | capability | -**prefix** | **String** | prefix | -**version** | **String** | version | - -[[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/PluginMount.md b/clients/hydra/rust/docs/PluginMount.md deleted file mode 100644 index 2895a76e0c6..00000000000 --- a/clients/hydra/rust/docs/PluginMount.md +++ /dev/null @@ -1,17 +0,0 @@ -# PluginMount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **String** | description | -**destination** | **String** | destination | -**name** | **String** | name | -**options** | **Vec** | options | -**settable** | **Vec** | settable | -**source** | **String** | source | -**_type** | **String** | type | - -[[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/PluginSettings.md b/clients/hydra/rust/docs/PluginSettings.md deleted file mode 100644 index 07b88882b96..00000000000 --- a/clients/hydra/rust/docs/PluginSettings.md +++ /dev/null @@ -1,14 +0,0 @@ -# PluginSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**args** | **Vec** | args | -**devices** | [**Vec**](PluginDevice.md) | devices | -**env** | **Vec** | env | -**mounts** | [**Vec**](PluginMount.md) | mounts | - -[[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/PreviousConsentSession.md b/clients/hydra/rust/docs/PreviousConsentSession.md deleted file mode 100644 index f4988961f2a..00000000000 --- a/clients/hydra/rust/docs/PreviousConsentSession.md +++ /dev/null @@ -1,17 +0,0 @@ -# PreviousConsentSession - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**consent_request** | Option<[**crate::models::ConsentRequest**](consentRequest.md)> | | [optional] -**grant_access_token_audience** | Option<**Vec**> | | [optional] -**grant_scope** | Option<**Vec**> | | [optional] -**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::ConsentRequestSession**](consentRequestSession.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/PublicApi.md b/clients/hydra/rust/docs/PublicApi.md deleted file mode 100644 index ba1c9bf6122..00000000000 --- a/clients/hydra/rust/docs/PublicApi.md +++ /dev/null @@ -1,367 +0,0 @@ -# \PublicApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**disconnect_user**](PublicApi.md#disconnect_user) | **GET** /oauth2/sessions/logout | OpenID Connect Front-Backchannel Enabled Logout -[**discover_open_id_configuration**](PublicApi.md#discover_open_id_configuration) | **GET** /.well-known/openid-configuration | OpenID Connect Discovery -[**dynamic_client_registration_create_o_auth2_client**](PublicApi.md#dynamic_client_registration_create_o_auth2_client) | **POST** /connect/register | Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamic_client_registration_delete_o_auth2_client**](PublicApi.md#dynamic_client_registration_delete_o_auth2_client) | **DELETE** /connect/register/{id} | Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamic_client_registration_get_o_auth2_client**](PublicApi.md#dynamic_client_registration_get_o_auth2_client) | **GET** /connect/register/{id} | Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**dynamic_client_registration_update_o_auth2_client**](PublicApi.md#dynamic_client_registration_update_o_auth2_client) | **PUT** /connect/register/{id} | Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol -[**is_instance_ready**](PublicApi.md#is_instance_ready) | **GET** /health/ready | Check Readiness Status -[**oauth2_token**](PublicApi.md#oauth2_token) | **POST** /oauth2/token | The OAuth 2.0 Token Endpoint -[**oauth_auth**](PublicApi.md#oauth_auth) | **GET** /oauth2/auth | The OAuth 2.0 Authorize Endpoint -[**revoke_o_auth2_token**](PublicApi.md#revoke_o_auth2_token) | **POST** /oauth2/revoke | Revoke OAuth2 Tokens -[**userinfo**](PublicApi.md#userinfo) | **GET** /userinfo | OpenID Connect Userinfo -[**well_known**](PublicApi.md#well_known) | **GET** /.well-known/jwks.json | JSON Web Keys Discovery - - - -## disconnect_user - -> disconnect_user() -OpenID Connect Front-Backchannel Enabled Logout - -This endpoint initiates and completes user logout at Ory Hydra 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 - -### Parameters - -This endpoint does not need any parameter. - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[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) - - -## discover_open_id_configuration - -> crate::models::WellKnown discover_open_id_configuration() -OpenID Connect Discovery - -The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**crate::models::WellKnown**](wellKnown.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## dynamic_client_registration_create_o_auth2_client - -> crate::models::OAuth2Client dynamic_client_registration_create_o_auth2_client(body) -Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**body** | [**OAuth2Client**](OAuth2Client.md) | | [required] | - -### Return type - -[**crate::models::OAuth2Client**](oAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## dynamic_client_registration_delete_o_auth2_client - -> dynamic_client_registration_delete_o_auth2_client(id) -Deletes an OAuth 2.0 Client using the OpenID / OAuth2 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **String** | The id of the OAuth 2.0 Client. | [required] | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## dynamic_client_registration_get_o_auth2_client - -> crate::models::OAuth2Client dynamic_client_registration_get_o_auth2_client(id) -Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -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. 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **String** | The id of the OAuth 2.0 Client. | [required] | - -### Return type - -[**crate::models::OAuth2Client**](oAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## dynamic_client_registration_update_o_auth2_client - -> crate::models::OAuth2Client dynamic_client_registration_update_o_auth2_client(id, body) -Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - -This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**id** | **String** | The id of the OAuth 2.0 Client. | [required] | -**body** | [**OAuth2Client**](OAuth2Client.md) | | [required] | - -### Return type - -[**crate::models::OAuth2Client**](oAuth2Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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) - - -## is_instance_ready - -> crate::models::HealthStatus is_instance_ready() -Check Readiness Status - -This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**crate::models::HealthStatus**](healthStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 - -> crate::models::Oauth2TokenResponse oauth2_token(grant_type, code, refresh_token, redirect_uri, client_id) -The OAuth 2.0 Token Endpoint - -The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**grant_type** | **String** | | [required] | -**code** | Option<**String**> | | | -**refresh_token** | Option<**String**> | | | -**redirect_uri** | Option<**String**> | | | -**client_id** | Option<**String**> | | | - -### Return type - -[**crate::models::Oauth2TokenResponse**](oauth2TokenResponse.md) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[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) - - -## oauth_auth - -> oauth_auth() -The OAuth 2.0 Authorize Endpoint - -This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - -### Parameters - -This endpoint does not need any parameter. - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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 OAuth2 Tokens - -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. - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**token** | **String** | | [required] | - -### Return type - - (empty response body) - -### Authorization - -[basic](../README.md#basic), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json - -[[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) - - -## userinfo - -> crate::models::UserinfoResponse userinfo() -OpenID Connect Userinfo - -This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**crate::models::UserinfoResponse**](userinfoResponse.md) - -### Authorization - -[oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - - -## well_known - -> crate::models::JsonWebKeySet well_known() -JSON Web Keys Discovery - -This endpoint returns JSON Web Keys to be used as public keys for 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. - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**crate::models::JsonWebKeySet**](JSONWebKeySet.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[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) - diff --git a/clients/hydra/rust/docs/RejectRequest.md b/clients/hydra/rust/docs/RejectOAuth2Request.md similarity index 97% rename from clients/hydra/rust/docs/RejectRequest.md rename to clients/hydra/rust/docs/RejectOAuth2Request.md index ae86b0c37e1..4ce7933077c 100644 --- a/clients/hydra/rust/docs/RejectRequest.md +++ b/clients/hydra/rust/docs/RejectOAuth2Request.md @@ -1,4 +1,4 @@ -# RejectRequest +# RejectOAuth2Request ## Properties diff --git a/clients/hydra/rust/docs/RequestWasHandledResponse.md b/clients/hydra/rust/docs/RequestWasHandledResponse.md deleted file mode 100644 index a9382559685..00000000000 --- a/clients/hydra/rust/docs/RequestWasHandledResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# RequestWasHandledResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**redirect_to** | **String** | Original request URL to which you should redirect the user if request was already handled. | - -[[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/TokenPagination.md b/clients/hydra/rust/docs/TokenPagination.md new file mode 100644 index 00000000000..92fea786ade --- /dev/null +++ b/clients/hydra/rust/docs/TokenPagination.md @@ -0,0 +1,12 @@ +# TokenPagination + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page_size** | Option<**i64**> | 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** | Option<**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] + +[[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/TokenPaginationHeaders.md b/clients/hydra/rust/docs/TokenPaginationHeaders.md new file mode 100644 index 00000000000..cb4ec3f9a34 --- /dev/null +++ b/clients/hydra/rust/docs/TokenPaginationHeaders.md @@ -0,0 +1,12 @@ +# TokenPaginationHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | Option<**String**> | 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** | Option<**String**> | The total number of clients. in: header | [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/TokenPaginationRequestParameters.md b/clients/hydra/rust/docs/TokenPaginationRequestParameters.md new file mode 100644 index 00000000000..0fc1ee9ce2e --- /dev/null +++ b/clients/hydra/rust/docs/TokenPaginationRequestParameters.md @@ -0,0 +1,12 @@ +# TokenPaginationRequestParameters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page_size** | Option<**i64**> | 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** | Option<**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] + +[[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/TokenPaginationResponseHeaders.md b/clients/hydra/rust/docs/TokenPaginationResponseHeaders.md new file mode 100644 index 00000000000..f13de6ecc47 --- /dev/null +++ b/clients/hydra/rust/docs/TokenPaginationResponseHeaders.md @@ -0,0 +1,12 @@ +# TokenPaginationResponseHeaders + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**link** | Option<**String**> | 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] +**x_total_count** | Option<**i64**> | The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. | [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/TrustJwtGrantIssuerBody.md b/clients/hydra/rust/docs/TrustOAuth2JwtGrantIssuer.md similarity index 64% rename from clients/hydra/rust/docs/TrustJwtGrantIssuerBody.md rename to clients/hydra/rust/docs/TrustOAuth2JwtGrantIssuer.md index acf177dd762..074e6f19bfe 100644 --- a/clients/hydra/rust/docs/TrustJwtGrantIssuerBody.md +++ b/clients/hydra/rust/docs/TrustOAuth2JwtGrantIssuer.md @@ -1,14 +1,15 @@ -# TrustJwtGrantIssuerBody +# TrustOAuth2JwtGrantIssuer ## Properties 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** | [**crate::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** | **String** | The \"subject\" identifies the principal that is the subject of the JWT. | +**subject** | Option<**String**> | The \"subject\" identifies the principal that is the subject of the JWT. | [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/TrustedJwtGrantIssuer.md b/clients/hydra/rust/docs/TrustedOAuth2JwtGrantIssuer.md similarity index 75% rename from clients/hydra/rust/docs/TrustedJwtGrantIssuer.md rename to clients/hydra/rust/docs/TrustedOAuth2JwtGrantIssuer.md index 64f19a0ae7f..19102240735 100644 --- a/clients/hydra/rust/docs/TrustedJwtGrantIssuer.md +++ b/clients/hydra/rust/docs/TrustedOAuth2JwtGrantIssuer.md @@ -1,14 +1,15 @@ -# TrustedJwtGrantIssuer +# TrustedOAuth2JwtGrantIssuer ## Properties 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] **created_at** | Option<**String**> | The \"created_at\" indicates, when grant was created. | [optional] **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::TrustedJsonWebKey**](trustedJsonWebKey.md)> | | [optional] +**public_key** | Option<[**crate::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/TrustedJsonWebKey.md b/clients/hydra/rust/docs/TrustedOAuth2JwtGrantJsonWebKey.md similarity index 94% rename from clients/hydra/rust/docs/TrustedJsonWebKey.md rename to clients/hydra/rust/docs/TrustedOAuth2JwtGrantJsonWebKey.md index 010c80a6800..1758622c8f1 100644 --- a/clients/hydra/rust/docs/TrustedJsonWebKey.md +++ b/clients/hydra/rust/docs/TrustedOAuth2JwtGrantJsonWebKey.md @@ -1,4 +1,4 @@ -# TrustedJsonWebKey +# TrustedOAuth2JwtGrantJsonWebKey ## Properties diff --git a/clients/hydra/rust/docs/Volume.md b/clients/hydra/rust/docs/Volume.md deleted file mode 100644 index 2bec42224d4..00000000000 --- a/clients/hydra/rust/docs/Volume.md +++ /dev/null @@ -1,19 +0,0 @@ -# Volume - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | Option<**String**> | Date/Time the volume was created. | [optional] -**driver** | **String** | Name of the volume driver used by the volume. | -**labels** | **::std::collections::HashMap** | User-defined key/value metadata. | -**mountpoint** | **String** | Mount path of the volume on the host. | -**name** | **String** | Name of the volume. | -**options** | **::std::collections::HashMap** | The driver specific options used when creating the volume. | -**scope** | **String** | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | -**status** | Option<[**serde_json::Value**](.md)> | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. | [optional] -**usage_data** | Option<[**crate::models::VolumeUsageData**](VolumeUsageData.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/VolumeUsageData.md b/clients/hydra/rust/docs/VolumeUsageData.md deleted file mode 100644 index 07b07d3cc40..00000000000 --- a/clients/hydra/rust/docs/VolumeUsageData.md +++ /dev/null @@ -1,12 +0,0 @@ -# VolumeUsageData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ref_count** | **i64** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | -**size** | **i64** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | - -[[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/WellKnown.md b/clients/hydra/rust/docs/WellKnown.md deleted file mode 100644 index c4356498e4c..00000000000 --- a/clients/hydra/rust/docs/WellKnown.md +++ /dev/null @@ -1,37 +0,0 @@ -# WellKnown - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorization_endpoint** | **String** | URL of the OP's OAuth 2.0 Authorization Endpoint. | -**backchannel_logout_session_supported** | Option<**bool**> | 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** | Option<**bool**> | Boolean value specifying whether the OP supports back-channel logout, with true indicating support. | [optional] -**claims_parameter_supported** | Option<**bool**> | Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. | [optional] -**claims_supported** | Option<**Vec**> | 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**> | JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. | [optional] -**end_session_endpoint** | Option<**String**> | 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**> | 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**> | Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. | [optional] -**grant_types_supported** | Option<**Vec**> | JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. | [optional] -**id_token_signing_alg_values_supported** | **Vec** | 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** | **String** | 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** | **String** | 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** | Option<**String**> | URL of the OP's Dynamic Client Registration Endpoint. | [optional] -**request_object_signing_alg_values_supported** | Option<**Vec**> | 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** | Option<**bool**> | Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. | [optional] -**request_uri_parameter_supported** | Option<**bool**> | Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. | [optional] -**require_request_uri_registration** | Option<**bool**> | 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** | Option<**Vec**> | JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. | [optional] -**response_types_supported** | **Vec** | 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** | Option<**String**> | URL of the authorization server's OAuth 2.0 revocation endpoint. | [optional] -**scopes_supported** | Option<**Vec**> | SON 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** | **Vec** | JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. | -**token_endpoint** | **String** | URL of the OP's OAuth 2.0 Token Endpoint | -**token_endpoint_auth_methods_supported** | Option<**Vec**> | 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** | Option<**String**> | URL of the OP's UserInfo Endpoint. | [optional] -**userinfo_signing_alg_values_supported** | Option<**Vec**> | 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] - -[[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/WellknownApi.md b/clients/hydra/rust/docs/WellknownApi.md new file mode 100644 index 00000000000..5a5a469891a --- /dev/null +++ b/clients/hydra/rust/docs/WellknownApi.md @@ -0,0 +1,36 @@ +# \WellknownApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**discover_json_web_keys**](WellknownApi.md#discover_json_web_keys) | **GET** /.well-known/jwks.json | Discover Well-Known JSON Web Keys + + + +## discover_json_web_keys + +> crate::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. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**crate::models::JsonWebKeySet**](jsonWebKeySet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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) + diff --git a/clients/hydra/rust/src/apis/admin_api.rs b/clients/hydra/rust/src/apis/admin_api.rs deleted file mode 100644 index 0816d2440d1..00000000000 --- a/clients/hydra/rust/src/apis/admin_api.rs +++ /dev/null @@ -1,1306 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - -use reqwest; - -use crate::apis::ResponseContent; -use super::{Error, configuration}; - - -/// struct for typed errors of method `accept_consent_request` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AcceptConsentRequestError { - Status404(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `accept_login_request` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AcceptLoginRequestError { - Status400(crate::models::JsonError), - Status401(crate::models::JsonError), - Status404(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `accept_logout_request` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AcceptLogoutRequestError { - Status404(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `create_json_web_key_set` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateJsonWebKeySetError { - Status401(crate::models::JsonError), - Status403(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `create_o_auth2_client` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateOAuth2ClientError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `delete_json_web_key` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteJsonWebKeyError { - Status401(crate::models::JsonError), - Status403(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `delete_json_web_key_set` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteJsonWebKeySetError { - Status401(crate::models::JsonError), - Status403(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `delete_o_auth2_client` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteOAuth2ClientError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `delete_o_auth2_token` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteOAuth2TokenError { - Status401(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `delete_trusted_jwt_grant_issuer` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteTrustedJwtGrantIssuerError { - Status404(crate::models::GenericError), - Status500(crate::models::GenericError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `flush_inactive_o_auth2_tokens` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum FlushInactiveOAuth2TokensError { - Status401(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `get_consent_request` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetConsentRequestError { - Status404(crate::models::JsonError), - Status410(crate::models::RequestWasHandledResponse), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `get_json_web_key` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetJsonWebKeyError { - Status404(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `get_json_web_key_set` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetJsonWebKeySetError { - Status401(crate::models::JsonError), - Status403(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `get_login_request` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLoginRequestError { - Status400(crate::models::JsonError), - Status404(crate::models::JsonError), - Status410(crate::models::RequestWasHandledResponse), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `get_logout_request` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLogoutRequestError { - Status404(crate::models::JsonError), - Status410(crate::models::RequestWasHandledResponse), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `get_o_auth2_client` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetOAuth2ClientError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `get_trusted_jwt_grant_issuer` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetTrustedJwtGrantIssuerError { - Status404(crate::models::GenericError), - Status500(crate::models::GenericError), - UnknownValue(serde_json::Value), -} - -/// 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 `introspect_o_auth2_token` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IntrospectOAuth2TokenError { - Status401(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `is_instance_alive` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IsInstanceAliveError { - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `list_o_auth2_clients` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListOAuth2ClientsError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `list_subject_consent_sessions` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListSubjectConsentSessionsError { - Status400(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `list_trusted_jwt_grant_issuers` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListTrustedJwtGrantIssuersError { - Status500(crate::models::GenericError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `patch_o_auth2_client` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PatchOAuth2ClientError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `reject_consent_request` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RejectConsentRequestError { - Status404(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `reject_login_request` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RejectLoginRequestError { - Status400(crate::models::JsonError), - Status401(crate::models::JsonError), - Status404(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `reject_logout_request` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RejectLogoutRequestError { - Status404(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `revoke_authentication_session` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RevokeAuthenticationSessionError { - Status400(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `revoke_consent_sessions` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RevokeConsentSessionsError { - Status400(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `trust_jwt_grant_issuer` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum TrustJwtGrantIssuerError { - Status400(crate::models::GenericError), - Status409(crate::models::GenericError), - Status500(crate::models::GenericError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `update_json_web_key` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateJsonWebKeyError { - Status401(crate::models::JsonError), - Status403(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `update_json_web_key_set` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateJsonWebKeySetError { - Status401(crate::models::JsonError), - Status403(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `update_o_auth2_client` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateOAuth2ClientError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - - -/// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. -pub async fn accept_consent_request(configuration: &configuration::Configuration, consent_challenge: &str, body: Option) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/requests/consent/accept", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra 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_login_request(configuration: &configuration::Configuration, login_challenge: &str, body: Option) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/requests/login/accept", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. -pub async fn accept_logout_request(configuration: &configuration::Configuration, logout_challenge: &str) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/requests/logout/accept", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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, body: Option) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/keys/{set}", 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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 create_o_auth2_client(configuration: &configuration::Configuration, body: crate::models::OAuth2Client) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/clients", 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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, kid: &str, set: &str) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/keys/{set}/{kid}", configuration.base_path, kid=crate::apis::urlencode(kid), 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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_client = &configuration.client; - - let local_var_uri_str = format!("{}/keys/{set}", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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_client = &configuration.client; - - let local_var_uri_str = format!("{}/clients/{id}", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint deletes OAuth2 access tokens issued for a client from the database -pub async fn delete_o_auth2_token(configuration: &configuration::Configuration, client_id: &str) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/tokens", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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_jwt_grant_issuer(configuration: &configuration::Configuration, id: &str) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/trust/grants/jwt-bearer/issuers/{id}", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. -pub async fn flush_inactive_o_auth2_tokens(configuration: &configuration::Configuration, body: Option) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/flush", 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. -pub async fn get_consent_request(configuration: &configuration::Configuration, consent_challenge: &str) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/requests/consent", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). -pub async fn get_json_web_key(configuration: &configuration::Configuration, kid: &str, set: &str) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/keys/{set}/{kid}", configuration.base_path, kid=crate::apis::urlencode(kid), 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/keys/{set}", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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_login_request(configuration: &configuration::Configuration, login_challenge: &str) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/requests/login", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Use this endpoint to fetch a logout request. -pub async fn get_logout_request(configuration: &configuration::Configuration, logout_challenge: &str) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/requests/logout", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/clients/{id}", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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_jwt_grant_issuer(configuration: &configuration::Configuration, id: &str) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/trust/grants/jwt-bearer/issuers/{id}", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. -pub async fn get_version(configuration: &configuration::Configuration, ) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/version", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). -pub async fn introspect_o_auth2_token(configuration: &configuration::Configuration, token: &str, scope: Option<&str>) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/introspect", 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 { - 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(); - local_var_form_params.insert("token", token.to_string()); - if let Some(local_var_param_value) = scope { - local_var_form_params.insert("scope", local_var_param_value.to_string()); - } - local_var_req_builder = local_var_req_builder.form(&local_var_form_params); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint returns a 200 status code when the HTTP server is up running. 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_instance_alive(configuration: &configuration::Configuration, ) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/health/alive", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. -pub async fn list_o_auth2_clients(configuration: &configuration::Configuration, limit: Option, offset: Option, client_name: Option<&str>, owner: Option<&str>) -> Result, Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/clients", 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) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = offset { - local_var_req_builder = local_var_req_builder.query(&[("offset", &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())]); - } - if let Some(ref local_var_str) = owner { - 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma. -pub async fn list_subject_consent_sessions(configuration: &configuration::Configuration, subject: &str) -> Result, Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/sessions/consent", 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(&[("subject", &subject.to_string())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. -pub async fn list_trusted_jwt_grant_issuers(configuration: &configuration::Configuration, issuer: Option<&str>, limit: Option, offset: Option) -> Result, Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/trust/grants/jwt-bearer/issuers", 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) = issuer { - local_var_req_builder = local_var_req_builder.query(&[("issuer", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); - } - if let Some(ref local_var_str) = offset { - local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]); - } - if let Some(ref local_var_user_agent) = configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Patch an existing OAuth 2.0 Client. 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, body: Vec) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/clients/{id}", 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. -pub async fn reject_consent_request(configuration: &configuration::Configuration, consent_challenge: &str, body: Option) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/requests/consent/reject", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. -pub async fn reject_login_request(configuration: &configuration::Configuration, login_challenge: &str, body: Option) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/requests/login/reject", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. -pub async fn reject_logout_request(configuration: &configuration::Configuration, logout_challenge: &str, body: Option) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/requests/logout/reject", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - local_var_req_builder = local_var_req_builder.json(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. -pub async fn revoke_authentication_session(configuration: &configuration::Configuration, subject: &str) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/sessions/login", 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())]); - if let Some(ref local_var_user_agent) = configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. -pub async fn revoke_consent_sessions(configuration: &configuration::Configuration, subject: &str, client: Option<&str>, all: Option) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth/sessions/consent", 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())]); - if let Some(ref local_var_str) = client { - 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())]); - } - if let Some(ref local_var_user_agent) = configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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_jwt_grant_issuer(configuration: &configuration::Configuration, body: Option) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/trust/grants/jwt-bearer/issuers", 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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 update_json_web_key(configuration: &configuration::Configuration, kid: &str, set: &str, body: Option) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/keys/{set}/{kid}", configuration.base_path, kid=crate::apis::urlencode(kid), 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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 update_json_web_key_set(configuration: &configuration::Configuration, set: &str, body: Option) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/keys/{set}", 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// Update an existing OAuth 2.0 Client. 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 update_o_auth2_client(configuration: &configuration::Configuration, id: &str, body: crate::models::OAuth2Client) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/clients/{id}", 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - diff --git a/clients/hydra/rust/src/apis/configuration.rs b/clients/hydra/rust/src/apis/configuration.rs index 68dd99fa4b2..e975c003cc2 100644 --- a/clients/hydra/rust/src/apis/configuration.rs +++ b/clients/hydra/rust/src/apis/configuration.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -41,7 +41,7 @@ impl Default for Configuration { fn default() -> Self { Configuration { base_path: "http://localhost".to_owned(), - user_agent: Some("OpenAPI-Generator/v1.11.0/rust".to_owned()), + user_agent: Some("OpenAPI-Generator/v2.0.1/rust".to_owned()), client: reqwest::Client::new(), basic_auth: None, oauth_access_token: None, diff --git a/clients/hydra/rust/src/apis/jwk_api.rs b/clients/hydra/rust/src/apis/jwk_api.rs new file mode 100644 index 00000000000..2bb3118951d --- /dev/null +++ b/clients/hydra/rust/src/apis/jwk_api.rs @@ -0,0 +1,282 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 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` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateJsonWebKeySetError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `delete_json_web_key` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteJsonWebKeyError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `get_json_web_key` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetJsonWebKeyError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `set_json_web_key` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SetJsonWebKeyError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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), + 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/keys/{set}", 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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_client = &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 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/keys/{set}", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &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 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/keys/{set}", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &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 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/keys/{set}", 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/clients/hydra/rust/src/apis/metadata_api.rs b/clients/hydra/rust/src/apis/metadata_api.rs index 3c1f188790e..6c1deb9184d 100644 --- a/clients/hydra/rust/src/apis/metadata_api.rs +++ b/clients/hydra/rust/src/apis/metadata_api.rs @@ -1,34 +1,120 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.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 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` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetVersionError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `is_alive` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IsAliveError { + Status500(crate::models::GenericError), + UnknownValue(serde_json::Value), +} -/// struct for typed errors of method `prometheus` +/// struct for typed errors of method `is_ready` #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] -pub enum PrometheusError { +pub enum IsReadyError { + Status503(crate::models::IsReady503Response), UnknownValue(serde_json::Value), } -/// ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` -pub async fn prometheus(configuration: &configuration::Configuration, ) -> Result<(), Error> { +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/version", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/health/alive", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { let local_var_client = &configuration.client; - let local_var_uri_str = format!("{}/metrics/prometheus", configuration.base_path); + let local_var_uri_str = format!("{}/health/ready", 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 { @@ -42,9 +128,9 @@ pub async fn prometheus(configuration: &configuration::Configuration, ) -> Resul let local_var_content = local_var_resp.text().await?; if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) + serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; Err(Error::ResponseError(local_var_error)) } diff --git a/clients/hydra/rust/src/apis/mod.rs b/clients/hydra/rust/src/apis/mod.rs index 5d498a03bea..87fcd1f2f1e 100644 --- a/clients/hydra/rust/src/apis/mod.rs +++ b/clients/hydra/rust/src/apis/mod.rs @@ -61,8 +61,10 @@ pub fn urlencode>(s: T) -> String { ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } -pub mod admin_api; +pub mod jwk_api; pub mod metadata_api; -pub mod public_api; +pub mod o_auth2_api; +pub mod oidc_api; +pub mod wellknown_api; pub mod configuration; diff --git a/clients/hydra/rust/src/apis/o_auth2_api.rs b/clients/hydra/rust/src/apis/o_auth2_api.rs new file mode 100644 index 00000000000..ddcf6039955 --- /dev/null +++ b/clients/hydra/rust/src/apis/o_auth2_api.rs @@ -0,0 +1,1112 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 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` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AcceptOAuth2ConsentRequestError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `delete_o_auth2_client` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOAuth2ClientError { + DefaultResponse(crate::models::GenericError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `delete_o_auth2_token` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOAuth2TokenError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `get_o_auth2_client` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOAuth2ClientError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `introspect_o_auth2_token` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum IntrospectOAuth2TokenError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `list_o_auth2_clients` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListOAuth2ClientsError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `o_auth2_authorize` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OAuth2AuthorizeError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `oauth2_token_exchange` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum Oauth2TokenExchangeError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `revoke_o_auth2_token` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum RevokeOAuth2TokenError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + UnknownValue(serde_json::Value), +} + +/// 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), + 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/consent/accept", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + local_var_req_builder = local_var_req_builder.json(&accept_o_auth2_consent_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/login/accept", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + local_var_req_builder = local_var_req_builder.json(&accept_o_auth2_login_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/logout/accept", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/clients", 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/clients/{id}", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/tokens", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers/{id}", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/clients/{id}", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/consent", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/login", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/logout", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers/{id}", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/introspect", 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 { + 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(); + if let Some(local_var_param_value) = scope { + local_var_form_params.insert("scope", local_var_param_value.to_string()); + } + local_var_form_params.insert("token", token.to_string()); + local_var_req_builder = local_var_req_builder.form(&local_var_form_params); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/clients", 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())]); + } + 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())]); + } + 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())]); + } + if let Some(ref local_var_str) = owner { + 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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>) -> Result, Error> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/sessions/consent", 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())]); + } + 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(&[("subject", subject.to_string())]); + if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers", 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())]); + } + if let Some(ref local_var_str) = default_items { + 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())]); + } + if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/oauth2/auth", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/oauth2/token", 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 { + 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 { + 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 { + 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(); + if let Some(local_var_param_value) = client_id { + local_var_form_params.insert("client_id", local_var_param_value.to_string()); + } + if let Some(local_var_param_value) = code { + local_var_form_params.insert("code", local_var_param_value.to_string()); + } + local_var_form_params.insert("grant_type", grant_type.to_string()); + if let Some(local_var_param_value) = redirect_uri { + local_var_form_params.insert("redirect_uri", local_var_param_value.to_string()); + } + if let Some(local_var_param_value) = refresh_token { + local_var_form_params.insert("refresh_token", local_var_param_value.to_string()); + } + local_var_req_builder = local_var_req_builder.form(&local_var_form_params); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/clients/{id}", 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/consent/reject", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + local_var_req_builder = local_var_req_builder.json(&reject_o_auth2_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/login/reject", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + local_var_req_builder = local_var_req_builder.json(&reject_o_auth2_request); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/requests/logout/reject", 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.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/sessions/consent", 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())]); + if let Some(ref local_var_str) = client { + 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())]); + } + if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. +pub async fn revoke_o_auth2_login_sessions(configuration: &configuration::Configuration, subject: &str) -> Result<(), Error> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/oauth2/auth/sessions/login", 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())]); + if let Some(ref local_var_user_agent) = configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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) -> Result<(), Error> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/oauth2/revoke", 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 { + 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 { + 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 { + 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(); + local_var_form_params.insert("token", token.to_string()); + local_var_req_builder = local_var_req_builder.form(&local_var_form_params); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/clients/{id}", 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/clients/{id}/lifespans", 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/admin/trust/grants/jwt-bearer/issuers", 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/clients/hydra/rust/src/apis/oidc_api.rs b/clients/hydra/rust/src/apis/oidc_api.rs new file mode 100644 index 00000000000..12d2cfcdc64 --- /dev/null +++ b/clients/hydra/rust/src/apis/oidc_api.rs @@ -0,0 +1,294 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 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` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateOidcDynamicClientError { + Status400(crate::models::ErrorOAuth2), + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `delete_oidc_dynamic_client` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOidcDynamicClientError { + DefaultResponse(crate::models::GenericError), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `discover_oidc_configuration` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DiscoverOidcConfigurationError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `get_oidc_dynamic_client` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOidcDynamicClientError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method `get_oidc_user_info` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOidcUserInfoError { + DefaultResponse(crate::models::ErrorOAuth2), + UnknownValue(serde_json::Value), +} + +/// 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` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SetOidcDynamicClientError { + Status404(crate::models::ErrorOAuth2), + DefaultResponse(crate::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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/oauth2/register", 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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_client = &configuration.client; + + let local_var_uri_str = format!("{}/oauth2/register/{id}", 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 { + 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 { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/.well-known/openid-configuration", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/oauth2/register/{id}", 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 { + 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 { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/userinfo", 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 { + 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 { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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_client = &configuration.client; + + let local_var_uri_str = format!("{}/oauth2/sessions/logout", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + Ok(()) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// 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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/oauth2/register/{id}", 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 { + 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 { + 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); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/clients/hydra/rust/src/apis/public_api.rs b/clients/hydra/rust/src/apis/public_api.rs deleted file mode 100644 index 067f355ad60..00000000000 --- a/clients/hydra/rust/src/apis/public_api.rs +++ /dev/null @@ -1,478 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - -use reqwest; - -use crate::apis::ResponseContent; -use super::{Error, configuration}; - - -/// struct for typed errors of method `disconnect_user` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DisconnectUserError { - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `discover_open_id_configuration` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DiscoverOpenIdConfigurationError { - Status401(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `dynamic_client_registration_create_o_auth2_client` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DynamicClientRegistrationCreateOAuth2ClientError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `dynamic_client_registration_delete_o_auth2_client` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DynamicClientRegistrationDeleteOAuth2ClientError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `dynamic_client_registration_get_o_auth2_client` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DynamicClientRegistrationGetOAuth2ClientError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `dynamic_client_registration_update_o_auth2_client` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DynamicClientRegistrationUpdateOAuth2ClientError { - DefaultResponse(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `is_instance_ready` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum IsInstanceReadyError { - Status503(crate::models::HealthNotReadyStatus), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `oauth2_token` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum Oauth2TokenError { - Status400(crate::models::JsonError), - Status401(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `oauth_auth` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum OauthAuthError { - Status401(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `revoke_o_auth2_token` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RevokeOAuth2TokenError { - Status401(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `userinfo` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UserinfoError { - Status401(crate::models::JsonError), - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - -/// struct for typed errors of method `well_known` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum WellKnownError { - Status500(crate::models::JsonError), - UnknownValue(serde_json::Value), -} - - -/// This endpoint initiates and completes user logout at Ory Hydra 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 -pub async fn disconnect_user(configuration: &configuration::Configuration, ) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/sessions/logout", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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_open_id_configuration(configuration: &configuration::Configuration, ) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/.well-known/openid-configuration", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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 dynamic_client_registration_create_o_auth2_client(configuration: &configuration::Configuration, body: crate::models::OAuth2Client) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/connect/register", 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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 dynamic_client_registration_delete_o_auth2_client(configuration: &configuration::Configuration, id: &str) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/connect/register/{id}", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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. 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 dynamic_client_registration_get_o_auth2_client(configuration: &configuration::Configuration, id: &str) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/connect/register/{id}", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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 dynamic_client_registration_update_o_auth2_client(configuration: &configuration::Configuration, id: &str, body: crate::models::OAuth2Client) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/connect/register/{id}", 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 { - 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(&body); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. -pub async fn is_instance_ready(configuration: &configuration::Configuration, ) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/health/ready", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! -pub async fn oauth2_token(configuration: &configuration::Configuration, grant_type: &str, code: Option<&str>, refresh_token: Option<&str>, redirect_uri: Option<&str>, client_id: Option<&str>) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/token", 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 { - 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 { - 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 { - 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(); - local_var_form_params.insert("grant_type", grant_type.to_string()); - if let Some(local_var_param_value) = code { - local_var_form_params.insert("code", local_var_param_value.to_string()); - } - if let Some(local_var_param_value) = refresh_token { - local_var_form_params.insert("refresh_token", local_var_param_value.to_string()); - } - if let Some(local_var_param_value) = redirect_uri { - local_var_form_params.insert("redirect_uri", local_var_param_value.to_string()); - } - if let Some(local_var_param_value) = client_id { - local_var_form_params.insert("client_id", local_var_param_value.to_string()); - } - local_var_req_builder = local_var_req_builder.form(&local_var_form_params); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 -pub async fn oauth_auth(configuration: &configuration::Configuration, ) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/auth", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// 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) -> Result<(), Error> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/oauth2/revoke", 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 { - 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 { - 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 { - 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(); - local_var_form_params.insert("token", token.to_string()); - local_var_req_builder = local_var_req_builder.form(&local_var_form_params); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - Ok(()) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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 userinfo(configuration: &configuration::Configuration, ) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/userinfo", 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 { - 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 { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - -/// This endpoint returns JSON Web Keys to be used as public keys for 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 well_known(configuration: &configuration::Configuration, ) -> Result> { - - let local_var_client = &configuration.client; - - let local_var_uri_str = format!("{}/.well-known/jwks.json", 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 { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - serde_json::from_str(&local_var_content).map_err(Error::from) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } -} - diff --git a/clients/hydra/rust/src/apis/wellknown_api.rs b/clients/hydra/rust/src/apis/wellknown_api.rs new file mode 100644 index 00000000000..1e4feabb9ee --- /dev/null +++ b/clients/hydra/rust/src/apis/wellknown_api.rs @@ -0,0 +1,69 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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 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` +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DiscoverJsonWebKeysError { + DefaultResponse(crate::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> { + + let local_var_client = &configuration.client; + + let local_var_uri_str = format!("{}/.well-known/jwks.json", 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 { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + serde_json::from_str(&local_var_content).map_err(Error::from) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/clients/hydra/rust/src/models/accept_consent_request.rs b/clients/hydra/rust/src/models/accept_o_auth2_consent_request.rs similarity index 62% rename from clients/hydra/rust/src/models/accept_consent_request.rs rename to clients/hydra/rust/src/models/accept_o_auth2_consent_request.rs index d18ae641dab..93768477b03 100644 --- a/clients/hydra/rust/src/models/accept_consent_request.rs +++ b/clients/hydra/rust/src/models/accept_o_auth2_consent_request.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -12,7 +12,7 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct AcceptConsentRequest { +pub struct AcceptOAuth2ConsentRequest { #[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")] @@ -26,18 +26,24 @@ pub struct AcceptConsentRequest { #[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>, + pub session: Option>, } -impl AcceptConsentRequest { - pub fn new() -> AcceptConsentRequest { - AcceptConsentRequest { - grant_access_token_audience: None, - grant_scope: None, - handled_at: None, - remember: None, - remember_for: None, - session: None, +impl Default for AcceptOAuth2ConsentRequest { + fn default() -> Self { + Self::new() + } +} + +impl AcceptOAuth2ConsentRequest { + pub fn new() -> AcceptOAuth2ConsentRequest { + AcceptOAuth2ConsentRequest { + 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/consent_request_session.rs b/clients/hydra/rust/src/models/accept_o_auth2_consent_request_session.rs similarity index 67% rename from clients/hydra/rust/src/models/consent_request_session.rs rename to clients/hydra/rust/src/models/accept_o_auth2_consent_request_session.rs index 3f5697ca9ab..cad61359ff7 100644 --- a/clients/hydra/rust/src/models/consent_request_session.rs +++ b/clients/hydra/rust/src/models/accept_o_auth2_consent_request_session.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -12,7 +12,7 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConsentRequestSession { +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, @@ -21,11 +21,17 @@ pub struct ConsentRequestSession { pub id_token: Option, } -impl ConsentRequestSession { - pub fn new() -> ConsentRequestSession { - ConsentRequestSession { - access_token: None, - id_token: None, +impl Default for AcceptOAuth2ConsentRequestSession { + fn default() -> Self { + Self::new() + } +} + +impl AcceptOAuth2ConsentRequestSession { + pub fn new() -> AcceptOAuth2ConsentRequestSession { + AcceptOAuth2ConsentRequestSession { + access_token: None, + id_token: None, } } } diff --git a/clients/hydra/rust/src/models/accept_login_request.rs b/clients/hydra/rust/src/models/accept_o_auth2_login_request.rs similarity index 84% rename from clients/hydra/rust/src/models/accept_login_request.rs rename to clients/hydra/rust/src/models/accept_o_auth2_login_request.rs index 4704c5d30bf..5d0a5e3a116 100644 --- a/clients/hydra/rust/src/models/accept_login_request.rs +++ b/clients/hydra/rust/src/models/accept_o_auth2_login_request.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -12,7 +12,7 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct AcceptLoginRequest { +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, @@ -34,16 +34,17 @@ pub struct AcceptLoginRequest { pub subject: String, } -impl AcceptLoginRequest { - pub fn new(subject: String) -> AcceptLoginRequest { - AcceptLoginRequest { - acr: None, - amr: None, - context: None, - force_subject_identifier: None, - remember: None, - remember_for: None, - subject, + +impl AcceptOAuth2LoginRequest { + pub fn new(subject: String) -> AcceptOAuth2LoginRequest { + AcceptOAuth2LoginRequest { + acr: None, + amr: None, + context: None, + force_subject_identifier: None, + remember: None, + remember_for: None, + subject, } } } diff --git a/clients/hydra/rust/src/models/completed_request.rs b/clients/hydra/rust/src/models/completed_request.rs deleted file mode 100644 index ebad667e52b..00000000000 --- a/clients/hydra/rust/src/models/completed_request.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct CompletedRequest { - /// RedirectURL is the URL which you should redirect the user to once the authentication process is completed. - #[serde(rename = "redirect_to")] - pub redirect_to: String, -} - -impl CompletedRequest { - pub fn new(redirect_to: String) -> CompletedRequest { - CompletedRequest { - redirect_to, - } - } -} - - diff --git a/clients/hydra/rust/src/models/container_wait_ok_body_error.rs b/clients/hydra/rust/src/models/container_wait_ok_body_error.rs deleted file mode 100644 index 152586a5cdd..00000000000 --- a/clients/hydra/rust/src/models/container_wait_ok_body_error.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// ContainerWaitOkBodyError : ContainerWaitOKBodyError container waiting error, if any - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct ContainerWaitOkBodyError { - /// Details of an error - #[serde(rename = "Message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl ContainerWaitOkBodyError { - /// ContainerWaitOKBodyError container waiting error, if any - pub fn new() -> ContainerWaitOkBodyError { - ContainerWaitOkBodyError { - message: None, - } - } -} - - 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 new file mode 100644 index 00000000000..2a09a546613 --- /dev/null +++ b/clients/hydra/rust/src/models/create_json_web_key_set.rs @@ -0,0 +1,40 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + +/// CreateJsonWebKeySet : Create JSON Web Key Set Request Body + + + +#[derive(Clone, 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")] + pub alg: String, + /// JSON Web Key ID The Key ID of the key to be created. + #[serde(rename = "kid")] + 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, +} + + +impl CreateJsonWebKeySet { + /// Create JSON Web Key Set Request Body + pub fn new(alg: String, kid: String, _use: String) -> CreateJsonWebKeySet { + CreateJsonWebKeySet { + alg, + kid, + _use, + } + } +} + + diff --git a/clients/hydra/rust/src/models/error_o_auth2.rs b/clients/hydra/rust/src/models/error_o_auth2.rs new file mode 100644 index 00000000000..2647f742f5f --- /dev/null +++ b/clients/hydra/rust/src/models/error_o_auth2.rs @@ -0,0 +1,53 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + +/// ErrorOAuth2 : Error + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct ErrorOAuth2 { + /// Error + #[serde(rename = "error", skip_serializing_if = "Option::is_none")] + pub error: Option, + /// Error Debug Information Only available in dev mode. + #[serde(rename = "error_debug", skip_serializing_if = "Option::is_none")] + pub error_debug: Option, + /// Error Description + #[serde(rename = "error_description", skip_serializing_if = "Option::is_none")] + pub error_description: Option, + /// Error Hint Helps the user identify the error cause. + #[serde(rename = "error_hint", skip_serializing_if = "Option::is_none")] + pub error_hint: Option, + /// HTTP Status Code + #[serde(rename = "status_code", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/flush_inactive_o_auth2_tokens_request.rs b/clients/hydra/rust/src/models/flush_inactive_o_auth2_tokens_request.rs deleted file mode 100644 index 6b876bddbff..00000000000 --- a/clients/hydra/rust/src/models/flush_inactive_o_auth2_tokens_request.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct FlushInactiveOAuth2TokensRequest { - /// NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. - #[serde(rename = "notAfter", skip_serializing_if = "Option::is_none")] - pub not_after: Option, -} - -impl FlushInactiveOAuth2TokensRequest { - pub fn new() -> FlushInactiveOAuth2TokensRequest { - FlushInactiveOAuth2TokensRequest { - not_after: None, - } - } -} - - diff --git a/clients/hydra/rust/src/models/generic_error.rs b/clients/hydra/rust/src/models/generic_error.rs index f9b4caafb55..de367ab78d4 100644 --- a/clients/hydra/rust/src/models/generic_error.rs +++ b/clients/hydra/rust/src/models/generic_error.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -39,17 +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 new file mode 100644 index 00000000000..e17b09acde7 --- /dev/null +++ b/clients/hydra/rust/src/models/get_version_200_response.rs @@ -0,0 +1,35 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, 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, + } + } +} + + 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 83a8b3a05a9..296805a8aeb 100644 --- a/clients/hydra/rust/src/models/health_not_ready_status.rs +++ b/clients/hydra/rust/src/models/health_not_ready_status.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -18,10 +18,16 @@ pub struct HealthNotReadyStatus { pub errors: Option<::std::collections::HashMap>, } +impl Default for HealthNotReadyStatus { + fn default() -> Self { + Self::new() + } +} + 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 66e47b4a297..711f8357d0d 100644 --- a/clients/hydra/rust/src/models/health_status.rs +++ b/clients/hydra/rust/src/models/health_status.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -18,10 +18,16 @@ pub struct HealthStatus { 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/o_auth2_token_introspection.rs b/clients/hydra/rust/src/models/introspected_o_auth2_token.rs similarity index 76% rename from clients/hydra/rust/src/models/o_auth2_token_introspection.rs rename to clients/hydra/rust/src/models/introspected_o_auth2_token.rs index 89f53049f69..1dab169c7e6 100644 --- a/clients/hydra/rust/src/models/o_auth2_token_introspection.rs +++ b/clients/hydra/rust/src/models/introspected_o_auth2_token.rs @@ -1,19 +1,19 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// OAuth2TokenIntrospection : https://tools.ietf.org/html/rfc7662 +/// IntrospectedOAuth2Token : Introspection contains an access token's session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662) #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct OAuth2TokenIntrospection { +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")] pub active: bool, @@ -28,7 +28,7 @@ pub struct OAuth2TokenIntrospection { pub exp: Option, /// Extra is arbitrary data set by the session. #[serde(rename = "ext", skip_serializing_if = "Option::is_none")] - pub ext: Option, + pub ext: Option<::std::collections::HashMap>, /// 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,24 +58,25 @@ pub struct OAuth2TokenIntrospection { pub username: Option, } -impl OAuth2TokenIntrospection { - /// https://tools.ietf.org/html/rfc7662 - pub fn new(active: bool) -> OAuth2TokenIntrospection { - OAuth2TokenIntrospection { - 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, + +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, } } } diff --git a/clients/hydra/rust/src/models/is_ready_200_response.rs b/clients/hydra/rust/src/models/is_ready_200_response.rs new file mode 100644 index 00000000000..8cfa4659cf2 --- /dev/null +++ b/clients/hydra/rust/src/models/is_ready_200_response.rs @@ -0,0 +1,35 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/is_ready_503_response.rs b/clients/hydra/rust/src/models/is_ready_503_response.rs new file mode 100644 index 00000000000..60ac3d133f0 --- /dev/null +++ b/clients/hydra/rust/src/models/is_ready_503_response.rs @@ -0,0 +1,35 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, 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() + } +} + +impl IsReady503Response { + pub fn new() -> IsReady503Response { + IsReady503Response { + errors: None, + } + } +} + + diff --git a/clients/hydra/rust/src/models/json_error.rs b/clients/hydra/rust/src/models/json_error.rs deleted file mode 100644 index 5ddfb35ed24..00000000000 --- a/clients/hydra/rust/src/models/json_error.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// JsonError : Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct JsonError { - /// Name is the error name. - #[serde(rename = "error", skip_serializing_if = "Option::is_none")] - pub error: Option, - /// Debug contains debug information. This is usually not available and has to be enabled. - #[serde(rename = "error_debug", skip_serializing_if = "Option::is_none")] - pub error_debug: Option, - /// Description contains further information on the nature of the error. - #[serde(rename = "error_description", skip_serializing_if = "Option::is_none")] - pub error_description: Option, - /// Code represents the error status code (404, 403, 401, ...). - #[serde(rename = "status_code", skip_serializing_if = "Option::is_none")] - pub status_code: Option, -} - -impl JsonError { - /// Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. - pub fn new() -> JsonError { - JsonError { - error: None, - error_debug: None, - error_description: None, - status_code: None, - } - } -} - - diff --git a/clients/hydra/rust/src/models/json_patch.rs b/clients/hydra/rust/src/models/json_patch.rs new file mode 100644 index 00000000000..756b143291b --- /dev/null +++ b/clients/hydra/rust/src/models/json_patch.rs @@ -0,0 +1,44 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + +/// JsonPatch : A JSONPatch document as defined by RFC 6902 + + + +#[derive(Clone, 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")] + pub from: Option, + /// The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\". + #[serde(rename = "op")] + pub 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). + #[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, +} + + +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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/json_web_key.rs b/clients/hydra/rust/src/models/json_web_key.rs index c90549e5424..ed058e29b0c 100644 --- a/clients/hydra/rust/src/models/json_web_key.rs +++ b/clients/hydra/rust/src/models/json_web_key.rs @@ -1,14 +1,13 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// JsonWebKey : It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. @@ -55,27 +54,27 @@ pub struct JsonWebKey { pub y: Option, } + impl JsonWebKey { - /// It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. pub fn new(alg: String, kid: String, kty: String, _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, + _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 87f01e044f5..d6d52d25600 100644 --- a/clients/hydra/rust/src/models/json_web_key_set.rs +++ b/clients/hydra/rust/src/models/json_web_key_set.rs @@ -1,29 +1,35 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// JsonWebKeySet : It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. +/// JsonWebKeySet : JSON Web Key Set #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct JsonWebKeySet { - /// The value of the \"keys\" parameter is an array of 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. + /// 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() + } +} + impl JsonWebKeySet { - /// It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. + /// JSON Web Key Set pub fn new() -> JsonWebKeySet { JsonWebKeySet { - keys: None, + keys: None, } } } diff --git a/clients/hydra/rust/src/models/json_web_key_set_generator_request.rs b/clients/hydra/rust/src/models/json_web_key_set_generator_request.rs deleted file mode 100644 index 504297bdfb4..00000000000 --- a/clients/hydra/rust/src/models/json_web_key_set_generator_request.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct JsonWebKeySetGeneratorRequest { - /// The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" - #[serde(rename = "alg")] - pub alg: String, - /// The kid of the key to be created - #[serde(rename = "kid")] - pub kid: String, - /// 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, -} - -impl JsonWebKeySetGeneratorRequest { - pub fn new(alg: String, kid: String, _use: String) -> JsonWebKeySetGeneratorRequest { - JsonWebKeySetGeneratorRequest { - alg, - kid, - _use, - } - } -} - - diff --git a/clients/hydra/rust/src/models/mod.rs b/clients/hydra/rust/src/models/mod.rs index ca906204dfd..8b32e9bac93 100644 --- a/clients/hydra/rust/src/models/mod.rs +++ b/clients/hydra/rust/src/models/mod.rs @@ -1,88 +1,76 @@ -pub mod accept_consent_request; -pub use self::accept_consent_request::AcceptConsentRequest; -pub mod accept_login_request; -pub use self::accept_login_request::AcceptLoginRequest; -pub mod completed_request; -pub use self::completed_request::CompletedRequest; -pub mod consent_request; -pub use self::consent_request::ConsentRequest; -pub mod consent_request_session; -pub use self::consent_request_session::ConsentRequestSession; -pub mod container_wait_ok_body_error; -pub use self::container_wait_ok_body_error::ContainerWaitOkBodyError; -pub mod flush_inactive_o_auth2_tokens_request; -pub use self::flush_inactive_o_auth2_tokens_request::FlushInactiveOAuth2TokensRequest; +pub mod accept_o_auth2_consent_request; +pub use self::accept_o_auth2_consent_request::AcceptOAuth2ConsentRequest; +pub mod accept_o_auth2_consent_request_session; +pub use self::accept_o_auth2_consent_request_session::AcceptOAuth2ConsentRequestSession; +pub mod accept_o_auth2_login_request; +pub use self::accept_o_auth2_login_request::AcceptOAuth2LoginRequest; +pub mod create_json_web_key_set; +pub use self::create_json_web_key_set::CreateJsonWebKeySet; +pub mod error_o_auth2; +pub use self::error_o_auth2::ErrorOAuth2; pub mod generic_error; pub use self::generic_error::GenericError; +pub mod get_version_200_response; +pub use self::get_version_200_response::GetVersion200Response; pub mod health_not_ready_status; pub use self::health_not_ready_status::HealthNotReadyStatus; pub mod health_status; pub use self::health_status::HealthStatus; -pub mod json_error; -pub use self::json_error::JsonError; +pub mod introspected_o_auth2_token; +pub use self::introspected_o_auth2_token::IntrospectedOAuth2Token; +pub mod is_ready_200_response; +pub use self::is_ready_200_response::IsReady200Response; +pub mod is_ready_503_response; +pub use self::is_ready_503_response::IsReady503Response; +pub mod json_patch; +pub use self::json_patch::JsonPatch; pub mod json_web_key; pub use self::json_web_key::JsonWebKey; pub mod json_web_key_set; pub use self::json_web_key_set::JsonWebKeySet; -pub mod json_web_key_set_generator_request; -pub use self::json_web_key_set_generator_request::JsonWebKeySetGeneratorRequest; -pub mod login_request; -pub use self::login_request::LoginRequest; -pub mod logout_request; -pub use self::logout_request::LogoutRequest; pub mod o_auth2_client; pub use self::o_auth2_client::OAuth2Client; -pub mod o_auth2_token_introspection; -pub use self::o_auth2_token_introspection::OAuth2TokenIntrospection; -pub mod oauth2_token_response; -pub use self::oauth2_token_response::Oauth2TokenResponse; -pub mod open_id_connect_context; -pub use self::open_id_connect_context::OpenIdConnectContext; -pub mod patch_document; -pub use self::patch_document::PatchDocument; -pub mod plugin_config; -pub use self::plugin_config::PluginConfig; -pub mod plugin_config_args; -pub use self::plugin_config_args::PluginConfigArgs; -pub mod plugin_config_interface; -pub use self::plugin_config_interface::PluginConfigInterface; -pub mod plugin_config_linux; -pub use self::plugin_config_linux::PluginConfigLinux; -pub mod plugin_config_network; -pub use self::plugin_config_network::PluginConfigNetwork; -pub mod plugin_config_rootfs; -pub use self::plugin_config_rootfs::PluginConfigRootfs; -pub mod plugin_config_user; -pub use self::plugin_config_user::PluginConfigUser; -pub mod plugin_device; -pub use self::plugin_device::PluginDevice; -pub mod plugin_env; -pub use self::plugin_env::PluginEnv; -pub mod plugin_interface_type; -pub use self::plugin_interface_type::PluginInterfaceType; -pub mod plugin_mount; -pub use self::plugin_mount::PluginMount; -pub mod plugin_settings; -pub use self::plugin_settings::PluginSettings; -pub mod previous_consent_session; -pub use self::previous_consent_session::PreviousConsentSession; -pub mod reject_request; -pub use self::reject_request::RejectRequest; -pub mod request_was_handled_response; -pub use self::request_was_handled_response::RequestWasHandledResponse; -pub mod trust_jwt_grant_issuer_body; -pub use self::trust_jwt_grant_issuer_body::TrustJwtGrantIssuerBody; -pub mod trusted_json_web_key; -pub use self::trusted_json_web_key::TrustedJsonWebKey; -pub mod trusted_jwt_grant_issuer; -pub use self::trusted_jwt_grant_issuer::TrustedJwtGrantIssuer; -pub mod userinfo_response; -pub use self::userinfo_response::UserinfoResponse; +pub mod o_auth2_client_token_lifespans; +pub use self::o_auth2_client_token_lifespans::OAuth2ClientTokenLifespans; +pub mod o_auth2_consent_request; +pub use self::o_auth2_consent_request::OAuth2ConsentRequest; +pub mod o_auth2_consent_request_open_id_connect_context; +pub use self::o_auth2_consent_request_open_id_connect_context::OAuth2ConsentRequestOpenIdConnectContext; +pub mod o_auth2_consent_session; +pub use self::o_auth2_consent_session::OAuth2ConsentSession; +pub mod o_auth2_consent_session_expires_at; +pub use self::o_auth2_consent_session_expires_at::OAuth2ConsentSessionExpiresAt; +pub mod o_auth2_login_request; +pub use self::o_auth2_login_request::OAuth2LoginRequest; +pub mod o_auth2_logout_request; +pub use self::o_auth2_logout_request::OAuth2LogoutRequest; +pub mod o_auth2_redirect_to; +pub use self::o_auth2_redirect_to::OAuth2RedirectTo; +pub mod o_auth2_token_exchange; +pub use self::o_auth2_token_exchange::OAuth2TokenExchange; +pub mod oidc_configuration; +pub use self::oidc_configuration::OidcConfiguration; +pub mod oidc_user_info; +pub use self::oidc_user_info::OidcUserInfo; +pub mod pagination; +pub use self::pagination::Pagination; +pub mod pagination_headers; +pub use self::pagination_headers::PaginationHeaders; +pub mod reject_o_auth2_request; +pub use self::reject_o_auth2_request::RejectOAuth2Request; +pub mod token_pagination; +pub use self::token_pagination::TokenPagination; +pub mod token_pagination_headers; +pub use self::token_pagination_headers::TokenPaginationHeaders; +pub mod token_pagination_request_parameters; +pub use self::token_pagination_request_parameters::TokenPaginationRequestParameters; +pub mod token_pagination_response_headers; +pub use self::token_pagination_response_headers::TokenPaginationResponseHeaders; +pub mod trust_o_auth2_jwt_grant_issuer; +pub use self::trust_o_auth2_jwt_grant_issuer::TrustOAuth2JwtGrantIssuer; +pub mod trusted_o_auth2_jwt_grant_issuer; +pub use self::trusted_o_auth2_jwt_grant_issuer::TrustedOAuth2JwtGrantIssuer; +pub mod trusted_o_auth2_jwt_grant_json_web_key; +pub use self::trusted_o_auth2_jwt_grant_json_web_key::TrustedOAuth2JwtGrantJsonWebKey; pub mod version; pub use self::version::Version; -pub mod volume; -pub use self::volume::Volume; -pub mod volume_usage_data; -pub use self::volume_usage_data::VolumeUsageData; -pub mod well_known; -pub use self::well_known::WellKnown; diff --git a/clients/hydra/rust/src/models/o_auth2_client.rs b/clients/hydra/rust/src/models/o_auth2_client.rs index 93f32dd5b8e..b08c85988db 100644 --- a/clients/hydra/rust/src/models/o_auth2_client.rs +++ b/clients/hydra/rust/src/models/o_auth2_client.rs @@ -1,13 +1,14 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.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. @@ -17,137 +18,185 @@ pub struct OAuth2Client { pub allowed_cors_origins: Option>, #[serde(rename = "audience", skip_serializing_if = "Option::is_none")] pub audience: Option>, - /// 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. + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "authorization_code_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] + pub authorization_code_grant_access_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "authorization_code_grant_id_token_lifespan", skip_serializing_if = "Option::is_none")] + pub authorization_code_grant_id_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "authorization_code_grant_refresh_token_lifespan", skip_serializing_if = "Option::is_none")] + pub authorization_code_grant_refresh_token_lifespan: Option, + /// 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. #[serde(rename = "backchannel_logout_session_required", skip_serializing_if = "Option::is_none")] pub backchannel_logout_session_required: Option, - /// RP URL that will cause the RP to log itself out when sent a Logout Token by the OP. + /// 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. #[serde(rename = "backchannel_logout_uri", skip_serializing_if = "Option::is_none")] pub backchannel_logout_uri: Option, - /// ID is the id for this client. + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "client_credentials_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] + pub client_credentials_grant_access_token_lifespan: Option, + /// OAuth 2.0 Client ID The ID is autogenerated and immutable. #[serde(rename = "client_id", skip_serializing_if = "Option::is_none")] pub client_id: Option, - /// Name is the human-readable string name of the client to be presented to the end-user during authorization. + /// OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization. #[serde(rename = "client_name", skip_serializing_if = "Option::is_none")] pub client_name: Option, - /// Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. + /// 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. #[serde(rename = "client_secret", skip_serializing_if = "Option::is_none")] pub client_secret: Option, - /// SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0. + /// OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0. #[serde(rename = "client_secret_expires_at", skip_serializing_if = "Option::is_none")] pub client_secret_expires_at: Option, - /// ClientURI is an 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. + /// 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. #[serde(rename = "client_uri", skip_serializing_if = "Option::is_none")] pub client_uri: Option, #[serde(rename = "contacts", skip_serializing_if = "Option::is_none")] pub contacts: Option>, - /// CreatedAt returns the timestamp of the client's creation. + /// OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation. #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, - /// 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. + /// 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. #[serde(rename = "frontchannel_logout_session_required", skip_serializing_if = "Option::is_none")] pub frontchannel_logout_session_required: Option, - /// 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. + /// 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. #[serde(rename = "frontchannel_logout_uri", skip_serializing_if = "Option::is_none")] pub frontchannel_logout_uri: Option, #[serde(rename = "grant_types", skip_serializing_if = "Option::is_none")] pub grant_types: Option>, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "implicit_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] + pub implicit_grant_access_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[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, - /// 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. + /// 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, - /// LogoURI is an URL string that references a logo for the client. + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "jwt_bearer_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] + pub jwt_bearer_grant_access_token_lifespan: Option, + /// 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, - /// Owner is a string identifying the owner of the OAuth 2.0 Client. + /// 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, - /// 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. + /// 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. #[serde(rename = "policy_uri", skip_serializing_if = "Option::is_none")] pub policy_uri: Option, #[serde(rename = "post_logout_redirect_uris", skip_serializing_if = "Option::is_none")] pub post_logout_redirect_uris: Option>, #[serde(rename = "redirect_uris", skip_serializing_if = "Option::is_none")] pub redirect_uris: Option>, - /// RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "refresh_token_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] + pub refresh_token_grant_access_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "refresh_token_grant_id_token_lifespan", skip_serializing_if = "Option::is_none")] + pub refresh_token_grant_id_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "refresh_token_grant_refresh_token_lifespan", skip_serializing_if = "Option::is_none")] + pub refresh_token_grant_refresh_token_lifespan: Option, + /// 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. #[serde(rename = "registration_access_token", skip_serializing_if = "Option::is_none")] pub registration_access_token: Option, - /// RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + /// OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. #[serde(rename = "registration_client_uri", skip_serializing_if = "Option::is_none")] pub registration_client_uri: Option, - /// 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. + /// 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. #[serde(rename = "request_object_signing_alg", skip_serializing_if = "Option::is_none")] pub request_object_signing_alg: Option, #[serde(rename = "request_uris", skip_serializing_if = "Option::is_none")] pub request_uris: Option>, #[serde(rename = "response_types", skip_serializing_if = "Option::is_none")] pub response_types: Option>, - /// 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. #[serde(rename = "scope", skip_serializing_if = "Option::is_none")] pub scope: Option, - /// 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. + /// 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. #[serde(rename = "sector_identifier_uri", skip_serializing_if = "Option::is_none")] pub sector_identifier_uri: Option, - /// SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + /// 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`. #[serde(rename = "subject_type", skip_serializing_if = "Option::is_none")] pub subject_type: Option, - /// Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. + /// OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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. #[serde(rename = "token_endpoint_auth_method", skip_serializing_if = "Option::is_none")] pub token_endpoint_auth_method: Option, - /// Requested Client Authentication signing algorithm for the Token Endpoint. + /// OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint. #[serde(rename = "token_endpoint_auth_signing_alg", skip_serializing_if = "Option::is_none")] pub token_endpoint_auth_signing_alg: Option, - /// TermsOfServiceURI is a URL string that points 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 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. #[serde(rename = "tos_uri", skip_serializing_if = "Option::is_none")] pub tos_uri: Option, - /// UpdatedAt returns the timestamp of the last update. + /// OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")] pub updated_at: Option, - /// 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. + /// 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. #[serde(rename = "userinfo_signed_response_alg", skip_serializing_if = "Option::is_none")] 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 { - allowed_cors_origins: None, - audience: None, - backchannel_logout_session_required: None, - backchannel_logout_uri: 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, - jwks: None, - jwks_uri: None, - logo_uri: None, - metadata: None, - owner: None, - policy_uri: None, - post_logout_redirect_uris: None, - redirect_uris: 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, - 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, + 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, + 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 new file mode 100644 index 00000000000..b3143dcfc77 --- /dev/null +++ b/clients/hydra/rust/src/models/o_auth2_client_token_lifespans.rs @@ -0,0 +1,73 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + +/// OAuth2ClientTokenLifespans : Lifespans of different token types issued for this OAuth 2.0 Client. + + + +#[derive(Clone, 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")] + pub authorization_code_grant_access_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "authorization_code_grant_id_token_lifespan", skip_serializing_if = "Option::is_none")] + pub authorization_code_grant_id_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "authorization_code_grant_refresh_token_lifespan", skip_serializing_if = "Option::is_none")] + pub authorization_code_grant_refresh_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "client_credentials_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] + pub client_credentials_grant_access_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "implicit_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] + pub implicit_grant_access_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "implicit_grant_id_token_lifespan", skip_serializing_if = "Option::is_none")] + pub implicit_grant_id_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "jwt_bearer_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] + pub jwt_bearer_grant_access_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "refresh_token_grant_access_token_lifespan", skip_serializing_if = "Option::is_none")] + pub refresh_token_grant_access_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "refresh_token_grant_id_token_lifespan", skip_serializing_if = "Option::is_none")] + pub refresh_token_grant_id_token_lifespan: Option, + /// Specify a time duration in milliseconds, seconds, minutes, hours. + #[serde(rename = "refresh_token_grant_refresh_token_lifespan", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/consent_request.rs b/clients/hydra/rust/src/models/o_auth2_consent_request.rs similarity index 79% rename from clients/hydra/rust/src/models/consent_request.rs rename to clients/hydra/rust/src/models/o_auth2_consent_request.rs index 497393719c4..17934f5e549 100644 --- a/clients/hydra/rust/src/models/consent_request.rs +++ b/clients/hydra/rust/src/models/o_auth2_consent_request.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -12,7 +12,7 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct ConsentRequest { +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")] pub acr: Option, @@ -32,7 +32,7 @@ pub struct ConsentRequest { #[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,22 +48,23 @@ pub struct ConsentRequest { pub subject: Option, } -impl ConsentRequest { - pub fn new(challenge: String) -> ConsentRequest { - ConsentRequest { - 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, + +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, } } } diff --git a/clients/hydra/rust/src/models/open_id_connect_context.rs b/clients/hydra/rust/src/models/o_auth2_consent_request_open_id_connect_context.rs similarity index 83% rename from clients/hydra/rust/src/models/open_id_connect_context.rs rename to clients/hydra/rust/src/models/o_auth2_consent_request_open_id_connect_context.rs index eeb06ecea3e..d5045fad573 100644 --- a/clients/hydra/rust/src/models/open_id_connect_context.rs +++ b/clients/hydra/rust/src/models/o_auth2_consent_request_open_id_connect_context.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -12,7 +12,7 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenIdConnectContext { +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")] pub acr_values: Option>, @@ -21,7 +21,7 @@ pub struct OpenIdConnectContext { 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, + pub id_token_hint_claims: Option<::std::collections::HashMap>, /// 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,14 +30,20 @@ pub struct OpenIdConnectContext { pub ui_locales: Option>, } -impl OpenIdConnectContext { - pub fn new() -> OpenIdConnectContext { - OpenIdConnectContext { - acr_values: None, - display: None, - id_token_hint_claims: None, - login_hint: None, - ui_locales: None, +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, } } } diff --git a/clients/hydra/rust/src/models/o_auth2_consent_session.rs b/clients/hydra/rust/src/models/o_auth2_consent_session.rs new file mode 100644 index 00000000000..227bcc11696 --- /dev/null +++ b/clients/hydra/rust/src/models/o_auth2_consent_session.rs @@ -0,0 +1,59 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + +/// OAuth2ConsentSession : A completed OAuth 2.0 Consent Session. + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OAuth2ConsentSession { + #[serde(rename = "consent_request", skip_serializing_if = "Option::is_none")] + pub consent_request: Option>, + #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")] + 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")] + pub grant_scope: Option>, + #[serde(rename = "handled_at", skip_serializing_if = "Option::is_none")] + pub handled_at: Option, + /// 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. + #[serde(rename = "remember", skip_serializing_if = "Option::is_none")] + pub remember: Option, + /// 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. + #[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() + } +} + +impl OAuth2ConsentSession { + /// A completed OAuth 2.0 Consent Session. + pub fn new() -> OAuth2ConsentSession { + OAuth2ConsentSession { + consent_request: 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 new file mode 100644 index 00000000000..ee7db9f542a --- /dev/null +++ b/clients/hydra/rust/src/models/o_auth2_consent_session_expires_at.rs @@ -0,0 +1,46 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OAuth2ConsentSessionExpiresAt { + #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")] + pub access_token: Option, + #[serde(rename = "authorize_code", skip_serializing_if = "Option::is_none")] + pub authorize_code: Option, + #[serde(rename = "id_token", skip_serializing_if = "Option::is_none")] + pub id_token: Option, + #[serde(rename = "par_context", skip_serializing_if = "Option::is_none")] + pub par_context: Option, + #[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/login_request.rs b/clients/hydra/rust/src/models/o_auth2_login_request.rs similarity index 79% rename from clients/hydra/rust/src/models/login_request.rs rename to clients/hydra/rust/src/models/o_auth2_login_request.rs index 8747cf35d1d..fb8722aa096 100644 --- a/clients/hydra/rust/src/models/login_request.rs +++ b/clients/hydra/rust/src/models/o_auth2_login_request.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -12,14 +12,14 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct LoginRequest { +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, #[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,18 +38,19 @@ pub struct LoginRequest { pub subject: String, } -impl LoginRequest { - pub fn new(challenge: String, client: crate::models::OAuth2Client, request_url: String, requested_access_token_audience: Vec, requested_scope: Vec, skip: bool, subject: String) -> LoginRequest { - LoginRequest { - challenge, - client: Box::new(client), - oidc_context: None, - request_url, - requested_access_token_audience, - requested_scope, - session_id: None, - skip, - subject, + +impl OAuth2LoginRequest { + pub fn new(challenge: String, client: crate::models::OAuth2Client, request_url: String, requested_access_token_audience: Vec, requested_scope: Vec, skip: bool, subject: String) -> OAuth2LoginRequest { + OAuth2LoginRequest { + challenge, + client: Box::new(client), + oidc_context: None, + request_url, + requested_access_token_audience, + requested_scope, + session_id: None, + skip, + subject, } } } diff --git a/clients/hydra/rust/src/models/logout_request.rs b/clients/hydra/rust/src/models/o_auth2_logout_request.rs similarity index 69% rename from clients/hydra/rust/src/models/logout_request.rs rename to clients/hydra/rust/src/models/o_auth2_logout_request.rs index a41e4660c57..fe9f7711322 100644 --- a/clients/hydra/rust/src/models/logout_request.rs +++ b/clients/hydra/rust/src/models/o_auth2_logout_request.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -12,7 +12,7 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct LogoutRequest { +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, @@ -32,15 +32,21 @@ pub struct LogoutRequest { pub subject: Option, } -impl LogoutRequest { - pub fn new() -> LogoutRequest { - LogoutRequest { - challenge: None, - client: None, - request_url: None, - rp_initiated: None, - sid: None, - subject: None, +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, } } } diff --git a/clients/hydra/rust/src/models/o_auth2_redirect_to.rs b/clients/hydra/rust/src/models/o_auth2_redirect_to.rs new file mode 100644 index 00000000000..532146a62fe --- /dev/null +++ b/clients/hydra/rust/src/models/o_auth2_redirect_to.rs @@ -0,0 +1,32 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + + + +#[derive(Clone, 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/o_auth2_token_exchange.rs b/clients/hydra/rust/src/models/o_auth2_token_exchange.rs new file mode 100644 index 00000000000..c7798b154bf --- /dev/null +++ b/clients/hydra/rust/src/models/o_auth2_token_exchange.rs @@ -0,0 +1,57 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + +/// OAuth2TokenExchange : OAuth2 Token Exchange Result + + + +#[derive(Clone, 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")] + pub access_token: Option, + /// 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. + #[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")] + pub expires_in: Option, + /// To retrieve a refresh token request the id_token scope. + #[serde(rename = "id_token", skip_serializing_if = "Option::is_none")] + pub id_token: Option, + /// The refresh token, which can be used to obtain new access tokens. To retrieve it add the scope \"offline\" to your access token request. + #[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")] + pub refresh_token: Option, + /// The scope of the access token + #[serde(rename = "scope", skip_serializing_if = "Option::is_none")] + pub scope: Option, + /// The type of the token issued + #[serde(rename = "token_type", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/oauth2_token_response.rs b/clients/hydra/rust/src/models/oauth2_token_response.rs deleted file mode 100644 index 41e50e9ebae..00000000000 --- a/clients/hydra/rust/src/models/oauth2_token_response.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// Oauth2TokenResponse : The Access Token Response - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct Oauth2TokenResponse { - #[serde(rename = "access_token", skip_serializing_if = "Option::is_none")] - pub access_token: Option, - #[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")] - pub expires_in: Option, - #[serde(rename = "id_token", skip_serializing_if = "Option::is_none")] - pub id_token: Option, - #[serde(rename = "refresh_token", skip_serializing_if = "Option::is_none")] - pub refresh_token: Option, - #[serde(rename = "scope", skip_serializing_if = "Option::is_none")] - pub scope: Option, - #[serde(rename = "token_type", skip_serializing_if = "Option::is_none")] - pub token_type: Option, -} - -impl Oauth2TokenResponse { - /// The Access Token Response - pub fn new() -> Oauth2TokenResponse { - Oauth2TokenResponse { - 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 new file mode 100644 index 00000000000..4dca89b4985 --- /dev/null +++ b/clients/hydra/rust/src/models/oidc_configuration.rs @@ -0,0 +1,144 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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. + + + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct OidcConfiguration { + /// OAuth 2.0 Authorization Endpoint URL + #[serde(rename = "authorization_endpoint")] + pub 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 + #[serde(rename = "backchannel_logout_session_supported", skip_serializing_if = "Option::is_none")] + pub backchannel_logout_session_supported: Option, + /// OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + #[serde(rename = "backchannel_logout_supported", skip_serializing_if = "Option::is_none")] + pub backchannel_logout_supported: Option, + /// OpenID Connect Claims Parameter Parameter Supported Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. + #[serde(rename = "claims_parameter_supported", skip_serializing_if = "Option::is_none")] + pub claims_parameter_supported: Option, + /// 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. + #[serde(rename = "claims_supported", skip_serializing_if = "Option::is_none")] + pub claims_supported: Option>, + /// 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. + #[serde(rename = "code_challenge_methods_supported", skip_serializing_if = "Option::is_none")] + pub code_challenge_methods_supported: 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, + /// 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. + #[serde(rename = "frontchannel_logout_session_supported", skip_serializing_if = "Option::is_none")] + pub frontchannel_logout_session_supported: Option, + /// OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + #[serde(rename = "frontchannel_logout_supported", skip_serializing_if = "Option::is_none")] + pub frontchannel_logout_supported: Option, + /// OAuth 2.0 Supported Grant Types JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. + #[serde(rename = "grant_types_supported", skip_serializing_if = "Option::is_none")] + pub grant_types_supported: Option>, + /// OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. + #[serde(rename = "id_token_signed_response_alg")] + pub id_token_signed_response_alg: Vec, + /// 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. + #[serde(rename = "id_token_signing_alg_values_supported")] + pub id_token_signing_alg_values_supported: Vec, + /// 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. + #[serde(rename = "issuer")] + pub 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. + #[serde(rename = "jwks_uri")] + pub jwks_uri: String, + /// OpenID Connect Dynamic Client Registration Endpoint URL + #[serde(rename = "registration_endpoint", skip_serializing_if = "Option::is_none")] + pub registration_endpoint: Option, + /// 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). + #[serde(rename = "request_object_signing_alg_values_supported", skip_serializing_if = "Option::is_none")] + pub request_object_signing_alg_values_supported: Option>, + /// OpenID Connect Request Parameter Supported Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. + #[serde(rename = "request_parameter_supported", skip_serializing_if = "Option::is_none")] + pub request_parameter_supported: Option, + /// OpenID Connect Request URI Parameter Supported Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + #[serde(rename = "request_uri_parameter_supported", skip_serializing_if = "Option::is_none")] + pub request_uri_parameter_supported: Option, + /// 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. + #[serde(rename = "require_request_uri_registration", skip_serializing_if = "Option::is_none")] + pub require_request_uri_registration: Option, + /// OAuth 2.0 Supported Response Modes JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. + #[serde(rename = "response_modes_supported", skip_serializing_if = "Option::is_none")] + pub response_modes_supported: Option>, + /// 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. + #[serde(rename = "response_types_supported")] + pub response_types_supported: Vec, + /// OAuth 2.0 Token Revocation URL URL of the authorization server's OAuth 2.0 revocation endpoint. + #[serde(rename = "revocation_endpoint", skip_serializing_if = "Option::is_none")] + pub revocation_endpoint: Option, + /// 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 + #[serde(rename = "scopes_supported", skip_serializing_if = "Option::is_none")] + pub scopes_supported: Option>, + /// 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. + #[serde(rename = "subject_types_supported")] + pub subject_types_supported: Vec, + /// OAuth 2.0 Token Endpoint URL + #[serde(rename = "token_endpoint")] + pub 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 + #[serde(rename = "token_endpoint_auth_methods_supported", skip_serializing_if = "Option::is_none")] + pub token_endpoint_auth_methods_supported: Option>, + /// OpenID Connect Userinfo URL URL of the OP's UserInfo Endpoint. + #[serde(rename = "userinfo_endpoint", skip_serializing_if = "Option::is_none")] + pub userinfo_endpoint: Option, + /// OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. + #[serde(rename = "userinfo_signed_response_alg")] + pub userinfo_signed_response_alg: Vec, + /// 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]. + #[serde(rename = "userinfo_signing_alg_values_supported", skip_serializing_if = "Option::is_none")] + 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, + 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/userinfo_response.rs b/clients/hydra/rust/src/models/oidc_user_info.rs similarity index 87% rename from clients/hydra/rust/src/models/userinfo_response.rs rename to clients/hydra/rust/src/models/oidc_user_info.rs index 31f8ba600fe..2837f2e48b3 100644 --- a/clients/hydra/rust/src/models/userinfo_response.rs +++ b/clients/hydra/rust/src/models/oidc_user_info.rs @@ -1,19 +1,19 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ -/// UserinfoResponse : The userinfo response +/// OidcUserInfo : OpenID Connect Userinfo #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct UserinfoResponse { +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")] pub birthdate: Option, @@ -73,29 +73,35 @@ pub struct UserinfoResponse { pub zoneinfo: Option, } -impl UserinfoResponse { - /// The userinfo response - pub fn new() -> UserinfoResponse { - UserinfoResponse { - 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, +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, } } } diff --git a/clients/hydra/rust/src/models/pagination.rs b/clients/hydra/rust/src/models/pagination.rs new file mode 100644 index 00000000000..08ead838e4a --- /dev/null +++ b/clients/hydra/rust/src/models/pagination.rs @@ -0,0 +1,39 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, 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")] + pub page_size: Option, + /// 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). + #[serde(rename = "page_token", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/pagination_headers.rs b/clients/hydra/rust/src/models/pagination_headers.rs new file mode 100644 index 00000000000..cf02c109d4e --- /dev/null +++ b/clients/hydra/rust/src/models/pagination_headers.rs @@ -0,0 +1,39 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, 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")] + pub link: Option, + /// The total number of clients. in: header + #[serde(rename = "x-total-count", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/patch_document.rs b/clients/hydra/rust/src/models/patch_document.rs deleted file mode 100644 index edb7fd22cdf..00000000000 --- a/clients/hydra/rust/src/models/patch_document.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PatchDocument : A JSONPatch document as defined by RFC 6902 - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PatchDocument { - /// A JSON-pointer - #[serde(rename = "from", skip_serializing_if = "Option::is_none")] - pub from: Option, - /// The operation to be performed - #[serde(rename = "op")] - pub op: String, - /// A JSON-pointer - #[serde(rename = "path")] - pub path: String, - /// The value to be used within the operations - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option, -} - -impl PatchDocument { - /// A JSONPatch document as defined by RFC 6902 - pub fn new(op: String, path: String) -> PatchDocument { - PatchDocument { - from: None, - op, - path, - value: None, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_config.rs b/clients/hydra/rust/src/models/plugin_config.rs deleted file mode 100644 index 23b4442b013..00000000000 --- a/clients/hydra/rust/src/models/plugin_config.rs +++ /dev/null @@ -1,83 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginConfig { - #[serde(rename = "Args")] - pub args: Box, - /// description - #[serde(rename = "Description")] - pub description: String, - /// Docker Version used to create the plugin - #[serde(rename = "DockerVersion", skip_serializing_if = "Option::is_none")] - pub docker_version: Option, - /// documentation - #[serde(rename = "Documentation")] - pub documentation: String, - /// entrypoint - #[serde(rename = "Entrypoint")] - pub entrypoint: Vec, - /// env - #[serde(rename = "Env")] - pub env: Vec, - #[serde(rename = "Interface")] - pub interface: Box, - /// ipc host - #[serde(rename = "IpcHost")] - pub ipc_host: bool, - #[serde(rename = "Linux")] - pub linux: Box, - /// mounts - #[serde(rename = "Mounts")] - pub mounts: Vec, - #[serde(rename = "Network")] - pub network: Box, - /// pid host - #[serde(rename = "PidHost")] - pub pid_host: bool, - /// propagated mount - #[serde(rename = "PropagatedMount")] - pub propagated_mount: String, - #[serde(rename = "User", skip_serializing_if = "Option::is_none")] - pub user: Option>, - /// work dir - #[serde(rename = "WorkDir")] - pub work_dir: String, - #[serde(rename = "rootfs", skip_serializing_if = "Option::is_none")] - pub rootfs: Option>, -} - -impl PluginConfig { - pub fn new(args: crate::models::PluginConfigArgs, description: String, documentation: String, entrypoint: Vec, env: Vec, interface: crate::models::PluginConfigInterface, ipc_host: bool, linux: crate::models::PluginConfigLinux, mounts: Vec, network: crate::models::PluginConfigNetwork, pid_host: bool, propagated_mount: String, work_dir: String) -> PluginConfig { - PluginConfig { - args: Box::new(args), - description, - docker_version: None, - documentation, - entrypoint, - env, - interface: Box::new(interface), - ipc_host, - linux: Box::new(linux), - mounts, - network: Box::new(network), - pid_host, - propagated_mount, - user: None, - work_dir, - rootfs: None, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_config_args.rs b/clients/hydra/rust/src/models/plugin_config_args.rs deleted file mode 100644 index ceef8af2fbc..00000000000 --- a/clients/hydra/rust/src/models/plugin_config_args.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginConfigArgs : PluginConfigArgs plugin config args - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginConfigArgs { - /// description - #[serde(rename = "Description")] - pub description: String, - /// name - #[serde(rename = "Name")] - pub name: String, - /// settable - #[serde(rename = "Settable")] - pub settable: Vec, - /// value - #[serde(rename = "Value")] - pub value: Vec, -} - -impl PluginConfigArgs { - /// PluginConfigArgs plugin config args - pub fn new(description: String, name: String, settable: Vec, value: Vec) -> PluginConfigArgs { - PluginConfigArgs { - description, - name, - settable, - value, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_config_interface.rs b/clients/hydra/rust/src/models/plugin_config_interface.rs deleted file mode 100644 index 9d295b8771b..00000000000 --- a/clients/hydra/rust/src/models/plugin_config_interface.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginConfigInterface : PluginConfigInterface The interface between Docker and the plugin - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginConfigInterface { - /// Protocol to use for clients connecting to the plugin. - #[serde(rename = "ProtocolScheme", skip_serializing_if = "Option::is_none")] - pub protocol_scheme: Option, - /// socket - #[serde(rename = "Socket")] - pub socket: String, - /// types - #[serde(rename = "Types")] - pub types: Vec, -} - -impl PluginConfigInterface { - /// PluginConfigInterface The interface between Docker and the plugin - pub fn new(socket: String, types: Vec) -> PluginConfigInterface { - PluginConfigInterface { - protocol_scheme: None, - socket, - types, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_config_linux.rs b/clients/hydra/rust/src/models/plugin_config_linux.rs deleted file mode 100644 index e440539a06f..00000000000 --- a/clients/hydra/rust/src/models/plugin_config_linux.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginConfigLinux : PluginConfigLinux plugin config linux - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginConfigLinux { - /// allow all devices - #[serde(rename = "AllowAllDevices")] - pub allow_all_devices: bool, - /// capabilities - #[serde(rename = "Capabilities")] - pub capabilities: Vec, - /// devices - #[serde(rename = "Devices")] - pub devices: Vec, -} - -impl PluginConfigLinux { - /// PluginConfigLinux plugin config linux - pub fn new(allow_all_devices: bool, capabilities: Vec, devices: Vec) -> PluginConfigLinux { - PluginConfigLinux { - allow_all_devices, - capabilities, - devices, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_config_network.rs b/clients/hydra/rust/src/models/plugin_config_network.rs deleted file mode 100644 index d2ddcfb7452..00000000000 --- a/clients/hydra/rust/src/models/plugin_config_network.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginConfigNetwork : PluginConfigNetwork plugin config network - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginConfigNetwork { - /// type - #[serde(rename = "Type")] - pub _type: String, -} - -impl PluginConfigNetwork { - /// PluginConfigNetwork plugin config network - pub fn new(_type: String) -> PluginConfigNetwork { - PluginConfigNetwork { - _type, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_config_rootfs.rs b/clients/hydra/rust/src/models/plugin_config_rootfs.rs deleted file mode 100644 index 3eee987ffe8..00000000000 --- a/clients/hydra/rust/src/models/plugin_config_rootfs.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginConfigRootfs : PluginConfigRootfs plugin config rootfs - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginConfigRootfs { - /// diff ids - #[serde(rename = "diff_ids", skip_serializing_if = "Option::is_none")] - pub diff_ids: Option>, - /// type - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub _type: Option, -} - -impl PluginConfigRootfs { - /// PluginConfigRootfs plugin config rootfs - pub fn new() -> PluginConfigRootfs { - PluginConfigRootfs { - diff_ids: None, - _type: None, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_config_user.rs b/clients/hydra/rust/src/models/plugin_config_user.rs deleted file mode 100644 index bf9ef415c34..00000000000 --- a/clients/hydra/rust/src/models/plugin_config_user.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginConfigUser : PluginConfigUser plugin config user - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginConfigUser { - /// g ID - #[serde(rename = "GID", skip_serializing_if = "Option::is_none")] - pub GID: Option, - /// UID - #[serde(rename = "UID", skip_serializing_if = "Option::is_none")] - pub UID: Option, -} - -impl PluginConfigUser { - /// PluginConfigUser plugin config user - pub fn new() -> PluginConfigUser { - PluginConfigUser { - GID: None, - UID: None, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_device.rs b/clients/hydra/rust/src/models/plugin_device.rs deleted file mode 100644 index cb3f7a4ef24..00000000000 --- a/clients/hydra/rust/src/models/plugin_device.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginDevice : PluginDevice plugin device - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginDevice { - /// description - #[serde(rename = "Description")] - pub description: String, - /// name - #[serde(rename = "Name")] - pub name: String, - /// path - #[serde(rename = "Path")] - pub path: String, - /// settable - #[serde(rename = "Settable")] - pub settable: Vec, -} - -impl PluginDevice { - /// PluginDevice plugin device - pub fn new(description: String, name: String, path: String, settable: Vec) -> PluginDevice { - PluginDevice { - description, - name, - path, - settable, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_env.rs b/clients/hydra/rust/src/models/plugin_env.rs deleted file mode 100644 index 534c21cde16..00000000000 --- a/clients/hydra/rust/src/models/plugin_env.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginEnv : PluginEnv plugin env - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginEnv { - /// description - #[serde(rename = "Description")] - pub description: String, - /// name - #[serde(rename = "Name")] - pub name: String, - /// settable - #[serde(rename = "Settable")] - pub settable: Vec, - /// value - #[serde(rename = "Value")] - pub value: String, -} - -impl PluginEnv { - /// PluginEnv plugin env - pub fn new(description: String, name: String, settable: Vec, value: String) -> PluginEnv { - PluginEnv { - description, - name, - settable, - value, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_interface_type.rs b/clients/hydra/rust/src/models/plugin_interface_type.rs deleted file mode 100644 index 585f9ca90bb..00000000000 --- a/clients/hydra/rust/src/models/plugin_interface_type.rs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginInterfaceType : PluginInterfaceType plugin interface type - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginInterfaceType { - /// capability - #[serde(rename = "Capability")] - pub capability: String, - /// prefix - #[serde(rename = "Prefix")] - pub prefix: String, - /// version - #[serde(rename = "Version")] - pub version: String, -} - -impl PluginInterfaceType { - /// PluginInterfaceType plugin interface type - pub fn new(capability: String, prefix: String, version: String) -> PluginInterfaceType { - PluginInterfaceType { - capability, - prefix, - version, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_mount.rs b/clients/hydra/rust/src/models/plugin_mount.rs deleted file mode 100644 index 49bd2243967..00000000000 --- a/clients/hydra/rust/src/models/plugin_mount.rs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PluginMount : PluginMount plugin mount - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginMount { - /// description - #[serde(rename = "Description")] - pub description: String, - /// destination - #[serde(rename = "Destination")] - pub destination: String, - /// name - #[serde(rename = "Name")] - pub name: String, - /// options - #[serde(rename = "Options")] - pub options: Vec, - /// settable - #[serde(rename = "Settable")] - pub settable: Vec, - /// source - #[serde(rename = "Source")] - pub source: String, - /// type - #[serde(rename = "Type")] - pub _type: String, -} - -impl PluginMount { - /// PluginMount plugin mount - pub fn new(description: String, destination: String, name: String, options: Vec, settable: Vec, source: String, _type: String) -> PluginMount { - PluginMount { - description, - destination, - name, - options, - settable, - source, - _type, - } - } -} - - diff --git a/clients/hydra/rust/src/models/plugin_settings.rs b/clients/hydra/rust/src/models/plugin_settings.rs deleted file mode 100644 index 79ceac36d77..00000000000 --- a/clients/hydra/rust/src/models/plugin_settings.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PluginSettings { - /// args - #[serde(rename = "Args")] - pub args: Vec, - /// devices - #[serde(rename = "Devices")] - pub devices: Vec, - /// env - #[serde(rename = "Env")] - pub env: Vec, - /// mounts - #[serde(rename = "Mounts")] - pub mounts: Vec, -} - -impl PluginSettings { - pub fn new(args: Vec, devices: Vec, env: Vec, mounts: Vec) -> PluginSettings { - PluginSettings { - args, - devices, - env, - mounts, - } - } -} - - diff --git a/clients/hydra/rust/src/models/previous_consent_session.rs b/clients/hydra/rust/src/models/previous_consent_session.rs deleted file mode 100644 index 3156886434e..00000000000 --- a/clients/hydra/rust/src/models/previous_consent_session.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// PreviousConsentSession : The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct PreviousConsentSession { - #[serde(rename = "consent_request", skip_serializing_if = "Option::is_none")] - pub consent_request: 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")] - pub grant_scope: Option>, - #[serde(rename = "handled_at", skip_serializing_if = "Option::is_none")] - pub handled_at: Option, - /// 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. - #[serde(rename = "remember", skip_serializing_if = "Option::is_none")] - pub remember: Option, - /// RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely. - #[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 PreviousConsentSession { - /// The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - pub fn new() -> PreviousConsentSession { - PreviousConsentSession { - consent_request: 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/reject_request.rs b/clients/hydra/rust/src/models/reject_o_auth2_request.rs similarity index 68% rename from clients/hydra/rust/src/models/reject_request.rs rename to clients/hydra/rust/src/models/reject_o_auth2_request.rs index 77f3188c139..888220bc844 100644 --- a/clients/hydra/rust/src/models/reject_request.rs +++ b/clients/hydra/rust/src/models/reject_o_auth2_request.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -12,7 +12,7 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct RejectRequest { +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")] pub error: Option, @@ -30,14 +30,20 @@ pub struct RejectRequest { pub status_code: Option, } -impl RejectRequest { - pub fn new() -> RejectRequest { - RejectRequest { - error: None, - error_debug: None, - error_description: None, - error_hint: None, - status_code: None, +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, } } } diff --git a/clients/hydra/rust/src/models/request_was_handled_response.rs b/clients/hydra/rust/src/models/request_was_handled_response.rs deleted file mode 100644 index ce009b7c4ab..00000000000 --- a/clients/hydra/rust/src/models/request_was_handled_response.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct RequestWasHandledResponse { - /// Original request URL to which you should redirect the user if request was already handled. - #[serde(rename = "redirect_to")] - pub redirect_to: String, -} - -impl RequestWasHandledResponse { - pub fn new(redirect_to: String) -> RequestWasHandledResponse { - RequestWasHandledResponse { - redirect_to, - } - } -} - - diff --git a/clients/hydra/rust/src/models/token_pagination.rs b/clients/hydra/rust/src/models/token_pagination.rs new file mode 100644 index 00000000000..699bcb84a04 --- /dev/null +++ b/clients/hydra/rust/src/models/token_pagination.rs @@ -0,0 +1,39 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, 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")] + pub page_size: Option, + /// 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). + #[serde(rename = "page_token", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/token_pagination_headers.rs b/clients/hydra/rust/src/models/token_pagination_headers.rs new file mode 100644 index 00000000000..1523e718cda --- /dev/null +++ b/clients/hydra/rust/src/models/token_pagination_headers.rs @@ -0,0 +1,39 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, 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")] + pub link: Option, + /// The total number of clients. in: header + #[serde(rename = "x-total-count", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/token_pagination_request_parameters.rs b/clients/hydra/rust/src/models/token_pagination_request_parameters.rs new file mode 100644 index 00000000000..bc0aac1a594 --- /dev/null +++ b/clients/hydra/rust/src/models/token_pagination_request_parameters.rs @@ -0,0 +1,41 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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). + + + +#[derive(Clone, 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")] + pub page_size: Option, + /// 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). + #[serde(rename = "page_token", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/token_pagination_response_headers.rs b/clients/hydra/rust/src/models/token_pagination_response_headers.rs new file mode 100644 index 00000000000..d68595f5641 --- /dev/null +++ b/clients/hydra/rust/src/models/token_pagination_response_headers.rs @@ -0,0 +1,41 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.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). + + + +#[derive(Clone, 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")] + pub link: Option, + /// The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + #[serde(rename = "x-total-count", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/trust_jwt_grant_issuer_body.rs b/clients/hydra/rust/src/models/trust_jwt_grant_issuer_body.rs deleted file mode 100644 index d492da929c0..00000000000 --- a/clients/hydra/rust/src/models/trust_jwt_grant_issuer_body.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct TrustJwtGrantIssuerBody { - /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". - #[serde(rename = "expires_at")] - pub expires_at: String, - /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). - #[serde(rename = "issuer")] - pub issuer: String, - #[serde(rename = "jwk")] - 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, - /// The \"subject\" identifies the principal that is the subject of the JWT. - #[serde(rename = "subject")] - pub subject: String, -} - -impl TrustJwtGrantIssuerBody { - pub fn new(expires_at: String, issuer: String, jwk: crate::models::JsonWebKey, scope: Vec, subject: String) -> TrustJwtGrantIssuerBody { - TrustJwtGrantIssuerBody { - expires_at, - issuer, - jwk: Box::new(jwk), - scope, - subject, - } - } -} - - 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 new file mode 100644 index 00000000000..e3d66508a9e --- /dev/null +++ b/clients/hydra/rust/src/models/trust_o_auth2_jwt_grant_issuer.rs @@ -0,0 +1,51 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + +/// TrustOAuth2JwtGrantIssuer : Trust OAuth2 JWT Bearer Grant Type Issuer Request Body + + + +#[derive(Clone, 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")] + pub allow_any_subject: Option, + /// The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + #[serde(rename = "expires_at")] + pub expires_at: String, + /// The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + #[serde(rename = "issuer")] + pub issuer: String, + #[serde(rename = "jwk")] + 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, + /// The \"subject\" identifies the principal that is the subject of the JWT. + #[serde(rename = "subject", skip_serializing_if = "Option::is_none")] + 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 { + TrustOAuth2JwtGrantIssuer { + allow_any_subject: None, + expires_at, + issuer, + jwk: Box::new(jwk), + scope, + subject: None, + } + } +} + + diff --git a/clients/hydra/rust/src/models/trusted_json_web_key.rs b/clients/hydra/rust/src/models/trusted_json_web_key.rs deleted file mode 100644 index 846027a7311..00000000000 --- a/clients/hydra/rust/src/models/trusted_json_web_key.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct TrustedJsonWebKey { - /// The \"key_id\" is key unique identifier (same as kid header in jws/jwt). - #[serde(rename = "kid", skip_serializing_if = "Option::is_none")] - pub kid: Option, - /// The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. - #[serde(rename = "set", skip_serializing_if = "Option::is_none")] - pub set: Option, -} - -impl TrustedJsonWebKey { - pub fn new() -> TrustedJsonWebKey { - TrustedJsonWebKey { - kid: None, - set: None, - } - } -} - - diff --git a/clients/hydra/rust/src/models/trusted_jwt_grant_issuer.rs b/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_issuer.rs similarity index 54% rename from clients/hydra/rust/src/models/trusted_jwt_grant_issuer.rs rename to clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_issuer.rs index ea1b6aedcc6..4dce677d33e 100644 --- a/clients/hydra/rust/src/models/trusted_jwt_grant_issuer.rs +++ b/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_issuer.rs @@ -1,18 +1,22 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ +/// TrustedOAuth2JwtGrantIssuer : OAuth2 JWT Bearer Grant Type Issuer Trust Relationship #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct TrustedJwtGrantIssuer { +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")] + pub allow_any_subject: Option, /// The \"created_at\" indicates, when grant was created. #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] pub created_at: Option, @@ -25,7 +29,7 @@ pub struct TrustedJwtGrantIssuer { #[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>, @@ -34,16 +38,24 @@ pub struct TrustedJwtGrantIssuer { pub subject: Option, } -impl TrustedJwtGrantIssuer { - pub fn new() -> TrustedJwtGrantIssuer { - TrustedJwtGrantIssuer { - created_at: None, - expires_at: None, - id: None, - issuer: None, - public_key: None, - scope: None, - subject: None, +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, } } } 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 new file mode 100644 index 00000000000..5928f04913e --- /dev/null +++ b/clients/hydra/rust/src/models/trusted_o_auth2_jwt_grant_json_web_key.rs @@ -0,0 +1,41 @@ +/* + * Ory Hydra API + * + * Documentation for all of Ory Hydra's APIs. + * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh + * Generated by: https://openapi-generator.tech + */ + +/// TrustedOAuth2JwtGrantJsonWebKey : OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key + + + +#[derive(Clone, 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")] + pub kid: Option, + /// The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. + #[serde(rename = "set", skip_serializing_if = "Option::is_none")] + 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, + } + } +} + + diff --git a/clients/hydra/rust/src/models/version.rs b/clients/hydra/rust/src/models/version.rs index d9085c17a10..099e2768838 100644 --- a/clients/hydra/rust/src/models/version.rs +++ b/clients/hydra/rust/src/models/version.rs @@ -1,10 +1,10 @@ /* - * ORY Hydra + * Ory Hydra API * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Documentation for all of Ory Hydra's APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * Generated by: https://openapi-generator.tech */ @@ -18,10 +18,16 @@ pub struct Version { 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/rust/src/models/volume.rs b/clients/hydra/rust/src/models/volume.rs deleted file mode 100644 index 242e555ca62..00000000000 --- a/clients/hydra/rust/src/models/volume.rs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// Volume : Volume volume - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct Volume { - /// Date/Time the volume was created. - #[serde(rename = "CreatedAt", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - /// Name of the volume driver used by the volume. - #[serde(rename = "Driver")] - pub driver: String, - /// User-defined key/value metadata. - #[serde(rename = "Labels")] - pub labels: ::std::collections::HashMap, - /// Mount path of the volume on the host. - #[serde(rename = "Mountpoint")] - pub mountpoint: String, - /// Name of the volume. - #[serde(rename = "Name")] - pub name: String, - /// The driver specific options used when creating the volume. - #[serde(rename = "Options")] - pub options: ::std::collections::HashMap, - /// The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. - #[serde(rename = "Scope")] - pub scope: String, - /// Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - #[serde(rename = "Status", skip_serializing_if = "Option::is_none")] - pub status: Option, - #[serde(rename = "UsageData", skip_serializing_if = "Option::is_none")] - pub usage_data: Option>, -} - -impl Volume { - /// Volume volume - pub fn new(driver: String, labels: ::std::collections::HashMap, mountpoint: String, name: String, options: ::std::collections::HashMap, scope: String) -> Volume { - Volume { - created_at: None, - driver, - labels, - mountpoint, - name, - options, - scope, - status: None, - usage_data: None, - } - } -} - - diff --git a/clients/hydra/rust/src/models/volume_usage_data.rs b/clients/hydra/rust/src/models/volume_usage_data.rs deleted file mode 100644 index 3055689f443..00000000000 --- a/clients/hydra/rust/src/models/volume_usage_data.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// VolumeUsageData : VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct VolumeUsageData { - /// The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. - #[serde(rename = "RefCount")] - pub ref_count: i64, - /// Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - #[serde(rename = "Size")] - pub size: i64, -} - -impl VolumeUsageData { - /// VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. - pub fn new(ref_count: i64, size: i64) -> VolumeUsageData { - VolumeUsageData { - ref_count, - size, - } - } -} - - diff --git a/clients/hydra/rust/src/models/well_known.rs b/clients/hydra/rust/src/models/well_known.rs deleted file mode 100644 index ad59c3f8b80..00000000000 --- a/clients/hydra/rust/src/models/well_known.rs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * ORY Hydra - * - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. - * - * The version of the OpenAPI document: v1.11.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// WellKnown : It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. - - - -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] -pub struct WellKnown { - /// URL of the OP's OAuth 2.0 Authorization Endpoint. - #[serde(rename = "authorization_endpoint")] - pub authorization_endpoint: String, - /// 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 - #[serde(rename = "backchannel_logout_session_supported", skip_serializing_if = "Option::is_none")] - pub backchannel_logout_session_supported: Option, - /// Boolean value specifying whether the OP supports back-channel logout, with true indicating support. - #[serde(rename = "backchannel_logout_supported", skip_serializing_if = "Option::is_none")] - pub backchannel_logout_supported: Option, - /// Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. - #[serde(rename = "claims_parameter_supported", skip_serializing_if = "Option::is_none")] - pub claims_parameter_supported: Option, - /// 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. - #[serde(rename = "claims_supported", skip_serializing_if = "Option::is_none")] - pub claims_supported: Option>, - /// JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. - #[serde(rename = "code_challenge_methods_supported", skip_serializing_if = "Option::is_none")] - pub code_challenge_methods_supported: Option>, - /// 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, - /// 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. - #[serde(rename = "frontchannel_logout_session_supported", skip_serializing_if = "Option::is_none")] - pub frontchannel_logout_session_supported: Option, - /// Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. - #[serde(rename = "frontchannel_logout_supported", skip_serializing_if = "Option::is_none")] - pub frontchannel_logout_supported: Option, - /// JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. - #[serde(rename = "grant_types_supported", skip_serializing_if = "Option::is_none")] - pub grant_types_supported: Option>, - /// 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. - #[serde(rename = "id_token_signing_alg_values_supported")] - pub id_token_signing_alg_values_supported: Vec, - /// 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. - #[serde(rename = "issuer")] - pub issuer: String, - /// 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. - #[serde(rename = "jwks_uri")] - pub jwks_uri: String, - /// URL of the OP's Dynamic Client Registration Endpoint. - #[serde(rename = "registration_endpoint", skip_serializing_if = "Option::is_none")] - pub registration_endpoint: Option, - /// 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). - #[serde(rename = "request_object_signing_alg_values_supported", skip_serializing_if = "Option::is_none")] - pub request_object_signing_alg_values_supported: Option>, - /// Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. - #[serde(rename = "request_parameter_supported", skip_serializing_if = "Option::is_none")] - pub request_parameter_supported: Option, - /// Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. - #[serde(rename = "request_uri_parameter_supported", skip_serializing_if = "Option::is_none")] - pub request_uri_parameter_supported: Option, - /// Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter. - #[serde(rename = "require_request_uri_registration", skip_serializing_if = "Option::is_none")] - pub require_request_uri_registration: Option, - /// JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. - #[serde(rename = "response_modes_supported", skip_serializing_if = "Option::is_none")] - pub response_modes_supported: Option>, - /// 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. - #[serde(rename = "response_types_supported")] - pub response_types_supported: Vec, - /// URL of the authorization server's OAuth 2.0 revocation endpoint. - #[serde(rename = "revocation_endpoint", skip_serializing_if = "Option::is_none")] - pub revocation_endpoint: Option, - /// SON 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 - #[serde(rename = "scopes_supported", skip_serializing_if = "Option::is_none")] - pub scopes_supported: Option>, - /// JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. - #[serde(rename = "subject_types_supported")] - pub subject_types_supported: Vec, - /// URL of the OP's OAuth 2.0 Token Endpoint - #[serde(rename = "token_endpoint")] - pub token_endpoint: String, - /// 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 - #[serde(rename = "token_endpoint_auth_methods_supported", skip_serializing_if = "Option::is_none")] - pub token_endpoint_auth_methods_supported: Option>, - /// URL of the OP's UserInfo Endpoint. - #[serde(rename = "userinfo_endpoint", skip_serializing_if = "Option::is_none")] - pub userinfo_endpoint: Option, - /// 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]. - #[serde(rename = "userinfo_signing_alg_values_supported", skip_serializing_if = "Option::is_none")] - pub userinfo_signing_alg_values_supported: Option>, -} - -impl WellKnown { - /// It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. - pub fn new(authorization_endpoint: String, id_token_signing_alg_values_supported: Vec, issuer: String, jwks_uri: String, response_types_supported: Vec, subject_types_supported: Vec, token_endpoint: String) -> WellKnown { - WellKnown { - authorization_endpoint, - backchannel_logout_session_supported: None, - backchannel_logout_supported: None, - claims_parameter_supported: None, - claims_supported: None, - code_challenge_methods_supported: None, - end_session_endpoint: None, - frontchannel_logout_session_supported: None, - frontchannel_logout_supported: None, - grant_types_supported: None, - 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_signing_alg_values_supported: None, - } - } -} - - diff --git a/clients/hydra/typescript/README.md b/clients/hydra/typescript/README.md index 2d863da8320..a84b5d97bd2 100644 --- a/clients/hydra/typescript/README.md +++ b/clients/hydra/typescript/README.md @@ -1,4 +1,4 @@ -## @ory/hydra-client@v1.11.0 +## @ory/hydra-client@v2.0.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: @@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co _published:_ ``` -npm install @ory/hydra-client@v1.11.0 --save +npm install @ory/hydra-client@v2.0.1 --save ``` _unPublished (not recommended):_ diff --git a/clients/hydra/typescript/api.ts b/clients/hydra/typescript/api.ts index 561ba2a6ddf..0e558c88c19 100644 --- a/clients/hydra/typescript/api.ts +++ b/clients/hydra/typescript/api.ts @@ -1,11 +1,11 @@ /* tslint:disable */ /* eslint-disable */ /** - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,237 +24,175 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr /** * * @export - * @interface AcceptConsentRequest + * @interface AcceptOAuth2ConsentRequest */ -export interface AcceptConsentRequest { +export interface AcceptOAuth2ConsentRequest { /** * * @type {Array} - * @memberof AcceptConsentRequest + * @memberof AcceptOAuth2ConsentRequest */ 'grant_access_token_audience'?: Array; /** * * @type {Array} - * @memberof AcceptConsentRequest + * @memberof AcceptOAuth2ConsentRequest */ 'grant_scope'?: Array; /** * * @type {string} - * @memberof AcceptConsentRequest + * @memberof AcceptOAuth2ConsentRequest */ 'handled_at'?: string; /** * 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 AcceptConsentRequest + * @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 AcceptConsentRequest + * @memberof AcceptOAuth2ConsentRequest */ 'remember_for'?: number; /** * - * @type {ConsentRequestSession} - * @memberof AcceptConsentRequest + * @type {AcceptOAuth2ConsentRequestSession} + * @memberof AcceptOAuth2ConsentRequest + */ + 'session'?: AcceptOAuth2ConsentRequestSession; +} +/** + * + * @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; + /** + * 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 */ - 'session'?: ConsentRequestSession; + 'id_token'?: any; } /** * * @export - * @interface AcceptLoginRequest + * @interface AcceptOAuth2LoginRequest */ -export interface AcceptLoginRequest { +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 AcceptLoginRequest + * @memberof AcceptOAuth2LoginRequest */ 'acr'?: string; /** * * @type {Array} - * @memberof AcceptLoginRequest + * @memberof AcceptOAuth2LoginRequest */ 'amr'?: Array; /** * - * @type {object} - * @memberof AcceptLoginRequest + * @type {any} + * @memberof AcceptOAuth2LoginRequest */ - 'context'?: object; + 'context'?: any; /** * 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 AcceptLoginRequest + * @memberof AcceptOAuth2LoginRequest */ 'force_subject_identifier'?: 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 AcceptLoginRequest + * @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 AcceptLoginRequest + * @memberof AcceptOAuth2LoginRequest */ 'remember_for'?: number; /** * Subject is the user ID of the end-user that authenticated. * @type {string} - * @memberof AcceptLoginRequest + * @memberof AcceptOAuth2LoginRequest */ 'subject': string; } /** - * - * @export - * @interface CompletedRequest - */ -export interface CompletedRequest { - /** - * RedirectURL is the URL which you should redirect the user to once the authentication process is completed. - * @type {string} - * @memberof CompletedRequest - */ - 'redirect_to': string; -} -/** - * + * Create JSON Web Key Set Request Body * @export - * @interface ConsentRequest + * @interface CreateJsonWebKeySet */ -export interface ConsentRequest { - /** - * 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 ConsentRequest - */ - 'acr'?: string; - /** - * - * @type {Array} - * @memberof ConsentRequest - */ - 'amr'?: Array; +export interface CreateJsonWebKeySet { /** - * ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session. - * @type {string} - * @memberof ConsentRequest - */ - 'challenge': string; - /** - * - * @type {OAuth2Client} - * @memberof ConsentRequest - */ - 'client'?: OAuth2Client; - /** - * - * @type {object} - * @memberof ConsentRequest - */ - 'context'?: object; - /** - * 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 ConsentRequest - */ - '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. + * JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`. * @type {string} - * @memberof ConsentRequest - */ - 'login_session_id'?: string; - /** - * - * @type {OpenIDConnectContext} - * @memberof ConsentRequest + * @memberof CreateJsonWebKeySet */ - 'oidc_context'?: OpenIDConnectContext; + 'alg': 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. + * JSON Web Key ID The Key ID of the key to be created. * @type {string} - * @memberof ConsentRequest - */ - 'request_url'?: string; - /** - * - * @type {Array} - * @memberof ConsentRequest - */ - 'requested_access_token_audience'?: Array; - /** - * - * @type {Array} - * @memberof ConsentRequest - */ - '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 ConsentRequest + * @memberof CreateJsonWebKeySet */ - 'skip'?: boolean; + 'kid': string; /** - * 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. + * 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 ConsentRequest + * @memberof CreateJsonWebKeySet */ - 'subject'?: string; + 'use': string; } /** - * + * Error * @export - * @interface ConsentRequestSession + * @interface ErrorOAuth2 */ -export interface ConsentRequestSession { +export interface ErrorOAuth2 { /** - * 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 {object} - * @memberof ConsentRequestSession + * Error + * @type {string} + * @memberof ErrorOAuth2 */ - 'access_token'?: object; + 'error'?: string; /** - * 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 {object} - * @memberof ConsentRequestSession + * Error Debug Information Only available in dev mode. + * @type {string} + * @memberof ErrorOAuth2 */ - 'id_token'?: object; -} -/** - * ContainerWaitOKBodyError container waiting error, if any - * @export - * @interface ContainerWaitOKBodyError - */ -export interface ContainerWaitOKBodyError { + 'error_debug'?: string; /** - * Details of an error + * Error Description * @type {string} - * @memberof ContainerWaitOKBodyError + * @memberof ErrorOAuth2 */ - 'Message'?: string; -} -/** - * - * @export - * @interface FlushInactiveOAuth2TokensRequest - */ -export interface FlushInactiveOAuth2TokensRequest { + 'error_description'?: string; /** - * NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history of recently issued tokens for auditing. + * Error Hint Helps the user identify the error cause. * @type {string} - * @memberof FlushInactiveOAuth2TokensRequest + * @memberof ErrorOAuth2 + */ + 'error_hint'?: string; + /** + * HTTP Status Code + * @type {number} + * @memberof ErrorOAuth2 */ - 'notAfter'?: string; + 'status_code'?: number; } /** * @@ -276,10 +214,10 @@ export interface GenericError { 'debug'?: string; /** * Further error details - * @type {object} + * @type {any} * @memberof GenericError */ - 'details'?: object; + 'details'?: any; /** * The error ID Useful when trying to identify various errors in application logic. * @type {string} @@ -338,343 +276,368 @@ export interface HealthStatus { 'status'?: string; } /** - * It is important that this model object is named JSONWebKey for \"swagger generate spec\" to generate only on definition of a JSONWebKey. + * + * @export + * @interface InlineResponse200 + */ +export interface InlineResponse200 { + /** + * Always \"ok\". + * @type {string} + * @memberof InlineResponse200 + */ + 'status'?: string; +} +/** + * + * @export + * @interface InlineResponse2001 + */ +export interface InlineResponse2001 { + /** + * The version of Ory Hydra. + * @type {string} + * @memberof InlineResponse2001 + */ + 'version'?: string; +} +/** + * + * @export + * @interface InlineResponse503 + */ +export interface InlineResponse503 { + /** + * Errors contains a list of errors that caused the not ready status. + * @type {{ [key: string]: string; }} + * @memberof InlineResponse503 + */ + 'errors'?: { [key: string]: string; }; +} +/** + * 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; +} +/** + * 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; +} +/** + * * @export - * @interface JSONWebKey + * @interface JsonWebKey */ -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 + * @memberof JsonWebKey */ 'alg': string; /** * * @type {string} - * @memberof JSONWebKey + * @memberof JsonWebKey */ 'crv'?: string; /** * * @type {string} - * @memberof JSONWebKey + * @memberof JsonWebKey */ 'd'?: string; /** * * @type {string} - * @memberof JSONWebKey + * @memberof JsonWebKey */ 'dp'?: string; /** * * @type {string} - * @memberof JSONWebKey + * @memberof JsonWebKey */ 'dq'?: string; /** * * @type {string} - * @memberof JSONWebKey + * @memberof JsonWebKey */ 'e'?: string; /** * * @type {string} - * @memberof JSONWebKey + * @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 + * @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 + * @memberof JsonWebKey */ 'kty': string; /** * * @type {string} - * @memberof JSONWebKey + * @memberof JsonWebKey */ 'n'?: string; /** * * @type {string} - * @memberof JSONWebKey + * @memberof JsonWebKey */ 'p'?: string; /** * * @type {string} - * @memberof JSONWebKey + * @memberof JsonWebKey */ 'q'?: string; /** * * @type {string} - * @memberof JSONWebKey + * @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 + * @memberof JsonWebKey */ 'use': string; /** * * @type {string} - * @memberof JSONWebKey + * @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 + * @memberof JsonWebKey */ 'x5c'?: Array; /** * * @type {string} - * @memberof JSONWebKey + * @memberof JsonWebKey */ 'y'?: string; } /** - * It is important that this model object is named JSONWebKeySet for \"swagger generate spec\" to generate only on definition of a JSONWebKeySet. Since one with the same name is previously defined as client.Client.JSONWebKeys and this one is last, this one will be effectively written in the swagger spec. + * JSON Web Key Set * @export - * @interface JSONWebKeySet + * @interface JsonWebKeySet */ -export interface JSONWebKeySet { +export interface JsonWebKeySet { /** - * The value of the \"keys\" parameter is an array of 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 + * 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; + 'keys'?: Array; } /** - * Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. + * 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 JsonError + * @interface OAuth2Client */ -export interface JsonError { +export interface OAuth2Client { + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + 'allowed_cors_origins'?: Array; + /** + * + * @type {Array} + * @memberof OAuth2Client + */ + 'audience'?: Array; /** - * Name is the error name. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof JsonError + * @memberof OAuth2Client */ - 'error'?: string; + 'authorization_code_grant_access_token_lifespan'?: string; /** - * Debug contains debug information. This is usually not available and has to be enabled. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof JsonError + * @memberof OAuth2Client */ - 'error_debug'?: string; + 'authorization_code_grant_id_token_lifespan'?: string; /** - * Description contains further information on the nature of the error. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof JsonError + * @memberof OAuth2Client */ - 'error_description'?: string; + 'authorization_code_grant_refresh_token_lifespan'?: string; /** - * Code represents the error status code (404, 403, 401, ...). - * @type {number} - * @memberof JsonError + * 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 */ - 'status_code'?: number; -} -/** - * - * @export - * @interface JsonWebKeySetGeneratorRequest - */ -export interface JsonWebKeySetGeneratorRequest { + 'backchannel_logout_session_required'?: boolean; /** - * The algorithm to be used for creating the key. Supports \"RS256\", \"ES256\", \"ES512\", \"HS512\", and \"HS256\" + * 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 JsonWebKeySetGeneratorRequest + * @memberof OAuth2Client */ - 'alg': string; + 'backchannel_logout_uri'?: string; /** - * The kid of the key to be created + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof JsonWebKeySetGeneratorRequest + * @memberof OAuth2Client */ - 'kid': string; + 'client_credentials_grant_access_token_lifespan'?: string; /** - * 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\". + * OAuth 2.0 Client ID The ID is autogenerated and immutable. * @type {string} - * @memberof JsonWebKeySetGeneratorRequest - */ - 'use': string; -} -/** - * - * @export - * @interface LoginRequest - */ -export interface LoginRequest { - /** - * ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. - * @type {string} - * @memberof LoginRequest - */ - 'challenge': string; - /** - * - * @type {OAuth2Client} - * @memberof LoginRequest - */ - 'client': OAuth2Client; - /** - * - * @type {OpenIDConnectContext} - * @memberof LoginRequest - */ - 'oidc_context'?: OpenIDConnectContext; - /** - * 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 LoginRequest - */ - 'request_url': string; - /** - * - * @type {Array} - * @memberof LoginRequest - */ - 'requested_access_token_audience': Array; - /** - * - * @type {Array} - * @memberof LoginRequest - */ - '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 LoginRequest - */ - '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 LoginRequest - */ - '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 LoginRequest - */ - 'subject': string; -} -/** - * - * @export - * @interface LogoutRequest - */ -export interface LogoutRequest { - /** - * Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. - * @type {string} - * @memberof LogoutRequest - */ - 'challenge'?: string; - /** - * - * @type {OAuth2Client} - * @memberof LogoutRequest - */ - 'client'?: OAuth2Client; - /** - * RequestURL is the original Logout URL requested. - * @type {string} - * @memberof LogoutRequest - */ - '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 LogoutRequest - */ - 'rp_initiated'?: boolean; - /** - * SessionID is the login session ID that was requested to log out. - * @type {string} - * @memberof LogoutRequest - */ - 'sid'?: string; - /** - * Subject is the user for whom the logout was request. - * @type {string} - * @memberof LogoutRequest - */ - 'subject'?: string; -} -/** - * - * @export - * @interface OAuth2Client - */ -export interface OAuth2Client { - /** - * - * @type {Array} - * @memberof OAuth2Client - */ - 'allowed_cors_origins'?: Array; - /** - * - * @type {Array} - * @memberof OAuth2Client - */ - 'audience'?: Array; - /** - * 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; - /** - * 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; - /** - * ID is the id for this client. - * @type {string} - * @memberof OAuth2Client + * @memberof OAuth2Client */ 'client_id'?: string; /** - * Name is the human-readable string name of the client to be presented to the end-user during authorization. + * 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; /** - * Secret is the client\'s secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again. + * 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; /** - * SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it\'s value will always be set to 0. + * 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; /** - * ClientURI is an 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. + * 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 */ @@ -686,19 +649,19 @@ export interface OAuth2Client { */ 'contacts'?: Array; /** - * CreatedAt returns the timestamp of the client\'s creation. + * OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client\'s creation. * @type {string} * @memberof OAuth2Client */ 'created_at'?: string; /** - * 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. + * 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; /** - * 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. + * 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 */ @@ -710,37 +673,55 @@ export interface OAuth2Client { */ 'grant_types'?: Array; /** - * - * @type {object} + * 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'?: object; + 'jwks'?: any; /** - * 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. + * 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; /** - * LogoURI is an URL string that references a logo for the client. + * 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 {object} + * @type {any} * @memberof OAuth2Client */ - 'metadata'?: object; + 'metadata'?: any; /** - * Owner is a string identifying the owner of the OAuth 2.0 Client. + * OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client. * @type {string} * @memberof OAuth2Client */ 'owner'?: string; /** - * 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. + * 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 */ @@ -758,19 +739,37 @@ export interface OAuth2Client { */ 'redirect_uris'?: Array; /** - * RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. + * 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; /** - * RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client. + * 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; /** - * 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. + * 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 */ @@ -788,1264 +787,1100 @@ export interface OAuth2Client { */ 'response_types'?: Array; /** - * 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. * @type {string} * @memberof OAuth2Client */ 'scope'?: string; /** - * 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. + * 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; /** - * SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`. + * 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; /** - * Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none. + * OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `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; /** - * Requested Client Authentication signing algorithm for the Token Endpoint. + * 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; /** - * TermsOfServiceURI is a URL string that points 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 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; /** - * UpdatedAt returns the timestamp of the last update. + * OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update. * @type {string} * @memberof OAuth2Client */ 'updated_at'?: string; /** - * 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. + * 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; } /** - * https://tools.ietf.org/html/rfc7662 + * Lifespans of different token types issued for this OAuth 2.0 Client. * @export - * @interface OAuth2TokenIntrospection + * @interface OAuth2ClientTokenLifespans */ -export interface OAuth2TokenIntrospection { - /** - * 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 OAuth2TokenIntrospection - */ - 'active': boolean; - /** - * Audience contains a list of the token\'s intended audiences. - * @type {Array} - * @memberof OAuth2TokenIntrospection - */ - 'aud'?: Array; +export interface OAuth2ClientTokenLifespans { /** - * ID is aclient identifier for the OAuth 2.0 client that requested this token. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof OAuth2TokenIntrospection - */ - '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 OAuth2TokenIntrospection - */ - 'exp'?: number; - /** - * Extra is arbitrary data set by the session. - * @type {object} - * @memberof OAuth2TokenIntrospection + * @memberof OAuth2ClientTokenLifespans */ - 'ext'?: object; + 'authorization_code_grant_access_token_lifespan'?: string; /** - * 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 OAuth2TokenIntrospection + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans */ - 'iat'?: number; + 'authorization_code_grant_id_token_lifespan'?: string; /** - * IssuerURL is a string representing the issuer of this token + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof OAuth2TokenIntrospection + * @memberof OAuth2ClientTokenLifespans */ - 'iss'?: string; + 'authorization_code_grant_refresh_token_lifespan'?: 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 OAuth2TokenIntrospection + * Specify a time duration in milliseconds, seconds, minutes, hours. + * @type {string} + * @memberof OAuth2ClientTokenLifespans */ - 'nbf'?: number; + 'client_credentials_grant_access_token_lifespan'?: string; /** - * 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. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof OAuth2TokenIntrospection + * @memberof OAuth2ClientTokenLifespans */ - 'obfuscated_subject'?: string; + 'implicit_grant_access_token_lifespan'?: string; /** - * Scope is a JSON string containing a space-separated list of scopes associated with this token. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof OAuth2TokenIntrospection + * @memberof OAuth2ClientTokenLifespans */ - 'scope'?: string; + 'implicit_grant_id_token_lifespan'?: string; /** - * Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof OAuth2TokenIntrospection + * @memberof OAuth2ClientTokenLifespans */ - 'sub'?: string; + 'jwt_bearer_grant_access_token_lifespan'?: string; /** - * TokenType is the introspected token\'s type, typically `Bearer`. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof OAuth2TokenIntrospection + * @memberof OAuth2ClientTokenLifespans */ - 'token_type'?: string; + 'refresh_token_grant_access_token_lifespan'?: string; /** - * TokenUse is the introspected token\'s use, for example `access_token` or `refresh_token`. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof OAuth2TokenIntrospection + * @memberof OAuth2ClientTokenLifespans */ - 'token_use'?: string; + 'refresh_token_grant_id_token_lifespan'?: string; /** - * Username is a human-readable identifier for the resource owner who authorized this token. + * Specify a time duration in milliseconds, seconds, minutes, hours. * @type {string} - * @memberof OAuth2TokenIntrospection + * @memberof OAuth2ClientTokenLifespans */ - 'username'?: string; + 'refresh_token_grant_refresh_token_lifespan'?: string; } /** - * The Access Token Response + * * @export - * @interface Oauth2TokenResponse + * @interface OAuth2ConsentRequest */ -export interface Oauth2TokenResponse { +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 Oauth2TokenResponse + * @memberof OAuth2ConsentRequest */ - 'access_token'?: string; + 'challenge': string; /** * - * @type {number} - * @memberof Oauth2TokenResponse + * @type {OAuth2Client} + * @memberof OAuth2ConsentRequest */ - 'expires_in'?: number; + 'client'?: OAuth2Client; /** * + * @type {any} + * @memberof OAuth2ConsentRequest + */ + 'context'?: any; + /** + * 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 Oauth2TokenResponse + * @memberof OAuth2ConsentRequest */ - 'id_token'?: string; + '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 Oauth2TokenResponse + * @memberof OAuth2ConsentRequest */ - 'refresh_token'?: string; + '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 Oauth2TokenResponse + * @memberof OAuth2ConsentRequest */ - 'scope'?: string; + '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 Oauth2TokenResponse + * @memberof OAuth2ConsentRequest */ - 'token_type'?: string; + 'subject'?: string; } /** * * @export - * @interface OpenIDConnectContext + * @interface OAuth2ConsentRequestOpenIDConnectContext */ -export interface OpenIDConnectContext { +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 OpenIDConnectContext + * @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 OpenIDConnectContext + * @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 {object} - * @memberof OpenIDConnectContext + * @type {{ [key: string]: any; }} + * @memberof OAuth2ConsentRequestOpenIDConnectContext */ - 'id_token_hint_claims'?: object; + '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 OpenIDConnectContext + * @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 OpenIDConnectContext + * @memberof OAuth2ConsentRequestOpenIDConnectContext */ 'ui_locales'?: Array; } /** - * A JSONPatch document as defined by RFC 6902 + * A completed OAuth 2.0 Consent Session. * @export - * @interface PatchDocument + * @interface OAuth2ConsentSession */ -export interface PatchDocument { +export interface OAuth2ConsentSession { /** - * A JSON-pointer - * @type {string} - * @memberof PatchDocument - */ - 'from'?: string; - /** - * The operation to be performed - * @type {string} - * @memberof PatchDocument + * + * @type {OAuth2ConsentRequest} + * @memberof OAuth2ConsentSession */ - 'op': string; + 'consent_request'?: OAuth2ConsentRequest; /** - * A JSON-pointer - * @type {string} - * @memberof PatchDocument + * + * @type {OAuth2ConsentSessionExpiresAt} + * @memberof OAuth2ConsentSession */ - 'path': string; + 'expires_at'?: OAuth2ConsentSessionExpiresAt; /** - * The value to be used within the operations - * @type {object} - * @memberof PatchDocument + * + * @type {Array} + * @memberof OAuth2ConsentSession */ - 'value'?: object; -} -/** - * - * @export - * @interface PluginConfig - */ -export interface PluginConfig { + 'grant_access_token_audience'?: Array; /** * - * @type {PluginConfigArgs} - * @memberof PluginConfig + * @type {Array} + * @memberof OAuth2ConsentSession */ - 'Args': PluginConfigArgs; + 'grant_scope'?: Array; /** - * description + * * @type {string} - * @memberof PluginConfig + * @memberof OAuth2ConsentSession */ - 'Description': string; + 'handled_at'?: string; /** - * Docker Version used to create the plugin - * @type {string} - * @memberof PluginConfig + * 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 */ - 'DockerVersion'?: string; - /** - * documentation - * @type {string} - * @memberof PluginConfig - */ - 'Documentation': string; + 'remember'?: boolean; /** - * entrypoint - * @type {Array} - * @memberof PluginConfig + * 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 */ - 'Entrypoint': Array; + 'remember_for'?: number; /** - * env - * @type {Array} - * @memberof PluginConfig + * + * @type {AcceptOAuth2ConsentRequestSession} + * @memberof OAuth2ConsentSession */ - 'Env': Array; + 'session'?: AcceptOAuth2ConsentRequestSession; +} +/** + * + * @export + * @interface OAuth2ConsentSessionExpiresAt + */ +export interface OAuth2ConsentSessionExpiresAt { /** * - * @type {PluginConfigInterface} - * @memberof PluginConfig + * @type {string} + * @memberof OAuth2ConsentSessionExpiresAt */ - 'Interface': PluginConfigInterface; + 'access_token'?: string; /** - * ipc host - * @type {boolean} - * @memberof PluginConfig + * + * @type {string} + * @memberof OAuth2ConsentSessionExpiresAt */ - 'IpcHost': boolean; + 'authorize_code'?: string; /** * - * @type {PluginConfigLinux} - * @memberof PluginConfig + * @type {string} + * @memberof OAuth2ConsentSessionExpiresAt */ - 'Linux': PluginConfigLinux; + 'id_token'?: string; /** - * mounts - * @type {Array} - * @memberof PluginConfig + * + * @type {string} + * @memberof OAuth2ConsentSessionExpiresAt */ - 'Mounts': Array; + 'par_context'?: string; /** * - * @type {PluginConfigNetwork} - * @memberof PluginConfig + * @type {string} + * @memberof OAuth2ConsentSessionExpiresAt */ - 'Network': PluginConfigNetwork; + 'refresh_token'?: string; +} +/** + * + * @export + * @interface OAuth2LoginRequest + */ +export interface OAuth2LoginRequest { /** - * pid host - * @type {boolean} - * @memberof PluginConfig + * ID is the identifier (\"login challenge\") of the login request. It is used to identify the session. + * @type {string} + * @memberof OAuth2LoginRequest */ - 'PidHost': boolean; + 'challenge': string; /** - * propagated mount - * @type {string} - * @memberof PluginConfig + * + * @type {OAuth2Client} + * @memberof OAuth2LoginRequest */ - 'PropagatedMount': string; + 'client': OAuth2Client; /** * - * @type {PluginConfigUser} - * @memberof PluginConfig + * @type {OAuth2ConsentRequestOpenIDConnectContext} + * @memberof OAuth2LoginRequest */ - 'User'?: PluginConfigUser; + 'oidc_context'?: OAuth2ConsentRequestOpenIDConnectContext; /** - * work dir + * 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 PluginConfig + * @memberof OAuth2LoginRequest */ - 'WorkDir': string; + 'request_url': string; /** * - * @type {PluginConfigRootfs} - * @memberof PluginConfig + * @type {Array} + * @memberof OAuth2LoginRequest */ - 'rootfs'?: PluginConfigRootfs; -} -/** - * PluginConfigArgs plugin config args - * @export - * @interface PluginConfigArgs - */ -export interface PluginConfigArgs { + 'requested_access_token_audience': Array; /** - * description - * @type {string} - * @memberof PluginConfigArgs + * + * @type {Array} + * @memberof OAuth2LoginRequest */ - 'Description': string; + 'requested_scope': Array; /** - * name + * 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 PluginConfigArgs + * @memberof OAuth2LoginRequest */ - 'Name': string; + 'session_id'?: string; /** - * settable - * @type {Array} - * @memberof PluginConfigArgs + * 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 */ - 'Settable': Array; + 'skip': boolean; /** - * value - * @type {Array} - * @memberof PluginConfigArgs + * 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 */ - 'Value': Array; + 'subject': string; } /** - * PluginConfigInterface The interface between Docker and the plugin + * * @export - * @interface PluginConfigInterface + * @interface OAuth2LogoutRequest */ -export interface PluginConfigInterface { +export interface OAuth2LogoutRequest { /** - * Protocol to use for clients connecting to the plugin. + * Challenge is the identifier (\"logout challenge\") of the logout authentication request. It is used to identify the session. * @type {string} - * @memberof PluginConfigInterface + * @memberof OAuth2LogoutRequest */ - 'ProtocolScheme'?: string; + 'challenge'?: string; /** - * socket - * @type {string} - * @memberof PluginConfigInterface + * + * @type {OAuth2Client} + * @memberof OAuth2LogoutRequest */ - 'Socket': string; + 'client'?: OAuth2Client; /** - * types - * @type {Array} - * @memberof PluginConfigInterface + * RequestURL is the original Logout URL requested. + * @type {string} + * @memberof OAuth2LogoutRequest */ - 'Types': Array; -} -/** - * PluginConfigLinux plugin config linux - * @export - * @interface PluginConfigLinux - */ -export interface PluginConfigLinux { + 'request_url'?: string; /** - * allow all devices + * 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 PluginConfigLinux + * @memberof OAuth2LogoutRequest */ - 'AllowAllDevices': boolean; + 'rp_initiated'?: boolean; /** - * capabilities - * @type {Array} - * @memberof PluginConfigLinux + * SessionID is the login session ID that was requested to log out. + * @type {string} + * @memberof OAuth2LogoutRequest */ - 'Capabilities': Array; + 'sid'?: string; /** - * devices - * @type {Array} - * @memberof PluginConfigLinux + * Subject is the user for whom the logout was request. + * @type {string} + * @memberof OAuth2LogoutRequest */ - 'Devices': Array; + 'subject'?: string; } /** - * PluginConfigNetwork plugin config network + * Contains a redirect URL used to complete a login, consent, or logout request. * @export - * @interface PluginConfigNetwork + * @interface OAuth2RedirectTo */ -export interface PluginConfigNetwork { +export interface OAuth2RedirectTo { /** - * type + * RedirectURL is the URL which you should redirect the user\'s browser to once the authentication process is completed. * @type {string} - * @memberof PluginConfigNetwork + * @memberof OAuth2RedirectTo */ - 'Type': string; + 'redirect_to': string; } /** - * PluginConfigRootfs plugin config rootfs + * OAuth2 Token Exchange Result * @export - * @interface PluginConfigRootfs + * @interface OAuth2TokenExchange */ -export interface PluginConfigRootfs { - /** - * diff ids - * @type {Array} - * @memberof PluginConfigRootfs - */ - 'diff_ids'?: Array; +export interface OAuth2TokenExchange { /** - * type + * The access token issued by the authorization server. * @type {string} - * @memberof PluginConfigRootfs + * @memberof OAuth2TokenExchange */ - 'type'?: string; -} -/** - * PluginConfigUser plugin config user - * @export - * @interface PluginConfigUser - */ -export interface PluginConfigUser { + 'access_token'?: string; /** - * g ID + * 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 PluginConfigUser + * @memberof OAuth2TokenExchange */ - 'GID'?: number; + 'expires_in'?: number; /** - * UID + * To retrieve a refresh token request the id_token scope. * @type {number} - * @memberof PluginConfigUser + * @memberof OAuth2TokenExchange */ - 'UID'?: number; -} -/** - * PluginDevice plugin device - * @export - * @interface PluginDevice - */ -export interface PluginDevice { + 'id_token'?: number; /** - * 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} - * @memberof PluginDevice + * @memberof OAuth2TokenExchange */ - 'Description': string; + 'refresh_token'?: string; /** - * name - * @type {string} - * @memberof PluginDevice + * The scope of the access token + * @type {number} + * @memberof OAuth2TokenExchange */ - 'Name': string; + 'scope'?: number; /** - * path + * The type of the token issued * @type {string} - * @memberof PluginDevice - */ - 'Path': string; - /** - * settable - * @type {Array} - * @memberof PluginDevice + * @memberof OAuth2TokenExchange */ - 'Settable': Array; + 'token_type'?: string; } /** - * PluginEnv plugin env + * Includes links to several endpoints (for example `/oauth2/token`) and exposes information on supported signature algorithms among others. * @export - * @interface PluginEnv + * @interface OidcConfiguration */ -export interface PluginEnv { +export interface OidcConfiguration { /** - * description + * OAuth 2.0 Authorization Endpoint URL * @type {string} - * @memberof PluginEnv + * @memberof OidcConfiguration */ - 'Description': string; + 'authorization_endpoint': string; /** - * name - * @type {string} - * @memberof PluginEnv + * 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 */ - 'Name': string; + 'backchannel_logout_session_supported'?: boolean; /** - * settable - * @type {Array} - * @memberof PluginEnv + * OpenID Connect Back-Channel Logout Supported Boolean value specifying whether the OP supports back-channel logout, with true indicating support. + * @type {boolean} + * @memberof OidcConfiguration */ - 'Settable': Array; + 'backchannel_logout_supported'?: boolean; /** - * value - * @type {string} - * @memberof PluginEnv + * 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 */ - 'Value': string; -} -/** - * PluginInterfaceType plugin interface type - * @export - * @interface PluginInterfaceType - */ -export interface PluginInterfaceType { + 'claims_parameter_supported'?: boolean; /** - * capability - * @type {string} - * @memberof PluginInterfaceType + * 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 */ - 'Capability': string; + 'claims_supported'?: Array; /** - * prefix - * @type {string} - * @memberof PluginInterfaceType + * 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 */ - 'Prefix': string; + 'code_challenge_methods_supported'?: Array; /** - * version + * 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 PluginInterfaceType + * @memberof OidcConfiguration */ - 'Version': string; -} -/** - * PluginMount plugin mount - * @export - * @interface PluginMount - */ -export interface PluginMount { + 'end_session_endpoint'?: string; /** - * description - * @type {string} - * @memberof PluginMount + * 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 */ - 'Description': string; + 'frontchannel_logout_session_supported'?: boolean; /** - * destination - * @type {string} - * @memberof PluginMount + * OpenID Connect Front-Channel Logout Supported Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + * @type {boolean} + * @memberof OidcConfiguration */ - 'Destination': string; + 'frontchannel_logout_supported'?: boolean; /** - * name - * @type {string} - * @memberof PluginMount + * 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 */ - 'Name': string; + 'grant_types_supported'?: Array; /** - * options + * OpenID Connect Default ID Token Signing Algorithms Algorithm used to sign OpenID Connect ID Tokens. * @type {Array} - * @memberof PluginMount + * @memberof OidcConfiguration */ - 'Options': Array; + 'id_token_signed_response_alg': Array; /** - * settable + * 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 PluginMount + * @memberof OidcConfiguration */ - 'Settable': Array; + 'id_token_signing_alg_values_supported': Array; /** - * source + * 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 PluginMount + * @memberof OidcConfiguration */ - 'Source': string; + 'issuer': string; /** - * type + * 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 PluginMount + * @memberof OidcConfiguration */ - 'Type': string; -} -/** - * - * @export - * @interface PluginSettings - */ -export interface PluginSettings { + 'jwks_uri': string; /** - * args - * @type {Array} - * @memberof PluginSettings + * OpenID Connect Dynamic Client Registration Endpoint URL + * @type {string} + * @memberof OidcConfiguration */ - 'Args': Array; + 'registration_endpoint'?: string; /** - * devices - * @type {Array} - * @memberof PluginSettings + * 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 */ - 'Devices': Array; + 'request_object_signing_alg_values_supported'?: Array; /** - * env - * @type {Array} - * @memberof PluginSettings + * 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 */ - 'Env': Array; + 'request_parameter_supported'?: boolean; /** - * mounts - * @type {Array} - * @memberof PluginSettings + * 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 */ - 'Mounts': Array; -} -/** - * The response used to return used consent requests same as HandledLoginRequest, just with consent_request exposed as json - * @export - * @interface PreviousConsentSession - */ -export interface PreviousConsentSession { + 'request_uri_parameter_supported'?: boolean; /** - * - * @type {ConsentRequest} - * @memberof PreviousConsentSession + * 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 */ - 'consent_request'?: ConsentRequest; + '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 PreviousConsentSession + * @memberof OidcConfiguration */ - 'grant_access_token_audience'?: Array; + '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 PreviousConsentSession + * @memberof OidcConfiguration */ - 'grant_scope'?: Array; + 'response_types_supported': Array; /** - * + * OAuth 2.0 Token Revocation URL URL of the authorization server\'s OAuth 2.0 revocation endpoint. * @type {string} - * @memberof PreviousConsentSession - */ - 'handled_at'?: string; - /** - * 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 PreviousConsentSession + * @memberof OidcConfiguration */ - 'remember'?: boolean; + 'revocation_endpoint'?: string; /** - * 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 PreviousConsentSession + * 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 */ - 'remember_for'?: number; + 'scopes_supported'?: Array; /** - * - * @type {ConsentRequestSession} - * @memberof PreviousConsentSession + * 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 */ - 'session'?: ConsentRequestSession; -} -/** - * - * @export - * @interface RejectRequest - */ -export interface RejectRequest { + 'subject_types_supported': Array; /** - * The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. + * OAuth 2.0 Token Endpoint URL * @type {string} - * @memberof RejectRequest + * @memberof OidcConfiguration */ - 'error'?: string; + 'token_endpoint': 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 RejectRequest + * 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 */ - 'error_debug'?: string; + 'token_endpoint_auth_methods_supported'?: Array; /** - * Description of the error in a human readable format. + * OpenID Connect Userinfo URL URL of the OP\'s UserInfo Endpoint. * @type {string} - * @memberof RejectRequest + * @memberof OidcConfiguration */ - 'error_description'?: string; + 'userinfo_endpoint'?: string; /** - * Hint to help resolve the error. - * @type {string} - * @memberof RejectRequest + * OpenID Connect User Userinfo Signing Algorithm Algorithm used to sign OpenID Connect Userinfo Responses. + * @type {Array} + * @memberof OidcConfiguration */ - 'error_hint'?: string; + 'userinfo_signed_response_alg': Array; /** - * Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 - * @type {number} - * @memberof RejectRequest + * 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 */ - 'status_code'?: number; + 'userinfo_signing_alg_values_supported'?: Array; } /** - * + * OpenID Connect Userinfo * @export - * @interface RequestWasHandledResponse + * @interface OidcUserInfo */ -export interface RequestWasHandledResponse { +export interface OidcUserInfo { /** - * Original request URL to which you should redirect the user if request was already handled. + * 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 RequestWasHandledResponse + * @memberof OidcUserInfo */ - 'redirect_to': string; -} -/** - * - * @export - * @interface TrustJwtGrantIssuerBody - */ -export interface TrustJwtGrantIssuerBody { + 'birthdate'?: string; /** - * The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + * 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 TrustJwtGrantIssuerBody + * @memberof OidcUserInfo */ - 'expires_at': string; + 'email'?: string; /** - * The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). + * 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 TrustJwtGrantIssuerBody + * @memberof OidcUserInfo */ - 'issuer': string; + 'family_name'?: string; /** - * - * @type {JSONWebKey} - * @memberof TrustJwtGrantIssuerBody + * 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 */ - 'jwk': JSONWebKey; + 'gender'?: string; /** - * The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) - * @type {Array} - * @memberof TrustJwtGrantIssuerBody + * 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 */ - 'scope': Array; + 'given_name'?: string; /** - * The \"subject\" identifies the principal that is the subject of the JWT. + * 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 TrustJwtGrantIssuerBody + * @memberof OidcUserInfo */ - 'subject': string; -} -/** - * - * @export - * @interface TrustedJsonWebKey - */ -export interface TrustedJsonWebKey { + 'locale'?: string; /** - * The \"key_id\" is key unique identifier (same as kid header in jws/jwt). + * 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 TrustedJsonWebKey + * @memberof OidcUserInfo */ - 'kid'?: string; + 'middle_name'?: string; /** - * The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. + * 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 TrustedJsonWebKey - */ - 'set'?: string; -} -/** - * - * @export - * @interface TrustedJwtGrantIssuer - */ -export interface TrustedJwtGrantIssuer { - /** - * The \"created_at\" indicates, when grant was created. - * @type {string} - * @memberof TrustedJwtGrantIssuer - */ - 'created_at'?: string; - /** - * The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". - * @type {string} - * @memberof TrustedJwtGrantIssuer - */ - 'expires_at'?: string; - /** - * - * @type {string} - * @memberof TrustedJwtGrantIssuer - */ - 'id'?: string; - /** - * The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). - * @type {string} - * @memberof TrustedJwtGrantIssuer - */ - 'issuer'?: string; - /** - * - * @type {TrustedJsonWebKey} - * @memberof TrustedJwtGrantIssuer - */ - 'public_key'?: TrustedJsonWebKey; - /** - * The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) - * @type {Array} - * @memberof TrustedJwtGrantIssuer - */ - 'scope'?: Array; - /** - * The \"subject\" identifies the principal that is the subject of the JWT. - * @type {string} - * @memberof TrustedJwtGrantIssuer - */ - 'subject'?: string; -} -/** - * The userinfo response - * @export - * @interface UserinfoResponse - */ -export interface UserinfoResponse { - /** - * 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 UserinfoResponse - */ - '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 UserinfoResponse - */ - '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 UserinfoResponse - */ - '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 UserinfoResponse - */ - '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 UserinfoResponse - */ - '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 UserinfoResponse - */ - '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 UserinfoResponse - */ - '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 UserinfoResponse - */ - '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 UserinfoResponse + * @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 UserinfoResponse + * @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 UserinfoResponse + * @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 UserinfoResponse + * @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 UserinfoResponse + * @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 UserinfoResponse + * @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 UserinfoResponse + * @memberof OidcUserInfo */ 'profile'?: string; /** * Subject - Identifier for the End-User at the IssuerURL. * @type {string} - * @memberof UserinfoResponse + * @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 UserinfoResponse + * @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 UserinfoResponse + * @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 UserinfoResponse + * @memberof OidcUserInfo */ 'zoneinfo'?: string; } /** * * @export - * @interface Version + * @interface Pagination */ -export interface Version { +export interface Pagination { /** - * Version is the service\'s version. + * 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 Version + * @memberof Pagination */ - 'version'?: string; + 'page_token'?: string; } /** - * Volume volume + * * @export - * @interface Volume + * @interface PaginationHeaders */ -export interface Volume { +export interface PaginationHeaders { /** - * Date/Time the volume was created. + * 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 Volume + * @memberof PaginationHeaders */ - 'CreatedAt'?: string; + 'link'?: string; /** - * Name of the volume driver used by the volume. + * The total number of clients. in: header * @type {string} - * @memberof Volume + * @memberof PaginationHeaders */ - 'Driver': string; - /** - * User-defined key/value metadata. - * @type {{ [key: string]: string; }} - * @memberof Volume - */ - 'Labels': { [key: string]: string; }; + 'x-total-count'?: string; +} +/** + * + * @export + * @interface RejectOAuth2Request + */ +export interface RejectOAuth2Request { /** - * Mount path of the volume on the host. + * The error should follow the OAuth2 error format (e.g. `invalid_request`, `login_required`). Defaults to `request_denied`. * @type {string} - * @memberof Volume + * @memberof RejectOAuth2Request */ - 'Mountpoint': string; + 'error'?: string; /** - * Name of the volume. + * 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 Volume - */ - 'Name': string; - /** - * The driver specific options used when creating the volume. - * @type {{ [key: string]: string; }} - * @memberof Volume + * @memberof RejectOAuth2Request */ - 'Options': { [key: string]: string; }; + 'error_debug'?: string; /** - * The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. + * Description of the error in a human readable format. * @type {string} - * @memberof Volume + * @memberof RejectOAuth2Request */ - 'Scope': string; + 'error_description'?: string; /** - * Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. - * @type {object} - * @memberof Volume + * Hint to help resolve the error. + * @type {string} + * @memberof RejectOAuth2Request */ - 'Status'?: object; + 'error_hint'?: string; /** - * - * @type {VolumeUsageData} - * @memberof Volume + * Represents the HTTP status code of the error (e.g. 401 or 403) Defaults to 400 + * @type {number} + * @memberof RejectOAuth2Request */ - 'UsageData'?: VolumeUsageData; + 'status_code'?: number; } /** - * VolumeUsageData Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. + * * @export - * @interface VolumeUsageData + * @interface TokenPagination */ -export interface VolumeUsageData { +export interface TokenPagination { /** - * The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. + * 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 VolumeUsageData + * @memberof TokenPagination */ - 'RefCount': number; + 'page_size'?: number; /** - * Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") - * @type {number} - * @memberof VolumeUsageData + * 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 */ - 'Size': number; + 'page_token'?: string; } /** - * It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others. + * * @export - * @interface WellKnown + * @interface TokenPaginationHeaders */ -export interface WellKnown { +export interface TokenPaginationHeaders { /** - * URL of the OP\'s OAuth 2.0 Authorization Endpoint. + * 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 WellKnown - */ - 'authorization_endpoint': string; - /** - * 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 WellKnown + * @memberof TokenPaginationHeaders */ - 'backchannel_logout_session_supported'?: boolean; - /** - * Boolean value specifying whether the OP supports back-channel logout, with true indicating support. - * @type {boolean} - * @memberof WellKnown - */ - 'backchannel_logout_supported'?: boolean; + 'link'?: string; /** - * Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support. - * @type {boolean} - * @memberof WellKnown + * The total number of clients. in: header + * @type {string} + * @memberof TokenPaginationHeaders */ - 'claims_parameter_supported'?: boolean; + 'x-total-count'?: string; +} +/** + * 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 { /** - * 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 WellKnown + * 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 */ - 'claims_supported'?: Array; + 'page_size'?: number; /** - * JSON array containing a list of Proof Key for Code Exchange (PKCE) [RFC7636] code challenge methods supported by this authorization server. - * @type {Array} - * @memberof WellKnown + * 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 */ - 'code_challenge_methods_supported'?: Array; + 'page_token'?: string; +} +/** + * 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 { /** - * URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP. + * 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 WellKnown + * @memberof TokenPaginationResponseHeaders */ - 'end_session_endpoint'?: string; + 'link'?: string; /** - * 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 WellKnown + * The X-Total-Count HTTP Header The `X-Total-Count` header contains the total number of items in the collection. + * @type {number} + * @memberof TokenPaginationResponseHeaders */ - 'frontchannel_logout_session_supported'?: boolean; + 'x-total-count'?: number; +} +/** + * Trust OAuth2 JWT Bearer Grant Type Issuer Request Body + * @export + * @interface TrustOAuth2JwtGrantIssuer + */ +export interface TrustOAuth2JwtGrantIssuer { /** - * Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support. + * The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. * @type {boolean} - * @memberof WellKnown - */ - 'frontchannel_logout_supported'?: boolean; - /** - * JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports. - * @type {Array} - * @memberof WellKnown - */ - 'grant_types_supported'?: Array; - /** - * 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 WellKnown + * @memberof TrustOAuth2JwtGrantIssuer */ - 'id_token_signing_alg_values_supported': Array; + 'allow_any_subject'?: boolean; /** - * 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. + * The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". * @type {string} - * @memberof WellKnown + * @memberof TrustOAuth2JwtGrantIssuer */ - 'issuer': string; + 'expires_at': string; /** - * 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. + * The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). * @type {string} - * @memberof WellKnown + * @memberof TrustOAuth2JwtGrantIssuer */ - 'jwks_uri': string; + 'issuer': string; /** - * URL of the OP\'s Dynamic Client Registration Endpoint. - * @type {string} - * @memberof WellKnown + * + * @type {JsonWebKey} + * @memberof TrustOAuth2JwtGrantIssuer */ - 'registration_endpoint'?: string; + 'jwk': JsonWebKey; /** - * 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). + * The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) * @type {Array} - * @memberof WellKnown + * @memberof TrustOAuth2JwtGrantIssuer */ - 'request_object_signing_alg_values_supported'?: Array; + 'scope': Array; /** - * Boolean value specifying whether the OP supports use of the request parameter, with true indicating support. - * @type {boolean} - * @memberof WellKnown + * The \"subject\" identifies the principal that is the subject of the JWT. + * @type {string} + * @memberof TrustOAuth2JwtGrantIssuer */ - 'request_parameter_supported'?: boolean; + 'subject'?: string; +} +/** + * OAuth2 JWT Bearer Grant Type Issuer Trust Relationship + * @export + * @interface TrustedOAuth2JwtGrantIssuer + */ +export interface TrustedOAuth2JwtGrantIssuer { /** - * Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support. + * The \"allow_any_subject\" indicates that the issuer is allowed to have any principal as the subject of the JWT. * @type {boolean} - * @memberof WellKnown + * @memberof TrustedOAuth2JwtGrantIssuer */ - 'request_uri_parameter_supported'?: boolean; + 'allow_any_subject'?: boolean; /** - * 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 WellKnown + * The \"created_at\" indicates, when grant was created. + * @type {string} + * @memberof TrustedOAuth2JwtGrantIssuer */ - 'require_request_uri_registration'?: boolean; + 'created_at'?: string; /** - * JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports. - * @type {Array} - * @memberof WellKnown + * The \"expires_at\" indicates, when grant will expire, so we will reject assertion from \"issuer\" targeting \"subject\". + * @type {string} + * @memberof TrustedOAuth2JwtGrantIssuer */ - 'response_modes_supported'?: Array; + 'expires_at'?: string; /** - * 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 WellKnown + * + * @type {string} + * @memberof TrustedOAuth2JwtGrantIssuer */ - 'response_types_supported': Array; + 'id'?: string; /** - * URL of the authorization server\'s OAuth 2.0 revocation endpoint. + * The \"issuer\" identifies the principal that issued the JWT assertion (same as \"iss\" claim in JWT). * @type {string} - * @memberof WellKnown + * @memberof TrustedOAuth2JwtGrantIssuer */ - 'revocation_endpoint'?: string; + 'issuer'?: string; /** - * SON 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 WellKnown + * + * @type {TrustedOAuth2JwtGrantJsonWebKey} + * @memberof TrustedOAuth2JwtGrantIssuer */ - 'scopes_supported'?: Array; + 'public_key'?: TrustedOAuth2JwtGrantJsonWebKey; /** - * JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public. + * The \"scope\" contains list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) * @type {Array} - * @memberof WellKnown + * @memberof TrustedOAuth2JwtGrantIssuer */ - 'subject_types_supported': Array; + 'scope'?: Array; /** - * URL of the OP\'s OAuth 2.0 Token Endpoint + * The \"subject\" identifies the principal that is the subject of the JWT. * @type {string} - * @memberof WellKnown + * @memberof TrustedOAuth2JwtGrantIssuer */ - 'token_endpoint': string; + 'subject'?: string; +} +/** + * OAuth2 JWT Bearer Grant Type Issuer Trusted JSON Web Key + * @export + * @interface TrustedOAuth2JwtGrantJsonWebKey + */ +export interface TrustedOAuth2JwtGrantJsonWebKey { /** - * 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 WellKnown + * The \"key_id\" is key unique identifier (same as kid header in jws/jwt). + * @type {string} + * @memberof TrustedOAuth2JwtGrantJsonWebKey */ - 'token_endpoint_auth_methods_supported'?: Array; + 'kid'?: string; /** - * URL of the OP\'s UserInfo Endpoint. + * The \"set\" is basically a name for a group(set) of keys. Will be the same as \"issuer\" in grant. * @type {string} - * @memberof WellKnown + * @memberof TrustedOAuth2JwtGrantJsonWebKey */ - 'userinfo_endpoint'?: string; + 'set'?: string; +} +/** + * + * @export + * @interface Version + */ +export interface Version { /** - * 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 WellKnown + * Version is the service\'s version. + * @type {string} + * @memberof Version */ - 'userinfo_signing_alg_values_supported'?: Array; + 'version'?: string; } /** - * AdminApi - axios parameter creator + * JwkApi - axios parameter creator * @export */ -export const AdminApiAxiosParamCreator = function (configuration?: Configuration) { +export const JwkApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Accept a Consent Request - * @param {string} consentChallenge - * @param {AcceptConsentRequest} [body] + * 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. + * @summary Create JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {CreateJsonWebKeySet} createJsonWebKeySet * @param {*} [options] Override http request option. * @throws {RequiredError} */ - acceptConsentRequest: async (consentChallenge: string, body?: AcceptConsentRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'consentChallenge' is not null or undefined - assertParamExists('acceptConsentRequest', 'consentChallenge', consentChallenge) - const localVarPath = `/oauth2/auth/requests/consent/accept`; + createJsonWebKeySet: async (set: string, createJsonWebKeySet: CreateJsonWebKeySet, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'set' is not null or undefined + assertParamExists('createJsonWebKeySet', 'set', set) + // verify required parameter 'createJsonWebKeySet' is not null or undefined + assertParamExists('createJsonWebKeySet', 'createJsonWebKeySet', createJsonWebKeySet) + const localVarPath = `/admin/keys/{set}` + .replace(`{${"set"}}`, encodeURIComponent(String(set))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2053,14 +1888,10 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (consentChallenge !== undefined) { - localVarQueryParameter['consent_challenge'] = consentChallenge; - } - localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -2068,7 +1899,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(createJsonWebKeySet, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2076,40 +1907,37 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if ORY Hydra 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. - * @summary Accept a Login Request - * @param {string} loginChallenge - * @param {AcceptLoginRequest} [body] + * 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. + * @summary Delete JSON Web Key + * @param {string} set The JSON Web Key Set + * @param {string} kid The JSON Web Key ID (kid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - acceptLoginRequest: async (loginChallenge: string, body?: AcceptLoginRequest, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'loginChallenge' is not null or undefined - assertParamExists('acceptLoginRequest', 'loginChallenge', loginChallenge) - const localVarPath = `/oauth2/auth/requests/login/accept`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + deleteJsonWebKey: async (set: string, kid: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'set' is not null or undefined + assertParamExists('deleteJsonWebKey', 'set', set) + // verify required parameter 'kid' is not null or undefined + assertParamExists('deleteJsonWebKey', 'kid', kid) + const localVarPath = `/admin/keys/{set}/{kid}` + .replace(`{${"set"}}`, encodeURIComponent(String(set))) + .replace(`{${"kid"}}`, encodeURIComponent(String(kid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (loginChallenge !== undefined) { - localVarQueryParameter['login_challenge'] = loginChallenge; - } - - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2117,16 +1945,17 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @summary Accept a Logout Request - * @param {string} logoutChallenge + * 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. + * @summary Delete JSON Web Key Set + * @param {string} set The JSON Web Key Set * @param {*} [options] Override http request option. * @throws {RequiredError} */ - acceptLogoutRequest: async (logoutChallenge: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'logoutChallenge' is not null or undefined - assertParamExists('acceptLogoutRequest', 'logoutChallenge', logoutChallenge) - const localVarPath = `/oauth2/auth/requests/logout/accept`; + deleteJsonWebKeySet: async (set: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'set' is not null or undefined + assertParamExists('deleteJsonWebKeySet', 'set', set) + const localVarPath = `/admin/keys/{set}` + .replace(`{${"set"}}`, encodeURIComponent(String(set))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2134,14 +1963,10 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (logoutChallenge !== undefined) { - localVarQueryParameter['logout_challenge'] = logoutChallenge; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2154,18 +1979,21 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * 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. - * @summary Generate a New JSON Web Key - * @param {string} set The set - * @param {JsonWebKeySetGeneratorRequest} [body] + * This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + * @summary Get JSON Web Key + * @param {string} set JSON Web Key Set ID + * @param {string} kid JSON Web Key ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createJsonWebKeySet: async (set: string, body?: JsonWebKeySetGeneratorRequest, options: AxiosRequestConfig = {}): Promise => { + getJsonWebKey: async (set: string, kid: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'set' is not null or undefined - assertParamExists('createJsonWebKeySet', 'set', set) - const localVarPath = `/keys/{set}` - .replace(`{${"set"}}`, encodeURIComponent(String(set))); + assertParamExists('getJsonWebKey', 'set', set) + // verify required parameter 'kid' is not null or undefined + assertParamExists('getJsonWebKey', 'kid', kid) + const localVarPath = `/admin/keys/{set}/{kid}` + .replace(`{${"set"}}`, encodeURIComponent(String(set))) + .replace(`{${"kid"}}`, encodeURIComponent(String(kid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2173,18 +2001,15 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2192,16 +2017,17 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - * @summary Create an OAuth 2.0 Client - * @param {OAuth2Client} body + * 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. + * @summary Retrieve a JSON Web Key Set + * @param {string} set JSON Web Key Set ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createOAuth2Client: async (body: OAuth2Client, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'body' is not null or undefined - assertParamExists('createOAuth2Client', 'body', body) - const localVarPath = `/clients`; + getJsonWebKeySet: async (set: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'set' is not null or undefined + assertParamExists('getJsonWebKeySet', 'set', set) + const localVarPath = `/admin/keys/{set}` + .replace(`{${"set"}}`, encodeURIComponent(String(set))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2209,18 +2035,15 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2228,21 +2051,22 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * 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. - * @summary Delete a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The 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. + * @summary Set JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {string} kid JSON Web Key ID + * @param {JsonWebKey} [jsonWebKey] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteJsonWebKey: async (kid: string, set: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'kid' is not null or undefined - assertParamExists('deleteJsonWebKey', 'kid', kid) + setJsonWebKey: async (set: string, kid: string, jsonWebKey?: JsonWebKey, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'set' is not null or undefined - assertParamExists('deleteJsonWebKey', 'set', set) - const localVarPath = `/keys/{set}/{kid}` - .replace(`{${"kid"}}`, encodeURIComponent(String(kid))) - .replace(`{${"set"}}`, encodeURIComponent(String(set))); + assertParamExists('setJsonWebKey', 'set', set) + // verify required parameter 'kid' is not null or undefined + assertParamExists('setJsonWebKey', 'kid', kid) + const localVarPath = `/admin/keys/{set}/{kid}` + .replace(`{${"set"}}`, encodeURIComponent(String(set))) + .replace(`{${"kid"}}`, encodeURIComponent(String(kid))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2250,15 +2074,18 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(jsonWebKey, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2266,16 +2093,17 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * 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. - * @summary Delete a JSON Web Key Set - * @param {string} set The 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. + * @summary Update a JSON Web Key Set + * @param {string} set The JSON Web Key Set ID + * @param {JsonWebKeySet} [jsonWebKeySet] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteJsonWebKeySet: async (set: string, options: AxiosRequestConfig = {}): Promise => { + setJsonWebKeySet: async (set: string, jsonWebKeySet?: JsonWebKeySet, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'set' is not null or undefined - assertParamExists('deleteJsonWebKeySet', 'set', set) - const localVarPath = `/keys/{set}` + assertParamExists('setJsonWebKeySet', 'set', set) + const localVarPath = `/admin/keys/{set}` .replace(`{${"set"}}`, encodeURIComponent(String(set))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2284,258 +2112,756 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(jsonWebKeySet, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, + } +}; + +/** + * JwkApi - functional programming interface + * @export + */ +export const JwkApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = JwkApiAxiosParamCreator(configuration) + return { /** - * 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. - * @summary Deletes an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. + * 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. + * @summary Create JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {CreateJsonWebKeySet} createJsonWebKeySet * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOAuth2Client: async (id: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('deleteOAuth2Client', 'id', id) - const localVarPath = `/clients/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async createJsonWebKeySet(set: string, createJsonWebKeySet: CreateJsonWebKeySet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createJsonWebKeySet(set, createJsonWebKeySet, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @summary Delete OAuth2 Access Tokens from a Client - * @param {string} clientId + * 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. + * @summary Delete JSON Web Key + * @param {string} set The JSON Web Key Set + * @param {string} kid The JSON Web Key ID (kid) * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteOAuth2Token: async (clientId: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'clientId' is not null or undefined - assertParamExists('deleteOAuth2Token', 'clientId', clientId) - const localVarPath = `/oauth2/tokens`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (clientId !== undefined) { - localVarQueryParameter['client_id'] = clientId; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async deleteJsonWebKey(set: string, kid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteJsonWebKey(set, kid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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. - * @summary Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - * @param {string} id The id of the desired grant + * 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. + * @summary Delete JSON Web Key Set + * @param {string} set The JSON Web Key Set * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteTrustedJwtGrantIssuer: async (id: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('deleteTrustedJwtGrantIssuer', 'id', id) - const localVarPath = `/trust/grants/jwt-bearer/issuers/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async deleteJsonWebKeySet(set: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteJsonWebKeySet(set, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - * @summary Flush Expired OAuth2 Access Tokens - * @param {FlushInactiveOAuth2TokensRequest} [body] + * This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + * @summary Get JSON Web Key + * @param {string} set JSON Web Key Set ID + * @param {string} kid JSON Web Key ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - flushInactiveOAuth2Tokens: async (body?: FlushInactiveOAuth2TokensRequest, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/oauth2/flush`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async getJsonWebKey(set: string, kid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getJsonWebKey(set, kid, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - * @summary Get Consent Request Information - * @param {string} consentChallenge + * 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. + * @summary Retrieve a JSON Web Key Set + * @param {string} set JSON Web Key Set ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getConsentRequest: async (consentChallenge: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'consentChallenge' is not null or undefined - assertParamExists('getConsentRequest', 'consentChallenge', consentChallenge) - const localVarPath = `/oauth2/auth/requests/consent`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - if (consentChallenge !== undefined) { - localVarQueryParameter['consent_challenge'] = consentChallenge; - } - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async getJsonWebKeySet(set: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getJsonWebKeySet(set, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @summary Fetch a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The 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. + * @summary Set JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {string} kid JSON Web Key ID + * @param {JsonWebKey} [jsonWebKey] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getJsonWebKey: async (kid: string, set: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'kid' is not null or undefined - assertParamExists('getJsonWebKey', 'kid', kid) - // verify required parameter 'set' is not null or undefined - assertParamExists('getJsonWebKey', 'set', set) - const localVarPath = `/keys/{set}/{kid}` - .replace(`{${"kid"}}`, encodeURIComponent(String(kid))) - .replace(`{${"set"}}`, encodeURIComponent(String(set))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; + async setJsonWebKey(set: string, kid: string, jsonWebKey?: JsonWebKey, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.setJsonWebKey(set, kid, jsonWebKey, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * 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. - * @summary Retrieve a JSON Web Key Set - * @param {string} set The 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. + * @summary Update a JSON Web Key Set + * @param {string} set The JSON Web Key Set ID + * @param {JsonWebKeySet} [jsonWebKeySet] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getJsonWebKeySet: async (set: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'set' is not null or undefined - assertParamExists('getJsonWebKeySet', 'set', set) - const localVarPath = `/keys/{set}` - .replace(`{${"set"}}`, encodeURIComponent(String(set))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { + async setJsonWebKeySet(set: string, jsonWebKeySet?: JsonWebKeySet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.setJsonWebKeySet(set, jsonWebKeySet, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * JwkApi - factory interface + * @export + */ +export const JwkApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = JwkApiFp(configuration) + return { + /** + * 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. + * @summary Create JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {CreateJsonWebKeySet} createJsonWebKeySet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createJsonWebKeySet(set: string, createJsonWebKeySet: CreateJsonWebKeySet, options?: any): AxiosPromise { + return localVarFp.createJsonWebKeySet(set, createJsonWebKeySet, options).then((request) => request(axios, 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. + * @summary Delete JSON Web Key + * @param {string} set The JSON Web Key Set + * @param {string} kid The JSON Web Key ID (kid) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteJsonWebKey(set: string, kid: string, options?: any): AxiosPromise { + return localVarFp.deleteJsonWebKey(set, kid, options).then((request) => request(axios, 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. + * @summary Delete JSON Web Key Set + * @param {string} set The JSON Web Key Set + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteJsonWebKeySet(set: string, options?: any): AxiosPromise { + return localVarFp.deleteJsonWebKeySet(set, options).then((request) => request(axios, 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). + * @summary Get JSON Web Key + * @param {string} set JSON Web Key Set ID + * @param {string} kid JSON Web Key ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getJsonWebKey(set: string, kid: string, options?: any): AxiosPromise { + return localVarFp.getJsonWebKey(set, kid, options).then((request) => request(axios, 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. + * @summary Retrieve a JSON Web Key Set + * @param {string} set JSON Web Key Set ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getJsonWebKeySet(set: string, options?: any): AxiosPromise { + return localVarFp.getJsonWebKeySet(set, options).then((request) => request(axios, 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. + * @summary Set JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {string} kid JSON Web Key ID + * @param {JsonWebKey} [jsonWebKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setJsonWebKey(set: string, kid: string, jsonWebKey?: JsonWebKey, options?: any): AxiosPromise { + return localVarFp.setJsonWebKey(set, kid, jsonWebKey, options).then((request) => request(axios, 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. + * @summary Update a JSON Web Key Set + * @param {string} set The JSON Web Key Set ID + * @param {JsonWebKeySet} [jsonWebKeySet] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setJsonWebKeySet(set: string, jsonWebKeySet?: JsonWebKeySet, options?: any): AxiosPromise { + return localVarFp.setJsonWebKeySet(set, jsonWebKeySet, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * JwkApi - interface + * @export + * @interface JwkApi + */ +export interface JwkApiInterface { + /** + * 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. + * @summary Create JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {CreateJsonWebKeySet} createJsonWebKeySet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApiInterface + */ + createJsonWebKeySet(set: string, createJsonWebKeySet: CreateJsonWebKeySet, options?: AxiosRequestConfig): AxiosPromise; + + /** + * 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. + * @summary Delete JSON Web Key + * @param {string} set The JSON Web Key Set + * @param {string} kid The JSON Web Key ID (kid) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApiInterface + */ + deleteJsonWebKey(set: string, kid: string, options?: AxiosRequestConfig): AxiosPromise; + + /** + * 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. + * @summary Delete JSON Web Key Set + * @param {string} set The JSON Web Key Set + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApiInterface + */ + deleteJsonWebKeySet(set: string, options?: AxiosRequestConfig): AxiosPromise; + + /** + * This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid). + * @summary Get JSON Web Key + * @param {string} set JSON Web Key Set ID + * @param {string} kid JSON Web Key ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApiInterface + */ + getJsonWebKey(set: string, kid: string, options?: AxiosRequestConfig): AxiosPromise; + + /** + * 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. + * @summary Retrieve a JSON Web Key Set + * @param {string} set JSON Web Key Set ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApiInterface + */ + getJsonWebKeySet(set: string, options?: AxiosRequestConfig): AxiosPromise; + + /** + * 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. + * @summary Set JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {string} kid JSON Web Key ID + * @param {JsonWebKey} [jsonWebKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApiInterface + */ + setJsonWebKey(set: string, kid: string, jsonWebKey?: JsonWebKey, options?: AxiosRequestConfig): AxiosPromise; + + /** + * 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. + * @summary Update a JSON Web Key Set + * @param {string} set The JSON Web Key Set ID + * @param {JsonWebKeySet} [jsonWebKeySet] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApiInterface + */ + setJsonWebKeySet(set: string, jsonWebKeySet?: JsonWebKeySet, options?: AxiosRequestConfig): AxiosPromise; + +} + +/** + * JwkApi - object-oriented interface + * @export + * @class JwkApi + * @extends {BaseAPI} + */ +export class JwkApi extends BaseAPI implements JwkApiInterface { + /** + * 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. + * @summary Create JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {CreateJsonWebKeySet} createJsonWebKeySet + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApi + */ + public createJsonWebKeySet(set: string, createJsonWebKeySet: CreateJsonWebKeySet, options?: AxiosRequestConfig) { + return JwkApiFp(this.configuration).createJsonWebKeySet(set, createJsonWebKeySet, options).then((request) => request(this.axios, this.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. + * @summary Delete JSON Web Key + * @param {string} set The JSON Web Key Set + * @param {string} kid The JSON Web Key ID (kid) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApi + */ + public deleteJsonWebKey(set: string, kid: string, options?: AxiosRequestConfig) { + return JwkApiFp(this.configuration).deleteJsonWebKey(set, kid, options).then((request) => request(this.axios, this.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. + * @summary Delete JSON Web Key Set + * @param {string} set The JSON Web Key Set + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApi + */ + public deleteJsonWebKeySet(set: string, options?: AxiosRequestConfig) { + return JwkApiFp(this.configuration).deleteJsonWebKeySet(set, options).then((request) => request(this.axios, this.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). + * @summary Get JSON Web Key + * @param {string} set JSON Web Key Set ID + * @param {string} kid JSON Web Key ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApi + */ + public getJsonWebKey(set: string, kid: string, options?: AxiosRequestConfig) { + return JwkApiFp(this.configuration).getJsonWebKey(set, kid, options).then((request) => request(this.axios, this.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. + * @summary Retrieve a JSON Web Key Set + * @param {string} set JSON Web Key Set ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApi + */ + public getJsonWebKeySet(set: string, options?: AxiosRequestConfig) { + return JwkApiFp(this.configuration).getJsonWebKeySet(set, options).then((request) => request(this.axios, this.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. + * @summary Set JSON Web Key + * @param {string} set The JSON Web Key Set ID + * @param {string} kid JSON Web Key ID + * @param {JsonWebKey} [jsonWebKey] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApi + */ + public setJsonWebKey(set: string, kid: string, jsonWebKey?: JsonWebKey, options?: AxiosRequestConfig) { + return JwkApiFp(this.configuration).setJsonWebKey(set, kid, jsonWebKey, options).then((request) => request(this.axios, this.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. + * @summary Update a JSON Web Key Set + * @param {string} set The JSON Web Key Set ID + * @param {JsonWebKeySet} [jsonWebKeySet] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof JwkApi + */ + public setJsonWebKeySet(set: string, jsonWebKeySet?: JsonWebKeySet, options?: AxiosRequestConfig) { + return JwkApiFp(this.configuration).setJsonWebKeySet(set, jsonWebKeySet, options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * MetadataApi - axios parameter creator + * @export + */ +export const MetadataApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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. + * @summary Return Running Software Version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getVersion: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/version`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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. + * @summary Check HTTP Server Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + isAlive: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/health/alive`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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. + * @summary Check HTTP Server and Database Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + isReady: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/health/ready`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * MetadataApi - functional programming interface + * @export + */ +export const MetadataApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = MetadataApiAxiosParamCreator(configuration) + return { + /** + * 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. + * @summary Return Running Software Version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getVersion(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getVersion(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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. + * @summary Check HTTP Server Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async isAlive(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.isAlive(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * 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. + * @summary Check HTTP Server and Database Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async isReady(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.isReady(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * MetadataApi - factory interface + * @export + */ +export const MetadataApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = MetadataApiFp(configuration) + return { + /** + * 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. + * @summary Return Running Software Version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getVersion(options?: any): AxiosPromise { + return localVarFp.getVersion(options).then((request) => request(axios, 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. + * @summary Check HTTP Server Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + isAlive(options?: any): AxiosPromise { + return localVarFp.isAlive(options).then((request) => request(axios, 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. + * @summary Check HTTP Server and Database Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + isReady(options?: any): AxiosPromise { + return localVarFp.isReady(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * MetadataApi - interface + * @export + * @interface MetadataApi + */ +export interface MetadataApiInterface { + /** + * 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. + * @summary Return Running Software Version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetadataApiInterface + */ + getVersion(options?: AxiosRequestConfig): AxiosPromise; + + /** + * 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. + * @summary Check HTTP Server Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetadataApiInterface + */ + isAlive(options?: AxiosRequestConfig): AxiosPromise; + + /** + * 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. + * @summary Check HTTP Server and Database Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetadataApiInterface + */ + isReady(options?: AxiosRequestConfig): AxiosPromise; + +} + +/** + * MetadataApi - object-oriented interface + * @export + * @class MetadataApi + * @extends {BaseAPI} + */ +export class MetadataApi extends BaseAPI implements MetadataApiInterface { + /** + * 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. + * @summary Return Running Software Version. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetadataApi + */ + public getVersion(options?: AxiosRequestConfig) { + return MetadataApiFp(this.configuration).getVersion(options).then((request) => request(this.axios, this.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. + * @summary Check HTTP Server Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetadataApi + */ + public isAlive(options?: AxiosRequestConfig) { + return MetadataApiFp(this.configuration).isAlive(options).then((request) => request(this.axios, this.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. + * @summary Check HTTP Server and Database Status + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof MetadataApi + */ + public isReady(options?: AxiosRequestConfig) { + return MetadataApiFp(this.configuration).isReady(options).then((request) => request(this.axios, this.basePath)); + } +} + + +/** + * OAuth2Api - axios parameter creator + * @export + */ +export const OAuth2ApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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. + * @summary Accept OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {AcceptOAuth2ConsentRequest} [acceptOAuth2ConsentRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + acceptOAuth2ConsentRequest: async (consentChallenge: string, acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'consentChallenge' is not null or undefined + assertParamExists('acceptOAuth2ConsentRequest', 'consentChallenge', consentChallenge) + const localVarPath = `/admin/oauth2/auth/requests/consent/accept`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (consentChallenge !== undefined) { + localVarQueryParameter['consent_challenge'] = consentChallenge; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(acceptOAuth2ConsentRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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. + * @summary Accept OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {AcceptOAuth2LoginRequest} [acceptOAuth2LoginRequest] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + acceptOAuth2LoginRequest: async (loginChallenge: string, acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'loginChallenge' is not null or undefined + assertParamExists('acceptOAuth2LoginRequest', 'loginChallenge', loginChallenge) + const localVarPath = `/admin/oauth2/auth/requests/login/accept`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (loginChallenge !== undefined) { + localVarQueryParameter['login_challenge'] = loginChallenge; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(acceptOAuth2LoginRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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. + * @summary Accept OAuth 2.0 Session Logout Request + * @param {string} logoutChallenge OAuth 2.0 Logout Request Challenge + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + acceptOAuth2LogoutRequest: async (logoutChallenge: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'logoutChallenge' is not null or undefined + assertParamExists('acceptOAuth2LogoutRequest', 'logoutChallenge', logoutChallenge) + const localVarPath = `/admin/oauth2/auth/requests/logout/accept`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + if (logoutChallenge !== undefined) { + localVarQueryParameter['logout_challenge'] = logoutChallenge; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2548,16 +2874,16 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - * @summary Get a Login Request - * @param {string} loginChallenge + * 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. + * @summary Create OAuth 2.0 Client + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getLoginRequest: async (loginChallenge: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'loginChallenge' is not null or undefined - assertParamExists('getLoginRequest', 'loginChallenge', loginChallenge) - const localVarPath = `/oauth2/auth/requests/login`; + createOAuth2Client: async (oAuth2Client: OAuth2Client, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'oAuth2Client' is not null or undefined + assertParamExists('createOAuth2Client', 'oAuth2Client', oAuth2Client) + const localVarPath = `/admin/clients`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2565,14 +2891,47 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (loginChallenge !== undefined) { - localVarQueryParameter['login_challenge'] = loginChallenge; + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(oAuth2Client, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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. + * @summary Delete OAuth 2.0 Client + * @param {string} id The id of the OAuth 2.0 Client. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteOAuth2Client: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteOAuth2Client', 'id', id) + const localVarPath = `/admin/clients/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2585,16 +2944,16 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Use this endpoint to fetch a logout request. - * @summary Get a Logout Request - * @param {string} logoutChallenge + * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + * @summary Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + * @param {string} clientId OAuth 2.0 Client ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getLogoutRequest: async (logoutChallenge: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'logoutChallenge' is not null or undefined - assertParamExists('getLogoutRequest', 'logoutChallenge', logoutChallenge) - const localVarPath = `/oauth2/auth/requests/logout`; + deleteOAuth2Token: async (clientId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'clientId' is not null or undefined + assertParamExists('deleteOAuth2Token', 'clientId', clientId) + const localVarPath = `/admin/oauth2/tokens`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2602,14 +2961,48 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (logoutChallenge !== undefined) { - localVarQueryParameter['logout_challenge'] = logoutChallenge; + if (clientId !== undefined) { + localVarQueryParameter['client_id'] = clientId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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. + * @summary Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + * @param {string} id The id of the desired grant + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTrustedOAuth2JwtGrantIssuer: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteTrustedOAuth2JwtGrantIssuer', 'id', id) + const localVarPath = `/admin/trust/grants/jwt-bearer/issuers/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; } + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2631,7 +3024,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration getOAuth2Client: async (id: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getOAuth2Client', 'id', id) - const localVarPath = `/clients/{id}` + const localVarPath = `/admin/clients/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2656,17 +3049,16 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. - * @summary Get a Trusted OAuth2 JWT Bearer Grant Type Issuer - * @param {string} id The id of the desired grant + * 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. + * @summary Get OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTrustedJwtGrantIssuer: async (id: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getTrustedJwtGrantIssuer', 'id', id) - const localVarPath = `/trust/grants/jwt-bearer/issuers/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); + getOAuth2ConsentRequest: async (consentChallenge: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'consentChallenge' is not null or undefined + assertParamExists('getOAuth2ConsentRequest', 'consentChallenge', consentChallenge) + const localVarPath = `/admin/oauth2/auth/requests/consent`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2678,6 +3070,10 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + if (consentChallenge !== undefined) { + localVarQueryParameter['consent_challenge'] = consentChallenge; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2690,13 +3086,16 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - * @summary Get Service Version + * 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. + * @summary Get OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getVersion: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/version`; + getOAuth2LoginRequest: async (loginChallenge: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'loginChallenge' is not null or undefined + assertParamExists('getOAuth2LoginRequest', 'loginChallenge', loginChallenge) + const localVarPath = `/admin/oauth2/auth/requests/login`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2708,6 +3107,10 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + if (loginChallenge !== undefined) { + localVarQueryParameter['login_challenge'] = loginChallenge; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -2720,17 +3123,16 @@ export const AdminApiAxiosParamCreator = function (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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @summary Introspect OAuth2 Tokens - * @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. - * @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. + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * @summary Get OAuth 2.0 Session Logout Request + * @param {string} logoutChallenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - introspectOAuth2Token: async (token: string, scope?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'token' is not null or undefined - assertParamExists('introspectOAuth2Token', 'token', token) - const localVarPath = `/oauth2/introspect`; + getOAuth2LogoutRequest: async (logoutChallenge: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'logoutChallenge' is not null or undefined + assertParamExists('getOAuth2LogoutRequest', 'logoutChallenge', logoutChallenge) + const localVarPath = `/admin/oauth2/auth/requests/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2738,27 +3140,53 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - const localVarFormParams = new URLSearchParams(); - - if (token !== undefined) { - localVarFormParams.set('token', token as any); + if (logoutChallenge !== undefined) { + localVarQueryParameter['logout_challenge'] = logoutChallenge; } + + - if (scope !== undefined) { - localVarFormParams.set('scope', scope as any); + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. + * @summary Get Trusted OAuth2 JWT Bearer Grant Type Issuer + * @param {string} id The id of the desired grant + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrustedOAuth2JwtGrantIssuer: async (id: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getTrustedOAuth2JwtGrantIssuer', 'id', id) + const localVarPath = `/admin/trust/grants/jwt-bearer/issuers/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; } - - - localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = localVarFormParams.toString(); return { url: toPathString(localVarUrlObj), @@ -2766,13 +3194,17 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * This endpoint returns a 200 status code when the HTTP server is up running. 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. - * @summary Check Alive Status + * 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. + * @summary Introspect OAuth2 Access and Refresh Tokens + * @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. + * @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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - isInstanceAlive: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/health/alive`; + introspectOAuth2Token: async (token: string, scope?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'token' is not null or undefined + assertParamExists('introspectOAuth2Token', 'token', token) + const localVarPath = `/admin/oauth2/introspect`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2780,15 +3212,27 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + const localVarFormParams = new URLSearchParams(); + if (scope !== undefined) { + localVarFormParams.set('scope', scope as any); + } + + if (token !== undefined) { + localVarFormParams.set('token', token as any); + } + + + localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams.toString(); return { url: toPathString(localVarUrlObj), @@ -2796,17 +3240,17 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. + * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. * @summary List OAuth 2.0 Clients - * @param {number} [limit] The maximum amount of clients to returned, upper bound is 500 clients. - * @param {number} [offset] The offset from where to start looking. + * @param {number} [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). + * @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). * @param {string} [clientName] The name of the clients to filter by. * @param {string} [owner] The owner of the clients to filter by. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listOAuth2Clients: async (limit?: number, offset?: number, clientName?: string, owner?: string, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/clients`; + listOAuth2Clients: async (pageSize?: number, pageToken?: string, clientName?: string, owner?: string, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/clients`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2818,12 +3262,12 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; + if (pageSize !== undefined) { + localVarQueryParameter['page_size'] = pageSize; } - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; + if (pageToken !== undefined) { + localVarQueryParameter['page_token'] = pageToken; } if (clientName !== undefined) { @@ -2846,16 +3290,18 @@ export const AdminApiAxiosParamCreator = function (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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. - * @summary Lists All Consent Sessions of a Subject - * @param {string} 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. + * @summary List OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject The subject to list the consent sessions for. + * @param {number} [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). + * @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). * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSubjectConsentSessions: async (subject: string, options: AxiosRequestConfig = {}): Promise => { + listOAuth2ConsentSessions: async (subject: string, pageSize?: number, pageToken?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'subject' is not null or undefined - assertParamExists('listSubjectConsentSessions', 'subject', subject) - const localVarPath = `/oauth2/auth/sessions/consent`; + assertParamExists('listOAuth2ConsentSessions', 'subject', subject) + const localVarPath = `/admin/oauth2/auth/sessions/consent`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2867,6 +3313,14 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + if (pageSize !== undefined) { + localVarQueryParameter['page_size'] = pageSize; + } + + if (pageToken !== undefined) { + localVarQueryParameter['page_token'] = pageToken; + } + if (subject !== undefined) { localVarQueryParameter['subject'] = subject; } @@ -2885,14 +3339,93 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration /** * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers + * @param {number} [maxItems] + * @param {number} [defaultItems] * @param {string} [issuer] If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - * @param {number} [limit] The maximum amount of policies returned, upper bound is 500 policies - * @param {number} [offset] The offset from where to start looking. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTrustedJwtGrantIssuers: async (issuer?: string, limit?: number, offset?: number, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/trust/grants/jwt-bearer/issuers`; + listTrustedOAuth2JwtGrantIssuers: async (maxItems?: number, defaultItems?: number, issuer?: string, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/trust/grants/jwt-bearer/issuers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (maxItems !== undefined) { + localVarQueryParameter['MaxItems'] = maxItems; + } + + if (defaultItems !== undefined) { + localVarQueryParameter['DefaultItems'] = defaultItems; + } + + if (issuer !== undefined) { + localVarQueryParameter['issuer'] = issuer; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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. + * @summary OAuth 2.0 Authorize Endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + oAuth2Authorize: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/oauth2/auth`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 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. + * @summary The OAuth 2.0 Token Endpoint + * @param {string} grantType + * @param {string} [clientId] + * @param {string} [code] + * @param {string} [redirectUri] + * @param {string} [refreshToken] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + oauth2TokenExchange: async (grantType: string, clientId?: string, code?: string, redirectUri?: string, refreshToken?: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'grantType' is not null or undefined + assertParamExists('oauth2TokenExchange', 'grantType', grantType) + const localVarPath = `/oauth2/token`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -2900,27 +3433,47 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + const localVarFormParams = new URLSearchParams(); - if (issuer !== undefined) { - localVarQueryParameter['issuer'] = issuer; - } - - if (limit !== undefined) { - localVarQueryParameter['limit'] = limit; - } + // authentication basic required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) - if (offset !== undefined) { - localVarQueryParameter['offset'] = offset; - } + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration) + if (clientId !== undefined) { + localVarFormParams.set('client_id', clientId as any); + } + + if (code !== undefined) { + localVarFormParams.set('code', code as any); + } + + if (grantType !== undefined) { + localVarFormParams.set('grant_type', grantType as any); + } + + if (redirectUri !== undefined) { + localVarFormParams.set('redirect_uri', redirectUri as any); + } + + if (refreshToken !== undefined) { + localVarFormParams.set('refresh_token', refreshToken as any); + } + + + localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams.toString(); return { url: toPathString(localVarUrlObj), @@ -2928,19 +3481,19 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Patch an existing OAuth 2.0 Client. 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. - * @summary Patch an 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. + * @summary Patch OAuth 2.0 Client * @param {string} id The id of the OAuth 2.0 Client. - * @param {Array} body + * @param {Array} jsonPatch OAuth 2.0 Client JSON Patch Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchOAuth2Client: async (id: string, body: Array, options: AxiosRequestConfig = {}): Promise => { + patchOAuth2Client: async (id: string, jsonPatch: Array, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('patchOAuth2Client', 'id', id) - // verify required parameter 'body' is not null or undefined - assertParamExists('patchOAuth2Client', 'body', body) - const localVarPath = `/clients/{id}` + // verify required parameter 'jsonPatch' is not null or undefined + assertParamExists('patchOAuth2Client', 'jsonPatch', jsonPatch) + const localVarPath = `/admin/clients/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -2960,7 +3513,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(jsonPatch, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -2968,17 +3521,17 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Reject a Consent Request - * @param {string} consentChallenge - * @param {RejectRequest} [body] + * 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. + * @summary Reject OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rejectConsentRequest: async (consentChallenge: string, body?: RejectRequest, options: AxiosRequestConfig = {}): Promise => { + rejectOAuth2ConsentRequest: async (consentChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'consentChallenge' is not null or undefined - assertParamExists('rejectConsentRequest', 'consentChallenge', consentChallenge) - const localVarPath = `/oauth2/auth/requests/consent/reject`; + assertParamExists('rejectOAuth2ConsentRequest', 'consentChallenge', consentChallenge) + const localVarPath = `/admin/oauth2/auth/requests/consent/reject`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3001,7 +3554,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(rejectOAuth2Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3009,17 +3562,17 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - * @summary Reject a Login Request - * @param {string} loginChallenge - * @param {RejectRequest} [body] + * 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. + * @summary Reject OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rejectLoginRequest: async (loginChallenge: string, body?: RejectRequest, options: AxiosRequestConfig = {}): Promise => { + rejectOAuth2LoginRequest: async (loginChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'loginChallenge' is not null or undefined - assertParamExists('rejectLoginRequest', 'loginChallenge', loginChallenge) - const localVarPath = `/oauth2/auth/requests/login/reject`; + assertParamExists('rejectOAuth2LoginRequest', 'loginChallenge', loginChallenge) + const localVarPath = `/admin/oauth2/auth/requests/login/reject`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3042,7 +3595,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(rejectOAuth2Request, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3050,17 +3603,16 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - * @summary Reject a 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. + * @summary Reject OAuth 2.0 Session Logout Request * @param {string} logoutChallenge - * @param {RejectRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rejectLogoutRequest: async (logoutChallenge: string, body?: RejectRequest, options: AxiosRequestConfig = {}): Promise => { + rejectOAuth2LogoutRequest: async (logoutChallenge: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'logoutChallenge' is not null or undefined - assertParamExists('rejectLogoutRequest', 'logoutChallenge', logoutChallenge) - const localVarPath = `/oauth2/auth/requests/logout/reject`; + assertParamExists('rejectOAuth2LogoutRequest', 'logoutChallenge', logoutChallenge) + const localVarPath = `/admin/oauth2/auth/requests/logout/reject`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3078,12 +3630,9 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration - localVarHeaderParameter['Content-Type'] = 'application/json'; - setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3091,16 +3640,18 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - * @summary Invalidates All Login Sessions of a Certain User Invalidates a Subject\'s Authentication Session - * @param {string} 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. + * @summary Revoke OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + * @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. + * @param {boolean} [all] Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - revokeAuthenticationSession: async (subject: string, options: AxiosRequestConfig = {}): Promise => { + revokeOAuth2ConsentSessions: async (subject: string, client?: string, all?: boolean, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'subject' is not null or undefined - assertParamExists('revokeAuthenticationSession', 'subject', subject) - const localVarPath = `/oauth2/auth/sessions/login`; + assertParamExists('revokeOAuth2ConsentSessions', 'subject', subject) + const localVarPath = `/admin/oauth2/auth/sessions/consent`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3116,6 +3667,14 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['subject'] = subject; } + if (client !== undefined) { + localVarQueryParameter['client'] = client; + } + + if (all !== undefined) { + localVarQueryParameter['all'] = all; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3128,18 +3687,16 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * This endpoint revokes a subject\'s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - * @summary Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * @param {string} subject The subject (Subject) who\'s consent sessions should be deleted. - * @param {string} [client] If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - * @param {boolean} [all] If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. + * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + * @summary Revokes All OAuth 2.0 Login Sessions of a Subject + * @param {string} subject OAuth 2.0 Subject The subject to revoke authentication sessions for. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - revokeConsentSessions: async (subject: string, client?: string, all?: boolean, options: AxiosRequestConfig = {}): Promise => { + revokeOAuth2LoginSessions: async (subject: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'subject' is not null or undefined - assertParamExists('revokeConsentSessions', 'subject', subject) - const localVarPath = `/oauth2/auth/sessions/consent`; + assertParamExists('revokeOAuth2LoginSessions', 'subject', subject) + const localVarPath = `/admin/oauth2/auth/sessions/login`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3155,14 +3712,6 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['subject'] = subject; } - if (client !== undefined) { - localVarQueryParameter['client'] = client; - } - - if (all !== undefined) { - localVarQueryParameter['all'] = all; - } - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -3175,14 +3724,16 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * 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). - * @summary Trust an OAuth2 JWT Bearer Grant Type Issuer - * @param {TrustJwtGrantIssuerBody} [body] + * 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. + * @summary Revoke OAuth 2.0 Access or Refresh Token + * @param {string} token * @param {*} [options] Override http request option. * @throws {RequiredError} */ - trustJwtGrantIssuer: async (body?: TrustJwtGrantIssuerBody, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/trust/grants/jwt-bearer/issuers`; + revokeOAuth2Token: async (token: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'token' is not null or undefined + assertParamExists('revokeOAuth2Token', 'token', token) + const localVarPath = `/oauth2/revoke`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3193,15 +3744,28 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + const localVarFormParams = new URLSearchParams(); + // authentication basic required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication oauth2 required + // oauth required + await setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration) - - localVarHeaderParameter['Content-Type'] = 'application/json'; + if (token !== undefined) { + localVarFormParams.set('token', token as any); + } + + + localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = localVarFormParams.toString(); return { url: toPathString(localVarUrlObj), @@ -3209,22 +3773,20 @@ export const AdminApiAxiosParamCreator = function (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. - * @summary Update a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set - * @param {JSONWebKey} [body] + * 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. + * @summary Set OAuth 2.0 Client + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateJsonWebKey: async (kid: string, set: string, body?: JSONWebKey, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'kid' is not null or undefined - assertParamExists('updateJsonWebKey', 'kid', kid) - // verify required parameter 'set' is not null or undefined - assertParamExists('updateJsonWebKey', 'set', set) - const localVarPath = `/keys/{set}/{kid}` - .replace(`{${"kid"}}`, encodeURIComponent(String(kid))) - .replace(`{${"set"}}`, encodeURIComponent(String(set))); + setOAuth2Client: async (id: string, oAuth2Client: OAuth2Client, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('setOAuth2Client', 'id', id) + // verify required parameter 'oAuth2Client' is not null or undefined + assertParamExists('setOAuth2Client', 'oAuth2Client', oAuth2Client) + const localVarPath = `/admin/clients/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3243,7 +3805,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(oAuth2Client, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3251,18 +3813,18 @@ export const AdminApiAxiosParamCreator = function (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. - * @summary Update a JSON Web Key Set - * @param {string} set The set - * @param {JSONWebKeySet} [body] + * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + * @summary Set OAuth2 Client Token Lifespans + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2ClientTokenLifespans} [oAuth2ClientTokenLifespans] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateJsonWebKeySet: async (set: string, body?: JSONWebKeySet, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'set' is not null or undefined - assertParamExists('updateJsonWebKeySet', 'set', set) - const localVarPath = `/keys/{set}` - .replace(`{${"set"}}`, encodeURIComponent(String(set))); + setOAuth2ClientLifespans: async (id: string, oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('setOAuth2ClientLifespans', 'id', id) + const localVarPath = `/admin/clients/{id}/lifespans` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3281,7 +3843,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(oAuth2ClientTokenLifespans, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3289,20 +3851,14 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * Update an existing OAuth 2.0 Client. 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. - * @summary Update an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body + * 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). + * @summary Trust OAuth2 JWT Bearer Grant Type Issuer + * @param {TrustOAuth2JwtGrantIssuer} [trustOAuth2JwtGrantIssuer] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateOAuth2Client: async (id: string, body: OAuth2Client, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('updateOAuth2Client', 'id', id) - // verify required parameter 'body' is not null or undefined - assertParamExists('updateOAuth2Client', 'body', body) - const localVarPath = `/clients/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); + trustOAuth2JwtGrantIssuer: async (trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/admin/trust/grants/jwt-bearer/issuers`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -3310,7 +3866,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -3321,7 +3877,7 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(trustOAuth2JwtGrantIssuer, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -3332,96 +3888,61 @@ export const AdminApiAxiosParamCreator = function (configuration?: Configuration }; /** - * AdminApi - functional programming interface + * OAuth2Api - functional programming interface * @export */ -export const AdminApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = AdminApiAxiosParamCreator(configuration) +export const OAuth2ApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = OAuth2ApiAxiosParamCreator(configuration) return { /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Accept a Consent Request - * @param {string} consentChallenge - * @param {AcceptConsentRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async acceptConsentRequest(consentChallenge: string, body?: AcceptConsentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.acceptConsentRequest(consentChallenge, body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if ORY Hydra 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. - * @summary Accept a Login Request - * @param {string} loginChallenge - * @param {AcceptLoginRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async acceptLoginRequest(loginChallenge: string, body?: AcceptLoginRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.acceptLoginRequest(loginChallenge, body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @summary Accept a Logout Request - * @param {string} logoutChallenge - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async acceptLogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.acceptLogoutRequest(logoutChallenge, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * 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. - * @summary Generate a New JSON Web Key - * @param {string} set The set - * @param {JsonWebKeySetGeneratorRequest} [body] + * 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. + * @summary Accept OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {AcceptOAuth2ConsentRequest} [acceptOAuth2ConsentRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createJsonWebKeySet(set: string, body?: JsonWebKeySetGeneratorRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createJsonWebKeySet(set, body, options); + async acceptOAuth2ConsentRequest(consentChallenge: string, acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - * @summary Create an OAuth 2.0 Client - * @param {OAuth2Client} body + * 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. + * @summary Accept OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {AcceptOAuth2LoginRequest} [acceptOAuth2LoginRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createOAuth2Client(body: OAuth2Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createOAuth2Client(body, options); + async acceptOAuth2LoginRequest(loginChallenge: string, acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * 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. - * @summary Delete a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set + * 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. + * @summary Accept OAuth 2.0 Session Logout Request + * @param {string} logoutChallenge OAuth 2.0 Logout Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteJsonWebKey(kid: string, set: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteJsonWebKey(kid, set, options); + async acceptOAuth2LogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.acceptOAuth2LogoutRequest(logoutChallenge, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * 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. - * @summary Delete a JSON Web Key Set - * @param {string} set The set + * 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. + * @summary Create OAuth 2.0 Client + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteJsonWebKeySet(set: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteJsonWebKeySet(set, options); + async createOAuth2Client(oAuth2Client: OAuth2Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOAuth2Client(oAuth2Client, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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. - * @summary Deletes an OAuth 2.0 Client + * @summary Delete OAuth 2.0 Client * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -3431,9 +3952,9 @@ export const AdminApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @summary Delete OAuth2 Access Tokens from a Client - * @param {string} clientId + * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + * @summary Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + * @param {string} clientId OAuth 2.0 Client ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -3443,381 +3964,319 @@ export const AdminApiFp = function(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. - * @summary Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer + * @summary Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * @param {string} id The id of the desired grant * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteTrustedJwtGrantIssuer(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTrustedJwtGrantIssuer(id, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - * @summary Flush Expired OAuth2 Access Tokens - * @param {FlushInactiveOAuth2TokensRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async flushInactiveOAuth2Tokens(body?: FlushInactiveOAuth2TokensRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.flushInactiveOAuth2Tokens(body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - * @summary Get Consent Request Information - * @param {string} consentChallenge - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getConsentRequest(consentChallenge: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getConsentRequest(consentChallenge, options); + async deleteTrustedOAuth2JwtGrantIssuer(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTrustedOAuth2JwtGrantIssuer(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @summary Fetch a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set + * 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. + * @summary Get an OAuth 2.0 Client + * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getJsonWebKey(kid: string, set: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getJsonWebKey(kid, set, options); + async getOAuth2Client(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2Client(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * 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. - * @summary Retrieve a JSON Web Key Set - * @param {string} set The set + * 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. + * @summary Get OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getJsonWebKeySet(set: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getJsonWebKeySet(set, options); + async getOAuth2ConsentRequest(consentChallenge: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2ConsentRequest(consentChallenge, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - * @summary Get a Login Request - * @param {string} loginChallenge + * 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. + * @summary Get OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getLoginRequest(loginChallenge: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLoginRequest(loginChallenge, options); + async getOAuth2LoginRequest(loginChallenge: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2LoginRequest(loginChallenge, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to fetch a logout request. - * @summary Get a Logout Request + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * @summary Get OAuth 2.0 Session Logout Request * @param {string} logoutChallenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getLogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getLogoutRequest(logoutChallenge, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * 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. - * @summary Get an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getOAuth2Client(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2Client(id, options); + async getOAuth2LogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOAuth2LogoutRequest(logoutChallenge, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. - * @summary Get a Trusted OAuth2 JWT Bearer Grant Type Issuer + * @summary Get Trusted OAuth2 JWT Bearer Grant Type Issuer * @param {string} id The id of the desired grant * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getTrustedJwtGrantIssuer(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getTrustedJwtGrantIssuer(id, options); + async getTrustedOAuth2JwtGrantIssuer(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTrustedOAuth2JwtGrantIssuer(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - * @summary Get Service Version + * 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. + * @summary Introspect OAuth2 Access and Refresh Tokens + * @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. + * @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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getVersion(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getVersion(options); + async introspectOAuth2Token(token: string, scope?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.introspectOAuth2Token(token, scope, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @summary Introspect OAuth2 Tokens - * @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. - * @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. + * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. + * @summary List OAuth 2.0 Clients + * @param {number} [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). + * @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). + * @param {string} [clientName] The name of the clients to filter by. + * @param {string} [owner] The owner of the clients to filter by. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async introspectOAuth2Token(token: string, scope?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.introspectOAuth2Token(token, scope, options); + async listOAuth2Clients(pageSize?: number, pageToken?: string, clientName?: string, owner?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOAuth2Clients(pageSize, pageToken, clientName, owner, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns a 200 status code when the HTTP server is up running. 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. - * @summary Check Alive Status + * 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. + * @summary List OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject The subject to list the consent sessions for. + * @param {number} [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). + * @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). * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async isInstanceAlive(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.isInstanceAlive(options); + async listOAuth2ConsentSessions(subject: string, pageSize?: number, pageToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listOAuth2ConsentSessions(subject, pageSize, pageToken, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. - * @summary List OAuth 2.0 Clients - * @param {number} [limit] The maximum amount of clients to returned, upper bound is 500 clients. - * @param {number} [offset] The offset from where to start looking. - * @param {string} [clientName] The name of the clients to filter by. - * @param {string} [owner] The owner of the clients to filter by. + * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. + * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers + * @param {number} [maxItems] + * @param {number} [defaultItems] + * @param {string} [issuer] If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listOAuth2Clients(limit?: number, offset?: number, clientName?: string, owner?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listOAuth2Clients(limit, offset, clientName, owner, options); + async listTrustedOAuth2JwtGrantIssuers(maxItems?: number, defaultItems?: number, issuer?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. - * @summary Lists All Consent Sessions of a Subject - * @param {string} subject + * 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. + * @summary OAuth 2.0 Authorize Endpoint * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listSubjectConsentSessions(subject: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listSubjectConsentSessions(subject, options); + async oAuth2Authorize(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.oAuth2Authorize(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. - * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers - * @param {string} [issuer] If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - * @param {number} [limit] The maximum amount of policies returned, upper bound is 500 policies - * @param {number} [offset] The offset from where to start looking. + * 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. + * @summary The OAuth 2.0 Token Endpoint + * @param {string} grantType + * @param {string} [clientId] + * @param {string} [code] + * @param {string} [redirectUri] + * @param {string} [refreshToken] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async listTrustedJwtGrantIssuers(issuer?: string, limit?: number, offset?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.listTrustedJwtGrantIssuers(issuer, limit, offset, options); + async oauth2TokenExchange(grantType: string, clientId?: string, code?: string, redirectUri?: string, refreshToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Patch an existing OAuth 2.0 Client. 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. - * @summary Patch an 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. + * @summary Patch OAuth 2.0 Client * @param {string} id The id of the OAuth 2.0 Client. - * @param {Array} body + * @param {Array} jsonPatch OAuth 2.0 Client JSON Patch Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async patchOAuth2Client(id: string, body: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.patchOAuth2Client(id, body, options); + async patchOAuth2Client(id: string, jsonPatch: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.patchOAuth2Client(id, jsonPatch, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Reject a Consent Request - * @param {string} consentChallenge - * @param {RejectRequest} [body] + * 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. + * @summary Reject OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async rejectConsentRequest(consentChallenge: string, body?: RejectRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.rejectConsentRequest(consentChallenge, body, options); + async rejectOAuth2ConsentRequest(consentChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - * @summary Reject a Login Request - * @param {string} loginChallenge - * @param {RejectRequest} [body] + * 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. + * @summary Reject OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async rejectLoginRequest(loginChallenge: string, body?: RejectRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.rejectLoginRequest(loginChallenge, body, options); + async rejectOAuth2LoginRequest(loginChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - * @summary Reject a 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. + * @summary Reject OAuth 2.0 Session Logout Request * @param {string} logoutChallenge - * @param {RejectRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async rejectLogoutRequest(logoutChallenge: string, body?: RejectRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.rejectLogoutRequest(logoutChallenge, body, options); + async rejectOAuth2LogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.rejectOAuth2LogoutRequest(logoutChallenge, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - * @summary Invalidates All Login Sessions of a Certain User Invalidates a Subject\'s Authentication Session - * @param {string} 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. + * @summary Revoke OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + * @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. + * @param {boolean} [all] Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async revokeAuthenticationSession(subject: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.revokeAuthenticationSession(subject, options); + async revokeOAuth2ConsentSessions(subject: string, client?: string, all?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2ConsentSessions(subject, client, all, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint revokes a subject\'s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - * @summary Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * @param {string} subject The subject (Subject) who\'s consent sessions should be deleted. - * @param {string} [client] If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - * @param {boolean} [all] If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. + * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + * @summary Revokes All OAuth 2.0 Login Sessions of a Subject + * @param {string} subject OAuth 2.0 Subject The subject to revoke authentication sessions for. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async revokeConsentSessions(subject: string, client?: string, all?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.revokeConsentSessions(subject, client, all, options); + async revokeOAuth2LoginSessions(subject: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2LoginSessions(subject, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * 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). - * @summary Trust an OAuth2 JWT Bearer Grant Type Issuer - * @param {TrustJwtGrantIssuerBody} [body] + * 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. + * @summary Revoke OAuth 2.0 Access or Refresh Token + * @param {string} token * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async trustJwtGrantIssuer(body?: TrustJwtGrantIssuerBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.trustJwtGrantIssuer(body, options); + async revokeOAuth2Token(token: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2Token(token, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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. - * @summary Update a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set - * @param {JSONWebKey} [body] + * 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. + * @summary Set OAuth 2.0 Client + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateJsonWebKey(kid: string, set: string, body?: JSONWebKey, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateJsonWebKey(kid, set, body, options); + async setOAuth2Client(id: string, oAuth2Client: OAuth2Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.setOAuth2Client(id, oAuth2Client, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, 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. - * @summary Update a JSON Web Key Set - * @param {string} set The set - * @param {JSONWebKeySet} [body] + * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + * @summary Set OAuth2 Client Token Lifespans + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2ClientTokenLifespans} [oAuth2ClientTokenLifespans] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateJsonWebKeySet(set: string, body?: JSONWebKeySet, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateJsonWebKeySet(set, body, options); + async setOAuth2ClientLifespans(id: string, oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.setOAuth2ClientLifespans(id, oAuth2ClientTokenLifespans, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * Update an existing OAuth 2.0 Client. 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. - * @summary Update an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body + * 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). + * @summary Trust OAuth2 JWT Bearer Grant Type Issuer + * @param {TrustOAuth2JwtGrantIssuer} [trustOAuth2JwtGrantIssuer] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async updateOAuth2Client(id: string, body: OAuth2Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.updateOAuth2Client(id, body, options); + async trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** - * AdminApi - factory interface + * OAuth2Api - factory interface * @export */ -export const AdminApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = AdminApiFp(configuration) +export const OAuth2ApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OAuth2ApiFp(configuration) return { /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Accept a Consent Request - * @param {string} consentChallenge - * @param {AcceptConsentRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - acceptConsentRequest(consentChallenge: string, body?: AcceptConsentRequest, options?: any): AxiosPromise { - return localVarFp.acceptConsentRequest(consentChallenge, body, options).then((request) => request(axios, basePath)); - }, - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if ORY Hydra 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. - * @summary Accept a Login Request - * @param {string} loginChallenge - * @param {AcceptLoginRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - acceptLoginRequest(loginChallenge: string, body?: AcceptLoginRequest, options?: any): AxiosPromise { - return localVarFp.acceptLoginRequest(loginChallenge, body, options).then((request) => request(axios, basePath)); - }, - /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @summary Accept a Logout Request - * @param {string} logoutChallenge - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - acceptLogoutRequest(logoutChallenge: string, options?: any): AxiosPromise { - return localVarFp.acceptLogoutRequest(logoutChallenge, options).then((request) => request(axios, basePath)); - }, - /** - * 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. - * @summary Generate a New JSON Web Key - * @param {string} set The set - * @param {JsonWebKeySetGeneratorRequest} [body] + * 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. + * @summary Accept OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {AcceptOAuth2ConsentRequest} [acceptOAuth2ConsentRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createJsonWebKeySet(set: string, body?: JsonWebKeySetGeneratorRequest, options?: any): AxiosPromise { - return localVarFp.createJsonWebKeySet(set, body, options).then((request) => request(axios, basePath)); + acceptOAuth2ConsentRequest(consentChallenge: string, acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest, options?: any): AxiosPromise { + return localVarFp.acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest, options).then((request) => request(axios, basePath)); }, /** - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - * @summary Create an OAuth 2.0 Client - * @param {OAuth2Client} body + * 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. + * @summary Accept OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {AcceptOAuth2LoginRequest} [acceptOAuth2LoginRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createOAuth2Client(body: OAuth2Client, options?: any): AxiosPromise { - return localVarFp.createOAuth2Client(body, options).then((request) => request(axios, basePath)); + acceptOAuth2LoginRequest(loginChallenge: string, acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest, options?: any): AxiosPromise { + return localVarFp.acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest, options).then((request) => request(axios, 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. - * @summary Delete a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set + * 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. + * @summary Accept OAuth 2.0 Session Logout Request + * @param {string} logoutChallenge OAuth 2.0 Logout Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteJsonWebKey(kid: string, set: string, options?: any): AxiosPromise { - return localVarFp.deleteJsonWebKey(kid, set, options).then((request) => request(axios, basePath)); + acceptOAuth2LogoutRequest(logoutChallenge: string, options?: any): AxiosPromise { + return localVarFp.acceptOAuth2LogoutRequest(logoutChallenge, options).then((request) => request(axios, 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. - * @summary Delete a JSON Web Key Set - * @param {string} set The set + * 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. + * @summary Create OAuth 2.0 Client + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - deleteJsonWebKeySet(set: string, options?: any): AxiosPromise { - return localVarFp.deleteJsonWebKeySet(set, options).then((request) => request(axios, basePath)); + createOAuth2Client(oAuth2Client: OAuth2Client, options?: any): AxiosPromise { + return localVarFp.createOAuth2Client(oAuth2Client, options).then((request) => request(axios, 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. - * @summary Deletes an OAuth 2.0 Client + * @summary Delete OAuth 2.0 Client * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -3826,85 +4285,24 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath return localVarFp.deleteOAuth2Client(id, options).then((request) => request(axios, basePath)); }, /** - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @summary Delete OAuth2 Access Tokens from a Client - * @param {string} clientId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteOAuth2Token(clientId: string, options?: any): AxiosPromise { - return localVarFp.deleteOAuth2Token(clientId, options).then((request) => request(axios, 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. - * @summary Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer - * @param {string} id The id of the desired grant - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - deleteTrustedJwtGrantIssuer(id: string, options?: any): AxiosPromise { - return localVarFp.deleteTrustedJwtGrantIssuer(id, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - * @summary Flush Expired OAuth2 Access Tokens - * @param {FlushInactiveOAuth2TokensRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - flushInactiveOAuth2Tokens(body?: FlushInactiveOAuth2TokensRequest, options?: any): AxiosPromise { - return localVarFp.flushInactiveOAuth2Tokens(body, options).then((request) => request(axios, basePath)); - }, - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - * @summary Get Consent Request Information - * @param {string} consentChallenge - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getConsentRequest(consentChallenge: string, options?: any): AxiosPromise { - return localVarFp.getConsentRequest(consentChallenge, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @summary Fetch a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getJsonWebKey(kid: string, set: string, options?: any): AxiosPromise { - return localVarFp.getJsonWebKey(kid, set, options).then((request) => request(axios, 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. - * @summary Retrieve a JSON Web Key Set - * @param {string} set The set - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getJsonWebKeySet(set: string, options?: any): AxiosPromise { - return localVarFp.getJsonWebKeySet(set, options).then((request) => request(axios, basePath)); - }, - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - * @summary Get a Login Request - * @param {string} loginChallenge + * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + * @summary Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + * @param {string} clientId OAuth 2.0 Client ID * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getLoginRequest(loginChallenge: string, options?: any): AxiosPromise { - return localVarFp.getLoginRequest(loginChallenge, options).then((request) => request(axios, basePath)); + deleteOAuth2Token(clientId: string, options?: any): AxiosPromise { + return localVarFp.deleteOAuth2Token(clientId, options).then((request) => request(axios, basePath)); }, /** - * Use this endpoint to fetch a logout request. - * @summary Get a Logout Request - * @param {string} logoutChallenge + * 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. + * @summary Delete Trusted OAuth2 JWT Bearer Grant Type Issuer + * @param {string} id The id of the desired grant * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getLogoutRequest(logoutChallenge: string, options?: any): AxiosPromise { - return localVarFp.getLogoutRequest(logoutChallenge, options).then((request) => request(axios, basePath)); + deleteTrustedOAuth2JwtGrantIssuer(id: string, options?: any): AxiosPromise { + return localVarFp.deleteTrustedOAuth2JwtGrantIssuer(id, options).then((request) => request(axios, 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. @@ -3917,1187 +4315,916 @@ export const AdminApiFactory = function (configuration?: Configuration, basePath return localVarFp.getOAuth2Client(id, options).then((request) => request(axios, 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. - * @summary Get a Trusted OAuth2 JWT Bearer Grant Type Issuer - * @param {string} id The id of the desired grant + * 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. + * @summary Get OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getTrustedJwtGrantIssuer(id: string, options?: any): AxiosPromise { - return localVarFp.getTrustedJwtGrantIssuer(id, options).then((request) => request(axios, basePath)); + getOAuth2ConsentRequest(consentChallenge: string, options?: any): AxiosPromise { + return localVarFp.getOAuth2ConsentRequest(consentChallenge, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - * @summary Get Service Version + * 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. + * @summary Get OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getVersion(options?: any): AxiosPromise { - return localVarFp.getVersion(options).then((request) => request(axios, basePath)); + getOAuth2LoginRequest(loginChallenge: string, options?: any): AxiosPromise { + return localVarFp.getOAuth2LoginRequest(loginChallenge, options).then((request) => request(axios, 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @summary Introspect OAuth2 Tokens - * @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. - * @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. + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * @summary Get OAuth 2.0 Session Logout Request + * @param {string} logoutChallenge * @param {*} [options] Override http request option. * @throws {RequiredError} */ - introspectOAuth2Token(token: string, scope?: string, options?: any): AxiosPromise { - return localVarFp.introspectOAuth2Token(token, scope, options).then((request) => request(axios, basePath)); + getOAuth2LogoutRequest(logoutChallenge: string, options?: any): AxiosPromise { + return localVarFp.getOAuth2LogoutRequest(logoutChallenge, options).then((request) => request(axios, 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. + * @summary Get Trusted OAuth2 JWT Bearer Grant Type Issuer + * @param {string} id The id of the desired grant + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTrustedOAuth2JwtGrantIssuer(id: string, options?: any): AxiosPromise { + return localVarFp.getTrustedOAuth2JwtGrantIssuer(id, options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns a 200 status code when the HTTP server is up running. 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. - * @summary Check Alive Status + * 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. + * @summary Introspect OAuth2 Access and Refresh Tokens + * @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. + * @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. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - isInstanceAlive(options?: any): AxiosPromise { - return localVarFp.isInstanceAlive(options).then((request) => request(axios, basePath)); + introspectOAuth2Token(token: string, scope?: string, options?: any): AxiosPromise { + return localVarFp.introspectOAuth2Token(token, scope, options).then((request) => request(axios, basePath)); }, /** - * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. + * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. * @summary List OAuth 2.0 Clients - * @param {number} [limit] The maximum amount of clients to returned, upper bound is 500 clients. - * @param {number} [offset] The offset from where to start looking. + * @param {number} [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). + * @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). * @param {string} [clientName] The name of the clients to filter by. * @param {string} [owner] The owner of the clients to filter by. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listOAuth2Clients(limit?: number, offset?: number, clientName?: string, owner?: string, options?: any): AxiosPromise> { - return localVarFp.listOAuth2Clients(limit, offset, clientName, owner, options).then((request) => request(axios, basePath)); + listOAuth2Clients(pageSize?: number, pageToken?: string, clientName?: string, owner?: string, options?: any): AxiosPromise> { + return localVarFp.listOAuth2Clients(pageSize, pageToken, clientName, owner, options).then((request) => request(axios, 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. - * @summary Lists All Consent Sessions of a Subject - * @param {string} 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. + * @summary List OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject The subject to list the consent sessions for. + * @param {number} [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). + * @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). * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listSubjectConsentSessions(subject: string, options?: any): AxiosPromise> { - return localVarFp.listSubjectConsentSessions(subject, options).then((request) => request(axios, basePath)); + listOAuth2ConsentSessions(subject: string, pageSize?: number, pageToken?: string, options?: any): AxiosPromise> { + return localVarFp.listOAuth2ConsentSessions(subject, pageSize, pageToken, options).then((request) => request(axios, basePath)); }, /** * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers + * @param {number} [maxItems] + * @param {number} [defaultItems] * @param {string} [issuer] If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - * @param {number} [limit] The maximum amount of policies returned, upper bound is 500 policies - * @param {number} [offset] The offset from where to start looking. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listTrustedJwtGrantIssuers(issuer?: string, limit?: number, offset?: number, options?: any): AxiosPromise> { - return localVarFp.listTrustedJwtGrantIssuers(issuer, limit, offset, options).then((request) => request(axios, basePath)); + listTrustedOAuth2JwtGrantIssuers(maxItems?: number, defaultItems?: number, issuer?: string, options?: any): AxiosPromise> { + return localVarFp.listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer, options).then((request) => request(axios, 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. + * @summary OAuth 2.0 Authorize Endpoint + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + oAuth2Authorize(options?: any): AxiosPromise { + return localVarFp.oAuth2Authorize(options).then((request) => request(axios, 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. + * @summary The OAuth 2.0 Token Endpoint + * @param {string} grantType + * @param {string} [clientId] + * @param {string} [code] + * @param {string} [redirectUri] + * @param {string} [refreshToken] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + oauth2TokenExchange(grantType: string, clientId?: string, code?: string, redirectUri?: string, refreshToken?: string, options?: any): AxiosPromise { + return localVarFp.oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken, options).then((request) => request(axios, basePath)); }, /** - * Patch an existing OAuth 2.0 Client. 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. - * @summary Patch an 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. + * @summary Patch OAuth 2.0 Client * @param {string} id The id of the OAuth 2.0 Client. - * @param {Array} body + * @param {Array} jsonPatch OAuth 2.0 Client JSON Patch Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - patchOAuth2Client(id: string, body: Array, options?: any): AxiosPromise { - return localVarFp.patchOAuth2Client(id, body, options).then((request) => request(axios, basePath)); + patchOAuth2Client(id: string, jsonPatch: Array, options?: any): AxiosPromise { + return localVarFp.patchOAuth2Client(id, jsonPatch, options).then((request) => request(axios, basePath)); }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Reject a Consent Request - * @param {string} consentChallenge - * @param {RejectRequest} [body] + * 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. + * @summary Reject OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rejectConsentRequest(consentChallenge: string, body?: RejectRequest, options?: any): AxiosPromise { - return localVarFp.rejectConsentRequest(consentChallenge, body, options).then((request) => request(axios, basePath)); + rejectOAuth2ConsentRequest(consentChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: any): AxiosPromise { + return localVarFp.rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request, options).then((request) => request(axios, basePath)); }, /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - * @summary Reject a Login Request - * @param {string} loginChallenge - * @param {RejectRequest} [body] + * 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. + * @summary Reject OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rejectLoginRequest(loginChallenge: string, body?: RejectRequest, options?: any): AxiosPromise { - return localVarFp.rejectLoginRequest(loginChallenge, body, options).then((request) => request(axios, basePath)); + rejectOAuth2LoginRequest(loginChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: any): AxiosPromise { + return localVarFp.rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request, options).then((request) => request(axios, basePath)); }, /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - * @summary Reject a 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. + * @summary Reject OAuth 2.0 Session Logout Request * @param {string} logoutChallenge - * @param {RejectRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - rejectLogoutRequest(logoutChallenge: string, body?: RejectRequest, options?: any): AxiosPromise { - return localVarFp.rejectLogoutRequest(logoutChallenge, body, options).then((request) => request(axios, basePath)); + rejectOAuth2LogoutRequest(logoutChallenge: string, options?: any): AxiosPromise { + return localVarFp.rejectOAuth2LogoutRequest(logoutChallenge, options).then((request) => request(axios, basePath)); }, /** - * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - * @summary Invalidates All Login Sessions of a Certain User Invalidates a Subject\'s Authentication Session - * @param {string} 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. + * @summary Revoke OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + * @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. + * @param {boolean} [all] Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - revokeAuthenticationSession(subject: string, options?: any): AxiosPromise { - return localVarFp.revokeAuthenticationSession(subject, options).then((request) => request(axios, basePath)); + revokeOAuth2ConsentSessions(subject: string, client?: string, all?: boolean, options?: any): AxiosPromise { + return localVarFp.revokeOAuth2ConsentSessions(subject, client, all, options).then((request) => request(axios, basePath)); }, /** - * This endpoint revokes a subject\'s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - * @summary Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * @param {string} subject The subject (Subject) who\'s consent sessions should be deleted. - * @param {string} [client] If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - * @param {boolean} [all] If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. + * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + * @summary Revokes All OAuth 2.0 Login Sessions of a Subject + * @param {string} subject OAuth 2.0 Subject The subject to revoke authentication sessions for. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - revokeConsentSessions(subject: string, client?: string, all?: boolean, options?: any): AxiosPromise { - return localVarFp.revokeConsentSessions(subject, client, all, options).then((request) => request(axios, basePath)); + revokeOAuth2LoginSessions(subject: string, options?: any): AxiosPromise { + return localVarFp.revokeOAuth2LoginSessions(subject, options).then((request) => request(axios, 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). - * @summary Trust an OAuth2 JWT Bearer Grant Type Issuer - * @param {TrustJwtGrantIssuerBody} [body] + * 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. + * @summary Revoke OAuth 2.0 Access or Refresh Token + * @param {string} token * @param {*} [options] Override http request option. * @throws {RequiredError} */ - trustJwtGrantIssuer(body?: TrustJwtGrantIssuerBody, options?: any): AxiosPromise { - return localVarFp.trustJwtGrantIssuer(body, options).then((request) => request(axios, basePath)); + revokeOAuth2Token(token: string, options?: any): AxiosPromise { + return localVarFp.revokeOAuth2Token(token, options).then((request) => request(axios, 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. - * @summary Update a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set - * @param {JSONWebKey} [body] + * 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. + * @summary Set OAuth 2.0 Client + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateJsonWebKey(kid: string, set: string, body?: JSONWebKey, options?: any): AxiosPromise { - return localVarFp.updateJsonWebKey(kid, set, body, options).then((request) => request(axios, basePath)); + setOAuth2Client(id: string, oAuth2Client: OAuth2Client, options?: any): AxiosPromise { + return localVarFp.setOAuth2Client(id, oAuth2Client, options).then((request) => request(axios, 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. - * @summary Update a JSON Web Key Set - * @param {string} set The set - * @param {JSONWebKeySet} [body] + * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + * @summary Set OAuth2 Client Token Lifespans + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2ClientTokenLifespans} [oAuth2ClientTokenLifespans] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateJsonWebKeySet(set: string, body?: JSONWebKeySet, options?: any): AxiosPromise { - return localVarFp.updateJsonWebKeySet(set, body, options).then((request) => request(axios, basePath)); + setOAuth2ClientLifespans(id: string, oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans, options?: any): AxiosPromise { + return localVarFp.setOAuth2ClientLifespans(id, oAuth2ClientTokenLifespans, options).then((request) => request(axios, basePath)); }, /** - * Update an existing OAuth 2.0 Client. 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. - * @summary Update an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body + * 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). + * @summary Trust OAuth2 JWT Bearer Grant Type Issuer + * @param {TrustOAuth2JwtGrantIssuer} [trustOAuth2JwtGrantIssuer] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - updateOAuth2Client(id: string, body: OAuth2Client, options?: any): AxiosPromise { - return localVarFp.updateOAuth2Client(id, body, options).then((request) => request(axios, basePath)); + trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer, options?: any): AxiosPromise { + return localVarFp.trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer, options).then((request) => request(axios, basePath)); }, }; }; /** - * AdminApi - interface + * OAuth2Api - interface * @export - * @interface AdminApi + * @interface OAuth2Api */ -export interface AdminApiInterface { - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Accept a Consent Request - * @param {string} consentChallenge - * @param {AcceptConsentRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApiInterface - */ - acceptConsentRequest(consentChallenge: string, body?: AcceptConsentRequest, options?: AxiosRequestConfig): AxiosPromise; - - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if ORY Hydra 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. - * @summary Accept a Login Request - * @param {string} loginChallenge - * @param {AcceptLoginRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApiInterface - */ - acceptLoginRequest(loginChallenge: string, body?: AcceptLoginRequest, options?: AxiosRequestConfig): AxiosPromise; - - /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @summary Accept a Logout Request - * @param {string} logoutChallenge - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApiInterface - */ - acceptLogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): AxiosPromise; - +export interface OAuth2ApiInterface { /** - * 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. - * @summary Generate a New JSON Web Key - * @param {string} set The set - * @param {JsonWebKeySetGeneratorRequest} [body] + * 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. + * @summary Accept OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {AcceptOAuth2ConsentRequest} [acceptOAuth2ConsentRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - createJsonWebKeySet(set: string, body?: JsonWebKeySetGeneratorRequest, options?: AxiosRequestConfig): AxiosPromise; + acceptOAuth2ConsentRequest(consentChallenge: string, acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest, options?: AxiosRequestConfig): AxiosPromise; /** - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - * @summary Create an OAuth 2.0 Client - * @param {OAuth2Client} body + * 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. + * @summary Accept OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {AcceptOAuth2LoginRequest} [acceptOAuth2LoginRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - createOAuth2Client(body: OAuth2Client, options?: AxiosRequestConfig): AxiosPromise; + acceptOAuth2LoginRequest(loginChallenge: string, acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest, options?: AxiosRequestConfig): AxiosPromise; /** - * 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. - * @summary Delete a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set + * 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. + * @summary Accept OAuth 2.0 Session Logout Request + * @param {string} logoutChallenge OAuth 2.0 Logout Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - deleteJsonWebKey(kid: string, set: string, options?: AxiosRequestConfig): AxiosPromise; + acceptOAuth2LogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): AxiosPromise; /** - * 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. - * @summary Delete a JSON Web Key Set - * @param {string} set The set + * 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. + * @summary Create OAuth 2.0 Client + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - deleteJsonWebKeySet(set: string, options?: AxiosRequestConfig): AxiosPromise; + createOAuth2Client(oAuth2Client: OAuth2Client, options?: AxiosRequestConfig): AxiosPromise; /** * 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. - * @summary Deletes an OAuth 2.0 Client + * @summary Delete OAuth 2.0 Client * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ deleteOAuth2Client(id: string, options?: AxiosRequestConfig): AxiosPromise; /** - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @summary Delete OAuth2 Access Tokens from a Client - * @param {string} clientId + * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + * @summary Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + * @param {string} clientId OAuth 2.0 Client ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ deleteOAuth2Token(clientId: string, options?: AxiosRequestConfig): AxiosPromise; /** * 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. - * @summary Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer + * @summary Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * @param {string} id The id of the desired grant * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface - */ - deleteTrustedJwtGrantIssuer(id: string, options?: AxiosRequestConfig): AxiosPromise; - - /** - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - * @summary Flush Expired OAuth2 Access Tokens - * @param {FlushInactiveOAuth2TokensRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApiInterface - */ - flushInactiveOAuth2Tokens(body?: FlushInactiveOAuth2TokensRequest, options?: AxiosRequestConfig): AxiosPromise; - - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - * @summary Get Consent Request Information - * @param {string} consentChallenge - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - getConsentRequest(consentChallenge: string, options?: AxiosRequestConfig): AxiosPromise; + deleteTrustedOAuth2JwtGrantIssuer(id: string, options?: AxiosRequestConfig): AxiosPromise; /** - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @summary Fetch a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set + * 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. + * @summary Get an OAuth 2.0 Client + * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - getJsonWebKey(kid: string, set: string, options?: AxiosRequestConfig): AxiosPromise; + getOAuth2Client(id: string, options?: AxiosRequestConfig): AxiosPromise; /** - * 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. - * @summary Retrieve a JSON Web Key Set - * @param {string} set The set + * 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. + * @summary Get OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - getJsonWebKeySet(set: string, options?: AxiosRequestConfig): AxiosPromise; + getOAuth2ConsentRequest(consentChallenge: string, options?: AxiosRequestConfig): AxiosPromise; /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - * @summary Get a Login Request - * @param {string} loginChallenge + * 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. + * @summary Get OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - getLoginRequest(loginChallenge: string, options?: AxiosRequestConfig): AxiosPromise; + getOAuth2LoginRequest(loginChallenge: string, options?: AxiosRequestConfig): AxiosPromise; /** - * Use this endpoint to fetch a logout request. - * @summary Get a Logout Request + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * @summary Get OAuth 2.0 Session Logout Request * @param {string} logoutChallenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface - */ - getLogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): AxiosPromise; - - /** - * 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. - * @summary Get an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - getOAuth2Client(id: string, options?: AxiosRequestConfig): AxiosPromise; + getOAuth2LogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): AxiosPromise; /** * Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. - * @summary Get a Trusted OAuth2 JWT Bearer Grant Type Issuer + * @summary Get Trusted OAuth2 JWT Bearer Grant Type Issuer * @param {string} id The id of the desired grant * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface - */ - getTrustedJwtGrantIssuer(id: string, options?: AxiosRequestConfig): AxiosPromise; - - /** - * This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - * @summary Get Service Version - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - getVersion(options?: AxiosRequestConfig): AxiosPromise; + getTrustedOAuth2JwtGrantIssuer(id: string, options?: AxiosRequestConfig): AxiosPromise; /** - * 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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @summary Introspect OAuth2 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. + * @summary Introspect OAuth2 Access and Refresh Tokens * @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. * @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. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface - */ - introspectOAuth2Token(token: string, scope?: string, options?: AxiosRequestConfig): AxiosPromise; - - /** - * This endpoint returns a 200 status code when the HTTP server is up running. 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. - * @summary Check Alive Status - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - isInstanceAlive(options?: AxiosRequestConfig): AxiosPromise; + introspectOAuth2Token(token: string, scope?: string, options?: AxiosRequestConfig): AxiosPromise; /** - * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. + * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. * @summary List OAuth 2.0 Clients - * @param {number} [limit] The maximum amount of clients to returned, upper bound is 500 clients. - * @param {number} [offset] The offset from where to start looking. + * @param {number} [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). + * @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). * @param {string} [clientName] The name of the clients to filter by. * @param {string} [owner] The owner of the clients to filter by. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - listOAuth2Clients(limit?: number, offset?: number, clientName?: string, owner?: string, options?: AxiosRequestConfig): AxiosPromise>; + listOAuth2Clients(pageSize?: number, pageToken?: string, clientName?: string, owner?: string, options?: AxiosRequestConfig): AxiosPromise>; /** - * 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. - * @summary Lists All Consent Sessions of a Subject - * @param {string} 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. + * @summary List OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject The subject to list the consent sessions for. + * @param {number} [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). + * @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). * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - listSubjectConsentSessions(subject: string, options?: AxiosRequestConfig): AxiosPromise>; + listOAuth2ConsentSessions(subject: string, pageSize?: number, pageToken?: string, options?: AxiosRequestConfig): AxiosPromise>; /** * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers + * @param {number} [maxItems] + * @param {number} [defaultItems] * @param {string} [issuer] If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - * @param {number} [limit] The maximum amount of policies returned, upper bound is 500 policies - * @param {number} [offset] The offset from where to start looking. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - listTrustedJwtGrantIssuers(issuer?: string, limit?: number, offset?: number, options?: AxiosRequestConfig): AxiosPromise>; + listTrustedOAuth2JwtGrantIssuers(maxItems?: number, defaultItems?: number, issuer?: string, options?: AxiosRequestConfig): AxiosPromise>; /** - * Patch an existing OAuth 2.0 Client. 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. - * @summary Patch an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {Array} body + * 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. + * @summary OAuth 2.0 Authorize Endpoint * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - patchOAuth2Client(id: string, body: Array, options?: AxiosRequestConfig): AxiosPromise; + oAuth2Authorize(options?: AxiosRequestConfig): AxiosPromise; /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Reject a Consent Request - * @param {string} consentChallenge - * @param {RejectRequest} [body] + * 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. + * @summary The OAuth 2.0 Token Endpoint + * @param {string} grantType + * @param {string} [clientId] + * @param {string} [code] + * @param {string} [redirectUri] + * @param {string} [refreshToken] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - rejectConsentRequest(consentChallenge: string, body?: RejectRequest, options?: AxiosRequestConfig): AxiosPromise; + oauth2TokenExchange(grantType: string, clientId?: string, code?: string, redirectUri?: string, refreshToken?: string, options?: AxiosRequestConfig): AxiosPromise; /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - * @summary Reject a Login Request - * @param {string} loginChallenge - * @param {RejectRequest} [body] + * 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. + * @summary Patch OAuth 2.0 Client + * @param {string} id The id of the OAuth 2.0 Client. + * @param {Array} jsonPatch OAuth 2.0 Client JSON Patch Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - rejectLoginRequest(loginChallenge: string, body?: RejectRequest, options?: AxiosRequestConfig): AxiosPromise; + patchOAuth2Client(id: string, jsonPatch: Array, options?: AxiosRequestConfig): AxiosPromise; /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - * @summary Reject a Logout Request - * @param {string} logoutChallenge - * @param {RejectRequest} [body] + * 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. + * @summary Reject OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - rejectLogoutRequest(logoutChallenge: string, body?: RejectRequest, options?: AxiosRequestConfig): AxiosPromise; + rejectOAuth2ConsentRequest(consentChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: AxiosRequestConfig): AxiosPromise; /** - * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - * @summary Invalidates All Login Sessions of a Certain User Invalidates a Subject\'s Authentication Session - * @param {string} subject + * 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. + * @summary Reject OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - revokeAuthenticationSession(subject: string, options?: AxiosRequestConfig): AxiosPromise; + rejectOAuth2LoginRequest(loginChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: AxiosRequestConfig): AxiosPromise; /** - * This endpoint revokes a subject\'s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - * @summary Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * @param {string} subject The subject (Subject) who\'s consent sessions should be deleted. - * @param {string} [client] If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - * @param {boolean} [all] If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. + * 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. + * @summary Reject OAuth 2.0 Session Logout Request + * @param {string} logoutChallenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - revokeConsentSessions(subject: string, client?: string, all?: boolean, options?: AxiosRequestConfig): AxiosPromise; + rejectOAuth2LogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig): AxiosPromise; /** - * 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). - * @summary Trust an OAuth2 JWT Bearer Grant Type Issuer - * @param {TrustJwtGrantIssuerBody} [body] + * 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. + * @summary Revoke OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + * @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. + * @param {boolean} [all] Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - trustJwtGrantIssuer(body?: TrustJwtGrantIssuerBody, options?: AxiosRequestConfig): AxiosPromise; + revokeOAuth2ConsentSessions(subject: string, client?: string, all?: boolean, options?: AxiosRequestConfig): AxiosPromise; /** - * 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. - * @summary Update a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set - * @param {JSONWebKey} [body] + * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + * @summary Revokes All OAuth 2.0 Login Sessions of a Subject + * @param {string} subject OAuth 2.0 Subject The subject to revoke authentication sessions for. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - updateJsonWebKey(kid: string, set: string, body?: JSONWebKey, options?: AxiosRequestConfig): AxiosPromise; + revokeOAuth2LoginSessions(subject: string, options?: AxiosRequestConfig): AxiosPromise; /** - * 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. - * @summary Update a JSON Web Key Set - * @param {string} set The set - * @param {JSONWebKeySet} [body] + * 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. + * @summary Revoke OAuth 2.0 Access or Refresh Token + * @param {string} token * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - updateJsonWebKeySet(set: string, body?: JSONWebKeySet, options?: AxiosRequestConfig): AxiosPromise; + revokeOAuth2Token(token: string, options?: AxiosRequestConfig): AxiosPromise; /** - * Update an existing OAuth 2.0 Client. 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. - * @summary Update an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body + * 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. + * @summary Set OAuth 2.0 Client + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApiInterface + * @memberof OAuth2ApiInterface */ - updateOAuth2Client(id: string, body: OAuth2Client, options?: AxiosRequestConfig): AxiosPromise; - -} + setOAuth2Client(id: string, oAuth2Client: OAuth2Client, options?: AxiosRequestConfig): AxiosPromise; -/** - * AdminApi - object-oriented interface - * @export - * @class AdminApi - * @extends {BaseAPI} - */ -export class AdminApi extends BaseAPI implements AdminApiInterface { /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Accept a Consent Request - * @param {string} consentChallenge - * @param {AcceptConsentRequest} [body] + * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + * @summary Set OAuth2 Client Token Lifespans + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2ClientTokenLifespans} [oAuth2ClientTokenLifespans] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2ApiInterface */ - public acceptConsentRequest(consentChallenge: string, body?: AcceptConsentRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).acceptConsentRequest(consentChallenge, body, options).then((request) => request(this.axios, this.basePath)); - } + setOAuth2ClientLifespans(id: string, oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans, options?: AxiosRequestConfig): AxiosPromise; /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject\'s ID and if ORY Hydra 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. - * @summary Accept a Login Request - * @param {string} loginChallenge - * @param {AcceptLoginRequest} [body] + * 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). + * @summary Trust OAuth2 JWT Bearer Grant Type Issuer + * @param {TrustOAuth2JwtGrantIssuer} [trustOAuth2JwtGrantIssuer] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2ApiInterface */ - public acceptLoginRequest(loginChallenge: string, body?: AcceptLoginRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).acceptLoginRequest(loginChallenge, body, options).then((request) => request(this.axios, this.basePath)); - } + trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer, options?: AxiosRequestConfig): AxiosPromise; - /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to. - * @summary Accept a Logout Request - * @param {string} logoutChallenge - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public acceptLogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).acceptLogoutRequest(logoutChallenge, options).then((request) => request(this.axios, this.basePath)); - } +} +/** + * OAuth2Api - object-oriented interface + * @export + * @class OAuth2Api + * @extends {BaseAPI} + */ +export class OAuth2Api extends BaseAPI implements OAuth2ApiInterface { /** - * 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. - * @summary Generate a New JSON Web Key - * @param {string} set The set - * @param {JsonWebKeySetGeneratorRequest} [body] + * 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. + * @summary Accept OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {AcceptOAuth2ConsentRequest} [acceptOAuth2ConsentRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public createJsonWebKeySet(set: string, body?: JsonWebKeySetGeneratorRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).createJsonWebKeySet(set, body, options).then((request) => request(this.axios, this.basePath)); + public acceptOAuth2ConsentRequest(consentChallenge: string, acceptOAuth2ConsentRequest?: AcceptOAuth2ConsentRequest, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).acceptOAuth2ConsentRequest(consentChallenge, acceptOAuth2ConsentRequest, options).then((request) => request(this.axios, this.basePath)); } /** - * Create a new OAuth 2.0 client If you pass `client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. - * @summary Create an OAuth 2.0 Client - * @param {OAuth2Client} body + * 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. + * @summary Accept OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {AcceptOAuth2LoginRequest} [acceptOAuth2LoginRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public createOAuth2Client(body: OAuth2Client, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).createOAuth2Client(body, options).then((request) => request(this.axios, this.basePath)); + public acceptOAuth2LoginRequest(loginChallenge: string, acceptOAuth2LoginRequest?: AcceptOAuth2LoginRequest, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).acceptOAuth2LoginRequest(loginChallenge, acceptOAuth2LoginRequest, options).then((request) => request(this.axios, this.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. - * @summary Delete a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set + * 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. + * @summary Accept OAuth 2.0 Session Logout Request + * @param {string} logoutChallenge OAuth 2.0 Logout Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public deleteJsonWebKey(kid: string, set: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).deleteJsonWebKey(kid, set, options).then((request) => request(this.axios, this.basePath)); + public acceptOAuth2LogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).acceptOAuth2LogoutRequest(logoutChallenge, options).then((request) => request(this.axios, this.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. - * @summary Delete a JSON Web Key Set - * @param {string} set The set + * 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. + * @summary Create OAuth 2.0 Client + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public deleteJsonWebKeySet(set: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).deleteJsonWebKeySet(set, options).then((request) => request(this.axios, this.basePath)); + public createOAuth2Client(oAuth2Client: OAuth2Client, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).createOAuth2Client(oAuth2Client, options).then((request) => request(this.axios, this.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. - * @summary Deletes an OAuth 2.0 Client + * @summary Delete OAuth 2.0 Client * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ public deleteOAuth2Client(id: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).deleteOAuth2Client(id, options).then((request) => request(this.axios, this.basePath)); + return OAuth2ApiFp(this.configuration).deleteOAuth2Client(id, options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint deletes OAuth2 access tokens issued for a client from the database - * @summary Delete OAuth2 Access Tokens from a Client - * @param {string} clientId + * This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database. + * @summary Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client + * @param {string} clientId OAuth 2.0 Client ID * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ public deleteOAuth2Token(clientId: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).deleteOAuth2Token(clientId, options).then((request) => request(this.axios, this.basePath)); + return OAuth2ApiFp(this.configuration).deleteOAuth2Token(clientId, options).then((request) => request(this.axios, this.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. - * @summary Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer + * @summary Delete Trusted OAuth2 JWT Bearer Grant Type Issuer * @param {string} id The id of the desired grant * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi - */ - public deleteTrustedJwtGrantIssuer(id: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).deleteTrustedJwtGrantIssuer(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow. - * @summary Flush Expired OAuth2 Access Tokens - * @param {FlushInactiveOAuth2TokensRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public flushInactiveOAuth2Tokens(body?: FlushInactiveOAuth2TokensRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).flushInactiveOAuth2Tokens(body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. - * @summary Get Consent Request Information - * @param {string} consentChallenge - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public getConsentRequest(consentChallenge: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getConsentRequest(consentChallenge, options).then((request) => request(this.axios, this.basePath)); + public deleteTrustedOAuth2JwtGrantIssuer(id: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).deleteTrustedOAuth2JwtGrantIssuer(id, options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid). - * @summary Fetch a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set + * 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. + * @summary Get an OAuth 2.0 Client + * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public getJsonWebKey(kid: string, set: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getJsonWebKey(kid, set, options).then((request) => request(this.axios, this.basePath)); + public getOAuth2Client(id: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).getOAuth2Client(id, options).then((request) => request(this.axios, this.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. - * @summary Retrieve a JSON Web Key Set - * @param {string} set The set + * 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. + * @summary Get OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public getJsonWebKeySet(set: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getJsonWebKeySet(set, options).then((request) => request(this.axios, this.basePath)); + public getOAuth2ConsentRequest(consentChallenge: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).getOAuth2ConsentRequest(consentChallenge, options).then((request) => request(this.axios, this.basePath)); } /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. - * @summary Get a Login Request - * @param {string} loginChallenge + * 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. + * @summary Get OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public getLoginRequest(loginChallenge: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getLoginRequest(loginChallenge, options).then((request) => request(this.axios, this.basePath)); + public getOAuth2LoginRequest(loginChallenge: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).getOAuth2LoginRequest(loginChallenge, options).then((request) => request(this.axios, this.basePath)); } /** - * Use this endpoint to fetch a logout request. - * @summary Get a Logout Request + * Use this endpoint to fetch an Ory OAuth 2.0 logout request. + * @summary Get OAuth 2.0 Session Logout Request * @param {string} logoutChallenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi - */ - public getLogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getLogoutRequest(logoutChallenge, options).then((request) => request(this.axios, this.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. - * @summary Get an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public getOAuth2Client(id: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getOAuth2Client(id, options).then((request) => request(this.axios, this.basePath)); + public getOAuth2LogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).getOAuth2LogoutRequest(logoutChallenge, options).then((request) => request(this.axios, this.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. - * @summary Get a Trusted OAuth2 JWT Bearer Grant Type Issuer + * @summary Get Trusted OAuth2 JWT Bearer Grant Type Issuer * @param {string} id The id of the desired grant * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi - */ - public getTrustedJwtGrantIssuer(id: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getTrustedJwtGrantIssuer(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. - * @summary Get Service Version - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public getVersion(options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).getVersion(options).then((request) => request(this.axios, this.basePath)); + public getTrustedOAuth2JwtGrantIssuer(id: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).getTrustedOAuth2JwtGrantIssuer(id, options).then((request) => request(this.axios, this.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 `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/). - * @summary Introspect OAuth2 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. + * @summary Introspect OAuth2 Access and Refresh Tokens * @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. * @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. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ public introspectOAuth2Token(token: string, scope?: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).introspectOAuth2Token(token, scope, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * This endpoint returns a 200 status code when the HTTP server is up running. 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. - * @summary Check Alive Status - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public isInstanceAlive(options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).isInstanceAlive(options).then((request) => request(this.axios, this.basePath)); + return OAuth2ApiFp(this.configuration).introspectOAuth2Token(token, scope, options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. 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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. + * This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. * @summary List OAuth 2.0 Clients - * @param {number} [limit] The maximum amount of clients to returned, upper bound is 500 clients. - * @param {number} [offset] The offset from where to start looking. + * @param {number} [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). + * @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). * @param {string} [clientName] The name of the clients to filter by. * @param {string} [owner] The owner of the clients to filter by. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public listOAuth2Clients(limit?: number, offset?: number, clientName?: string, owner?: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).listOAuth2Clients(limit, offset, clientName, owner, options).then((request) => request(this.axios, this.basePath)); + public listOAuth2Clients(pageSize?: number, pageToken?: string, clientName?: string, owner?: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).listOAuth2Clients(pageSize, pageToken, clientName, owner, options).then((request) => request(this.axios, this.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. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: \'; rel=\"{page}\"\', where page is one of the following applicable pages: \'first\', \'next\', \'last\', and \'previous\'. Multiple links can be included in this header, and will be separated by a comma. - * @summary Lists All Consent Sessions of a Subject - * @param {string} 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. + * @summary List OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject The subject to list the consent sessions for. + * @param {number} [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). + * @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). * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public listSubjectConsentSessions(subject: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).listSubjectConsentSessions(subject, options).then((request) => request(this.axios, this.basePath)); + public listOAuth2ConsentSessions(subject: string, pageSize?: number, pageToken?: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).listOAuth2ConsentSessions(subject, pageSize, pageToken, options).then((request) => request(this.axios, this.basePath)); } /** * Use this endpoint to list all trusted JWT Bearer Grant Type Issuers. * @summary List Trusted OAuth2 JWT Bearer Grant Type Issuers + * @param {number} [maxItems] + * @param {number} [defaultItems] * @param {string} [issuer] If optional \"issuer\" is supplied, only jwt-bearer grants with this issuer will be returned. - * @param {number} [limit] The maximum amount of policies returned, upper bound is 500 policies - * @param {number} [offset] The offset from where to start looking. - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public listTrustedJwtGrantIssuers(issuer?: string, limit?: number, offset?: number, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).listTrustedJwtGrantIssuers(issuer, limit, offset, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * Patch an existing OAuth 2.0 Client. 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. - * @summary Patch an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {Array} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public patchOAuth2Client(id: string, body: Array, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).patchOAuth2Client(id, body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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. - * @summary Reject a Consent Request - * @param {string} consentChallenge - * @param {RejectRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public rejectConsentRequest(consentChallenge: string, body?: RejectRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).rejectConsentRequest(consentChallenge, body, options).then((request) => request(this.axios, this.basePath)); + public listTrustedOAuth2JwtGrantIssuers(maxItems?: number, defaultItems?: number, issuer?: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).listTrustedOAuth2JwtGrantIssuers(maxItems, defaultItems, issuer, options).then((request) => request(this.axios, this.basePath)); } /** - * When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to. - * @summary Reject a Login Request - * @param {string} loginChallenge - * @param {RejectRequest} [body] + * 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. + * @summary OAuth 2.0 Authorize Endpoint * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public rejectLoginRequest(loginChallenge: string, body?: RejectRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).rejectLoginRequest(loginChallenge, body, options).then((request) => request(this.axios, this.basePath)); + public oAuth2Authorize(options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).oAuth2Authorize(options).then((request) => request(this.axios, this.basePath)); } /** - * When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next. - * @summary Reject a Logout Request - * @param {string} logoutChallenge - * @param {RejectRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof AdminApi - */ - public rejectLogoutRequest(logoutChallenge: string, body?: RejectRequest, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).rejectLogoutRequest(logoutChallenge, body, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. - * @summary Invalidates All Login Sessions of a Certain User Invalidates a Subject\'s Authentication Session - * @param {string} subject + * 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. + * @summary The OAuth 2.0 Token Endpoint + * @param {string} grantType + * @param {string} [clientId] + * @param {string} [code] + * @param {string} [redirectUri] + * @param {string} [refreshToken] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public revokeAuthenticationSession(subject: string, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).revokeAuthenticationSession(subject, options).then((request) => request(this.axios, this.basePath)); + public oauth2TokenExchange(grantType: string, clientId?: string, code?: string, redirectUri?: string, refreshToken?: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).oauth2TokenExchange(grantType, clientId, code, redirectUri, refreshToken, options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint revokes a subject\'s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens. - * @summary Revokes Consent Sessions of a Subject for a Specific OAuth 2.0 Client - * @param {string} subject The subject (Subject) who\'s consent sessions should be deleted. - * @param {string} [client] If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID - * @param {boolean} [all] If set to `?all=true`, deletes all consent sessions by the Subject that have been granted. + * 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. + * @summary Patch OAuth 2.0 Client + * @param {string} id The id of the OAuth 2.0 Client. + * @param {Array} jsonPatch OAuth 2.0 Client JSON Patch Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public revokeConsentSessions(subject: string, client?: string, all?: boolean, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).revokeConsentSessions(subject, client, all, options).then((request) => request(this.axios, this.basePath)); + public patchOAuth2Client(id: string, jsonPatch: Array, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).patchOAuth2Client(id, jsonPatch, options).then((request) => request(this.axios, this.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). - * @summary Trust an OAuth2 JWT Bearer Grant Type Issuer - * @param {TrustJwtGrantIssuerBody} [body] + * 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. + * @summary Reject OAuth 2.0 Consent Request + * @param {string} consentChallenge OAuth 2.0 Consent Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public trustJwtGrantIssuer(body?: TrustJwtGrantIssuerBody, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).trustJwtGrantIssuer(body, options).then((request) => request(this.axios, this.basePath)); + public rejectOAuth2ConsentRequest(consentChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).rejectOAuth2ConsentRequest(consentChallenge, rejectOAuth2Request, options).then((request) => request(this.axios, this.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. - * @summary Update a JSON Web Key - * @param {string} kid The kid of the desired key - * @param {string} set The set - * @param {JSONWebKey} [body] + * 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. + * @summary Reject OAuth 2.0 Login Request + * @param {string} loginChallenge OAuth 2.0 Login Request Challenge + * @param {RejectOAuth2Request} [rejectOAuth2Request] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public updateJsonWebKey(kid: string, set: string, body?: JSONWebKey, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).updateJsonWebKey(kid, set, body, options).then((request) => request(this.axios, this.basePath)); + public rejectOAuth2LoginRequest(loginChallenge: string, rejectOAuth2Request?: RejectOAuth2Request, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).rejectOAuth2LoginRequest(loginChallenge, rejectOAuth2Request, options).then((request) => request(this.axios, this.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. - * @summary Update a JSON Web Key Set - * @param {string} set The set - * @param {JSONWebKeySet} [body] + * 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. + * @summary Reject OAuth 2.0 Session Logout Request + * @param {string} logoutChallenge * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public updateJsonWebKeySet(set: string, body?: JSONWebKeySet, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).updateJsonWebKeySet(set, body, options).then((request) => request(this.axios, this.basePath)); + public rejectOAuth2LogoutRequest(logoutChallenge: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).rejectOAuth2LogoutRequest(logoutChallenge, options).then((request) => request(this.axios, this.basePath)); } /** - * Update an existing OAuth 2.0 Client. 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. - * @summary Update an OAuth 2.0 Client - * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body + * 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. + * @summary Revoke OAuth 2.0 Consent Sessions of a Subject + * @param {string} subject OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted. + * @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. + * @param {boolean} [all] Revoke All Consent Sessions If set to `true` deletes all consent sessions by the Subject that have been granted. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof AdminApi + * @memberof OAuth2Api */ - public updateOAuth2Client(id: string, body: OAuth2Client, options?: AxiosRequestConfig) { - return AdminApiFp(this.configuration).updateOAuth2Client(id, body, options).then((request) => request(this.axios, this.basePath)); - } -} - - -/** - * MetadataApi - axios parameter creator - * @export - */ -export const MetadataApiAxiosParamCreator = function (configuration?: Configuration) { - return { - /** - * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` - * @summary Get snapshot metrics from the service. If you\'re using k8s, you can then add annotations to your deployment like so: - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - prometheus: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/metrics/prometheus`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, + public revokeOAuth2ConsentSessions(subject: string, client?: string, all?: boolean, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).revokeOAuth2ConsentSessions(subject, client, all, options).then((request) => request(this.axios, this.basePath)); } -}; -/** - * MetadataApi - functional programming interface - * @export - */ -export const MetadataApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = MetadataApiAxiosParamCreator(configuration) - return { - /** - * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` - * @summary Get snapshot metrics from the service. If you\'re using k8s, you can then add annotations to your deployment like so: - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async prometheus(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.prometheus(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, + /** + * This endpoint invalidates a subject\'s authentication session. After revoking the authentication session, the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout. + * @summary Revokes All OAuth 2.0 Login Sessions of a Subject + * @param {string} subject OAuth 2.0 Subject The subject to revoke authentication sessions for. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OAuth2Api + */ + public revokeOAuth2LoginSessions(subject: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).revokeOAuth2LoginSessions(subject, options).then((request) => request(this.axios, this.basePath)); } -}; -/** - * MetadataApi - factory interface - * @export - */ -export const MetadataApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = MetadataApiFp(configuration) - return { - /** - * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` - * @summary Get snapshot metrics from the service. If you\'re using k8s, you can then add annotations to your deployment like so: - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - prometheus(options?: any): AxiosPromise { - return localVarFp.prometheus(options).then((request) => request(axios, 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. + * @summary Revoke OAuth 2.0 Access or Refresh Token + * @param {string} token + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OAuth2Api + */ + public revokeOAuth2Token(token: string, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).revokeOAuth2Token(token, options).then((request) => request(this.axios, this.basePath)); + } -/** - * MetadataApi - interface - * @export - * @interface MetadataApi - */ -export interface MetadataApiInterface { /** - * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` - * @summary Get snapshot metrics from the service. If you\'re using k8s, you can then add annotations to your deployment like so: + * 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. + * @summary Set OAuth 2.0 Client + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MetadataApiInterface + * @memberof OAuth2Api */ - prometheus(options?: AxiosRequestConfig): AxiosPromise; + public setOAuth2Client(id: string, oAuth2Client: OAuth2Client, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).setOAuth2Client(id, oAuth2Client, options).then((request) => request(this.axios, this.basePath)); + } -} + /** + * Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields. + * @summary Set OAuth2 Client Token Lifespans + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2ClientTokenLifespans} [oAuth2ClientTokenLifespans] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OAuth2Api + */ + public setOAuth2ClientLifespans(id: string, oAuth2ClientTokenLifespans?: OAuth2ClientTokenLifespans, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).setOAuth2ClientLifespans(id, oAuth2ClientTokenLifespans, options).then((request) => request(this.axios, this.basePath)); + } -/** - * MetadataApi - object-oriented interface - * @export - * @class MetadataApi - * @extends {BaseAPI} - */ -export class MetadataApi extends BaseAPI implements MetadataApiInterface { /** - * ``` metadata: annotations: prometheus.io/port: \"4434\" prometheus.io/path: \"/metrics/prometheus\" ``` - * @summary Get snapshot metrics from the service. If you\'re using k8s, you can then add annotations to your deployment like so: + * 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). + * @summary Trust OAuth2 JWT Bearer Grant Type Issuer + * @param {TrustOAuth2JwtGrantIssuer} [trustOAuth2JwtGrantIssuer] * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof MetadataApi + * @memberof OAuth2Api */ - public prometheus(options?: AxiosRequestConfig) { - return MetadataApiFp(this.configuration).prometheus(options).then((request) => request(this.axios, this.basePath)); + public trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer?: TrustOAuth2JwtGrantIssuer, options?: AxiosRequestConfig) { + return OAuth2ApiFp(this.configuration).trustOAuth2JwtGrantIssuer(trustOAuth2JwtGrantIssuer, options).then((request) => request(this.axios, this.basePath)); } } /** - * PublicApi - axios parameter creator + * OidcApi - axios parameter creator * @export */ -export const PublicApiAxiosParamCreator = function (configuration?: Configuration) { +export const OidcApiAxiosParamCreator = function (configuration?: Configuration) { return { - /** - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @summary OpenID Connect Front-Backchannel Enabled Logout - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - disconnectUser: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/oauth2/sessions/logout`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - * @summary OpenID Connect Discovery - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - discoverOpenIDConfiguration: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/.well-known/openid-configuration`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, /** * 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. - * @summary Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {OAuth2Client} body + * @summary Register OAuth2 Client using OpenID Dynamic Client Registration + * @param {OAuth2Client} oAuth2Client Dynamic Client Registration Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - dynamicClientRegistrationCreateOAuth2Client: async (body: OAuth2Client, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'body' is not null or undefined - assertParamExists('dynamicClientRegistrationCreateOAuth2Client', 'body', body) - const localVarPath = `/connect/register`; + createOidcDynamicClient: async (oAuth2Client: OAuth2Client, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'oAuth2Client' is not null or undefined + assertParamExists('createOidcDynamicClient', 'oAuth2Client', oAuth2Client) + const localVarPath = `/oauth2/register`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5116,7 +5243,7 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(oAuth2Client, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -5125,15 +5252,15 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio }, /** * 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. - * @summary Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * @summary Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - dynamicClientRegistrationDeleteOAuth2Client: async (id: string, options: AxiosRequestConfig = {}): Promise => { + deleteOidcDynamicClient: async (id: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined - assertParamExists('dynamicClientRegistrationDeleteOAuth2Client', 'id', id) - const localVarPath = `/connect/register/{id}` + assertParamExists('deleteOidcDynamicClient', 'id', id) + const localVarPath = `/oauth2/register/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -5146,6 +5273,10 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -5158,17 +5289,13 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * 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. 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. - * @summary Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {string} id The id of the OAuth 2.0 Client. + * 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/ + * @summary OpenID Connect Discovery * @param {*} [options] Override http request option. * @throws {RequiredError} */ - dynamicClientRegistrationGetOAuth2Client: async (id: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('dynamicClientRegistrationGetOAuth2Client', 'id', id) - const localVarPath = `/connect/register/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); + discoverOidcConfiguration: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/.well-known/openid-configuration`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5192,19 +5319,16 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - * @summary Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * 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. + * @summary Get OAuth2 Client using OpenID Dynamic Client Registration * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - dynamicClientRegistrationUpdateOAuth2Client: async (id: string, body: OAuth2Client, options: AxiosRequestConfig = {}): Promise => { + getOidcDynamicClient: async (id: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined - assertParamExists('dynamicClientRegistrationUpdateOAuth2Client', 'id', id) - // verify required parameter 'body' is not null or undefined - assertParamExists('dynamicClientRegistrationUpdateOAuth2Client', 'body', body) - const localVarPath = `/connect/register/{id}` + assertParamExists('getOidcDynamicClient', 'id', id) + const localVarPath = `/oauth2/register/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -5213,141 +5337,13 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - - - localVarHeaderParameter['Content-Type'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - * @summary Check Readiness Status - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - isInstanceReady: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/health/ready`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @summary The OAuth 2.0 Token Endpoint - * @param {string} grantType - * @param {string} [code] - * @param {string} [refreshToken] - * @param {string} [redirectUri] - * @param {string} [clientId] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - oauth2Token: async (grantType: string, code?: string, refreshToken?: string, redirectUri?: string, clientId?: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'grantType' is not null or undefined - assertParamExists('oauth2Token', 'grantType', grantType) - const localVarPath = `/oauth2/token`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - const localVarFormParams = new URLSearchParams(); - - // authentication basic required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) - - // authentication oauth2 required - // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration) - - - if (grantType !== undefined) { - localVarFormParams.set('grant_type', grantType as any); - } - - if (code !== undefined) { - localVarFormParams.set('code', code as any); - } - - if (refreshToken !== undefined) { - localVarFormParams.set('refresh_token', refreshToken as any); - } - - if (redirectUri !== undefined) { - localVarFormParams.set('redirect_uri', redirectUri as any); - } - - if (clientId !== undefined) { - localVarFormParams.set('client_id', clientId as any); - } - - - localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = localVarFormParams.toString(); - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @summary The OAuth 2.0 Authorize Endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - oauthAuth: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/oauth2/auth`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) @@ -5361,16 +5357,13 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * 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. - * @summary Revoke OAuth2 Tokens - * @param {string} token - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - revokeOAuth2Token: async (token: string, options: AxiosRequestConfig = {}): Promise => { - // verify required parameter 'token' is not null or undefined - assertParamExists('revokeOAuth2Token', 'token', token) - const localVarPath = `/oauth2/revoke`; + * 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. + * @summary OpenID Connect Userinfo + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOidcUserInfo: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/userinfo`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5378,31 +5371,19 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - const localVarFormParams = new URLSearchParams(); - - // authentication basic required - // http basic authentication required - setBasicAuthToObject(localVarRequestOptions, configuration) // authentication oauth2 required // oauth required await setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration) - if (token !== undefined) { - localVarFormParams.set('token', token as any); - } - - - localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = localVarFormParams.toString(); return { url: toPathString(localVarUrlObj), @@ -5410,13 +5391,13 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - * @summary OpenID Connect Userinfo + * 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. + * @summary OpenID Connect Front- and Back-channel Enabled Logout * @param {*} [options] Override http request option. * @throws {RequiredError} */ - userinfo: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/userinfo`; + revokeOidcSession: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/oauth2/sessions/logout`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5428,10 +5409,6 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - // authentication oauth2 required - // oauth required - await setOAuthToObject(localVarHeaderParameter, "oauth2", [], configuration) - setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -5444,13 +5421,20 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * This endpoint returns JSON Web Keys to be used as public keys for 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. - * @summary JSON Web Keys Discovery + * 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. + * @summary Set OAuth2 Client using OpenID Dynamic Client Registration + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - wellKnown: async (options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/.well-known/jwks.json`; + setOidcDynamicClient: async (id: string, oAuth2Client: OAuth2Client, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('setOidcDynamicClient', 'id', id) + // verify required parameter 'oAuth2Client' is not null or undefined + assertParamExists('setOidcDynamicClient', 'oAuth2Client', oAuth2Client) + const localVarPath = `/oauth2/register/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5458,15 +5442,22 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(oAuth2Client, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -5477,550 +5468,446 @@ export const PublicApiAxiosParamCreator = function (configuration?: Configuratio }; /** - * PublicApi - functional programming interface + * OidcApi - functional programming interface * @export */ -export const PublicApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = PublicApiAxiosParamCreator(configuration) +export const OidcApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = OidcApiAxiosParamCreator(configuration) return { - /** - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @summary OpenID Connect Front-Backchannel Enabled Logout - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async disconnectUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.disconnectUser(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - * @summary OpenID Connect Discovery - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async discoverOpenIDConfiguration(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.discoverOpenIDConfiguration(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, /** * 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. - * @summary Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {OAuth2Client} body + * @summary Register OAuth2 Client using OpenID Dynamic Client Registration + * @param {OAuth2Client} oAuth2Client Dynamic Client Registration Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async dynamicClientRegistrationCreateOAuth2Client(body: OAuth2Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.dynamicClientRegistrationCreateOAuth2Client(body, options); + async createOidcDynamicClient(oAuth2Client: OAuth2Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOidcDynamicClient(oAuth2Client, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * 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. - * @summary Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * @summary Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async dynamicClientRegistrationDeleteOAuth2Client(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.dynamicClientRegistrationDeleteOAuth2Client(id, options); + async deleteOidcDynamicClient(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteOidcDynamicClient(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * 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. 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. - * @summary Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {string} id The id of the OAuth 2.0 Client. + * 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/ + * @summary OpenID Connect Discovery * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async dynamicClientRegistrationGetOAuth2Client(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.dynamicClientRegistrationGetOAuth2Client(id, options); + async discoverOidcConfiguration(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.discoverOidcConfiguration(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - * @summary Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * 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. + * @summary Get OAuth2 Client using OpenID Dynamic Client Registration * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async dynamicClientRegistrationUpdateOAuth2Client(id: string, body: OAuth2Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.dynamicClientRegistrationUpdateOAuth2Client(id, body, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - * @summary Check Readiness Status - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async isInstanceReady(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.isInstanceReady(options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @summary The OAuth 2.0 Token Endpoint - * @param {string} grantType - * @param {string} [code] - * @param {string} [refreshToken] - * @param {string} [redirectUri] - * @param {string} [clientId] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async oauth2Token(grantType: string, code?: string, refreshToken?: string, redirectUri?: string, clientId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.oauth2Token(grantType, code, refreshToken, redirectUri, clientId, options); - return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); - }, - /** - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @summary The OAuth 2.0 Authorize Endpoint * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async oauthAuth(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.oauthAuth(options); + async getOidcDynamicClient(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOidcDynamicClient(id, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * 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. - * @summary Revoke OAuth2 Tokens - * @param {string} token + * 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. + * @summary OpenID Connect Userinfo * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async revokeOAuth2Token(token: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOAuth2Token(token, options); + async getOidcUserInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOidcUserInfo(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - * @summary OpenID Connect Userinfo + * 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. + * @summary OpenID Connect Front- and Back-channel Enabled Logout * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async userinfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.userinfo(options); + async revokeOidcSession(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.revokeOidcSession(options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * This endpoint returns JSON Web Keys to be used as public keys for 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. - * @summary JSON Web Keys Discovery + * 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. + * @summary Set OAuth2 Client using OpenID Dynamic Client Registration + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async wellKnown(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.wellKnown(options); + async setOidcDynamicClient(id: string, oAuth2Client: OAuth2Client, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.setOidcDynamicClient(id, oAuth2Client, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** - * PublicApi - factory interface + * OidcApi - factory interface * @export */ -export const PublicApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = PublicApiFp(configuration) +export const OidcApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OidcApiFp(configuration) return { - /** - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @summary OpenID Connect Front-Backchannel Enabled Logout - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - disconnectUser(options?: any): AxiosPromise { - return localVarFp.disconnectUser(options).then((request) => request(axios, basePath)); - }, - /** - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - * @summary OpenID Connect Discovery - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - discoverOpenIDConfiguration(options?: any): AxiosPromise { - return localVarFp.discoverOpenIDConfiguration(options).then((request) => request(axios, basePath)); - }, /** * 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. - * @summary Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {OAuth2Client} body + * @summary Register OAuth2 Client using OpenID Dynamic Client Registration + * @param {OAuth2Client} oAuth2Client Dynamic Client Registration Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - dynamicClientRegistrationCreateOAuth2Client(body: OAuth2Client, options?: any): AxiosPromise { - return localVarFp.dynamicClientRegistrationCreateOAuth2Client(body, options).then((request) => request(axios, basePath)); + createOidcDynamicClient(oAuth2Client: OAuth2Client, options?: any): AxiosPromise { + return localVarFp.createOidcDynamicClient(oAuth2Client, options).then((request) => request(axios, 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. - * @summary Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * @summary Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - dynamicClientRegistrationDeleteOAuth2Client(id: string, options?: any): AxiosPromise { - return localVarFp.dynamicClientRegistrationDeleteOAuth2Client(id, options).then((request) => request(axios, basePath)); + deleteOidcDynamicClient(id: string, options?: any): AxiosPromise { + return localVarFp.deleteOidcDynamicClient(id, options).then((request) => request(axios, 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. 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. - * @summary Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {string} id The id of the OAuth 2.0 Client. + * 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/ + * @summary OpenID Connect Discovery * @param {*} [options] Override http request option. * @throws {RequiredError} */ - dynamicClientRegistrationGetOAuth2Client(id: string, options?: any): AxiosPromise { - return localVarFp.dynamicClientRegistrationGetOAuth2Client(id, options).then((request) => request(axios, basePath)); + discoverOidcConfiguration(options?: any): AxiosPromise { + return localVarFp.discoverOidcConfiguration(options).then((request) => request(axios, basePath)); }, /** - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - * @summary Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * 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. + * @summary Get OAuth2 Client using OpenID Dynamic Client Registration * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - dynamicClientRegistrationUpdateOAuth2Client(id: string, body: OAuth2Client, options?: any): AxiosPromise { - return localVarFp.dynamicClientRegistrationUpdateOAuth2Client(id, body, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - * @summary Check Readiness Status * @param {*} [options] Override http request option. * @throws {RequiredError} */ - isInstanceReady(options?: any): AxiosPromise { - return localVarFp.isInstanceReady(options).then((request) => request(axios, basePath)); + getOidcDynamicClient(id: string, options?: any): AxiosPromise { + return localVarFp.getOidcDynamicClient(id, options).then((request) => request(axios, basePath)); }, /** - * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @summary The OAuth 2.0 Token Endpoint - * @param {string} grantType - * @param {string} [code] - * @param {string} [refreshToken] - * @param {string} [redirectUri] - * @param {string} [clientId] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - oauth2Token(grantType: string, code?: string, refreshToken?: string, redirectUri?: string, clientId?: string, options?: any): AxiosPromise { - return localVarFp.oauth2Token(grantType, code, refreshToken, redirectUri, clientId, options).then((request) => request(axios, basePath)); - }, - /** - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @summary The OAuth 2.0 Authorize Endpoint - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - oauthAuth(options?: any): AxiosPromise { - return localVarFp.oauthAuth(options).then((request) => request(axios, 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. - * @summary Revoke OAuth2 Tokens - * @param {string} token + * 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. + * @summary OpenID Connect Userinfo * @param {*} [options] Override http request option. * @throws {RequiredError} */ - revokeOAuth2Token(token: string, options?: any): AxiosPromise { - return localVarFp.revokeOAuth2Token(token, options).then((request) => request(axios, basePath)); + getOidcUserInfo(options?: any): AxiosPromise { + return localVarFp.getOidcUserInfo(options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - * @summary OpenID Connect Userinfo + * 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. + * @summary OpenID Connect Front- and Back-channel Enabled Logout * @param {*} [options] Override http request option. * @throws {RequiredError} */ - userinfo(options?: any): AxiosPromise { - return localVarFp.userinfo(options).then((request) => request(axios, basePath)); + revokeOidcSession(options?: any): AxiosPromise { + return localVarFp.revokeOidcSession(options).then((request) => request(axios, basePath)); }, /** - * This endpoint returns JSON Web Keys to be used as public keys for 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. - * @summary JSON Web Keys Discovery + * 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. + * @summary Set OAuth2 Client using OpenID Dynamic Client Registration + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} */ - wellKnown(options?: any): AxiosPromise { - return localVarFp.wellKnown(options).then((request) => request(axios, basePath)); + setOidcDynamicClient(id: string, oAuth2Client: OAuth2Client, options?: any): AxiosPromise { + return localVarFp.setOidcDynamicClient(id, oAuth2Client, options).then((request) => request(axios, basePath)); }, }; }; /** - * PublicApi - interface + * OidcApi - interface * @export - * @interface PublicApi + * @interface OidcApi */ -export interface PublicApiInterface { - /** - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @summary OpenID Connect Front-Backchannel Enabled Logout - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PublicApiInterface - */ - disconnectUser(options?: AxiosRequestConfig): AxiosPromise; - - /** - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - * @summary OpenID Connect Discovery - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PublicApiInterface - */ - discoverOpenIDConfiguration(options?: AxiosRequestConfig): AxiosPromise; - +export interface OidcApiInterface { /** * 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. - * @summary Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {OAuth2Client} body + * @summary Register OAuth2 Client using OpenID Dynamic Client Registration + * @param {OAuth2Client} oAuth2Client Dynamic Client Registration Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApiInterface + * @memberof OidcApiInterface */ - dynamicClientRegistrationCreateOAuth2Client(body: OAuth2Client, options?: AxiosRequestConfig): AxiosPromise; + createOidcDynamicClient(oAuth2Client: OAuth2Client, options?: AxiosRequestConfig): AxiosPromise; /** * 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. - * @summary Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * @summary Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApiInterface + * @memberof OidcApiInterface */ - dynamicClientRegistrationDeleteOAuth2Client(id: string, options?: AxiosRequestConfig): AxiosPromise; + deleteOidcDynamicClient(id: string, options?: AxiosRequestConfig): AxiosPromise; /** - * 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. 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. - * @summary Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {string} id The id of the OAuth 2.0 Client. + * 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/ + * @summary OpenID Connect Discovery * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApiInterface + * @memberof OidcApiInterface */ - dynamicClientRegistrationGetOAuth2Client(id: string, options?: AxiosRequestConfig): AxiosPromise; + discoverOidcConfiguration(options?: AxiosRequestConfig): AxiosPromise; /** - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - * @summary Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * 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. + * @summary Get OAuth2 Client using OpenID Dynamic Client Registration * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PublicApiInterface - */ - dynamicClientRegistrationUpdateOAuth2Client(id: string, body: OAuth2Client, options?: AxiosRequestConfig): AxiosPromise; - - /** - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - * @summary Check Readiness Status - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PublicApiInterface - */ - isInstanceReady(options?: AxiosRequestConfig): AxiosPromise; - - /** - * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @summary The OAuth 2.0 Token Endpoint - * @param {string} grantType - * @param {string} [code] - * @param {string} [refreshToken] - * @param {string} [redirectUri] - * @param {string} [clientId] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PublicApiInterface - */ - oauth2Token(grantType: string, code?: string, refreshToken?: string, redirectUri?: string, clientId?: string, options?: AxiosRequestConfig): AxiosPromise; - - /** - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @summary The OAuth 2.0 Authorize Endpoint * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApiInterface + * @memberof OidcApiInterface */ - oauthAuth(options?: AxiosRequestConfig): AxiosPromise; + getOidcDynamicClient(id: string, options?: AxiosRequestConfig): AxiosPromise; /** - * 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. - * @summary Revoke OAuth2 Tokens - * @param {string} token + * 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. + * @summary OpenID Connect Userinfo * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApiInterface + * @memberof OidcApiInterface */ - revokeOAuth2Token(token: string, options?: AxiosRequestConfig): AxiosPromise; + getOidcUserInfo(options?: AxiosRequestConfig): AxiosPromise; /** - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - * @summary OpenID Connect Userinfo + * 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. + * @summary OpenID Connect Front- and Back-channel Enabled Logout * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApiInterface + * @memberof OidcApiInterface */ - userinfo(options?: AxiosRequestConfig): AxiosPromise; + revokeOidcSession(options?: AxiosRequestConfig): AxiosPromise; /** - * This endpoint returns JSON Web Keys to be used as public keys for 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. - * @summary JSON Web Keys Discovery + * 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. + * @summary Set OAuth2 Client using OpenID Dynamic Client Registration + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApiInterface + * @memberof OidcApiInterface */ - wellKnown(options?: AxiosRequestConfig): AxiosPromise; + setOidcDynamicClient(id: string, oAuth2Client: OAuth2Client, options?: AxiosRequestConfig): AxiosPromise; } /** - * PublicApi - object-oriented interface + * OidcApi - object-oriented interface * @export - * @class PublicApi + * @class OidcApi * @extends {BaseAPI} */ -export class PublicApi extends BaseAPI implements PublicApiInterface { - /** - * This endpoint initiates and completes user logout at Ory Hydra 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 - * @summary OpenID Connect Front-Backchannel Enabled Logout - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PublicApi - */ - public disconnectUser(options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).disconnectUser(options).then((request) => request(this.axios, this.basePath)); - } - - /** - * The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . 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/ - * @summary OpenID Connect Discovery - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PublicApi - */ - public discoverOpenIDConfiguration(options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).discoverOpenIDConfiguration(options).then((request) => request(this.axios, this.basePath)); - } - +export class OidcApi extends BaseAPI implements OidcApiInterface { /** * 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. - * @summary Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {OAuth2Client} body + * @summary Register OAuth2 Client using OpenID Dynamic Client Registration + * @param {OAuth2Client} oAuth2Client Dynamic Client Registration Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApi + * @memberof OidcApi */ - public dynamicClientRegistrationCreateOAuth2Client(body: OAuth2Client, options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).dynamicClientRegistrationCreateOAuth2Client(body, options).then((request) => request(this.axios, this.basePath)); + public createOidcDynamicClient(oAuth2Client: OAuth2Client, options?: AxiosRequestConfig) { + return OidcApiFp(this.configuration).createOidcDynamicClient(oAuth2Client, options).then((request) => request(this.axios, this.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. - * @summary Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * @summary Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol * @param {string} id The id of the OAuth 2.0 Client. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApi + * @memberof OidcApi */ - public dynamicClientRegistrationDeleteOAuth2Client(id: string, options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).dynamicClientRegistrationDeleteOAuth2Client(id, options).then((request) => request(this.axios, this.basePath)); + public deleteOidcDynamicClient(id: string, options?: AxiosRequestConfig) { + return OidcApiFp(this.configuration).deleteOidcDynamicClient(id, options).then((request) => request(this.axios, this.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. 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. - * @summary Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol - * @param {string} id The id of the OAuth 2.0 Client. + * 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/ + * @summary OpenID Connect Discovery * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApi + * @memberof OidcApi */ - public dynamicClientRegistrationGetOAuth2Client(id: string, options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).dynamicClientRegistrationGetOAuth2Client(id, options).then((request) => request(this.axios, this.basePath)); + public discoverOidcConfiguration(options?: AxiosRequestConfig) { + return OidcApiFp(this.configuration).discoverOidcConfiguration(options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) 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. 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. 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. - * @summary Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol + * 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. + * @summary Get OAuth2 Client using OpenID Dynamic Client Registration * @param {string} id The id of the OAuth 2.0 Client. - * @param {OAuth2Client} body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApi + * @memberof OidcApi */ - public dynamicClientRegistrationUpdateOAuth2Client(id: string, body: OAuth2Client, options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).dynamicClientRegistrationUpdateOAuth2Client(id, body, options).then((request) => request(this.axios, this.basePath)); + public getOidcDynamicClient(id: string, options?: AxiosRequestConfig) { + return OidcApiFp(this.configuration).getOidcDynamicClient(id, options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint returns a 200 status code when the HTTP server 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 this service, the health status will never refer to the cluster state, only to a single instance. - * @summary Check Readiness Status + * 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. + * @summary OpenID Connect Userinfo * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApi + * @memberof OidcApi */ - public isInstanceReady(options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).isInstanceReady(options).then((request) => request(this.axios, this.basePath)); + public getOidcUserInfo(options?: AxiosRequestConfig) { + return OidcApiFp(this.configuration).getOidcUserInfo(options).then((request) => request(this.axios, this.basePath)); } /** - * The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above! - * @summary The OAuth 2.0 Token Endpoint - * @param {string} grantType - * @param {string} [code] - * @param {string} [refreshToken] - * @param {string} [redirectUri] - * @param {string} [clientId] + * 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. + * @summary OpenID Connect Front- and Back-channel Enabled Logout * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApi + * @memberof OidcApi */ - public oauth2Token(grantType: string, code?: string, refreshToken?: string, redirectUri?: string, clientId?: string, options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).oauth2Token(grantType, code, refreshToken, redirectUri, clientId, options).then((request) => request(this.axios, this.basePath)); + public revokeOidcSession(options?: AxiosRequestConfig) { + return OidcApiFp(this.configuration).revokeOidcSession(options).then((request) => request(this.axios, this.basePath)); } /** - * This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749 - * @summary The OAuth 2.0 Authorize Endpoint + * 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. + * @summary Set OAuth2 Client using OpenID Dynamic Client Registration + * @param {string} id OAuth 2.0 Client ID + * @param {OAuth2Client} oAuth2Client OAuth 2.0 Client Request Body * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApi + * @memberof OidcApi */ - public oauthAuth(options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).oauthAuth(options).then((request) => request(this.axios, this.basePath)); + public setOidcDynamicClient(id: string, oAuth2Client: OAuth2Client, options?: AxiosRequestConfig) { + return OidcApiFp(this.configuration).setOidcDynamicClient(id, oAuth2Client, options).then((request) => request(this.axios, this.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. - * @summary Revoke OAuth2 Tokens - * @param {string} token - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof PublicApi - */ - public revokeOAuth2Token(token: string, options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).revokeOAuth2Token(token, options).then((request) => request(this.axios, this.basePath)); + +/** + * WellknownApi - axios parameter creator + * @export + */ +export const WellknownApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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. + * @summary Discover Well-Known JSON Web Keys + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + discoverJsonWebKeys: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/.well-known/jwks.json`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WellknownApi - functional programming interface + * @export + */ +export const WellknownApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WellknownApiAxiosParamCreator(configuration) + return { + /** + * 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. + * @summary Discover Well-Known JSON Web Keys + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async discoverJsonWebKeys(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.discoverJsonWebKeys(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, } +}; + +/** + * WellknownApi - factory interface + * @export + */ +export const WellknownApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WellknownApiFp(configuration) + return { + /** + * 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. + * @summary Discover Well-Known JSON Web Keys + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + discoverJsonWebKeys(options?: any): AxiosPromise { + return localVarFp.discoverJsonWebKeys(options).then((request) => request(axios, basePath)); + }, + }; +}; +/** + * WellknownApi - interface + * @export + * @interface WellknownApi + */ +export interface WellknownApiInterface { /** - * This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). 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. - * @summary OpenID Connect Userinfo + * 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. + * @summary Discover Well-Known JSON Web Keys * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApi + * @memberof WellknownApiInterface */ - public userinfo(options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).userinfo(options).then((request) => request(this.axios, this.basePath)); - } + discoverJsonWebKeys(options?: AxiosRequestConfig): AxiosPromise; + +} +/** + * WellknownApi - object-oriented interface + * @export + * @class WellknownApi + * @extends {BaseAPI} + */ +export class WellknownApi extends BaseAPI implements WellknownApiInterface { /** - * This endpoint returns JSON Web Keys to be used as public keys for 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. - * @summary JSON Web Keys Discovery + * 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. + * @summary Discover Well-Known JSON Web Keys * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof PublicApi + * @memberof WellknownApi */ - public wellKnown(options?: AxiosRequestConfig) { - return PublicApiFp(this.configuration).wellKnown(options).then((request) => request(this.axios, this.basePath)); + public discoverJsonWebKeys(options?: AxiosRequestConfig) { + return WellknownApiFp(this.configuration).discoverJsonWebKeys(options).then((request) => request(this.axios, this.basePath)); } } diff --git a/clients/hydra/typescript/base.ts b/clients/hydra/typescript/base.ts index ede62a15961..c659e10f746 100644 --- a/clients/hydra/typescript/base.ts +++ b/clients/hydra/typescript/base.ts @@ -1,11 +1,11 @@ /* tslint:disable */ /* eslint-disable */ /** - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/clients/hydra/typescript/common.ts b/clients/hydra/typescript/common.ts index fb78fd09dec..362cd4a3ba3 100644 --- a/clients/hydra/typescript/common.ts +++ b/clients/hydra/typescript/common.ts @@ -1,11 +1,11 @@ /* tslint:disable */ /* eslint-disable */ /** - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/clients/hydra/typescript/configuration.ts b/clients/hydra/typescript/configuration.ts index 5a91a05a22c..22a12d69a66 100644 --- a/clients/hydra/typescript/configuration.ts +++ b/clients/hydra/typescript/configuration.ts @@ -1,11 +1,11 @@ /* tslint:disable */ /* eslint-disable */ /** - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/clients/hydra/typescript/index.ts b/clients/hydra/typescript/index.ts index d3bac6a1434..5cdadb97bff 100644 --- a/clients/hydra/typescript/index.ts +++ b/clients/hydra/typescript/index.ts @@ -1,11 +1,11 @@ /* tslint:disable */ /* eslint-disable */ /** - * ORY Hydra - * Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. + * Ory Hydra API + * Documentation for all of Ory Hydra\'s APIs. * - * The version of the OpenAPI document: v1.11.0 - * + * The version of the OpenAPI document: v2.0.1 + * Contact: hi@ory.sh * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/clients/hydra/typescript/package-lock.json b/clients/hydra/typescript/package-lock.json new file mode 100644 index 00000000000..eb382372855 --- /dev/null +++ b/clients/hydra/typescript/package-lock.json @@ -0,0 +1,93 @@ +{ + "name": "@ory/hydra-client", + "version": "v2.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "@ory/hydra-client", + "version": "v2.0.1", + "license": "Apache-2.0", + "dependencies": { + "axios": "^0.21.4" + }, + "devDependencies": { + "@types/node": "^12.11.5", + "typescript": "^3.6.4" + } + }, + "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 + }, + "node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + } + }, + "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 + }, + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "requires": { + "follow-redirects": "^1.14.0" + } + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, + "typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true + } + } +} diff --git a/clients/hydra/typescript/package.json b/clients/hydra/typescript/package.json index cf7d762c552..8e1b26a540e 100644 --- a/clients/hydra/typescript/package.json +++ b/clients/hydra/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@ory/hydra-client", - "version": "v1.11.0", + "version": "v2.0.1", "description": "OpenAPI client for @ory/hydra-client", "author": "ORY GmbH", "keywords": [ diff --git a/spec/hydra/v2.0.1.json b/spec/hydra/v2.0.1.json index dfc87c82345..46c74e2fca8 100644 --- a/spec/hydra/v2.0.1.json +++ b/spec/hydra/v2.0.1.json @@ -1,3646 +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": { - "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" - }, - "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" - }, - "acceptOAuth2ConsentRequest": { - "properties": { - "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" - }, - "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" - }, - "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" - }, - "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": { - "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 autogenerated and immutable.", - "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" - }, - "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": { - "description": "OAuth 2.0 Token Endpoint Authentication Method\n\nRequested Client Authentication method for the Token Endpoint. The options are:\n\n`client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body.\n`client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header.\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 \u0026 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\u003e 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" - }, - "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", - "requested_scope", - "requested_access_token_audience", - "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.", - "format": "int64", - "type": "integer" - }, - "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", - "format": "int64", - "type": "integer" - }, - "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" - }, - "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`\u003chttps://{project-slug}.projects.oryapis.com/admin/clients?limit={limit}\u0026offset={offset}\u003e; 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`\u003chttps://{project-slug}.projects.oryapis.com/admin/clients?limit={limit}\u0026offset={offset}\u003e; 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\u003c/clients?limit=5\u0026offset=0\u003e; rel=\"first\",\u003c/clients?limit=5\u0026offset=15\u003e; rel=\"next\",\u003c/clients?limit=5\u0026offset=5\u003e; rel=\"prev\",\u003c/clients?limit=5\u0026offset=20\u003e; 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" - }, - "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": "" - }, - "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" - } - } - ], - "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 a subject's authentication session. After revoking the authentication session, the subject\nhas to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and\ndoes not work with OpenID Connect Front- or Back-channel logout.", - "operationId": "revokeOAuth2LoginSessions", - "parameters": [ - { - "description": "OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.", - "in": "query", - "name": "subject", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/emptyResponse" - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorOAuth2" - } - } - }, - "description": "errorOAuth2" - } - }, - "summary": "Revokes All OAuth 2.0 Login Sessions of a Subject", - "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" - ] - } - }, - "/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": { - "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 \u0026 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": "OAuth 2.0 Consent", - "name": "consent" - } - ], - "x-forwarded-proto": "string", - "x-request-id": "string" -} \ No newline at end of file +{"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":{"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"},"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"},"acceptOAuth2ConsentRequest":{"properties":{"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"},"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"},"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"},"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":{"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 autogenerated and immutable.","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"},"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":{"description":"OAuth 2.0 Token Endpoint Authentication Method\n\nRequested Client Authentication method for the Token Endpoint. The options are:\n\n`client_secret_post`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body.\n`client_secret_basic`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header.\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"},"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","requested_scope","requested_access_token_audience","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.","format":"int64","type":"integer"},"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","format":"int64","type":"integer"},"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"},"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"},"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.0.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"}}],"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 a subject's authentication session. After revoking the authentication session, the subject\nhas to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens and\ndoes not work with OpenID Connect Front- or Back-channel logout.","operationId":"revokeOAuth2LoginSessions","parameters":[{"description":"OAuth 2.0 Subject\n\nThe subject to revoke authentication sessions for.","in":"query","name":"subject","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorOAuth2"}}},"description":"errorOAuth2"}},"summary":"Revokes All OAuth 2.0 Login Sessions of a Subject","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"]}},"/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":{"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":"OAuth 2.0 Consent","name":"consent"}],"x-forwarded-proto":"string","x-request-id":"string"}